Skip to content

Commit

Permalink
Merge pull request #26 from collective/overlay_url_fresh
Browse files Browse the repository at this point in the history
Make {{url}} available in overlay templates so you can create links
  • Loading branch information
hvelarde committed Jun 21, 2016
2 parents e783328 + f35a643 commit b73fcac
Show file tree
Hide file tree
Showing 8 changed files with 141 additions and 45 deletions.
3 changes: 1 addition & 2 deletions CHANGES.rst
Expand Up @@ -6,8 +6,7 @@ There's a frood who really knows where his towel is.
1.0b2 (unreleased)
------------------

- Nothing changed yet.

- Make {{url}} available in overlay templates so you can put a link to a carousel item. [fredvd]

1.0b1 (2016-06-21)
------------------
Expand Down
5 changes: 1 addition & 4 deletions CONTRIBUTORS.rst
Expand Up @@ -6,10 +6,7 @@ Share and Enjoy
- André Nogueira
- Daniel Jowett
- Héctor Velarde

Translations

- Fred van Dijk (Dutch)
- Fred van Dijk

You can find an updated list of package contributors on `GitHub`_.

Expand Down
45 changes: 30 additions & 15 deletions src/covertile/cycle2/locales/covertile.cycle2.pot
Expand Up @@ -4,7 +4,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2015-09-03 08:26+0000\n"
"POT-Creation-Date: 2016-06-21 16:05+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n"
"Last-Translator: FULL NAME <daniel@jowettenterprises.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand All @@ -17,51 +17,59 @@ msgstr ""
"Preferred-Encodings: utf-8 latin1\n"
"Domain: covertile.cycle2\n"

#: ../tiles/carousel.py:109
msgid "A Mustache-style template string, in which you can use {{title}}, {{desc}} or {{date}}"
#: ../tiles/carousel.py:107
msgid "A Mustache-style template string, in which you can use {{title}}, {{desc}}, {{url}} or {{date}}"
msgstr ""

#: Tile description in tiles/tiles.zcml
#: ../tiles/tiles.zcml:21
msgid "A tile showing Cycle2 based carousel of images."
msgstr ""

#: ../tiles/carousel.py:90
#: ../tiles/carousel.py:88
msgid "Auto play"
msgstr ""

#: Tile title in tiles/tiles.zcml
#: ../tiles/tiles.zcml:21
msgid "Cycle2 Carousel Tile"
msgstr ""

#: ../tiles/carousel.py:21
msgid "Dots"
msgstr ""

#: ../tiles/carousel.py:44
#: ../tiles/carousel.py:42
msgid "Elements"
msgstr ""

#: ../tiles/carousel.py:59
#: ../tiles/carousel.py:57
msgid "Image"
msgstr ""

#: ../profiles.zcml:15
msgid "Install the covertile.cycle2 product in Plone"
msgstr ""

#: ../tiles/carousel.py:22
msgid "Numbers"
msgstr ""

#: ../tiles/carousel.py:108
#: ../tiles/carousel.py:106
msgid "Overlay Template"
msgstr ""

#: ../tiles/carousel.py:98
#: ../tiles/carousel.py:96
msgid "Pager"
msgstr ""

#: ../tiles/carousel.py:73
#: ../profiles.zcml:24
msgid "Remove covertile.cycle2 from Plone"
msgstr ""

#: ../tiles/carousel.py:71
msgid "Show more... link"
msgstr ""

#: ../tiles/carousel.py:81
#: ../tiles/carousel.py:79
msgid "Show more... link text"
msgstr ""

Expand All @@ -73,12 +81,19 @@ msgstr ""
msgid "This carousel is empty; open the content chooser and drag-and-drop some items here."
msgstr ""

#: ../tiles/carousel.py:66
#: ../tiles/carousel.py:64
msgid "Tile Title"
msgstr ""

#: ../profiles.zcml:15
msgid "covertile.cycle2: A Cycle2 based carousel tile for collective.cover"
msgstr ""

#: ../profiles.zcml:24
msgid "covertile.cycle2: Uninstall product"
msgstr ""

#. Default: "C2 Carousel"
#: ../tiles/carousel.py:126
#: ../tiles/carousel.py:124
msgid "msg_short_name_carousel"
msgstr ""

73 changes: 66 additions & 7 deletions src/covertile/cycle2/locales/en/LC_MESSAGES/covertile.cycle2.po
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2015-03-25 18:38+0000\n"
"POT-Creation-Date: 2016-06-21 16:05+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand All @@ -14,24 +14,83 @@ msgstr ""
"Preferred-Encodings: utf-8 latin1\n"
"Domain: DOMAIN\n"

#: Tile description in tiles/tiles.zcml
#: ../tiles/carousel.py:107
msgid "A Mustache-style template string, in which you can use {{title}}, {{desc}}, {{url}} or {{date}}"
msgstr ""

#: ../tiles/tiles.zcml:21
msgid "A tile showing Cycle2 based carousel of images."
msgstr ""

#: ./tiles/carousel.py:22
#: ../tiles/carousel.py:88
msgid "Auto play"
msgstr ""

#: Tile title in tiles/tiles.zcml
#: ../tiles/tiles.zcml:21
msgid "Cycle2 Carousel Tile"
msgstr ""

#: ./tiles/templates/carousel.pt:15
#: ../tiles/carousel.py:21
msgid "Dots"
msgstr ""

#: ../tiles/carousel.py:42
msgid "Elements"
msgstr ""

#: ../tiles/carousel.py:57
msgid "Image"
msgstr ""

#: ../profiles.zcml:15
msgid "Install the covertile.cycle2 product in Plone"
msgstr ""

#: ../tiles/carousel.py:22
msgid "Numbers"
msgstr ""

#: ../tiles/carousel.py:106
msgid "Overlay Template"
msgstr ""

#: ../tiles/carousel.py:96
msgid "Pager"
msgstr ""

#: ../profiles.zcml:24
msgid "Remove covertile.cycle2 from Plone"
msgstr ""

#: ../tiles/carousel.py:71
msgid "Show more... link"
msgstr ""

#: ../tiles/carousel.py:79
msgid "Show more... link text"
msgstr ""

#: ../tiles/carousel.py:23
msgid "Square Thumbnails"
msgstr ""

#: ../tiles/templates/carousel.pt:9
msgid "This carousel is empty; open the content chooser and drag-and-drop some items here."
msgstr ""

#: ../tiles/carousel.py:64
msgid "Tile Title"
msgstr ""

#: ../profiles.zcml:15
msgid "covertile.cycle2: A Cycle2 based carousel tile for collective.cover"
msgstr ""

#: ../profiles.zcml:24
msgid "covertile.cycle2: Uninstall product"
msgstr ""

#. Default: "C2 Carousel"
#: ./tiles/carousel.py:39
#: ../tiles/carousel.py:124
msgid "msg_short_name_carousel"
msgstr ""

47 changes: 31 additions & 16 deletions src/covertile/cycle2/locales/nl/LC_MESSAGES/covertile.cycle2.po
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2015-09-03 08:26+0000\n"
"POT-Creation-Date: 2016-06-21 16:05+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n"
"Last-Translator: Zest Software <info@zestsoftware.nl>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand All @@ -15,51 +15,59 @@ msgstr ""
"Domain: covertile.cycle2\n"
"X-Is-Fallback-For: nl-be nl-nl\n"

#: ../tiles/carousel.py:109
msgid "A Mustache-style template string, in which you can use {{title}}, {{desc}} or {{date}}"
msgstr "Een Mustache (snor) sjabloontekst, waarin {{title}}, {{desc}} or {{date}} te gebruiken zijn"
#: ../tiles/carousel.py:107
msgid "A Mustache-style template string, in which you can use {{title}}, {{desc}}, {{url}} or {{date}}"
msgstr "Een Mustache (snor) sjabloontekst, waarin {{title}}, {{desc}}, {{url}} of {{date}} te gebruiken zijn"

#: Tile description in tiles/tiles.zcml
#: ../tiles/tiles.zcml:21
msgid "A tile showing Cycle2 based carousel of images."
msgstr "Een tegel met een afbeeldingscarousel op basis van Cycle2"

#: ../tiles/carousel.py:90
#: ../tiles/carousel.py:88
msgid "Auto play"
msgstr "Automatisch afspelen"

#: Tile title in tiles/tiles.zcml
#: ../tiles/tiles.zcml:21
msgid "Cycle2 Carousel Tile"
msgstr "Cycle2 Carouseltegel"

#: ../tiles/carousel.py:21
msgid "Dots"
msgstr "Stippen"

#: ../tiles/carousel.py:44
#: ../tiles/carousel.py:42
msgid "Elements"
msgstr "Elementen"

#: ../tiles/carousel.py:59
#: ../tiles/carousel.py:57
msgid "Image"
msgstr "Afbeelding"

#: ../profiles.zcml:15
msgid "Install the covertile.cycle2 product in Plone"
msgstr "Installeer het covertile.cycl2 extra product in Pone"

#: ../tiles/carousel.py:22
msgid "Numbers"
msgstr "Nummers"

#: ../tiles/carousel.py:108
#: ../tiles/carousel.py:106
msgid "Overlay Template"
msgstr "Sjabloon voor tekst"

#: ../tiles/carousel.py:98
#: ../tiles/carousel.py:96
msgid "Pager"
msgstr "Paginatie (pager)"

#: ../tiles/carousel.py:73
#: ../profiles.zcml:24
msgid "Remove covertile.cycle2 from Plone"
msgstr "Deïnstalleer covertile.cycle"

#: ../tiles/carousel.py:71
msgid "Show more... link"
msgstr "Toon meer... link"

#: ../tiles/carousel.py:81
#: ../tiles/carousel.py:79
msgid "Show more... link text"
msgstr "Toon meer... link tekst"

Expand All @@ -71,12 +79,19 @@ msgstr "Vierkante kleine voorvertoning"
msgid "This carousel is empty; open the content chooser and drag-and-drop some items here."
msgstr "Deze carousel is leeg; open de content chooser en sleep content op de tegel."

#: ../tiles/carousel.py:66
#: ../tiles/carousel.py:64
msgid "Tile Title"
msgstr "Tegeltitel"

#: ../profiles.zcml:15
msgid "covertile.cycle2: A Cycle2 based carousel tile for collective.cover"
msgstr "covertile.cycel2: Een carouseltegel voor collective.cover op basis van Cycle2"

#: ../profiles.zcml:24
msgid "covertile.cycle2: Uninstall product"
msgstr "covertile.cycle2: deïnstalleer"

#. Default: "C2 Carousel"
#: ../tiles/carousel.py:126
#: ../tiles/carousel.py:124
msgid "msg_short_name_carousel"
msgstr "C2 Carousel"

10 changes: 10 additions & 0 deletions src/covertile/cycle2/tests/test_carousel_tile.robot
Expand Up @@ -204,6 +204,16 @@ Test Carousel Tile
Compose Cover
Page Should Contain Element css=div.cycle-pager > a > img

## test the {{url}} variable
Open Layout Tab
Click Element css=a.config-tile-link
Wait Until Element Is Visible css=textarea#covertile-cycle2-carousel-overlay-template
Input Text css=textarea#covertile-cycle2-carousel-overlay-template <div><a href="{{url}}">This is a link!</a></div>
Click Button Save
Click Link link=View
# test for custom url set above in this robot test
Wait Until Page Contains Element css=div.cycle-overlay div
Page Should Contain Element xpath=//div[@class='cycle-overlay']//a[@href='http://www.google.com']

# delete the tile
Open Layout Tab
Expand Down
2 changes: 1 addition & 1 deletion src/covertile/cycle2/tiles/carousel.py
Expand Up @@ -104,7 +104,7 @@ class ICarouselTile(IListTile):

overlay = schema.SourceText(
title=_(u'Overlay Template'),
description=_(u'A Mustache-style template string, in which you can use {{title}}, {{desc}} or {{date}}'),
description=_(u'A Mustache-style template string, in which you can use {{title}}, {{desc}}, {{url}} or {{date}}'),
required=False,
default=DEFAULT_OVERLAY_TEMPLATE,
)
Expand Down
1 change: 1 addition & 0 deletions src/covertile/cycle2/tiles/templates/carousel.pt
Expand Up @@ -45,6 +45,7 @@
data-thumbnail python: thumbnail and thumbnail.url or None;
data-cycle-title customTitle;
data-cycle-desc customDescription;
data-cycle-url customUrl;
data-date python:item.toLocalizedTime();">
<tal:image condition="python:slideimg">
<a href="#"
Expand Down

0 comments on commit b73fcac

Please sign in to comment.