// update css module tab

This commit is contained in:
sLorenzini committed 2013-07-12 14:30:44 +02:00
1 parent 84c0ccbae6
commit 160857bdc3
6 files changed
+169 -107

No files matched your search

@@ -1,33 +1,42 @@
<div id="productBox"> <div id="productBox">
{include file='controllers/modules/header.tpl'} {include file='controllers/modules/header.tpl'}
<ul class="view-modules"> <div class="row">
<li class="button normal-view"><a href="index.php?controller={$smarty.get.controller|htmlentities}&token={$smarty.get.token|htmlentities}"><img src="themes/default/img/modules_view_layout_sidebar.png" alt="{l s='Normal view'}" border="0" /><span>{l s='Normal view'}</span></a></li> <div class="col-lg-12">
<li class="button favorites-view-disabled"><img src="themes/default/img/modules_view_table_select_row.png" alt="{l s='Favorites view'}" border="0" /><span>{l s='Favorites view'}</span></li> <span class="pull-right">
</ul> <a class="btn btn-default" href="index.php?controller={$smarty.get.controller|htmlentities}&token={$smarty.get.token|htmlentities}">
<i class="icon-list"></i>
{l s='Normal view'}
</a>
<a class="btn btn-default" href="index.php?controller={$smarty.get.controller|htmlentities}&token={$smarty.get.token|htmlentities}&select=favorites">
<i class="icon-star"></i>
{l s='Favorites view'}
</a>
</span>
</div>
<div class="col-lg-12">&nbsp;</div>
<div id="container" class="col-lg-12">
<div id="container"> <div id="moduleContainer">
<table class="table table-striped table-hover" cellspacing="0" cellpadding="0" id="">
<div id="moduleContainer" style="padding:0px;margin:0px;padding-top:15px"> <colgroup>
<col width="5%">
<table cellspacing="0" cellpadding="0" style="width: 100%; margin-bottom:10px;" class="table" id=""> <col width="10%">
<col width="30px"> <col width="20%">
<col width="240px"> <col width="5%">
<col width=""> <col width="20%">
<col width="140px"> <col width="5%">
<col width="250px"> <col width="7%">
<col width="180px"> <col width="7%">
<col width="70px"> <col width="7%">
<col width="70px">
<col width="130px">
</colgroup> </colgroup>
<thead> <thead>
<tr class="nodrag nodrop"> <tr class="nodrag nodrop">
<th class="center">{l s='Logo'}</th> <th class="center">{l s='Logo'}</th>
<th>{l s='Module Name'}</th> <th class="center">{l s='Module Name'}</th>
<th>{l s='Description'}</th> <th>{l s='Description'}</th>
<th>{l s='Status'}</th> <th class="center">{l s='Status'}</th>
<th>{l s='Tab'}</th> <th>{l s='Tab'}</th>
<th>{l s='Categories'}</th> <th class="center">{l s='Categories'}</th>
<th>{l s='Interest'}</th> <th>{l s='Interest'}</th>
<th>{l s='Favorite'}</th> <th>{l s='Favorite'}</th>
<th>&nbsp;</th> <th>&nbsp;</th>
@@ -36,13 +45,25 @@
<tbody> <tbody>
{foreach from=$modules key=km item=module} {foreach from=$modules key=km item=module}
<tr height="32" {if $km % 2 eq 0} class="alt_row"{/if}> <tr height="32" {if $km % 2 eq 0} class="alt_row"{/if}>
<td><img src="{if isset($module->image)}{$module->image}{else}../modules/{$module->name}/{$module->logo}{/if}" width="16" height="16" /></td> <td class="center">
<td><span class="moduleName">{$module->displayName}</span></td> <img src="{if isset($module->image)}{$module->image}{else}../modules/{$module->name}/{$module->logo}{/if}" width="57" height="57" />
<td><span class="moduleFavDesc">{$module->description|truncate:80:'...'}</span></td> </td>
<td>{if isset($module->id) && $module->id gt 0}<span class="setup">{l s='Installed'}</span>{else}<span class="setup non-install">{l s='Not Installed'}</span>{/if}</td> <td class="center moduleName">
<h5>{$module->displayName}</h5>
</td>
<td>
<span class="moduleFavDesc">{$module->description|truncate:80:'...'}</span>
</td>
<td class="center setup">
{if isset($module->id) && $module->id gt 0}
<span class="label label-success">{l s='Installed'}</span>
{else}
<span class="label label-warning">{l s='Not Installed'}</span>
{/if}
</td>
<td> <td>
{assign var="module_name" value=$module->name} {assign var="module_name" value=$module->name}
<select class="chosen moduleTabPreferencesChoise" name="t_{$module->name}" multiple="multiple"> <select name="t_{$module->name}" multiple="multiple">
{foreach $tabs AS $t} {foreach $tabs AS $t}
{if $t.active} {if $t.active}
<option {if isset($tab_modules_preferences.$module_name) && in_array($t.id_tab, $tab_modules_preferences.$module_name)} selected="selected" {/if} class="group" value="{$t.id_tab}">{if $t.name eq ''}{$t.class_name}{else}{$t.name}{/if}</option> <option {if isset($tab_modules_preferences.$module_name) && in_array($t.id_tab, $tab_modules_preferences.$module_name)} selected="selected" {/if} class="group" value="{$t.id_tab}">{if $t.name eq ''}{$t.class_name}{else}{$t.name}{/if}</option>
@@ -56,27 +77,31 @@
{/foreach} {/foreach}
</select> </select>
</td> </td>
<td>{$module->categoryName}</td> <td class="center">
<td> <span>{$module->categoryName}</span>
<select name="i_{$module->name}" class="moduleFavorite" style="width:50px">
<option value="" selected="selected">---</option>
<option value="1" {if isset($module->preferences.interest) && $module->preferences.interest eq '1'}selected="selected"{/if}>{l s='Yes'}</option>
<option value="0" {if isset($module->preferences.interest) && $module->preferences.interest eq '0'}selected="selected"{/if}>{l s='No'}</option>
</select>
</td> </td>
<td> <td>
<select name="f_{$module->name}" class="moduleFavorite" style="width:50px"> <select name="i_{$module->name}" class="moduleFavorite">
<option value="" selected="selected">---</option> <option value="" selected="selected">---</option>
<option value="1" {if isset($module->preferences.favorite) && $module->preferences.favorite eq '1'}selected="selected"{/if}>{l s='Yes'}</option> <option value="1" {if isset($module->preferences.interest) && $module->preferences.interest eq '1'}selected="selected"{/if}>{l s='Yes'}</option>
<option value="0" {if isset($module->preferences.favorite) && $module->preferences.favorite eq '0'}selected="selected"{/if}>{l s='No'}</option> <option value="0" {if isset($module->preferences.interest) && $module->preferences.interest eq '0'}selected="selected"{/if}>{l s='No'}</option>
</select> </select>
</td>
<td>
<select name="f_{$module->name}" class="moduleFavorite">
<option value="" selected="selected">---</option>
<option value="1" {if isset($module->preferences.favorite) && $module->preferences.favorite eq '1'}selected="selected"{/if}>{l s='Yes'}</option>
<option value="0" {if isset($module->preferences.favorite) && $module->preferences.favorite eq '0'}selected="selected"{/if}>{l s='No'}</option>
</select>
</td>
<td class="center" id="r_{$module->name}">
<span>&nbsp;</span>
</td> </td>
<td id="r_{$module->name}">&nbsp;</td>
</tr> </tr>
{/foreach} {/foreach}
</tbody> </tbody>
</table> </table>
</div>
</div> </div>
</div> </div>
</div> </div>
@@ -44,24 +44,31 @@
</div> </div>
{if $add_permission eq '1'} {if $add_permission eq '1'}
<div id="module_install" style="width:500px;margin-top:5px;{if !isset($smarty.post.downloadflag)}display: none;{/if}"> <div id="module_install" class="row" style="{if !isset($smarty.post.downloadflag)}display: none;{/if}">
<fieldset> <div class="col-lg-12">
<legend><img src="../img/admin/add.gif" alt="{l s='Add a new module'}" class="middle" /> {l s='Add a new module'}</legend> <div class="row-fluid">
<p>{l s='The module must either be a zip file or a tarball.'}</p> <form action="{$currentIndex}&token={$token}" method="post" enctype="multipart/form-data" class="form-horizontal">
<div style="float:left;margin-right:50px"> <legend>{l s='Add a new module'}</legend>
<form action="{$currentIndex}&token={$token}" method="post" enctype="multipart/form-data"> <p>{l s='The module must either be a zip file or a tarball.'}</p>
<label style="width: 100px">{l s='Module file'}</label> <label class="control-label col-lg-3">
<div class="margin-form" style="padding-left: 140px"> <span class="label-tooltip" data-toggle="tooltip" title="{l s='Upload a module from your computer.'}">
<input type="file" name="file" /> {l s='Module file'}
<p>{l s='Upload a module from your computer.'}</p> </span>
</div> </label>
<div class="margin-form" style="padding-left: 140px"> <div class="col-lg-9">
<input type="submit" name="download" value="{l s='Upload this module'}" class="button" /> <p>
<input type="file" name="file" />
</p>
<p>
<button class="btn btn-default" type="submit" name="download">
<i class="icon-upload-alt" ></i>
{l s='Upload this module'}
</button>
</p>
</div> </div>
</form> </form>
</div> </div>
</fieldset> </div>
<br />
</div> </div>
{/if} {/if}
@@ -24,6 +24,18 @@
*} *}
{if count($modules)} {if count($modules)}
<div class="row-fluid">
<span class="pull-right">
<button type="button" class="btn btn-default" onclick="modules_management('install')">
<i class="icon-plus-sign-alt"></i>
{l s='Install the selection'}
</button>
<button type="button" class="btn btn-default" onclick="modules_management('uninstall')">
<i class="icon-minus-sign-alt"></i>
{l s='Uninstall the selection'}
</button>
</span>
</div>
<table cellspacing="0" cellpadding="0" class="table table-striped table-hover"> <table cellspacing="0" cellpadding="0" class="table table-striped table-hover">
<thead> <thead>
<tr class="nodrag nodrop"> <tr class="nodrag nodrop">
@@ -84,7 +96,7 @@
<div class="row-fluid"> <div class="row-fluid">
{if !isset($module->not_on_disk)} {if !isset($module->not_on_disk)}
{$module->optionsHtml} {$module->optionsHtml}
{if isset($module->preferences) && $module->preferences['favorite'] == 1} {if isset($module->preferences) && isset($module->preferences['favorite']) && $module->preferences['favorite'] == 1}
<a class="btn btn-default btn-small action_module action_unfavorite toggle_favorite" data-module="{$module->name}" data-value="0" href="#"> <a class="btn btn-default btn-small action_module action_unfavorite toggle_favorite" data-module="{$module->name}" data-value="0" href="#">
<i class="icon-star"></i> {l s='Remove from Favorites'} <i class="icon-star"></i> {l s='Remove from Favorites'}
</a> </a>
@@ -152,9 +164,17 @@
</tbody> </tbody>
</table> </table>
<div style="margin-top: 12px;"> <div class="row-fluid">
<input type="button" class="button big" value="{l s='Install the selection'}" onclick="modules_management('install')"/> <span class="pull-right">
<input type="button" class="button big" value="{l s='Uninstall the selection'}" onclick="modules_management('uninstall')" /> <button type="button" class="btn btn-default" onclick="modules_management('install')">
<i class="icon-plus-sign-alt"></i>
{l s='Install the selection'}
</button>
<button type="button" class="btn btn-default" onclick="modules_management('uninstall')">
<i class="icon-minus-sign-alt"></i>
{l s='Uninstall the selection'}
</button>
</span>
</div> </div>
{else} {else}
<p class="help-block">{l s='No modules available in this section.'}</p> <p class="help-block">{l s='No modules available in this section.'}</p>
@@ -49,38 +49,38 @@
{l s='Favorites view'} {l s='Favorites view'}
</a> </a>
</span> </span>
</span> </div>
</div>
<div id="container"> <div id="container">
<!--start sidebar module--> <!--start sidebar module-->
<div class="row-fluid"> <div class="row-fluid">
<div class="categorieTitle col-lg-3"> <div class="categorieTitle col-lg-3">
<legend>{l s='Categories'}</legend> <legend>{l s='Categories'}</legend>
<ul class="tab nav nav-pills nav-stacked"> <ul class="tab nav nav-pills nav-stacked">
<li class="tab-row {if isset($categoryFiltered.favorites)}active{/if}"> <li class="tab-row {if isset($categoryFiltered.favorites)}active{/if}">
<a class="tab-page" href="{$currentIndex}&token={$token}&filterCategory=favorites"> <a class="tab-page" href="{$currentIndex}&token={$token}&filterCategory=favorites">
{l s='Favorites'} <span class="badge pull-right">{$nb_modules_favorites}</span> {l s='Favorites'} <span class="badge pull-right">{$nb_modules_favorites}</span>
</a>
</li>
<li class="tab-row {if count($categoryFiltered) lte 0}active{/if}">
<a class="tab-page" href="{$currentIndex}&token={$token}&unfilterCategory=yes">
{l s='Total'} <span class="badge pull-right">{$nb_modules}</span>
</a>
</li>
{foreach from=$list_modules_categories item=module_category key=module_category_key}
<li class="tab-row {if isset($categoryFiltered[$module_category_key])}active{/if}">
<a class="tab-page" href="{$currentIndex}&token={$token}&{if isset($categoryFiltered[$module_category_key])}un{/if}filterCategory={$module_category_key}">
{$module_category.name} <span class="badge pull-right">{$module_category.nb}</span>
</a> </a>
</li> </li>
{/foreach} <li class="tab-row {if count($categoryFiltered) lte 0}active{/if}">
</ul> <a class="tab-page" href="{$currentIndex}&token={$token}&unfilterCategory=yes">
{l s='Total'} <span class="badge pull-right">{$nb_modules}</span>
</a>
</li>
{foreach from=$list_modules_categories item=module_category key=module_category_key}
<li class="tab-row {if isset($categoryFiltered[$module_category_key])}active{/if}">
<a class="tab-page" href="{$currentIndex}&token={$token}&{if isset($categoryFiltered[$module_category_key])}un{/if}filterCategory={$module_category_key}">
{$module_category.name} <span class="badge pull-right">{$module_category.nb}</span>
</a>
</li>
{/foreach}
</ul>
</div>
</div>
<div id="moduleContainer" class="col-lg-9">
<legend>{l s='Modules list'}</legend>
{include file='controllers/modules/list.tpl'}
</div> </div>
</div>
<div id="moduleContainer" class="col-lg-9">
<legend>{l s='Modules list'}</legend>
{include file='controllers/modules/list.tpl'}
</div> </div>
</div> </div>
</div> </div>
@@ -29,28 +29,28 @@
<table border="0" cellpadding="0" cellspacing="5"> <table border="0" cellpadding="0" cellspacing="5">
<tr> <tr>
<td valign="top" width="32" align="center"> <td valign="top" width="32" align="center">
<img class="imgm" alt="" src="{if isset($module->image)}{$module->image}{else}../modules/{$module->name}/{$module->logo}{/if}"> <img width="57" alt="" src="{if isset($module->image)}{$module->image}{else}../modules/{$module->name}/{$module->logo}{/if}">
</td> </td>
<td height="60" valign="top"> <td height="60" valign="top">
<div class="moduleDesc" id="anchor{$module->name|ucfirst}"> <div id="anchor{$module->name|ucfirst}">
<h3> <h4>
{$module->displayName|truncate:40:'…'} {$module->version} {$module->displayName|truncate:40:'…'} {$module->version}
{if isset($module->id) && $module->id gt 0 } {if isset($module->id) && $module->id gt 0 }
{if $module->active} {if $module->active}
<span class="setup">{l s='Enabled'}</span> <span class="label label-success">{l s='Enabled'}</span>
{else} {else}
<span class="setup off">{l s='Disabled'}</span> <span class="label label-warning">{l s='Disabled'}</span>
{/if} {/if}
{else} {else}
{if isset($module->type) && $module->type == 'addonsMustHave'} {if isset($module->type) && $module->type == 'addonsMustHave'}
<span class="setup must-have">{l s='Must Have'}</span> <span class="label label-danger">{l s='Must Have'}</span>
{else} {else}
<span class="setup off">{l s='Not installed'}</span> <span class="label label-warning">{l s='Not installed'}</span>
{/if} {/if}
{/if} {/if}
</h3> </h4>
<p class="desc"> <p>
{if isset($module->description) && $module->description ne ''} {if isset($module->description) && $module->description ne ''}
{$module->description|truncate:100:'…'} {$module->description|truncate:100:'…'}
{else} {else}
@@ -60,16 +60,26 @@
</div> </div>
</td> </td>
<td border="0" valign="middle" align="right"> <td border="0" valign="middle" align="right">
{if isset($module->type) && $module->type == 'addonsMustHave'} <div id="list-action-button" class="row-light">
<a href="{$module->addons_buy_url}" target="_blank" class="button updated"> {if isset($module->type) && $module->type == 'addonsMustHave'}
<span><img src="../img/admin/cart_addons.png">&nbsp;&nbsp;{displayPrice price=$module->price currency=$module->id_currency}</span></a> <p>
{else if !isset($module->not_on_disk)} <a href="{$module->addons_buy_url}" target="_blank" class="button updated">
{$module->optionsHtml} <span class="btn btn-default">
<div class="clear">&nbsp;</div> <i class="icon-shopping-cart"></i> &nbsp;&nbsp;{displayPrice price=$module->price currency=$module->id_currency}
<a href="#" class="button action_tab_module" data-option="select_{$module->name}" class="button">{l s='Submit'}</a> </span>
{else} </a>
<a href="{$module->options.install_url}" class="button">{l s='Install'}</a> </p>
{/if} {else if !isset($module->not_on_disk)}
{$module->optionsHtml}
<p>
<a href="#" class="btn btn-default action_tab_module" data-option="select_{$module->name}">{l s='Submit'}</a>
</p>
{else}
<p>
<a href="{$module->options.install_url}" class="btn btn-default">{l s='Install'}</a>
</p>
{/if}
</div>
</td> </td>
</tr> </tr>
</table> </table>
@@ -83,4 +83,4 @@
{/if} {/if}
</div> </div>
{/if} {/if}
<p style="text-align:right;text-decoration:underline;padding-right:10px"><a href="{$admin_module_favorites_view}" style="color:#666">{l s='More options'}</a></p> <p><a href="{$admin_module_favorites_view}">{l s='More options'}</a></p>