[ Index ]
 

Code source de eZ Publish 3.9.0

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/design/standard/templates/content/ -> browse.tpl (source)

   1  {* DO NOT EDIT THIS FILE! Use an override template instead. *}
   2  {let browse_indentation=5
   3       page_limit=15
   4       browse_list_count=fetch(content,list_count,hash(parent_node_id,$node_id,depth,1))
   5       object_array=fetch(content,list,hash(parent_node_id,$node_id,depth,1,offset,$view_parameters.offset,limit,$page_limit,sort_by,$main_node.sort_array))
   6       bookmark_list=fetch('content','bookmarks',array())
   7       recent_list=fetch('content','recent',array())
   8  
   9       select_name='SelectedObjectIDArray'
  10       select_type='checkbox'
  11       select_attribute='contentobject_id'}
  12  
  13  {section show=eq($browse.return_type,'NodeID')}
  14      {set select_name='SelectedNodeIDArray'}
  15      {set select_attribute='node_id'}
  16  {/section}
  17  {section show=eq($browse.selection,'single')}
  18      {set select_type='radio'}
  19  {/section}
  20  
  21  <form action={concat($browse.from_page)|ezurl} method="post">
  22  
  23  <table width="100%" border="0" cellspacing="0" cellpadding="0">
  24  <tr>
  25  
  26      <td width="80%" valign="top">
  27  
  28  {section show=$browse.description_template}
  29      {include name=Description uri=$browse.description_template browse=$browse main_node=$main_node}
  30  {section-else}
  31      <div class="maincontentheader">
  32      <h1>{"Browse"|i18n("design/standard/content/browse")} - {$main_node.name|wash}</h1>
  33      </div>
  34  
  35      <p>{'To select objects, choose the appropriate radiobutton or checkbox(es), and click the "Select" button.'|i18n("design/standard/content/browse")}</p>
  36      <p>{'To select an object that is a child of one of the displayed objects, click the object name and you will get a list of the children of the object.'|i18n("design/standard/content/browse")}</p>
  37  {/section}
  38  
  39          {* Browse listing start *}
  40          <table class="list" width="100%" border="0" cellspacing="0" cellpadding="0">
  41          <tr>
  42              <th width="1">
  43              </th>
  44              <th width="69%">
  45              {"Name"|i18n("design/standard/content/browse")}
  46              </th>
  47              <th width="30%">
  48              {"Class"|i18n("design/standard/content/browse")}
  49              </th>
  50              <th width="30%">
  51              {"Section"|i18n("design/standard/content/browse")}
  52              </th>
  53          </tr>
  54          <tr>
  55              <td class="bglight">
  56              {section show=and( or( $browse.permission|not,
  57                                     cond( is_set( $browse.permission.contentclass_id ),
  58                                           fetch( content, access,
  59                                                  hash( access, $browse.permission.access,
  60                                                        contentobject, $main_node,
  61                                                        contentclass_id, $browse.permission.contentclass_id ) ),
  62                                           fetch( content, access,
  63                                                  hash( access, $browse.permission.access,
  64                                                        contentobject, $main_node ) ) ) ),
  65                                 $browse.ignore_nodes_select|contains( $main_node.node_id )|not() )}
  66            {section show=is_array($browse.class_array)}
  67              {section show=$browse.class_array|contains($main_node.object.content_class.identifier)}
  68            <input type="{$select_type}" name="{$select_name}[]" value="{$main_node[$select_attribute]}" {section show=eq($browse.selection,'single')}checked="checked"{/section} />
  69          {section-else}
  70              &nbsp;
  71          {/section}
  72            {section-else}
  73              <input type="{$select_type}" name="{$select_name}[]" value="{$main_node[$select_attribute]}" {section show=eq($browse.selection,'single')}checked="checked"{/section} />
  74            {/section}
  75          {section-else}
  76              &nbsp;
  77              {/section}
  78              </td>
  79  
  80              <td class="bglight">
  81  {*                 {node_view_gui view=line content_node=$main_node node_url=concat( 'content/browse', $main_node.parent_node_id, '/' )} *}
  82                  {node_view_gui view=line content_node=$main_node node_url=false()}
  83                  {section show=$main_node.depth|gt(1)}
  84                      <a href={concat("/content/browse/",$main_node.parent_node_id,"/")|ezurl}>
  85                          [{'Up one level'|i18n('design/standard/content/browse')}]
  86                      </a>
  87                  {/section}
  88              </td>
  89  
  90              <td class="bglight">
  91              {$main_node.object.content_class.name|wash}
  92              </td>
  93  
  94              <td class="bglight">
  95              {$main_node.object.section_id}
  96              </td>
  97          </tr>
  98          {section name=Object loop=$object_array sequence=array(bgdark,bglight)}
  99          <tr class="{$Object:sequence}">
 100              <td>
 101              {section show=and( or( $browse.permission|not,
 102                                     cond( is_set( $browse.permission.contentclass_id ),
 103                                           fetch( content, access,
 104                                                  hash( access, $browse.permission.access,
 105                                                        contentobject, $:item,
 106                                                        contentclass_id, $browse.permission.contentclass_id ) ),
 107                                           fetch( content, access,
 108                                                  hash( access, $browse.permission.access,
 109                                                        contentobject, $:item ) ) ) ),
 110                                 $browse.ignore_nodes_select|contains($:item.node_id)|not() )}
 111                {section show=is_array($browse.class_array)}
 112                  {section show=$browse.class_array|contains($:item.object.content_class.identifier)}
 113                    <input type="{$select_type}" name="{$select_name}[]" value="{$:item[$select_attribute]}" />
 114                  {section-else}
 115                    &nbsp;
 116                  {/section}
 117                {section-else}
 118                  <input type="{$select_type}" name="{$select_name}[]" value="{$:item[$select_attribute]}" />
 119                {/section}
 120              {/section}
 121              </td>
 122  
 123              <td>
 124                  <img src={"1x1.gif"|ezimage} width="{mul(sub($:item.depth,$main_node.depth),$browse_indentation)}" height="1" alt="" border="0" />
 125  
 126                   {node_view_gui view=line content_node=$Object:item node_url=cond( $browse.ignore_nodes_click|contains($Object:item.node_id)|not(), concat( 'content/browse/', $Object:item.node_id, '/' ), false() )}
 127              </td>
 128  
 129              <td>
 130                      {$Object:item.object.content_class.name|wash}
 131              </td>
 132  
 133              <td>
 134                      {$:item.object.section_id}
 135              </td>
 136          </tr>
 137          {/section}
 138          </table>
 139          {* Browse listing end *}
 140  
 141      </td>
 142  
 143      <td width="20">
 144      </td>
 145  
 146      <td width="200" valign="top">
 147  
 148          {* Recent and bookmark start *}
 149          <table class="list" width="100%" border="0" cellspacing="0" cellpadding="0">
 150  
 151          <tr>
 152              <th colspan="2">
 153                  {"Top levels"|i18n("design/standard/content/browse")}
 154              </th>
 155          </tr>
 156  
 157          <tr>
 158              <td colspan="2">
 159                  {'Switch top levels by clicking one of these items.'|i18n('design/standard/content/browse')}
 160              </td>
 161          </tr>
 162  
 163          {section name=TopLevel loop=$browse.top_level_nodes
 164                   sequence=array(bgdark,bglight)}
 165          <tr class="{$:sequence}">
 166              {let top_node=fetch( content, node, hash( node_id, $:item ) )}
 167              <td width="1">
 168              {section show=and( or( $browse.permission|not,
 169                                     cond( is_set( $browse.permission.contentclass_id ),
 170                                           fetch( content, access,
 171                                                  hash( access, $browse.permission.access,
 172                                                        contentobject, $:top_node,
 173                                                        contentclass_id, $browse.permission.contentclass_id ) ),
 174                                           fetch( content, access,
 175                                                  hash( access, $browse.permission.access,
 176                                                        contentobject, $:top_node ) ) ) ),
 177                                 $browse.ignore_nodes_select|contains( $:item )|not() )}
 178                {section show=is_array($browse.class_array)|not()}
 179                  <input type="{$select_type}" name="{$select_name}[]" value="{$:item}" />
 180                {section-else}
 181                  &nbsp;
 182                {/section}
 183              {section-else}
 184                &nbsp;
 185              {/section}
 186              </td>
 187  
 188              <td>
 189                  {node_view_gui view=line content_node=$:top_node
 190                                 node_url=cond( eq( $:item, $main_node.node_id ), false(),
 191                                                $browse.ignore_nodes_click|contains( $:top_node.node_id )|not(), concat( 'content/browse/', $:top_node.node_id, '/' ), false() )}
 192              </td>
 193              {/let}
 194          </tr>
 195          {/section}
 196  
 197          <tr>
 198              <th colspan="2">
 199                  {"Bookmarks"|i18n("design/standard/content/browse")}
 200              </th>
 201          </tr>
 202  
 203          {section name=Bookmark loop=$bookmark_list show=$bookmark_list sequence=array(bgdark,bglight)}
 204          <tr class="{$:sequence}">
 205              <td width="1">
 206              {section show=and( or( $browse.permission|not,
 207                                     cond( is_set( $browse.permission.contentclass_id ),
 208                                           fetch( content, access,
 209                                                  hash( access, $browse.permission.access,
 210                                                        contentobject, $:item.node,
 211                                                        contentclass_id, $browse.permission.contentclass_id ) ),
 212                                           fetch( content, access,
 213                                                  hash( access, $browse.permission.access,
 214                                                        contentobject, $:item.node ) ) ) ),
 215                                 $browse.ignore_nodes_select|contains( $:item.node_id )|not() )}
 216                {section show=is_array($browse.class_array)}
 217                  {section show=$browse.class_array|contains($:item.object.content_class.identifier)}
 218                    <input type="{$select_type}" name="{$select_name}[]" value="{$:item.node[$select_attribute]}" />
 219                  {section-else}
 220                    &nbsp;
 221                  {/section}
 222                {section-else}
 223                  <input type="{$select_type}" name="{$select_name}[]" value="{$:item.node[$select_attribute]}" />
 224                {/section}
 225              {section-else}
 226                &nbsp;
 227              {/section}
 228              </td>
 229  
 230              <td>
 231                  {node_view_gui view=line content_node=$:item.node
 232                                 node_url=cond( eq( $:item.node_id, $main_node.node_id ), false(),
 233                                                $browse.ignore_nodes_click|contains( $:item.node_id )|not(), concat( 'content/browse/', $:item.node_id, '/' ), false() )}
 234              </td>
 235          </tr>
 236          {section-else}
 237          <tr>
 238              <td colspan="2">
 239                  {'Bookmark items are managed using %bookmarkname in the %personalname part.'
 240                   |i18n('design/standard/content/browse',,
 241                         hash('%bookmarkname',concat('<i>','My bookmarks'|i18n('design/standard/content/browse'),'</i>'),
 242                              '%personalname',concat('<i>','Personal'|i18n('design/standard/content/browse'),'</i>')))}
 243              </td>
 244          </tr>
 245          {/section}
 246  
 247          <tr height="6">
 248              <td>
 249              </td>
 250          </tr>
 251  
 252          <tr>
 253              <th colspan="2">
 254                  {"Recent items"|i18n("design/standard/content/browse")}
 255              </th>
 256          </tr>
 257  
 258          {section show=$recent_list}
 259              {section name=Recent loop=$recent_list sequence=array(bgdark,bglight)}
 260              <tr class="{$:sequence}">
 261                  <td width="1">
 262                  {section show=and( or( $browse.permission|not,
 263                                         cond( is_set( $browse.permission.contentclass_id ),
 264                                               fetch( content, access,
 265                                                      hash( access, $browse.permission.access,
 266                                                            contentobject, $:item.node,
 267                                                            contentclass_id, $browse.permission.contentclass_id ) ),
 268                                               fetch( content, access,
 269                                                      hash( access, $browse.permission.access,
 270                                                            contentobject, $:item.node ) ) ) ),
 271                                     $browse.ignore_nodes_select|contains( $:item.node_id )|not() )}
 272                    {section show=is_array($browse.class_array)|not()}
 273                      <input type="{$select_type}" name="{$select_name}[]" value="{$:item[$select_attribute]}" />
 274                    {section-else}
 275                      &nbsp;
 276                    {/section}
 277                  {section-else}
 278                    &nbsp;
 279                  {/section}
 280                  </td>
 281  
 282                  <td>
 283                  {node_view_gui view=line content_node=$:item.node
 284                                 node_url=cond( eq( $:item.node_id, $main_node.node_id ), false(),
 285                                                $browse.ignore_nodes_click|contains( $:item.node_id )|not(), concat( 'content/browse/', $:item.node_id, '/' ), false() )}
 286                  </td>
 287              </tr>
 288              {/section}
 289          {section-else}
 290          <tr>
 291              <td colspan="2">
 292                  {'Recent items are added on publishing.'|i18n('design/standard/content/browse')}
 293              </td>
 294          </tr>
 295          {/section}
 296  
 297          </table>
 298          {* Recent and bookmark end *}
 299  
 300      </td>
 301  
 302  </tr>
 303  </table>
 304  
 305  {include name=Navigator
 306           uri='design:navigator/google.tpl'
 307           page_uri=concat('/content/browse/',$main_node.node_id)
 308           item_count=$browse_list_count
 309           view_parameters=$view_parameters
 310           item_limit=$page_limit}
 311  
 312  
 313  {section name=Persistent show=$browse.persistent_data loop=$browse.persistent_data}
 314      <input type="hidden" name="{$:key|wash}" value="{$:item|wash}" />
 315  {/section}
 316  
 317  <input type="hidden" name="BrowseActionName" value="{$browse.action_name}" />
 318  {section show=$browse.browse_custom_action}
 319  <input type="hidden" name="{$browse.browse_custom_action.name}" value="{$browse.browse_custom_action.value}" />
 320  {/section}
 321  
 322          <input class="button" type="submit" name="SelectButton" value="{'Select'|i18n('design/standard/content/browse')}" />
 323  
 324  
 325  {section show=$cancel_action}
 326  <input type="hidden" name="BrowseCancelURI" value="{$cancel_action}" />
 327  {/section}
 328   <input class="button" type="submit" name="BrowseCancelButton" value="{'Cancel'|i18n( 'design/standard/content/browse' )}" />
 329  </form>
 330  
 331  <form name="test" method="post" action={"content/action"|ezurl}>
 332  <table>
 333          <tr>
 334              <th colspan="2">
 335                  {"Create new"|i18n("design/standard/content/browse")}
 336              </th>
 337          </tr>
 338          <tr class="bgdark">
 339          <td colspan="2" align="left">
 340      <select    name="ClassID" class="classcreate">
 341          {section name=Classes loop=$main_node.object.can_create_class_list}
 342          <option value="{$Classes:item.id}">{$Classes:item.name}</option>
 343          {/section}
 344      </select>
 345      <input class="menubutton" type="submit" name="NewButton" value="{'New'|i18n('design/standard/content/browse')}" />
 346      <input class="menubutton" type="hidden" name="RedirectURIAfterPublish" value="/content/browse/" />
 347      <input class="menubutton" type="hidden" name="NodeID" value="{$main_node.node_id}" />
 348      </td>
 349          </tr>
 350  </table>
 351  </form>
 352  {/let}


Généré le : Sat Feb 24 10:30:04 2007 par Balluche grâce à PHPXref 0.7