[ Index ] |
|
Code source de eZ Publish 3.9.0 |
1 {* DO NOT EDIT THIS FILE! Use an override template instead. *} 2 3 <div class="context-block" id="content-relation-items"> 4 5 {* 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"> 6 7 <h2 class="context-title">{'Related objects [%related_objects]'|i18n( 'design/admin/content/edit',, hash( '%related_objects', $related_contentobjects|count ) )}</h2> 8 9 {* DESIGN: Subline *}<div class="header-subline"></div> 10 11 {* DESIGN: Header END *}</div></div></div></div></div></div> 12 13 {* DESIGN: Content START *}<div class="box-ml"><div class="box-mr"><div class="box-content"> 14 15 {def $relation_type_names = hash( 'common', 'Common'|i18n( 'design/admin/content/edit' ), 16 'xml_embed', 'Embedded'|i18n( 'design/admin/content/edit' ), 17 'xml_link', 'Linked'|i18n( 'design/admin/content/edit' ), 18 'attribute', 'Attribute'|i18n( 'design/admin/content/edit' ) )} 19 {def $relation_name_delimiter = ', '} 20 21 {def $empty_array = array( 1 )} 22 {set $empty_array = $empty_array|extract( 1 )} 23 24 {section show=$related_contentobjects|count|gt( 0 )} 25 26 {* Related images *} 27 {section show=$grouped_related_contentobjects.images|count|gt( 0 )} 28 <h3>{'Related images [%related_images]'|i18n( 'design/admin/content/edit',, hash( '%related_images', $grouped_related_contentobjects.images|count ) )}</h3> 29 <table class="list-thumbnails" cellspacing="0"> 30 <tr> 31 32 {section var=RelatedImageObjects loop=$grouped_related_contentobjects.images} 33 <td> 34 <div class="image-thumbnail-item"> 35 {section show=$RelatedImageObjects.item.can_read } 36 {attribute_view_gui attribute=$RelatedImageObjects.item.data_map.image image_class=small} 37 <p> 38 <input type="checkbox" id="related-object-id-{$RelatedImageObjects.item.id}" name="DeleteRelationIDArray[]" value="{$RelatedImageObjects.item.id}" {if $related_contentobjects_id.common|contains( $RelatedImageObjects.item.id )|not}disabled="disabled"{/if} /> 39 {$RelatedImageObjects.item.name|wash} 40 </p> 41 {section-else} 42 <p> 43 {$RelatedImageObjects.item.name|wash} - {"You do not have sufficient permissions to view this object"|i18n( 'design/admin/content/edit' )} 44 </p> 45 {/section} 46 <input class="linkbox" type="text" value="<embed href='ezobject://{$RelatedImageObjects.item.id}' />" readonly="readonly" title="{'Copy this code and paste it into an XML field to embed the object.'|i18n( 'design/admin/content/edit' )}" /><br /> 47 <input class="linkbox" type="text" value="<link href='ezobject://{$RelatedImageObjects.item.id}'></link>" readonly="readonly" title="{'Copy this code and paste it into an XML field to link the object.'|i18n( 'design/admin/content/edit' )}" /><br /> 48 {def $relation_name_array = $empty_array} 49 {foreach $related_contentobjects_id as $relation_type => $relation_id_array} 50 {if $relation_id_array|contains( $RelatedImageObjects.item.id )} 51 {set $relation_name_array = $relation_name_array|append( $relation_type_names[$relation_type] )} 52 {/if} 53 {/foreach} 54 ({$relation_name_array|implode( $relation_name_delimiter )}) 55 {undef $relation_name_array} 56 </div> 57 </td> 58 {delimiter modulo=4} 59 </tr><tr> 60 {/delimiter} 61 {/section} 62 63 </tr> 64 </table> 65 66 {/section} 67 68 69 70 {* Related files *} 71 {section show=$grouped_related_contentobjects.files|count|gt( 0 )} 72 <h3>{'Related files [%related_files]'|i18n( 'design/admin/content/edit',, hash( '%related_files', $grouped_related_contentobjects.files|count ) )}</h3> 73 <div class="file-detail-list"> 74 75 <table class="list" cellspacing="0"> 76 <tr> 77 <th> </th> 78 <th class="name">{'Name'|i18n( 'design/admin/content/edit' )}</th> 79 <th class="class">{'File type'|i18n( 'design/admin/content/edit' )}</th> 80 <th class="filesize">{'Size'|i18n( 'design/admin/content/edit' )}</th> 81 <th class="code">{'XML code'|i18n( 'design/admin/content/edit' )}</th> 82 <th class="code">{'Relation type'|i18n( 'design/admin/content/edit' )}</th> 83 </tr> 84 85 {section var=RelatedFileObjects loop=$grouped_related_contentobjects.files sequence=array( bglight, bgdark )} 86 <tr class="{$RelatedFileObjects.sequence|wash}"> 87 {section show=$RelatedFileObjects.item.can_read} 88 <td class="checkbox"><input type="checkbox" id="related-object-id-{$RelatedFileObjects.item.id}" name="DeleteRelationIDArray[]" value="{$RelatedFileObjects.item.id}" {if $related_contentobjects_id.common|contains( $RelatedFileObjects.item.id )|not}disabled="disabled"{/if} /></td> 89 <td class="name">{$RelatedFileObjects.item.class_name|class_icon( small, $RelatedFileObjects.class_name )} {$RelatedFileObjects.item.name|wash}</td> 90 <td class="filetype">{$RelatedFileObjects.item.data_map.file.content.mime_type|wash}</td> 91 <td class="filesize">{$RelatedFileObjects.item.data_map.file.content.filesize|si( byte )}</td> 92 <td class="code"> 93 <input class="linkbox" type="text" value="<embed href='ezobject://{$RelatedFileObjects.item.id}' />" readonly="readonly" title="{'Copy this code and paste it into an XML field to embed the object.'|i18n( 'design/admin/content/edit' )}" /><br /> 94 <input class="linkbox" type="text" value="<link href='ezobject://{$RelatedFileObjects.item.id}'></link>" readonly="readonly" title="{'Copy this code and paste it into an XML field to link the object.'|i18n( 'design/admin/content/edit' )}" /> 95 </td> 96 <td class="code"> 97 {def $relation_name_array = $empty_array} 98 {foreach $related_contentobjects_id as $relation_type => $relation_id_array} 99 {if $relation_id_array|contains( $RelatedFileObjects.item.id )} 100 {set $relation_name_array = $relation_name_array|append( $relation_type_names[$relation_type] )} 101 {/if} 102 {/foreach} 103 {$relation_name_array|implode( $relation_name_delimiter )} 104 {undef $relation_name_array} 105 </td> 106 {section-else} 107 <td class="checkbox"> </td> 108 <td colspan="3">{$RelatedFileObjects.item.name|wash} - {"You do not have sufficient permissions to view this object"|i18n( 'design/admin/content/edit' )}</td> 109 <td class="code"> 110 <input class="linkbox" type="text" value="<embed href='ezobject://{$RelatedFileObjects.item.id}' />" readonly="readonly" title="{'Copy this code and paste it into an XML field to embed the object.'|i18n( 'design/admin/content/edit' )}" /><br /> 111 <input class="linkbox" type="text" value="<link href='ezobject://{$RelatedFileObjects.item.id}'></link>" readonly="readonly" title="{'Copy this code and paste it into an XML field to link the object.'|i18n( 'design/admin/content/edit' )}" /> 112 </td> 113 <td class="code"> 114 {def $relation_name_array = $empty_array} 115 {foreach $related_contentobjects_id as $relation_type => $relation_id_array} 116 {if $relation_id_array|contains( $RelatedFileObjects.item.id )} 117 {set $relation_name_array = $relation_name_array|append( $relation_type_names[$relation_type] )} 118 {/if} 119 {/foreach} 120 {$relation_name_array|implode( $relation_name_delimiter )} 121 {undef $relation_name_array} 122 </td> 123 {/section} 124 </tr> 125 126 {/section} 127 128 </table> 129 </div> 130 {/section} 131 132 133 {* Related objects *} 134 {section show=$grouped_related_contentobjects.objects|count|gt( 0 )} 135 <h3>{'Related content [%related_objects]'|i18n( 'design/admin/content/edit',, hash( '%related_objects', $grouped_related_contentobjects.objects|count ) )}</h3> 136 <div class="related-detail-list"> 137 138 <table class="list" cellspacing="0"> 139 <tr> 140 <th> </th> 141 <th class="name">{'Name'|i18n( 'design/admin/content/edit' )}</th> 142 <th class="class">{'Type'|i18n( 'design/admin/content/edit' )}</th> 143 <th class="code">{'XML code'|i18n( 'design/admin/content/edit' )}</th> 144 <th class="code">{'Relation type'|i18n( 'design/admin/content/edit' )}</th> 145 </tr> 146 147 {section var=RelatedObjects loop=$grouped_related_contentobjects.objects sequence=array( bglight, bgdark )} 148 149 <tr class="{$RelatedObjects.sequence|wash}"> 150 {section show=$RelatedObjects.item.can_read} 151 <td class="checkbox"><input type="checkbox" id="related-object-id-{$RelatedObjects.item.id}" name="DeleteRelationIDArray[]" value="{$RelatedObjects.item.id}" {if $related_contentobjects_id.common|contains( $RelatedObjects.item.id )|not}disabled="disabled"{/if} /></td> 152 <td class="name">{$RelatedObjects.item.class_name|class_icon( small, $RelatedObjects.class_name )} {$RelatedObjects.item.name|wash}</td> 153 <td class="class">{$RelatedObjects.item.class_name|wash}</td> 154 <td class="code"> 155 <input class="linkbox" type="text" value="<embed href='ezobject://{$RelatedObjects.item.id}' />" readonly="readonly" title="{'Copy this code and paste it into an XML field to embed the object.'i18n( 'design/admin/content/edit' )}" /><br /> 156 <input class="linkbox" type="text" value="<link href='ezobject://{$RelatedObjects.item.id}'></link>" readonly="readonly" title="{'Copy this code and paste it into an XML field to link the object.'|i18n( 'design/admin/content/edit' )}" /> 157 </td> 158 <td class="code"> 159 {def $relation_name_array = $empty_array} 160 {foreach $related_contentobjects_id as $relation_type => $relation_id_array} 161 {if $relation_id_array|contains( $RelatedObjects.item.id )} 162 {set $relation_name_array = $relation_name_array|append( $relation_type_names[$relation_type] )} 163 {/if} 164 {/foreach} 165 {$relation_name_array|implode( $relation_name_delimiter )} 166 {undef $relation_name_array} 167 </td> 168 {section-else} 169 <td class="checkbox"> </td> 170 <td colspan="2">{$RelatedObjects.item.name|wash} - {"You do not have sufficient permissions to view this object"|i18n( 'design/admin/content/edit' )}</td> 171 <td class="code"> 172 <input class="linkbox" type="text" value="<embed href='ezobject://{$RelatedObjects.item.id}' />" readonly="readonly" title="{'Copy this code and paste it into an XML field to embed the object.'i18n( 'design/admin/content/edit' )}" /> 173 <input class="linkbox" type="text" value="<link href='ezobject://{$RelatedObjects.item.id}'></link>" readonly="readonly" title="{'Copy this code and paste it into an XML field to link the object.'|i18n( 'design/admin/content/edit' )}" /> 174 </td> 175 <td class="code"> 176 {def $relation_name_array = $empty_array} 177 {foreach $related_contentobjects_id as $relation_type => $relation_id_array} 178 {if $relation_id_array|contains( $RelatedObjects.item.id )} 179 {set $relation_name_array = $relation_name_array|append( $relation_type_names[$relation_type] )} 180 {/if} 181 {/foreach} 182 {$relation_name_array|implode( $relation_name_delimiter )} 183 {undef $relation_name_array} 184 </td> 185 {/section} 186 </tr> 187 188 {/section} 189 190 </table> 191 </div> 192 {/section} 193 194 {section-else} 195 <div class="block"> 196 <p>{'There are no objects related to the one that is currently being edited.'|i18n( 'design/admin/content/edit' )}</p> 197 </div> 198 {/section} 199 200 {* DESIGN: Content END *}</div></div></div> 201 202 <div class="controlbar"> 203 {* 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"> 204 <div class="block"> 205 206 {section show=$related_contentobjects_id['common']|count|gt( 0 )} 207 <input class="button" type="submit" name="DeleteRelationButton" value="{'Remove selected'|i18n( 'design/admin/content/edit' )}" title="{'Remove the selected items from the list(s) above. It is only the relations that will be removed. The items will not be deleted.'|i18n( 'design/admin/content/edit' )}" /> 208 {section-else} 209 <input class="button-disabled" type="submit" name="DeleteRelationButton" value="{'Remove selected'|i18n( 'design/admin/content/edit' )}" disabled="disabled" /> 210 {/section} 211 212 <input class="button" type="submit" name="BrowseObjectButton" value="{'Add existing'|i18n( 'design/admin/content/edit' )}" title="{'Add an existing item as a related object.'|i18n( 'design/admin/content/edit' )}" /> 213 <input class="button" type="submit" name="UploadFileRelationButton" value="{'Upload new'|i18n( 'design/admin/content/edit' )}" title="{'Upload a file and add it as a related object.'|i18n( 'design/admin/content/edit' )}" /> 214 </div> 215 {* DESIGN: Control bar END *}</div></div></div></div></div></div> 216 </div> 217 218 </div>
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 |