PageRenderTime 60ms CodeModel.GetById 32ms RepoModel.GetById 1ms app.codeStats 0ms

/design/admin/templates/rss/edit_export.tpl

https://github.com/lserwatka/ezpublish
Smarty Template | 239 lines | 198 code | 40 blank | 1 comment | 8 complexity | ec0eab6b801a4798a590b4e537321fc7 MD5 | raw file
  1. <form action={"rss/edit_export"|ezurl} method="post" name="RSSExport">
  2. <div class="context-block">
  3. {* DESIGN: Header START *}<div class="box-header"><div class="box-tc"><div class="box-ml"><div class="box-mr"><div class="box-tl"><div class="box-tr">
  4. <h1 class="context-title">{'Edit <%rss_export_name> [RSS Export]'|i18n( 'design/admin/rss/edit_export',, hash( '%rss_export_name', $rss_export.title ) )|wash}</h1>
  5. {* DESIGN: Mainline *}<div class="header-mainline"></div>
  6. {* DESIGN: Header END *}</div></div></div></div></div></div>
  7. {* DESIGN: Content START *}<div class="box-ml"><div class="box-mr"><div class="box-content">
  8. <div class="context-attributes">
  9. {if not( $valid )}
  10. <div class="warning">
  11. <h2>{'Invalid input'|i18n( 'design/admin/rss/edit_export' )}</h2>
  12. <ul>
  13. {section var=Errors loop=$validation_errors}
  14. <li>{$Errors.item}</li>
  15. {/section}
  16. {* <li>{'If RSS Export is Active then a valid Access URL is required.'|i18n( 'design/admin/rss/edit_export' )}</li>*}
  17. </ul>
  18. </div>
  19. {/if}
  20. <div class="block">
  21. <label>{'Name'|i18n( 'design/admin/rss/edit_export' )}:</label>
  22. <input class="halfbox" id="exportName" type="text" name="title" value="{$rss_export.title|wash}" title="{'Name of the RSS export. This name is used in the Administration Interface only, to distinguish the different exports from each other.'|i18n('design/admin/rss/edit_export')}" />
  23. </div>
  24. <div class="block">
  25. <label>{'Description'|i18n( 'design/admin/rss/edit_export' )}:</label>
  26. <textarea class="halfbox" name="Description" rows="3" title="{'Use the description field to write a text explaining what users can expect from the RSS export.'|i18n('design/admin/rss/edit_export')}">{$rss_export.description|wash}</textarea>
  27. </div>
  28. <div class="block">
  29. <label>{'Site URL'|i18n( 'design/admin/rss/edit_export' )}:</label>
  30. <input class="halfbox" type="text" name="url" value="{$rss_export.url|wash}"/>
  31. <div class="context-attributes">
  32. <p>{'Use this field to enter the base URL of your site. It is used to produce the URLs in the export, composed by the Site URL (e.g. "http://www.example.com/index.php") and the path to the object (e.g. "/articles/my_article"). The Site URL depends on your web server and eZ Publish configuration.'|i18n( 'design/admin/rss/edit_export')}</p>
  33. <p>{'Leave this field empty if you want system automaticaly detect the URL of your site from the URL you access feed with'|i18n( 'design/admin/rss/edit_export')}</p>
  34. </div>
  35. </div>
  36. <input type="hidden" name="RSSImageID" value="{$rss_export.image_id}" />
  37. <div class="block">
  38. <label>{'Image'|i18n( 'design/admin/rss/edit_export' )}:</label>
  39. <input type="text" readonly="readonly" size="45" value="{$rss_export.image_path|wash}" />
  40. <input class="button" type="submit" name="BrowseImageButton" value="{'Browse'|i18n( 'design/admin/rss/edit_export' )}" title="{'Click this button to select an image for the RSS export. Note that images only work with RSS version 2.0'|i18n('design/admin/rss/edit_export')}" />
  41. </div>
  42. {if ne( $rss_export.image_id, 0 )}
  43. <div class="block">
  44. <input class="button" type="submit" name="RemoveImageButton" value="{'Remove image'|i18n( 'design/admin/rss/edit_export' )}" title="{'Click to remove image from RSS export.'|i18n('design/admin/rss/edit_export')}" />
  45. </div>
  46. {/if}
  47. <div class="block">
  48. <label>{'RSS version'|i18n( 'design/admin/rss/edit_export' )}:</label>
  49. <select name="RSSVersion" title="{'Use this drop-down menu to select the RSS version to use for the export. You must select RSS 2.0 in order to export the image selected above.'|i18n('design/admin/rss/edit_export')}">
  50. {foreach $rss_version_array as $rss_version_item}
  51. <option
  52. {if eq( $rss_export.rss_version, '' )}
  53. {if eq( $rss_version_item, $rss_version_default )}
  54. selected="selected"
  55. {/if}
  56. {else}
  57. {if eq( $rss_version_item, $rss_export.rss_version )}
  58. selected="selected"
  59. {/if}
  60. {/if}
  61. value="{$rss_version_item}">{$rss_version_item|wash}</option>
  62. {/foreach}
  63. </select>
  64. </div>
  65. <div class="block">
  66. <label>{'Number of objects'|i18n( 'design/admin/rss/edit_export' )}:</label>
  67. <select name="NumberOfObjects" title="{'Use this drop-down to select the maximum number of objects included in the RSS feed.'|i18n('design/admin/rss/edit_export')}">
  68. {foreach $number_of_objects_array as $number_of_objects_item}
  69. <option
  70. {if eq( $rss_export.number_of_objects, 0 )}
  71. {if eq( $number_of_objects_item, $number_of_objects_default )}
  72. selected="selected"
  73. {/if}
  74. {else}
  75. {if eq( $number_of_objects_item, $rss_export.number_of_objects )}
  76. selected="selected"
  77. {/if}
  78. {/if}
  79. value="{$number_of_objects_item}">{$number_of_objects_item|wash}
  80. </option>
  81. {/foreach}
  82. </select>
  83. </div>
  84. <div class="block">
  85. <label>{'Active'|i18n( 'design/admin/rss/edit_export' )}:</label>
  86. <input type="checkbox" name="active" {if $rss_export.active|eq( 1 )}checked="checked"{/if} title="{'Use this checkbox to control if the RSS export is active or not. An inactive export will not be automatically updated.'|i18n('design/admin/rss/edit_export')}"/>
  87. </div>
  88. <div class="block">
  89. <label>{'Main node only'|i18n( 'design/admin/rss/edit_export' )}:</label>
  90. <input type="checkbox" name="MainNodeOnly" {if $rss_export.main_node_only|eq( 1 )}checked="checked"{/if} title="{'Check if you want to only feed the object from the main node.'|i18n('design/admin/rss/edit_export')}"/>
  91. </div>
  92. <div class="block">
  93. <label>{'Access URL'|i18n( 'design/admin/rss/edit_export' )}:</label>
  94. rss/feed/<input class="halfbox" type="text" name="Access_URL" value="{$rss_export.access_url|wash}" title="{'Use this field to set the URL where the RSS export should be available. Note that "rss/feed/" will be appended to the real URL. '|i18n('design/admin/rss/edit_export')|wash}" />
  95. </div>
  96. <input type="hidden" name="RSSExport_ID" value={$rss_export.id} />
  97. <input type="hidden" name="Item_Count" value={count($rss_export.item_list)} />
  98. <hr />
  99. {section name=Source loop=$rss_export.item_list}
  100. <h2>{'Source'|i18n( 'design/admin/rss/edit_export' )} {sum($Source:index, 1)}</h2>
  101. <input type="hidden" name="Item_ID_{$Source:index}" value="{$Source:item.id}" />
  102. <input type="hidden" name="Ignore_Values_On_Browse_{$Source:index}" id="Ignore_Values_On_Browse_{$Source:index}" value="{$Source:item.title|eq('')}" />
  103. <div class="block">
  104. <label>{'Source path'|i18n( 'design/admin/rss/edit_export' )}:</label>
  105. <input type="text" readonly="readonly" size="45" value="{$Source:item.source_path|wash}" />
  106. <input class="button" type="submit" name="{concat( 'SourceBrowse_', $Source:index )}" value="{'Browse'|i18n( 'design/admin/rss/edit_export' )}" title="{'Click this button to select the source node for the RSS export source. Objects of the type selected in the drop-down below published as sub items of the selected node will be included in the RSS export.'|i18n('design/admin/rss/edit_export')}" />
  107. </div>
  108. <div class="block">
  109. <label>{'Subnodes'|i18n( 'design/admin/rss/edit_export' )}:</label>
  110. <input type="checkbox" name="Item_Subnodes_{$Source:index}" {if $Source:item.subnodes|wash|eq( 1 )}checked="checked"{/if} title="{'Activate this checkbox if objects from the subnodes of the source should also be fed.'|i18n('design/admin/rss/edit_export')}" onchange="document.getElementById('Ignore_Values_On_Browse_{$Source:index}').value=0;" />
  111. </div>
  112. <div class="block">
  113. <label>{'Class'|i18n( 'design/admin/rss/edit_export' )}:</label>
  114. <select name="Item_Class_{$Source:index}" title="{'Use this drop-down to select the type of object that triggers the export. Click the "Set" button to load the correct attribute types for the remaining fields.'|i18n('design/admin/rss/edit_export')|wash}" onchange="document.getElementById('Ignore_Values_On_Browse_{$Source:index}').value=0;">
  115. {section name=ContentClass loop=$rss_class_array }
  116. <option
  117. {section name=Class show=eq( $:item.id, $Source:item.class_id )}
  118. selected="selected"
  119. {/section} value="{$:item.id}">{$:item.name|wash}</option>
  120. {/section}
  121. </select>
  122. <input class="button" type="submit" name="Update_Item_Class" value="{'Set'|i18n( 'design/admin/rss/edit_export' )}" title="{'Click this button to load the correct values into the drop-down fields below. Use the drop-down menu on the left to select the class.'|i18n('design/admin/rss/edit_export')}" />
  123. </div>
  124. {section name=Attribute show=count( $rss_export.item_list[$Source:index] )|gt( 0 )}
  125. <div class="block">
  126. <label>{'Title'|i18n( 'design/admin/rss/edit_export' )}:</label>
  127. <select name="Item_Class_Attribute_Title_{$Source:index}" title="{'Use this drop-down to select the attribute that should be exported as the title of the RSS export entry.'|i18n('design/admin/rss/edit_export')}" onchange="document.getElementById('Ignore_Values_On_Browse_{$Source:index}').value=0;">
  128. {section name=ClassAttribute loop=$rss_export.item_list[$Source:index].class_attributes}
  129. <option value="{$:item.identifier}"
  130. {section name=ShowSelected show=eq( $Source:item.title, $:item.identifier )}
  131. selected="selected"
  132. {/section}>{$:item.name|wash}</option>
  133. {/section}
  134. </select>
  135. </div>
  136. <div class="block">
  137. <label>{'Description'|i18n( 'design/admin/rss/edit_export' )} ({'optional'|i18n( 'design/admin/rss/edit_export' )}):</label>
  138. <select name="Item_Class_Attribute_Description_{$Source:index}" title="{'Use this drop-down to select the attribute that should be exported as the description of the RSS export entry.'|i18n('design/admin/rss/edit_export')}" onchange="document.getElementById('Ignore_Values_On_Browse_{$Source:index}').value=0;">
  139. <option value="">[{'Skip'|i18n('design/admin/rss/edit_export')}]</option>
  140. {section name=ClassAttribute loop=$rss_export.item_list[$Source:index].class_attributes}
  141. <option value="{$:item.identifier|wash}"
  142. {section name=ShowSelected show=eq( $Source:item.description, $:item.identifier )}
  143. selected="selected"
  144. {/section}>{$:item.name|wash}</option>
  145. {/section}
  146. </select>
  147. </div>
  148. <div class="block">
  149. <label>{'Category'|i18n( 'design/admin/rss/edit_export' )} ({'optional'|i18n( 'design/admin/rss/edit_export' )}):</label>
  150. <select name="Item_Class_Attribute_Category_{$Source:index}" title="{'Use this drop-down to select the attribute that should be exported as the category of the RSS export entry.'|i18n('design/admin/rss/edit_export')}" onchange="document.getElementById('Ignore_Values_On_Browse_{$Source:index}').value=0;">
  151. <option value="">[{'Skip'|i18n('design/admin/rss/edit_export')}]</option>
  152. {section name=ClassAttribute loop=$rss_export.item_list[$Source:index].class_attributes}
  153. <option value="{$:item.identifier|wash}"
  154. {section name=ShowSelected show=eq( $Source:item.category, $:item.identifier )}
  155. selected="selected"
  156. {/section}>{$:item.name|wash}</option>
  157. {/section}
  158. </select>
  159. </div>
  160. <div class="block">
  161. <label>{'Enclosure (media)'|i18n( 'design/admin/rss/edit_export' )} ({'optional'|i18n( 'design/admin/rss/edit_export' )}):</label>
  162. <select name="Item_Class_Attribute_Enclosure_{$Source:index}" title="{'Use this drop-down to select the attribute that should be exported as the enclosure of the RSS export entry, enclosures are direct link to a media file, so use a media/image/file datatype .'|i18n('design/admin/rss/edit_export')}" onchange="document.getElementById('Ignore_Values_On_Browse_{$Source:index}').value=0;">
  163. <option value="">[{'Skip'|i18n('design/admin/rss/edit_export')}]</option>
  164. {foreach $rss_export.item_list[$Source:index].class_attributes as $class_attribute}
  165. <option value="{$class_attribute.identifier|wash}"
  166. {if eq( $Source:item.enclosure, $class_attribute.identifier )}
  167. selected="selected"
  168. {/if}>{$class_attribute.name|wash}</option>
  169. {/foreach}
  170. </select>
  171. </div>
  172. {/section}
  173. <input class="button" type="submit" name="{concat( 'RemoveSource_', $Source:index )}" value="{'Remove this source'|i18n( 'design/admin/rss/edit_export' )}" title="{'Click to remove this source from the RSS export.'|i18n('design/admin/rss/edit_export')}" />
  174. <hr />
  175. {/section}
  176. <input class="button" type="submit" name="AddSourceButton" value="{'Add source'|i18n( 'design/admin/rss/edit_export' )}" title="{'Click to add a new source to the RSS export.'|i18n('design/admin/rss/edit_export')}" />
  177. </div>
  178. {* DESIGN: Content END *}</div></div></div>
  179. <div class="controlbar">
  180. {* DESIGN: Control bar START *}<div class="box-bc"><div class="box-ml"><div class="box-mr"><div class="box-tc"><div class="box-bl"><div class="box-br">
  181. <div class="block">
  182. <input class="button" type="submit" name="StoreButton" value="{'OK'|i18n( 'design/admin/rss/edit_export' )}" title="{'Apply the changes and return to the RSS overview.'|i18n('design/admin/rss/edit_export')}" />
  183. <input class="button" type="submit" name="RemoveButton" value="{'Cancel'|i18n( 'design/admin/rss/edit_export' )}" title="{'Cancel the changes and return to the RSS overview.'|i18n('design/admin/rss/edit_export')}" />
  184. </div>
  185. {* DESIGN: Control bar END *}</div></div></div></div></div></div>
  186. </div>
  187. </div>
  188. </form>
  189. {literal}
  190. <script language="JavaScript" type="text/javascript">
  191. <!--
  192. window.onload=function()
  193. {
  194. document.getElementById('exportName').select();
  195. document.getElementById('exportName').focus();
  196. }
  197. -->
  198. </script>
  199. {/literal}