[ Index ]
 

Code source de eZ Publish 3.9.0

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

title

Body

[fermer]

/design/admin/templates/ -> locations.tpl (source)

   1  {* Locations window. *}
   2  {let assigned_nodes=$node.object.assigned_nodes
   3       assignment_count=$assigned_nodes|count
   4       has_manage_locations=fetch( 'user', 'current_user' ).has_manage_locations
   5       can_edit_node=$node.can_edit
   6       can_remove_location=false()
   7       can_manage_location=or(fetch( 'content', 'access',
   8                          hash( 'access', 'manage_locations',
   9                          'contentobject', $node)),
  10                  fetch( 'content', 'access',
  11                          hash( 'access', 'create',
  12                          'contentobject', $node)))}
  13  
  14  <form name="locationsform" method="post" action={'content/action'|ezurl}>
  15  <input type="hidden" name="ContentNodeID" value="{$node.node_id}" />
  16  <input type="hidden" name="ContentObjectID" value="{$node.object.id}" />
  17  <input type="hidden" name="ViewMode" value="{$viewmode|wash}" />
  18  <input type="hidden" name="ContentObjectLanguageCode" value="{$language_code|wash}" />
  19  
  20  <div class="context-block">
  21  
  22  {* 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">
  23  
  24  <h2 class="context-title">{'Locations [%locations]'|i18n( 'design/admin/node/view/full',, hash( '%locations', $assigned_nodes|count ) )}</h2>
  25  
  26  {* DESIGN: Subline *}<div class="header-subline"></div>
  27  
  28  {* DESIGN: Header END *}</div></div></div></div></div></div>
  29  
  30  {* DESIGN: Content START *}<div class="box-ml"><div class="box-mr"><div class="box-content">
  31  
  32  <table class="list" cellspacing="0">
  33  <tr>
  34      <th class="tight"><img src={'toggle-button-16x16.gif'|ezimage} alt="{'Invert selection.'|i18n( 'design/admin/node/view/full' )}" title="{'Invert selection.'|i18n( 'design/admin/node/view/full' )}" onclick="ezjs_toggleCheckboxes( document.locationsform, 'LocationIDSelection[]' ); return false;"/></th>
  35      <th class="wide">{'Location'|i18n( 'design/admin/node/view/full' )}</th>
  36      <th class="tight">{'Sub items'|i18n( 'design/admin/node/view/full' )}</th>
  37  {*   <th class="tight">{'Sorting'|i18n( 'design/admin/node/view/full' )}</th> *}
  38      <th class="tight">{'Visibility'|i18n( 'design/admin/node/view/full' )}</th>
  39      <th class="tight">{'Main'|i18n( 'design/admin/node/view/full' )}</th>
  40  </tr>
  41  {foreach $assigned_nodes as $assignment_node
  42           sequence array( bglight, bgdark ) as $sequence}
  43      {let assignment_path=$assignment_node.path|append( $assignment_node )}
  44  
  45  <tr class="{$sequence}">
  46  
  47      {* Remove. *}
  48      <td>
  49      {if and( or( $assignment_node.can_remove, $assignment_node.can_remove_location ), eq( $assignment_node.node_id, $node.main_node_id )|not )}
  50          <input type="checkbox" name="LocationIDSelection[]" value="{$assignment_node.node_id}" title="{'Select location for removal.'|i18n( 'design/admin/node/view/full' )}" />
  51          {set can_remove_location=true()}
  52      {else}
  53          <input type="checkbox" name="LocationIDSelection[]" value="{$assignment_node.node_id}" disabled="disabled" title="{'This location can not be removed either because you do not have permissions to remove it or because it is currently being displayed.'|i18n( 'design/admin/node/view/full' )}" />
  54      {/if}
  55      </td>
  56  
  57      {* Location.  *}
  58      {section show=and( eq( $assignment_node.path_string, $node.path_string ), $assigned_nodes|count|gt(1))}
  59      <td><b>{section var=node_path loop=$assignment_path} <a href={$node_path.url|ezurl}>{$node_path.name|wash}</a>{delimiter} / {/delimiter}{/section}</b></td>
  60      {section-else}
  61      <td>{section var=node_path loop=$assignment_path} <a href={$node_path.url|ezurl}>{$node_path.name|wash}</a>{delimiter} / {/delimiter}{/section}</td>
  62      {/section}
  63  
  64  
  65      {* Sub items. *}
  66      <td class="number" align="right">{$assignment_node.children_count}</td>
  67  
  68      {* Sorting. *}
  69  {*
  70      <td class="nowrap">{$assignment_node.item.sort_array[0][0]} / {$assignment_node.item.sort_array[0][1]|choose( 'down'|i18n( 'design/admin/node/view/full' ), 'up'|i18n( 'design/admin/node/view/full' ) )}</td>
  71  *}
  72  
  73      {* Visibility. *}
  74      <td class="nowrap">
  75      {section show=$assignment_node.is_invisible}
  76          {section show=$assignment_node.is_hidden}
  77              {'Hidden'|i18n( 'design/admin/node/view/full' )}
  78              [ <a href={concat( '/content/hide/', $assignment_node.node_id )|ezurl} title="{'Make location and all sub items visible.'|i18n( 'design/admin/node/view/full' )}">{'Reveal'|i18n( 'design/admin/node/view/full' )}</a> ]
  79          {section-else}
  80              {'Hidden by superior'|i18n( 'design/admin/node/view/full' )}
  81              [ <a href={concat( '/content/hide/', $assignment_node.node_id )|ezurl} title="{'Hide location and all sub items.'|i18n( 'design/admin/node/view/full' )}">{'Hide'|i18n( 'design/admin/node/view/full' )}</a> ]
  82          {/section}
  83      {section-else}
  84          {'Visible'|i18n( 'design/admin/node/view/full' )}
  85          [ <a href={concat( '/content/hide/', $assignment_node.node_id )|ezurl} title="{'Hide location and all sub items.'|i18n( 'design/admin/node/view/full' )}" >{'Hide'|i18n( 'design/admin/node/view/full' )}</a> ]
  86      {/section}
  87      </td>
  88  
  89      {* Main node. *}
  90      <td>
  91  
  92      {section show=$assignment_node.can_edit}
  93  
  94      {section show=$assignment_count|gt( 1 ) }
  95      <input type="radio" {section show=$assignment_node.is_main}checked="checked"{/section} name="MainAssignmentCheck" value="{$assignment_node.node_id}" title="{'Use these radio buttons to select the desired main location.'|i18n( 'design/admin/node/view/full' )}" />
  96      {section-else}
  97      <input type="radio" {section show=$assignment_node.is_main}checked="checked"{/section} name="MainAssignmentCheck" value="{$assignment_node.node_id}" disabled="disabled" title="{'The item being displayed has only one location and thus it does not make sense to set it.'|i18n( 'design/admin/node/view/full' )}" />
  98      {/section}
  99  
 100      {section-else}
 101  
 102      <input type="radio" {section show=$assignment_node.is_main}checked="checked"{/section} name="MainAssignmentCheck" value="{$assignment_node.node_id}" disabled="disabled" title="{'You can not set the main location because you do not have permissions to edit the item being displayed.'|i18n( 'design/admin/node/view/full' )}" />
 103  
 104      {/section}
 105  
 106      </td>
 107  </tr>
 108  {/let}
 109  {/foreach}
 110  </table>
 111  
 112  {* DESIGN: Content END *}</div></div></div>
 113  
 114  {* Required to get the main node selection to work,
 115     unchecked radiobuttons will not be sent by browser. *}
 116  <input type="hidden" name="HasMainAssignment" value="1" />
 117  
 118  <div class="controlbar">
 119  
 120  {* 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">
 121  
 122  <div class="block">
 123  <div class="button-left">
 124  {if or( $can_edit_node, $has_manage_locations )}
 125  
 126      {if $can_remove_location}
 127      <input class="button" type="submit" name="RemoveAssignmentButton" value="{'Remove selected'|i18n( 'design/admin/node/view/full' )}" title="{'Remove selected locations from the list above.'|i18n( 'design/admin/node/view/full' )}" />
 128      {else}
 129      <input class="button-disabled" type="submit" name="RemoveAssignmentButton" value="{'Remove selected'|i18n( 'design/admin/node/view/full' )}" title="{'There is no removable location.'|i18n( 'design/admin/node/view/full' )}" disabled="disabled" />
 130      {/if}
 131  
 132      {if and( $can_manage_location, ne( $node.node_id, ezini( 'NodeSettings', 'RootNode','content.ini' ) ), ne( $node.node_id, ezini( 'NodeSettings', 'MediaRootNode', 'content.ini' ) ), ne( $node.node_id, ezini( 'NodeSettings', 'UserRootNode', 'content.ini' ) ) )}
 133      <input class="button" type="submit" name="AddAssignmentButton" value="{'Add locations'|i18n( 'design/admin/node/view/full' )}" title="{'Add one or more new locations.'|i18n( 'design/admin/node/view/full' )}" />
 134      {else}
 135      <input class="button-disabled" type="submit" name="AddAssignmentButton" value="{'Add locations'|i18n( 'design/admin/node/view/full' )}" title="{'It is not possible to add locations to a top level node.'|i18n( 'design/admin/node/view/full' )}" disabled="disabled" />
 136      {/if}
 137  
 138  {else}
 139      <input class="button-disabled" type="submit" name="" value="{'Remove selected'|i18n( 'design/admin/node/view/full' )}" disabled="disabled" title="{'You can not remove any locations because you do not have permissions to edit the current item.'|i18n( 'design/admin/node/view/full' )}" />
 140      <input class="button-disabled" type="submit" name="" value="{'Add locations'|i18n( 'design/admin/node/view/full' )}" disabled="disabled" title="{'You can not add new locations because you do not have permissions to edit the current item.'|i18n( 'design/admin/node/view/full' )}" />
 141  {/if}
 142  </div>
 143  
 144  <div class="button-right">
 145  {if $can_edit_node}
 146  
 147  {if $assignment_count|gt( 1 )}
 148      <input class="button" type="submit" name="UpdateMainAssignmentButton" value="{'Set main'|i18n( 'design/admin/node/view/full' )}" title="{'Select the desired main location using the radio buttons above and click this button to store the setting.'|i18n( 'design/admin/node/view/full' )}" />
 149  {else}
 150      <input class="button-disabled" type="submit" name="UpdateMainAssignmentButton" value="{'Set main'|i18n( 'design/admin/node/view/full' )}" disabled="disabled" title="{'You can not set the main location because there is only one location present.'|i18n( 'design/admin/node/view/full' )}" />
 151  {/if}
 152  
 153  {else}
 154      <input class="button-disabled" type="submit" name="" value="{'Set main'|i18n( 'design/admin/node/view/full' )}" disabled="disabled" title="{'You can not set the main location because you do not have permissions to edit the current item.'|i18n( 'design/admin/node/view/full' )}" />
 155  {/if}
 156  </div>
 157  
 158  <div class="break"></div>
 159  </div>
 160  
 161  {* DESIGN: Control bar END *}</div></div></div></div></div></div>
 162  
 163  </div>
 164  </div>
 165  
 166  </form>
 167  {/let}


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