editcomplex.smarty 3.77 KB
{capture assign=sCSS}
{literal}
/* inactivity */
.active .inactivity_message { display: none; }

/* fixed status */
.active .fixed_message { display: none; }
.active.fixed .fixed_message { display: block; }
.active.fixed .unassigned_items { display: none; }

.inactive { background: #ccc; }
.inactive .fixed_message, 
.inactive .unassigned_items,
.inactive .available_behaviours,
.inactive .behaviour_edit_options 
{ display: none; }

.helpText { color: #666; }
{/literal}
{/capture}
{$context->oPage->requireCSSStandalone($sCSS)}

<!-- include the mochikit js -->
{$context->oPage->requireJSResource("thirdpartyjs/MochiKit/Base.js")}
{$context->oPage->requireJSResource("thirdpartyjs/MochiKit/Iter.js")}
{$context->oPage->requireJSResource("thirdpartyjs/MochiKit/DateTime.js")}
{$context->oPage->requireJSResource("thirdpartyjs/MochiKit/Async.js")}
{$context->oPage->requireJSResource("thirdpartyjs/MochiKit/DOM.js")}

{$context->oPage->requireJSResource("resources/js/taillog.js")}
{$context->oPage->requireJSResource("resources/js/conditional_complex_edit.js")}

{capture assign=sJS}
addLoadEvent(updateActiveFields);
{/capture}
{$context->oPage->requireJSStandalone($sJS)}

<h2>{i18n}Edit Complex Conditional Metadata{/i18n}</h2>
<form method="POST" action="{$smarty.server.PHP_SELF}">
<input type="hidden" name="fieldset_id" id="global-fieldset-id" value="{$fieldset_id}" />

<table>
<!--
<tr>
  <th>Column 1</th>
  <th>Column 2</th>
  <th>Column 3</th>
  <th>Column 4</th>
</tr> -->
<tbody>
<tr valign="top">
{foreach from=$aFields item=oField}
  <td class="inactive" id="md_{$oField->getId()}">
	<h3>{$oField->getName()}</h3>
     <p class="inactivity_message">{i18n}This column is not active.{/i18n}</p>
     <p class="fixed_message">{i18n}Editing behaviour <strong>Jack</strong>{/i18n}</p>
     <div class="unassigned_items">
     <h3>{i18n}Unassigned/Unavailable{/i18n}</h3>
         <select class="item_list" multiple="true">
		  <!--     These are orphaned - we fire a "activate" command on load / available.
            <option value="-1">Test 1</option>
            <option value="-2">Test 2</option>
            <option value="-3">Test 3</option>
            <option value="-4">Test 4</option>
		  -->
         </select>
     <p><strong>{i18n}Assign to behaviour{/i18n}</strong></p>
     <select class="available_behaviours" onchange="assignToBehaviour(this, {$oField->getId()});">
         <option>Select a behaviour</option>
	     <!-- ditto 
		 <option value="1">Behaviour 1</option>
         <option value="2">Behaviour 2</option>
         <option value="3">Behaviour 3</option>
         <option value="4">Behaviour 4</option>
		 -->
     </select> <br />
     {i18n}<strong>or</strong> to a new behaviour called{/i18n} <br />
     <input type="text" name="new_behaviour" class="new_behaviour" />
     <input type="button" value="{i18n}create behaviour{/i18n}" onclick="assignToNewBehaviour({$oField->getId()});" />
     </div>
     <div class="behaviour_edit_options">
     <h3>{i18n}Edit Behaviour{/i18n}</h3>
     <p class="helpText">
        {i18n}Select a behaviour from this list to change the
        items which are available.{/i18n}
     </p>
         <select class="edit_behaviours" onchange="editBehaviour(this, {$oField->getId()});">
         <option>Select a behaviour</option>
		 <!--
         <option value="1">Behaviour 1</option>
         <option value="2">Behaviour 2</option>
         <option value="3">Behaviour 3</option>
         <option value="4">Behaviour 4</option>
		 -->
         </select>
     <br />
     <a href="#" onclick="changeAssignments({$oField->getId()}); return
false;">{i18n}Change Assignments for this field.{/i18n}</a>
     </div>
  </td>
{/foreach}
</tr>
</tbody>
</table>


<table id="brad-log">
<tr>
    <th>Severity</th>
    <th>Time</th>
    <th>Entry</th>
</tr>
<tbody  >

</tbody>
</table>