[ Index ] |
|
Code source de eZ Publish 3.9.0 |
1 {* Warnings *} 2 3 {section show=$validation.processed} 4 {* handle attribute validation errors *} 5 {section show=$validation.attributes} 6 <div class="message-warning"> 7 <h2><span class="time">[{currentdate()|l10n( shortdatetime )}]</span> {'The class definition could not be stored.'|i18n( 'design/admin/class/edit' )}</h2> 8 <p>{'The following information is either missing or invalid'|i18n( 'design/admin/class/edit' )}:</p> 9 <ul> 10 {section var=UnvalidatedAttributes loop=$validation.attributes} 11 {section show=is_set( $UnvalidatedAttributes.item.reason )} 12 <li>attribute '{$UnvalidatedAttributes.item.identifier}': ({$UnvalidatedAttributes.item.id}) 13 {$UnvalidatedAttributes.item.reason.text|wash} 14 <ul> 15 {section var=subitem loop=$UnvalidatedAttributes.item.reason.list} 16 <li>{section show=is_set( $subitem.identifier )}{$subitem.identifier|wash}: {/section}{$subitem.text|wash}</li> 17 {/section} 18 </ul> 19 </li> 20 {section-else} 21 <li>attribute '{$UnvalidatedAttributes.item.identifier}': {$UnvalidatedAttributes.item.name|wash} ({$UnvalidatedAttributes.item.id})</li> 22 {/section} 23 {/section} 24 </ul> 25 </div> 26 {section-else} 27 {* no attribute validation errors *} 28 <div class="message-feedback"> 29 <h2><span class="time">[{currentdate()|l10n( shortdatetime )}]</span> {'The class definition was successfully stored.'|i18n( 'design/admin/class/edit' )}</h2> 30 </div> 31 {/section} 32 33 {section-else} {* !$validation|processed *} 34 {* we're about to store the class, so let's handle basic class properties errors (name, identifier, presence of attributes) *} 35 {section show=or( $validation.class_errors )} 36 <div class="message-warning"> 37 <h2>{"The class definition contains the following errors"|i18n("design/admin/class/edit")}:</h2> 38 <ul> 39 {section var=ClassErrors loop=$validation.class_errors} 40 <li>{$ClassErrors.item.text}</li> 41 {/section} 42 </ul> 43 </div> 44 {/section} 45 {/section} 46 47 {* Main window *} 48 <form action={concat( $module.functions.edit.uri, '/', $class.id, '/(language)/', $language_code )|ezurl} method="post" id="ClassEditForm" name="ClassEdit"> 49 <input type="hidden" name="ContentClassHasInput" value="1" /> 50 51 <div class="context-block"> 52 {* 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"> 53 54 <h1 class="context-title">{$class.identifier|class_icon( 'normal', $class.name|wash )} {'Edit <%class_name> [Class]'|i18n( 'design/admin/class/edit',, hash( '%class_name', $class.nameList[$language_code] ) )|wash}</h1> 55 56 {* DESIGN: Mainline *}<div class="header-mainline"></div> 57 58 {* DESIGN: Header END *}</div></div></div></div></div></div> 59 60 {* DESIGN: Content START *}<div class="box-ml"><div class="box-mr"><div class="box-content"> 61 62 <div class="context-information"> 63 <p class="modified">{'Last modified'|i18n( 'design/admin/class/edit' )}: {$class.modified|l10n( shortdatetime )}, {$class.modifier.contentobject.name|wash}</p> 64 {def $locale = fetch( 'content', 'locale', hash( 'locale_code', $language_code ) )} 65 <p class="translation">{$locale.intl_language_name} <img src="{$language_code|flag_icon}" alt="{$language_code}" style="vertical-align: middle;" /></p> 66 {undef $locale} 67 </div> 68 69 <div class="context-attributes"> 70 71 {* Name. *} 72 <div class="block"> 73 <label>{'Name'|i18n( 'design/admin/class/edit' )}:</label> 74 <input class="box" type="text" id="className" name="ContentClass_name" size="30" value="{$class.nameList[$language_code]|wash}" title="{'Use this field to set the informal name of the class. The name field can contain whitespaces and special characters.'|i18n( 'design/admin/class/edit' )}" /> 75 </div> 76 77 {* Identifier. *} 78 <div class="block"> 79 <label>{'Identifier'|i18n( 'design/admin/class/edit' )}:</label> 80 <input class="box" type="text" name="ContentClass_identifier" size="30" value="{$class.identifier|wash}" title="{'Use this field to set the internal name of the class. The identifier will be used in templates and in PHP code. Allowed characters: letters, numbers and underscore.'|i18n( 'design/admin/class/edit' )}" /> 81 </div> 82 83 {* Object name pattern. *} 84 <div class="block"> 85 <label>{'Object name pattern'|i18n( 'design/admin/class/edit' )}:</label> 86 <input class="box" type="text" name="ContentClass_contentobject_name" size="30" value="{$class.contentobject_name|wash}" title="{'Use this field to configure how the name of the objects are generated (also applies to nice URLs). Type in the identifiers of the attributes that should be used. The identifiers must be enclosed in angle brackets. Text outside angle brackets will be included as is.'|i18n( 'design/admin/class/edit' )}" /> 87 </div> 88 89 {* Container. *} 90 <div class="block"> 91 <label>{'Container'|i18n( 'design/admin/class/edit' )}:</label> 92 <input type="hidden" name="ContentClass_is_container_exists" value="1" /> 93 <input type="checkbox" name="ContentClass_is_container_checked" value="{$class.is_container}" {section show=$class.is_container|eq( 1 )}checked="checked"{/section} title="{'Use this checkbox to allow instances of the class to have sub items. If checked, it will be possible to create new sub-items. If not checked, the sub items will not be displayed.'|i18n( 'design/admin/class/edit' )}" /> 94 </div> 95 96 {* Class Default Sorting *} 97 <div class="block"> 98 <label>{'Default sorting of children'|i18n( 'design/admin/class/edit' )}:</label> 99 {def $sort_fields=fetch( content, available_sort_fields ) 100 $title='Use these controls to set the default sorting method for the sub items of instances of the content class.'|i18n( 'design/admin/class/edit' ) } 101 <input type="hidden" name="ContentClass_default_sorting_exists" value="1" /> 102 <select name="ContentClass_default_sorting_field" title="{$title}"> 103 {foreach $sort_fields as $sf_key => $sf_item} 104 <option value="{$sf_key}" {if eq( $sf_key, $class.sort_field )}selected="selected"{/if}>{$sf_item}</option> 105 {/foreach} 106 </select> 107 <select name="ContentClass_default_sorting_order" title="{$title}"> 108 <option value="0"{if eq($class.sort_order, 0)} selected="selected"{/if}>{'Descending'|i18n( 'design/admin/class/edit' )}</option> 109 <option value="1"{if eq($class.sort_order, 1)} selected="selected"{/if}>{'Ascending'|i18n( 'design/admin/class/edit' )}</option> 110 </select> 111 {undef} 112 </div> 113 114 {* Object availablility. *} 115 <div class="block"> 116 <label>{'Default object availability'|i18n( 'design/standard/class/edit' )}:</label> 117 <input type="hidden" name="ContentClass_always_available_exists" value="1" /> 118 <input type="checkbox" name="ContentClass_always_available"{if $class.always_available|eq(1)} checked="checked"{/if} title="{'Use this checkbox to set the default availability for the objects of this class. The availablility controls wether an object should be shown even if it does not exist in one of the languages specified by the "SiteLanguageList" setting. If this is the case, the system will use the main language of the object.'|i18n( 'design/admin/class/edit' )|wash}" /> 119 </div> 120 121 <div class="block"> 122 <label>{'Class attributes'|i18n( 'design/admin/class/edit' )}:</label> 123 </div> 124 {section show=$attributes} 125 126 <table class="list" cellspacing="0"> 127 {section var=Attributes loop=$attributes} 128 129 <tr> 130 <th class="tight"><input type="checkbox" name="ContentAttribute_id_checked[]" value="{$Attributes.item.id}" title="{'Select attribute for removal. Click the "Remove selected attributes" button to actually remove the selected attributes.'|i18n( 'design/admin/class/edit' )|wash}" /></th> 131 <th class="wide">{$Attributes.number}. {$Attributes.item.name|wash} [{$Attributes.item.data_type.information.name|wash}] (id:{$Attributes.item.id})</th> 132 <th class="tight"> 133 <div class="listbutton"> 134 <input type="image" src={'button-move_down.gif'|ezimage} alt="{'Down'|i18n( 'design/admin/class/edit' )}" name="MoveDown_{$Attributes.item.id}" title="{'Use the order buttons to set the order of the class attributes. The up arrow moves the attribute one place up. The down arrow moves the attribute one place down.'|i18n( 'design/admin/class/edit' )}" /> 135 <input type="image" src={'button-move_up.gif'|ezimage} alt="{'Up'|i18n( 'design/admin/class/edit' )}" name="MoveUp_{$Attributes.item.id}" title="{'Use the order buttons to set the order of the class attributes. The up arrow moves the attribute one place up. The down arrow moves the attribute one place down.'|i18n( 'design/admin/class/edit' )}" /> 136 <input size="2" type="text" name="ContentAttribute_priority[]" value="{$Attributes.number}" /> 137 </div> 138 </th> 139 </tr> 140 141 <tr> 142 <td> </td> 143 <!-- Attribute input Start --> 144 <td colspan="2"> 145 <input type="hidden" name="ContentAttribute_id[]" value="{$Attributes.item.id}" /> 146 <input type="hidden" name="ContentAttribute_position[]" value="{$Attributes.item.placement}" /> 147 148 149 {* Attribute name. *} 150 <div class="block"> 151 <label>{'Name'|i18n( 'design/admin/class/edit' )}:</label> 152 <input class="box" type="text" name="ContentAttribute_name[]" value="{$Attributes.item.nameList[$language_code]|wash}" title="{'Use this field to set the informal name of the attribute. This field can contain whitespaces and special characters.'|i18n( 'design/admin/class/edit' )}" /> 153 </div> 154 155 {* Attribute identifier. *} 156 <div class="block"> 157 <label>{'Identifier'|i18n( 'design/admin/class/edit' )}:</label> 158 <input class="box" type="text" name="ContentAttribute_identifier[]" value="{$Attributes.item.identifier}" title="{'Use this field to set the internal name of the attribute. The identifier will be used in templates and in PHP code. Allowed characters: letters, numbers and underscore.'|i18n( 'design/admin/class/edit' )}" /> 159 </div> 160 161 <!-- Attribute input End --> 162 163 <!-- Attribute flags Start --> 164 <div class="block inline"> 165 166 {* Required. *} 167 <label> 168 <input type="checkbox" name="ContentAttribute_is_required_checked[]" value="{$Attributes.item.id}" {section show=$Attributes.item.is_required}checked="checked"{/section} title="{'Use this checkbox to control if the user should be forced to enter information into the attribute.'|i18n( 'design/admin/class/edit' )}" /> 169 {'Required'|i18n( 'design/admin/class/edit' )} 170 </label> 171 172 {* Searchable. *} 173 174 <label> 175 {section show=$Attributes.item.data_type.is_indexable} 176 <input type="checkbox" name="ContentAttribute_is_searchable_checked[]" value="{$Attributes.item.id}" {section show=$Attributes.item.is_searchable}checked="checked"{/section} title="{'Use this checkbox to control if the contents of the attribute should be indexed by the search engine.'|i18n( 'design/admin/class/edit' )}" /> 177 {section-else} 178 <input type="checkbox" name="ContentAttribute_is_searchable_checked[]" value="" disabled="disabled" title="{'The <%datatype_name> datatype does not support search indexing.'|i18n( 'design/admin/class/edit',, hash( '%datatype_name', $Attributes.item.data_type.information.name ) )|wash}" /> 179 {/section} 180 {'Searchable'|i18n( 'design/admin/class/edit' )} 181 </label> 182 183 {* Information collector. *} 184 <label> 185 {section show=$Attributes.item.data_type.is_information_collector} 186 <input type="checkbox" name="ContentAttribute_is_information_collector_checked[]" value="{$Attributes.item.id}" {section show=$Attributes.item.is_information_collector}checked="checked"{/section} title="{'Use this checkbox to control if the attribute should collect input from users.'|i18n( 'design/admin/class/edit' )}" /> 187 {section-else} 188 <input type="checkbox" name="ContentAttribute_is_information_collector_checked[]" value="" disabled="disabled" title="{'The <%datatype_name> datatype can not be used as an information collector.'|i18n( 'design/admin/class/edit',, hash( '%datatype_name', $Attributes.item.data_type.information.name ) )|wash}" /> 189 {/section} 190 {'Information collector'|i18n( 'design/admin/class/edit' )} 191 </label> 192 193 194 {* Disable translation. *} 195 <label> 196 <input type="checkbox" name="ContentAttribute_can_translate_checked[]" value="{$Attributes.item.id}" {section show=$Attributes.item.can_translate|eq(0)}checked="checked"{/section} title="{'Use this checkbox for attributes that contain non-translatable content.'|i18n( 'design/admin/class/edit' )}" /> 197 {'Disable translation'|i18n( 'design/admin/class/edit' )} 198 </label> 199 200 </div> 201 202 {class_attribute_edit_gui class_attribute=$Attributes.item} 203 204 </td> 205 <!-- Attribute flags End --> 206 207 </tr> 208 209 {/section} 210 211 </table> 212 213 {section-else} 214 215 <div class="block"> 216 <p>{'This class does not have any attributes.'|i18n( 'design/admin/class/edit' )}</p> 217 </div> 218 {/section} 219 220 221 222 223 <div class="controlbar"> 224 225 {* Remove selected attributes button *} 226 <div class="block"> 227 {section show=$attributes} 228 <input class="button" type="submit" name="RemoveButton" value="{'Remove selected attributes'|i18n( 'design/admin/class/edit' )}" title="{'Remove the selected attributes.'|i18n( 'design/admin/class/edit' )}" /> 229 {section-else} 230 <input class="button-disabled" type="submit" name="RemoveButton" value="{'Remove selected attributes'|i18n( 'design/admin/class/edit' )}" title="{'Remove the selected attributes.'|i18n( 'design/admin/class/edit' )}" disabled="disabled" /> 231 {/section} 232 </div> 233 234 <div class="block"> 235 {include uri="design:class/datatypes.tpl" name=DataTypes id_name=DataTypeString datatypes=$datatypes current=$datatype} 236 <input class="button" type="submit" name="NewButton" value="{'Add attribute'|i18n( 'design/admin/class/edit' )}" title="{'Add a new attribute to the class. Use the menu on the left to select the attribute type.'|i18n( 'design/admin/class/edit' )}" /> 237 </div> 238 239 </div> 240 241 </div> 242 243 {* DESIGN: Content END *}</div></div></div> 244 245 246 <div class="controlbar"> 247 {* 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"> 248 <div class="block"> 249 <input class="button" type="submit" name="StoreButton" value="{'OK'|i18n( 'design/admin/class/edit' )}" title="{'Store changes and exit from edit mode.'|i18n( 'design/admin/class/edit' )}" /> 250 251 {section show=eq( ezini( 'ClassSettings', 'ApplyButton', 'content.ini' ), 'enabled' )} 252 <input class="button" type="submit" name="ApplyButton" value="{'Apply'|i18n( 'design/admin/class/edit' )}" title="{'Store changes and continue editing.'|i18n( 'design/admin/class/edit' )}" /> 253 {/section} 254 255 <input class="button" type="submit" name="DiscardButton" value="{'Cancel'|i18n( 'design/admin/class/edit' )}" title="{'Discard all changes and exit from edit mode.'|i18n( 'design/admin/class/edit' )}" /> 256 </div> 257 {* DESIGN: Control bar END *}</div></div></div></div></div></div> 258 </div> 259 260 </div> 261 262 </form> 263 264 265 {literal} 266 <script language="JavaScript" type="text/javascript"> 267 <!-- 268 window.onload=function() 269 { 270 document.getElementById('className').select(); 271 document.getElementById('className').focus(); 272 } 273 --> 274 </script> 275 {/literal}
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sat Feb 24 10:30:04 2007 | par Balluche grâce à PHPXref 0.7 |