{# Common Fields #}
{% set title %}{% trans "Name" %}{% endset %}
{% set helpText %}{% trans "An optional name for this widget" %}{% endset %}
{% set fieldName %}{{ forms.input("name", title, module.getOption("name"), helpText) }}{% endset %}
{% set title %}{% trans "Set a duration?" %}{% endset %}
{% set helpText %}{% trans "Select to provide a specific duration for this Widget" %}{% endset %}
{% set fieldUseDuration %}{{ forms.checkbox("useDuration", title, module.getUseDuration(), helpText) }}{% endset %}
{% set title %}{% trans "Duration" %}{% endset %}
{% set helpText %}{% trans "The duration in seconds this item should be displayed" %}{% endset %}
{% set fieldDuration %}{{ forms.number("duration", title, module.getDuration(), helpText, "duration-fields", "required") }}{% endset %}
{% set title %}{% trans "Effect" %}{% endset %}
{% set helpText %}{% trans "Please select the effect that will be used to transition between items. Marquee effects are CPU intensive and may not be suitable for lower power displays." %}{% endset %}
{% set showAll %}{% trans "Show all items" %}{% endset %}
{% set showPaged %}{% trans "Paged" %}{% endset %}
{% set marqueeLeft %}{% trans "Marquee Left" %}{% endset %}
{% set marqueeRight %}{% trans "Marquee Right" %}{% endset %}
{% set marqueeUp %}{% trans "Marquee Up" %}{% endset %}
{% set marqueeDown %}{% trans "Marquee Down" %}{% endset %}
{% set optionGroups = [
{id: "showAll", label: showAll},
{id: "showPaged", label: showPaged}
] %}
{% set noneOption %}{% trans "No effect - all items are shown" %}{% endset %}
{% set showAllOptions = [
{ effectid: "none", effect: noneOption },
{ effectid: "marqueeLeft", effect: marqueeLeft},
{ effectid: "marqueeRight", effect: marqueeRight},
{ effectid: "marqueeUp", effect: marqueeUp},
{ effectid: "marqueeDown", effect: marqueeDown}
] %}
{% set noTransitionOption %}{% trans "No transition" %}{% endset %}
{% set fade %}{% trans "Fade" %}{% endset %}
{% set fadeout %}{% trans "Fade Out" %}{% endset %}
{% set scrollHorz %}{% trans "Scroll Horizontal" %}{% endset %}
{% set scrollVert %}{% trans "Scroll Vertical" %}{% endset %}
{% set flipHorz %}{% trans "Flip Horizontal" %}{% endset %}
{% set flipVert %}{% trans "Flip Vertical" %}{% endset %}
{% set shuffle %}{% trans "Shuffle" %}{% endset %}
{% set tileSlide %}{% trans "Tile Slide" %}{% endset %}
{% set tileBlind %}{% trans "Tile Blind" %}{% endset %}
{% set showPagedOptions = [
{ effectid: "noTransition", effect: noTransitionOption },
{ effectid: "fade", effect: fade },
{ effectid: "fadeout", effect: fadeout},
{ effectid: "scrollHorz", effect: scrollHorz},
{ effectid: "scrollVert", effect: scrollVert},
{ effectid: "flipHorz", effect: flipHorz},
{ effectid: "flipVert", effect: flipVert},
{ effectid: "shuffle", effect: shuffle},
{ effectid: "tileSlide", effect: tileSlide},
{ effectid: "tileBlind", effect: tileBlind}
] %}
{% set fieldEffect %}{{ forms.dropdown("effect", "single", title, module.getOption("effect"), {showAll: showAllOptions, showPaged: showPagedOptions}, "effectid", "effect", helpText, "l", "", "", "", "", optionGroups) }}{% endset %}
{% set title %}{% trans "Speed" %}{% endset %}
{% set helpText %}{% trans "The transition speed of the selected effect in milliseconds (normal = 1000) or the Marquee Speed in a low to high scale (normal = 1)." %}{% endset %}
{% set fieldSpeed %}{{ forms.number("speed", title, module.getOption("speed", module.getOption("scrollSpeed")), helpText, "effect-controls") }}{% endset %}
{% set title %}{% trans "Background Colour" %}{% endset %}
{% set helpText %}{% trans "The selected effect works best with a background colour. Optionally add one here." %}{% endset %}
{% set fieldBackgroundColor %}{{ forms.input("backgroundColor", title, module.getOption("backgroundColor"), helpText, "background-color-group") }}{% endset %}
{% set title %}{% trans "Items per page" %}{% endset %}
{% set helpText %}{% trans "If an effect has been selected from the General tab, how many pages should we split the items across? If you don't enter anything here 1 item will be put on each page." %}{% endset %}
{% set fieldItemsPerPage %}{{ forms.number("itemsPerPage", title, module.getOption("itemsPerPage"), helpText, "effect-controls") }}{% endset %}
{% set title %}{% trans "Update Interval (mins)" %}{% endset %}
{% set helpText %}{% trans "Please enter the update interval in minutes. This should be kept as high as possible. For example, if the data will only change once per hour this could be set to 60." %}{% endset %}
{% set fieldUpdateInterval %}{{ forms.number("updateInterval", title, module.getOption("updateInterval", 5), helpText, "", "required") }}{% endset %}
{% set title %}{% trans "Duration is per item" %}{% endset %}
{% set helpText %}{% trans "The duration specified is per item otherwise it is per feed." %}{% endset %}
{% set fieldDurationIsPerItem %}{{ forms.checkbox("durationIsPerItem", title, module.getOption("durationIsPerItem"), helpText) }}{% endset %}
{% set title %}{% trans "Show items side by side?" %}{% endset %}
{% set helpText %}{% trans "Should items be shown side by side?" %}{% endset %}
{% set fieldItemsSideBySide %}{{ forms.checkbox("itemsSideBySide", title, module.getOption("itemsSideBySide"), helpText) }}{% endset %}
{% set helpText %}
{% trans "Enter the template. Please note that the background colour has automatically coloured to your layout background colour." %}
{% trans "The red rectangle reflects the size of the region you are editing." %}
{% trans "Shift+Enter will drop a single line. Enter alone starts a new paragraph." %}
{% endset %}
{% set fieldTemplate %}{{ forms.textarea("ta_text", "", module.getRawNode("template"), helpText, "template-override-controls", "", 10) }}{% endset %}
{% set title %}{% trans "Optional Stylesheet" %}{% endset %}
{% set fieldStyleSheet %}{{ forms.textarea("ta_css", "", module.getRawNode("css"), title, "template-override-controls", "", 10) }}{% endset %}
{% set title %}{% trans "Optional JavaScript" %}{% endset %}
{% set fieldJavaScript %}{{ forms.textarea("javaScript", "", module.getRawNode("javaScript"), title, "", "", 10) }}{% endset %}
{% set helpText %}{% trans "A message to display when no data is returned from the source" %}{% endset %}
{% set fieldNoDataMessage %}
{{ forms.textarea("noDataMessage", "", module.getRawNode("noDataMessage"), helpText, "", "", 5) }}
{% endset %}
{# Different fields for each type of Ticker #}
{% if module.getOption("sourceId") == 1 %}
{# Source = Feed #}
{% set title %}{% trans "Feed URL" %}{% endset %}
{% set helpText %}{% trans "The Link for the RSS feed" %}{% endset %}
{{ forms.input("uri", title, module.getOption("uri")|url_decode, helpText, "feed-fields") }}
{{ fieldName }}
{{ fieldUseDuration }}
{{ fieldDuration }}
{{ fieldEffect }}
{% set title %}{% trans "Template" %}{% endset %}
{% set helpText %}{% trans "Select the template you would like to apply. This can be overridden using the check box below." %}{% endset %}
{{ forms.dropdown("templateId", "single", title, module.getOption("templateId", "title-only"), module.templatesAvailable(), "id", "value", helptext, "template-selector-control selectPicker selectPickerWithImage", null, null, null, null, null, "image") }}
{% set title %}{% trans "Override the template?" %}{% endset %}
{% set helpText %}{% trans "Tick if you would like to override the template." %}{% endset %}
{{ forms.checkbox("overrideTemplate", title, module.getOption("overrideTemplate", 0), helpText) }}
{% trans "Available Substitutions" %}
- Name
- Title
- Description
- Date
- Content
- Copyright
- Link
- PermaLink
- Tag|Namespace
{{ fieldTemplate }}
{{ fieldStyleSheet }}
{{ fieldSpeed }}
{% set title %}{% trans "Text direction" %}{% endset %}
{% set helpText %}{% trans "Which direction does the text in the feed use?" %}{% endset %}
{% set leftToRight %}{% trans "Left to Right (LTR)" %}{% endset %}
{% set rightToLeft %}{% trans "Right to Left (RTL)" %}{% endset %}
{% set options = [
{ textdirectionid: "ltr", textdirection: leftToRight },
{ textdirectionid: "rtl", textdirection: rightToLeft }
] %}
{{ forms.dropdown("textDirection", "single", title, module.getOption("textDirection", "ltr"), options, "textdirectionid", "textdirection", helpText) }}
{% set title %}{% trans "Number of Items" %}{% endset %}
{% set helpText %}{% trans "The Number of RSS items you want to display" %}{% endset %}
{{ forms.number("numItems", title, module.getOption("numItems"), helpText) }}
{{ fieldItemsPerPage }}
{% set title %}{% trans "Take items from the" %}{% endset %}
{% set helpText %}{% trans "Take the items from the beginning or the end of the list" %}{% endset %}
{% set startOfTheFeed %}{% trans "Start of the Feed" %}{% endset %}
{% set endOfTheFeed %}{% trans "End of the Feed" %}{% endset %}
{% set options = [
{ takeitemsfromid: "start", takeitemsfrom: startOfTheFeed },
{ takeitemsfromid: "end", takeitemsfrom: endOfTheFeed }
] %}
{{ forms.dropdown("takeItemsFrom", "single", title, module.getOption("takeItemsFrom", "start"), options, "takeitemsfromid", "takeitemsfrom", helpText) }}
{{ fieldDurationIsPerItem }}
{% set title %}{% trans "Randomise?" %}{% endset %}
{% set helpText %}{% trans "Should the order of the feed be randomised? When enabled each time the Widget is shown the items will be randomly shuffled and displayed in a random order." %}{% endset %}
{{ forms.checkbox("randomiseItems", title, module.getOption("randomiseItems"), helpText) }}
{{ fieldBackgroundColor }}
{{ fieldUpdateInterval }}
{% set title %}{% trans "Copyright" %}{% endset %}
{% set helpText %}{% trans "Copyright information to display as the last item in this feed. This can be styled with the #copyright CSS selector." %}{% endset %}
{{ forms.input("copyright", title, module.getOption("copyright"), helpText) }}
{{ fieldItemsSideBySide }}
{% set title %}{% trans "Date Format" %}{% endset %}
{% set manualUrl %}{{ helpService.address("advanced_dateFormat.html") }}{% endset %}
{% set helpText %}{% trans %}The format to apply to all dates returned by the ticker. See the
Manual for allowed formats.{% endtrans %}{% endset %}
{{ forms.input("dateFormat", title, module.getOption("dateFormat"), helpText) }}
{% set title %}{% trans "Allowable Attributes" %}{% endset %}
{% set helpText %}{% trans "A comma separated list of attributes that should not be stripped from the incoming feed." %}{% endset %}
{{ forms.input("allowedAttributes", title, module.getOption("allowedAttributes"), helpText) }}
{% set title %}{% trans "Strip Tags" %}{% endset %}
{% set helpText %}{% trans "A comma separated list of HTML tags that should be stripped from the feed in addition to the default ones." %}{% endset %}
{{ forms.input("stripTags", title, module.getOption("stripTags"), helpText) }}
{% set title %}{% trans "Disable Date Sort" %}{% endset %}
{% set helpText %}{% trans "Should the date sort applied to the feed be disabled?" %}{% endset %}
{{ forms.checkbox("disableDateSort", title, module.getOption("disableDateSort"), helpText) }}
{{ fieldNoDataMessage }}
{{ fieldJavaScript }}
{% else %}
{# Source = Dataset #}
{{ fieldName }}
{{ fieldUseDuration }}
{{ fieldDuration }}
{{ fieldEffect }}
{{ fieldSpeed }}
{% trans "Available Substitutions" %}
{% for column in module.dataSetColumns() %}
- {{ column.heading }}
{% endfor %}
{{ fieldTemplate }}
{{ fieldStyleSheet }}
{% set message %}{% trans "The DataSet results can be ordered by any column and set below. New fields can be added by selecting the plus icon at the end of the current row. Should a more complicated order be required the advanced checkbox can be selected to provide custom SQL syntax." %}{% endset %}
{{ forms.message(message) }}
{% set title %}{% trans "Use advanced order clause?" %}{% endset %}
{% set helpText %}{% trans "Provide a custom clause instead of using the clause builder above." %}{% endset %}
{{ forms.checkbox("useOrderingClause", title, module.getOption("useOrderingClause", 0), helpText) }}
{% set title %}{% trans "Order" %}{% endset %}
{% set helpText %}{% trans "Please enter a SQL clause for how this dataset should be ordered" %}{% endset %}
{{ forms.input("ordering", title, module.getOption("ordering"), helpText, "order-clause-field") }}
{% set message %}{% trans "The DataSet results can be filtered by any column and set below. New fields can be added by selecting the plus icon at the end of the current row. Should a more complicated filter be required the advanced checkbox can be selected to provide custom SQL syntax." %}{% endset %}
{{ forms.message(message) }}
{% set title %}{% trans "Use advanced filter clause?" %}{% endset %}
{% set helpText %}{% trans "Provide a custom clause instead of using the clause builder above." %}{% endset %}
{{ forms.checkbox("useFilteringClause", title, module.getOption("useFilteringClause", 0), helpText) }}
{% set title %}{% trans "Filter" %}{% endset %}
{% set helpText %}{% trans "Please enter a SQL clause to filter this DataSet." %}{% endset %}
{{ forms.input("filter", title, module.getOption("filter"), helpText, "filter-clause-field") }}
{{ fieldItemsPerPage }}
{{ fieldItemsSideBySide }}
{{ fieldBackgroundColor }}
{{ fieldDurationIsPerItem }}
{{ fieldUpdateInterval }}
{% set title %}{% trans "Lower Row Limit" %}{% endset %}
{% set helpText %}{% trans "Please enter the Lower Row Limit for this DataSet (enter 0 for no limit)" %}{% endset %}
{{ forms.number("lowerLimit", title, module.getOption("lowerLimit"), helpText) }}
{% set title %}{% trans "Upper Row Limit" %}{% endset %}
{% set helpText %}{% trans "Please enter the Upper Row Limit for this DataSet (enter 0 for no limit)" %}{% endset %}
{{ forms.number("upperLimit", title, module.getOption("upperLimit"), helpText) }}
{{ fieldNoDataMessage }}
{{ fieldJavaScript }}
{% endif %}