diff options
| author | lsces <lester@lsces.co.uk> | 2012-08-06 11:32:45 +0100 |
|---|---|---|
| committer | lsces <lester@lsces.co.uk> | 2012-08-06 11:32:45 +0100 |
| commit | 31cacc6c7129ca9e9cd46c83fda72233f0eae95c (patch) | |
| tree | 2476b7fd84bded4add9856766c364d8a7d0db9ed /templates | |
| parent | a177cfa6b9e4cd225de8423e178a2f464da96bf1 (diff) | |
| download | themes-31cacc6c7129ca9e9cd46c83fda72233f0eae95c.tar.gz themes-31cacc6c7129ca9e9cd46c83fda72233f0eae95c.tar.bz2 themes-31cacc6c7129ca9e9cd46c83fda72233f0eae95c.zip | |
Separate templates for role model
still need selecting corretly
Theme still needs some work to merge remaining group/role switch
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/admin_layout_role.tpl | 333 | ||||
| -rw-r--r-- | templates/module_config_role_inc.tpl | 80 |
2 files changed, 413 insertions, 0 deletions
diff --git a/templates/admin_layout_role.tpl b/templates/admin_layout_role.tpl new file mode 100644 index 0000000..b92db1e --- /dev/null +++ b/templates/admin_layout_role.tpl @@ -0,0 +1,333 @@ +{strip} +{formfeedback hash=$feedback} + + {form legend="Create Layout for Packages and Sections" method="get"} + <input type="hidden" name="page" value="{$page}" /> + <div class="row"> + {formlabel label="Customized layout" for="module_package"} + {forminput} + <select name="module_package" id="module_package" onchange="this.form.submit();"> + {foreach key=layoutName item=layoutDisplay from=$layoutList} + <option value="{$layoutName}" {if $module_package == $layoutName}selected="selected"{/if}> + {if $layoutName eq 'kernel'} + {tr}Site Default{/tr} + {else} + {tr}{$layoutDisplay|capitalize}{/tr} + {/if} + </option> + {/foreach} + <option value="home" {if $module_package == 'home'}selected="selected"{/if}>{tr}User Homepages{/tr}</option> + </select> + + <noscript> + {formhelp note="Apply this setting before you customise and assign modules below."} + </noscript> + {/forminput} + </div> + + {if $cloneLayouts and $module_package != kernel} + <div class="row"> + {formlabel label="Copy existing layout" for="clone_layout"} + {forminput} + <ul> + {foreach from=$cloneLayouts item=clone_layout key=clone_package} + {if $clone_package != $module_package} + <li><a href="{$smarty.const.KERNEL_PKG_URL}admin/index.php?page={$page}&from_layout={$clone_package}&to_layout={$module_package}&module_package={$module_package}">{if $clone_package == kernel}{tr}Site Default{/tr}{else}{tr}{$clone_package|capitalize}{/tr}{/if}</a></li> + {/if} + {/foreach} + </ul> + {tr}to {if $module_package == kernel}Site Default{else}{$module_package|capitalize}{/if}{/tr} + {/forminput} + </div> + {/if} + + <noscript> + <div class="row submit"> + <input type="submit" name="fSubmitCustomize" value="{tr}Customize{/tr}" /> + </div> + </noscript> + {/form} + + <table class="layouts_table"> + <caption>{tr}Current Layout of '{if !$module_package || $module_package=='kernel'}Site Default{else}{$module_package|capitalize}{/if}'{/tr}</caption> + <tr> + {foreach from=$layoutAreas item=area key=colkey} + {if $colkey =='top'} + <td class="{cycle values="even,odd"} aligntop" colspan="3"> + {elseif $colkey =='bottom'} + </tr> + <tr> + <td class="{cycle values="even,odd"} aligntop" colspan="3"> + {else} + <td class="{cycle values="even,odd"} width33p aligntop"> + {/if} + + <table class="data width100p"> + <tr> + <th>{tr}{$colkey} area{/tr}</th> + </tr> + {section name=ix loop=$editLayout.$area} + <tr> + <td> + {include file="bitpackage:themes/module_config_inc.tpl" modInfo=$editLayout.$area[ix] condensed=1} + </td> + </tr> + {sectionelse} + <tr> + <td colspan="3" class="aligncenter"> + {if $colkey eq 'center'}{tr}Default{/tr}{else}{tr}None{/tr}{/if} + </td> + </tr> + {/section} + </table> + </td> + + {if $colkey =='top'} + </tr> + <tr> + {/if} + {/foreach} + </tr> + </table> + + +{jstabs} + {jstab title="Modules"} + {form action=$smarty.server.SCRIPT_NAME legend="Assign modules to columns and areas"} + <input type="hidden" name="page" value="{$page}" /> + <input type="hidden" name="module_package" value="{$module_package}" /> + <div class="row"> + {formlabel label="Package"} + {forminput} + <span class="highlight">{tr}{if !$module_package || $module_package eq 'kernel'}Site Default{else}{$module_package|capitalize}{/if}{/tr}</span> + {formhelp note="This is the package you are currently editing."} + {/forminput} + </div> + + {if $fEdit && $fAssign.name} + <input type="hidden" name="assign_name" value="{$fAssign.name}" /> + {else} + <div class="row"> + {formlabel label="Module" for="module_rsrc"} + {forminput} + {*html_options name="fAssign[module_rsrc]" id="module_rsrc" options=$allModules selected=`$fAssign.name` *} + <select name="fAssign[module_rsrc]" id="module_rsrc" onchange="javascript:BitThemes.viewModuleParamsHelp( this.options[this.selectedIndex].value )"> + {foreach key=pkg item=modules from=$allModules} + <optgroup label="{$pkg}"> + {foreach key=value item=module from=$modules} + <option value="{$value}" {if $fAssign.name eq $value}selected="selected"{/if}>{$module.title}</option> + {/foreach} + </optgroup> + {/foreach} + </select> + {formhelp note="Extended help can be found at the end of this page."} + {/forminput} + </div> + {/if} + + <div class="row"> + {formlabel label="Position" for="layout_area"} + {forminput} + <select name="fAssign[layout_area]" id="layout_area"> + {if $gBitSystem->isFeatureActive('site_top_column')} + <option value="t" {if $fAssign.layout_area eq 't'}selected="selected"{/if}>{tr}Top{/tr}</option> + {/if} + <option value="l" {if $fAssign.layout_area eq 'l'}selected="selected"{/if}>{tr}Left column{/tr}</option> + <option value="r" {if $fAssign.layout_area eq 'r'}selected="selected"{/if}>{tr}Right column{/tr}</option> + {if $gBitSystem->isFeatureActive('site_bottom_column')} + <option value="b" {if $fAssign.layout_area eq 'b'}selected="selected"{/if}>{tr}Bottom{/tr}</option> + {/if} + </select> + {formhelp note="Select the column this module should be displayed in."} + {/forminput} + </div> + + <div class="row"> + {formlabel label="Title" for="title"} + {forminput} + <input type="text" size="48" name="fAssign[title]" id="title" value="{$fAssign.title|escape}" /> + {formhelp note="Here you can override the default title used by the module. This is global for layouts in all sections. If you want to add a title just for one section, enter a module parameter below such as: title=My Title"} + {/forminput} + </div> + + <div class="row"> + {formlabel label="Order" for="pos"} + {forminput} + <select name="fAssign[pos]" id="pos"> + {section name=ix loop=$orders} + <option value="{$orders[ix]|escape}" {if $fAssign.pos eq $orders[ix]}selected="selected"{/if}>{$orders[ix]}</option> + {/section} + </select> + {formhelp note="Select where within the column the module should be displayed."} + {/forminput} + </div> + + <div class="row"> + {formlabel label="Cache Time" for="cache_time"} + {forminput} + <input type="text" size="5" name="fAssign[cache_time]" id="cache_time" value="{$fAssign.cache_time|escape}" /> seconds + {formhelp note="This is the number of seconds the module is cached before the content is refreshed. The higher the value, the less load there is on the server. (optional)"} + {/forminput} + </div> + + <div class="row"> + {formlabel label="Rows" for="module_rows"} + {forminput} + <input type="text" size="5" name="fAssign[module_rows]" id="module_rows" value="{$fAssign.module_rows|escape}" /> + {formhelp note="Select what the maximum number of items are displayed. (optional - default is 10)"} + {/forminput} + </div> + + <div class="row"> + {formlabel label="Parameters" for="params"} + {forminput} + <input type="text" size="48" name="fAssign[params]" id="params" value="{$fAssign.params|escape}" /> + {formhelp note="Here you can enter any additional parameters the module might need. Use the http query string form, e.g. foo=123&bar=ABC (optional)"} + {foreach key=pkg item=modules from=$allModules} + {foreach key=value item=module from=$modules} + {if $module.params} + <table id="themes_params_help_{$value}" class="themes_params_help" style="display:none"> + <tr> + <th colspan=2 style="text-align:left">Options for {$module.title}</th> + </tr> + {foreach key=param item=data from=$module.params} + {if $data.help} + <tr> + <td style="font-weight:bold; padding-right:4px">{$param}</td> + <td>{$data.help}</td> + </tr> + {/if} + {/foreach} + </table> + {/if} + {/foreach} + {/foreach} + {/forminput} + </div> + + <div class="row"> + {formlabel label="Roles" for="roles"} + {forminput} + <select multiple="multiple" size="5" name="roles[]" id="roles"> + {foreach from=$roles key=roleId item=role} + <option value="{$roleId}" {if $role.selected eq 'y'}selected="selected"{/if}>{$role.role_name}</option> + {/foreach} + </select> + {formhelp note="Select the roles of users who can see this module. If you select no role, the module will be visible to all users."} + {/forminput} + </div> + + <div class="row"> + {formlabel label="Add to all Layouts" for="add_to_all"} + {forminput} + <input type="checkbox" value="y" id="add_to_all" name="fAssign[add_to_all]" /> + {formhelp note="If you check this, the module will be added to all custom layouts."} + {/forminput} + </div> + + <div class="row submit"> + <input type="submit" name="ColumnTabSubmit" value="{tr}Assign{/tr}" /> + </div> + {/form} + {/jstab} + + {jstab title="Center"} + {form action=$smarty.server.SCRIPT_NAME legend="Assign content to the center area"} + <input type="hidden" name="page" value="{$page}" /> + <input type="hidden" name="module_package" value="{$module_package}" /> + <input type="hidden" name="fAssign[layout_area]" value="c" /> + + <div class="row"> + {formlabel label="Package"} + {forminput} + <span class="highlight">{tr}{if !$module_package || $module_package eq 'kernel'}Site Default{else}{$module_package|capitalize}{/if}{/tr}</span> + {formhelp note="This is the package you are currently editing."} + {/forminput} + </div> + + <div class="row"> + {formlabel label="Center Piece" for="module"} + {forminput} + {if $fEdit && $fAssign.name} + <input type="hidden" name="fAssign[module]" value="{$fAssign.module}" id="module" />{$fAssign.module} + {else} + {* html_options name="fAssign[module_rsrc]" id="module" values=$allCenters options=$allCenters selected=`$mod` *} + <select name="fAssign[module_rsrc]" id="module" {*onchange="javascript:BitThemes.viewModuleParamsHelp( this.options[this.selectedIndex].value )"*}> + {foreach key=pkg item=modules from=$allCenters} + <optgroup label="{$pkg}"> + {foreach key=value item=module from=$modules} + <option value="{$value}" {if $mod eq $value}selected="selected"{/if}>{$module.title}</option> + {/foreach} + </optgroup> + {/foreach} + </select> + {/if} + {formhelp note="Pick the center bit you want to display when accessing this package."} + {/forminput} + </div> + + <div class="row"> + {formlabel label="Position"} + {forminput} + {tr}Center{/tr} + {/forminput} + </div> + + <div class="row"> + {formlabel label="Order" for="c_ord"} + {forminput} + <select name="fAssign[pos]" id="c_ord"> + {section name=ix loop=$orders} + <option value="{$orders[ix]|escape}" {if $assign_order eq $orders[ix]}selected="selected"{/if}>{$orders[ix]}</option> + {/section} + </select> + {formhelp note="Select where within the column the module should be displayed."} + {/forminput} + </div> + + <div class="row"> + {formlabel label="Cache Time" for="c_cache_time"} + {forminput} + <input type="text" name="fAssign[cache_time]" id="c_cache_time" size="5" value="{$fAssign.cache_time|escape}" /> seconds + {formhelp note="This is the number of seconds the module is cached before the content is refreshed. The higher the value, the less load there is on the server. (optional)"} + {/forminput} + </div> + + <div class="row"> + {formlabel label="Rows" for="c_rows"} + {forminput} + <input type="text" size="5" name="fAssign[module_rows]" id="c_rows" value="{$fAssign.module_rows|escape}" /> + {formhelp note="Select what the maximum number of items are displayed. (optional - default is 10)"} + {/forminput} + </div> + + <div class="row"> + {formlabel label="Parameters" for="c_params"} + {forminput} + <input type="text" size="48" name="fAssign[params]" id="c_params" value="{$fAssign.params|escape}" /> + {formhelp note="Here you can enter any additional parameters the module might need. (optional)"} + {/forminput} + </div> + + <div class="row"> + {formlabel label="Roles" for="c_roles"} + {forminput} + <select multiple="multiple" size="5" name="roles[]" id="c_roles"> + {foreach from=$roles key=roleId item=role} + <option value="{$roleId}" {if $role.selected eq 'y'}selected="selected"{/if}>{$role.role_name}</option> + {/foreach} + </select> + {formhelp note="Select the roles of users who can see this module. If you select no role, the module will be visible to all users."} + {/forminput} + </div> + + <div class="row submit"> + <input type="submit" name="CenterTabSubmit" value="{tr}Assign{/tr}" /> + </div> + {/form} + {/jstab} + + {include file="bitpackage:themes/admin_layout_inc.tpl"} +{/jstabs} + +{/strip} diff --git a/templates/module_config_role_inc.tpl b/templates/module_config_role_inc.tpl new file mode 100644 index 0000000..13e2f62 --- /dev/null +++ b/templates/module_config_role_inc.tpl @@ -0,0 +1,80 @@ +{capture name=shared} + {smartlink ititle="Up" ibiticon="icons/go-up" iforce="icon" page=$page move_module=up module_package=$module_package module_id=`$modInfo.module_id`} + {smartlink ititle="Down" ibiticon="icons/go-down" iforce="icon" page=$page move_module=down module_package=$module_package module_id=`$modInfo.module_id`} + {if $colkey eq 'left' or $colkey eq 'right'} + {if $colkey == 'left'} + {assign var=icon value=next} + {assign var=move value=right} + {elseif $colkey == 'right'} + {assign var=icon value=previous} + {assign var=move value=left} + {/if} + {smartlink ititle="Move module" ibiticon="icons/go-$icon" iforce="icon" iexplain="`$move`" page=$page move_module=$move module_package=$module_package module_id=$modInfo.module_id} + {/if} + {if $gBitThemes->isCustomModule( $modInfo.module_rsrc )} + {smartlink ititle="Edit" ibiticon="icons/accessories-text-editor" iforce=icon iexplain="Edit" page=custom_modules name=$modInfo.module_rsrc|regex_replace:"!.*\/!":"" action=edit} + {/if} + {smartlink ititle="Unassign" ibiticon="icons/edit-delete" iforce=icon iexplain="Delete" ionclick="return confirm('Are you sure you want to remove `$modInfo.name`?');" page=$page move_module=unassign module_package=$module_package module_id=$modInfo.module_id } +{/capture} + +{strip} +<h3> + {if !$smarty.request.nocollapse && !$condensed && $gBitThemes->isJavascriptEnabled()}<a href="javascript:BitBase.flipWithSign('id-{$modInfo.module_id}');"><span id="flipperid-{$modInfo.module_id}" class="monospace">[+]</span> {/if} + {$modInfo.name} + <input type="hidden" name="modules[{$modInfo.module_id}][layout_area]" value="{$area}" /> + <input type="hidden" name="modules[{$modInfo.module_id}][layout]" value="{$module_package}" /> + {if !$smarty.request.nocollapse && !$condensed && $gBitThemes->isJavascriptEnabled()}</a>{/if} + <br /> + {$smarty.capture.shared} +</h3> + +{if !$condensed} + {if !$smarty.request.nocollapse && $gBitThemes->isJavascriptEnabled()}<div id="id-{$modInfo.module_id}" style="display:none;">{/if} + <table class="data"> + <tr> + <td class="alignright">{tr}Position{/tr}</td> + <td> + <input type="text" size="4" name="modules[{$modInfo.module_id}][pos]" value="{$modInfo.pos}" /> + </td> + </tr> + + {if !$gBitThemes->isCustomModule( $modInfo.module_rsrc )} + <tr> + <td class="alignright">{tr}Title{/tr}</td> + <td><input type="text" size="15" name="modules[{$modInfo.module_id}][title]" value="{$modInfo.title|escape}" /></td> + </tr> + <tr> + <td class="alignright">{tr}Rows{/tr}</td> + <td><input type="text" size="15" name="modules[{$modInfo.module_id}][module_rows]" value="{$modInfo.module_rows}" /></td> + </tr> + <tr> + <td class="alignright">{tr}Parameters{/tr}</td> + <td><input type="text" size="15" name="modules[{$modInfo.module_id}][params]" value="{$modInfo.params}" /></td> + </tr> + {/if} + + <tr> + <td class="alignright">{tr}Cache Time{/tr}</td> + <td><input type="text" size="15" name="modules[{$modInfo.module_id}][cache_time]" value="{$modInfo.cache_time}" /></td> + </tr> + + <tr> + <td class="alignright">{tr}Roles{/tr}</td> + <td> + <select multiple="multiple" size="3" name="modules[{$modInfo.module_id}][roles][]"> + {foreach from=$roles key=roleId item=role} + {assign var=selected value=n} + {foreach from=$modInfo.module_roles item=module_roles} + {if $roleId == $module_roles} + {assign var=selected value=y} + {/if} + {/foreach} + <option value="{$roleId}" {if $selected eq 'y'}selected="selected"{/if}>{$role.role_name}</option> + {/foreach} + </select> + </td> + </tr> + </table> + {if !$smarty.request.nocollapse && $gBitThemes->isJavascriptEnabled()}</div>{/if} +{/if} +{/strip} |
