Skip to content

Commit

Permalink
Commit sidebar + option for display
Browse files Browse the repository at this point in the history
  • Loading branch information
Berges yannick committed Jan 14, 2015
1 parent fb09dc2 commit c55d3d2
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 29 deletions.
4 changes: 4 additions & 0 deletions language/en-GB/en-GB.mod_flexiadmin.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
MOD_FLEXIADMIN="Module admin for FLEXIcontent"
FLEXI_ADMIN_DESC = "Quick administration module for FLEXIcontent (use CPANEL position)"
FLEXI_ADMIN_INTRO= "FLEXI ADMIN MODULE need to be publish in cpanel position. If you want to display in sidebar, choose sidebar template and choose icon position in Isis .Don't forget to <button class='btn btn'><a href='index.php?option=com_modules&filter_client_id=1&filter_module=mod_flexiadmin'>do it!</a></button>"
;;Admin
;;Main tab
FLEXI_ADMIN_DISPLAY_CONFIG_MODULE="Config module"
Expand Down Expand Up @@ -44,6 +45,9 @@ FLEXI_ADMIN_TYPES="Auto Type"
FLEXI_ADMIN_TYPES_DESC="Select automatique type for this button"
FLEXI_ADMIN_CAT="Auto Categorie"
FLEXI_ADMIN_CAT_DESC="Select automatique categorie for this button"
FLEXI_ADMIN_SIDEBAR_OPTIONS="Sidebar option"
FLEXI_ADMIN_SIDEBAR_TABS_MOD="Tabs"
FLEXI_ADMIN_SIDEBAR_TABS_MOD_DESC="Display link in tabs or in list with title (same name of tab)"

;;Custom tab
FLEXI_ADMIN_NAME_TAB="Tab name"
Expand Down
11 changes: 8 additions & 3 deletions language/fr-FR/fr-FR.mod_flexiadmin.ini
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
MOD_FLEXIADMIN="Module d'administration pour FLEXIcontent"
FLEXI_ADMIN_DESC="Module d'administration rapide pour FLEXIcontent (a placer dans la position CPANEL)"
FLEXI_ADMIN_INTRO= "Le module FLEXI ADMIN doit être publié en position CPANEL. Si vous souhaitez le publier dans la sidebar, choisissez le template sidebar et la position icon dans le template Isis .N'oubliez pas de le faire <button class='btn btn'><a href='index.php?option=com_modules&filter_client_id=1&filter_module=mod_flexiadmin'>Faire !</a></button>"

;;Admin
;;Main tab
FLEXI_ADMIN_DISPLAY_CONFIG_MODULE="Configuration du module"
FLEXI_ADMIN_DISPLAY_CONFIG_MODULE_DESC="Affichage du bouton de configuration du module"
FLEXI_ADMIN_NB_ITEM_DISPLAY="Affichage des items"
FLEXI_ADMIN_NB_ITEM_DISPLAY="Affichage des items <small>(non disponible en en mode Sidebar)</small>"
FLEXI_ADMIN_NBITEM="Nombre d'articles"
FLEXI_ADMIN_NBITEM_DESC="Nombre d'articles dans les blocks affichés"
FLEXI_ADMIN_COLUMN="Nombre de colonne"
Expand All @@ -14,7 +16,7 @@ FLEXI_ADMIN_TABS_CUSTOM="Onglet Personnalisé"
FLEXI_ADMIN_TABS_CREATE="Onglet Création"
FLEXI_ADMIN_TABS_MANAGE="Onglet Gestion"
FLEXI_ADMIN_TABS_ADMIN="Onglet Administration"
FLEXI_ADMIN_BLOCK_DISPLAY="Affichage des blocs d'items"
FLEXI_ADMIN_BLOCK_DISPLAY="Affichage des blocs d'items <small>(non disponible en en mode Sidebar)</small>"
FLEXI_ADMIN_DISPLAYBLOCK_PENDING="Block en attente"
FLEXI_ADMIN_DISPLAYBLOCK_PENDING_DESC="Afficher la liste des articles en attente"
FLEXI_ADMIN_DISPLAYBLOCK_REVISED="Block révision"
Expand All @@ -27,7 +29,7 @@ FLEXI_ADMIN_DISPLAYBLOCK_YOURITEM="Block utilisateur"
FLEXI_ADMIN_DISPLAYBLOCK_YOURITEM_DESC="Afficher la liste des articles de l'utilisateur connecté"
FLEXI_ADMIN_DISPLAYBLOCK_TRASHED="Block Poubelle"
FLEXI_ADMIN_DISPLAYBLOCK_VERSION_DESC="Afficher la liste des articles à la poubelle"
FLEXI_ADMIN_BLOCKCUSTOM_DESC="Blocks Personnalisés (vider le champ nom du block pour le caché)"
FLEXI_ADMIN_BLOCKCUSTOM_DESC="Blocks Personnalisés (vider le champ nom du block pour le caché) <small>(non disponible en en mode Sidebar)</small>"
FLEXI_ADMIN_BLOCKCUSTOM1="Nom du block 1"
FLEXI_ADMIN_BLOCKCUSTOM2="Nom du block 2"
FLEXI_ADMIN_BLOCKCUSTOM3="Nom du block 3"
Expand All @@ -38,6 +40,9 @@ FLEXI_ADMIN_BLOCKCUSTOM7="Nom du block 7"
FLEXI_ADMIN_BLOCKCUSTOM8="Nom du block 8"
FLEXI_ADMIN_BLOCKCUSTOM9="Nom du block 9"
FLEXI_ADMIN_BLOCKCUSTOM10="Nom du block 10"
FLEXI_ADMIN_SIDEBAR_OPTIONS="Option pour le mode sidebar"
FLEXI_ADMIN_SIDEBAR_TABS_MOD="Onglets"
FLEXI_ADMIN_SIDEBAR_TABS_MOD_DESC="Afficher les boutons dans des onglets ou sous forme de liste où les titres des tabs seront les catégories de séparation."

;;Custom tab
FLEXI_ADMIN_NAME_BUTTON="Nom du bouton"
Expand Down
24 changes: 16 additions & 8 deletions mod_flexiadmin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<version>0.4.0</version>
<copyright>Copyright (C) 2005 - 2014 Open Source Matters. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<description><![CDATA[FLEXI ADMIN MODULE need to be publish in cpanel position§If you want to display in sidebar, choose sidebar template and choose icon position in Isis Don't forget to <button class="btn btn-primary"><a href="index.php?option=com_modules&filter_client_id=1&filter_module=mod_flexiadmin">do it!</a></button>]]> </description>
<description>FLEXI_ADMIN_INTRO</description>
<files>
<filename module="mod_flexiadmin">mod_flexiadmin.php</filename>
<folder>tmpl</folder>
Expand Down Expand Up @@ -55,7 +55,12 @@
<option value="6">2</option>
<option value="4">3</option>

</field>
</field>
<field name="" type="separator" default="FLEXI_ADMIN_SIDEBAR_OPTIONS" level="level1" />
<field name="tabmodsidebar" type="radio" default="1" label="FLEXI_ADMIN_SIDEBAR_TABS_MOD" description="FLEXI_ADMIN_SIDEBAR_TABS_MOD_DESC" class="btn-group btn-group-yesno">
<option value="0">FLEXI_NO</option>
<option value="1">FLEXI_YES</option>
</field>
<field name="" type="separator" default="FLEXI_ADMIN_TABS" level="level1" />
<field name="displaycustomtab" type="radio" default="1" label="FLEXI_ADMIN_TABS_CUSTOM" description="FLEXI_ADMIN_TABS_CUSTOM_DESC" class="btn-group btn-group-yesno">
<option value="0">FLEXI_NO</option>
Expand Down Expand Up @@ -331,13 +336,16 @@
</fieldset>
<fieldset name="advanced">
<field
name="layout" type="modulelayout"
label="Type de mise en page"
description="Utiliser la mise en page souhaitée" />
name="layout"
type="modulelayout"
label="JFIELD_ALT_LAYOUT_LABEL"
description="JFIELD_ALT_MODULE_LAYOUT_DESC" />

<field
name="moduleclass_sfx" type="text"
label="Suffixe de classe CSS"
description="Suffixe à ajouter à la classe CSS du module pour le personnaliser" />
name="moduleclass_sfx"
type="textarea" rows="3"
label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL"
description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" />
</fieldset>
</fields>
</config>
Expand Down
56 changes: 38 additions & 18 deletions tmpl/sidebar.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,19 @@
$document->addStyleSheet("./modules/mod_flexiadmin/assets/css/style.css",'text/css',"screen");

//module config
$hiddepending = $params->get('hiddepending', '1' );
$hidderevised = $params->get('hidderevised', '1' );
$hiddeinprogess = $params->get('hiddeinprogess', '1' );
$hiddedraft = $params->get('hiddedraft', '1' );
$hiddeyouritem = $params->get('hiddeyouritem', '1' );
$hiddetrashed = $params->get('hiddetrashed', '1' );
$column = $params->get('column', '4' );
$displaycustomtab= $params->get('displaycustomtab', '1' );
$displaycreattab = $params->get('displaycreattab', '1' );
$displaymanagetab= $params->get('displaymanagetab', '1' );
$displayadmintab = $params->get('displayadmintab', '1' );
$displayconfigmodule= $params->get('displayconfigmodule', '1' );
$hiddepending = $params->get('hiddepending', '1' );
$hidderevised = $params->get('hidderevised', '1' );
$hiddeinprogess = $params->get('hiddeinprogess', '1' );
$hiddedraft = $params->get('hiddedraft', '1' );
$hiddeyouritem = $params->get('hiddeyouritem', '1' );
$hiddetrashed = $params->get('hiddetrashed', '1' );
$column = $params->get('column', '4' );
$displaycustomtab = $params->get('displaycustomtab', '1' );
$displaycreattab = $params->get('displaycreattab', '1' );
$displaymanagetab = $params->get('displaymanagetab', '1' );
$displayadmintab = $params->get('displayadmintab', '1' );
$displayconfigmodule = $params->get('displayconfigmodule', '1' );
$tabmodsidebar = $params->get('tabmodsidebar', '0' );

//id catlist
$catidlist1 = $params->get('catidlist1', '1' );
Expand Down Expand Up @@ -172,17 +173,24 @@

</a>
<?php endif; ?>

<?php if ($tabmodsidebar) : ?>
<ul class="nav nav-tabs" role="tablist">
<?php if ($displaycustomtab) : ?><li class="active"><a href="#0" data-toggle="tab"><?php echo JText::_($nametab); ?></a></li> <?php endif; ?>
<?php if ($displaycreattab) : ?><li class=""><a href="#1" data-toggle="tab"><?php echo JText::_(FLEXI_ADMIN_TAB_CREATE_D); ?></a></li> <?php endif; ?>
<?php if ($displaymanagetab) : ?><li class=""><a href="#2" data-toggle="tab"><?php echo JText::_(FLEXI_ADMIN_TAB_MANAGE_D); ?></a></li> <?php endif; ?>
<?php if ($displayadmintab) : ?><li class=""><a href="#3" data-toggle="tab"><?php echo JText::_(FLEXI_ADMIN_TAB_ADMIN_D); ?></a></li> <?php endif; ?>
<?php if ($displaycreattab) : ?><li class=""><a href="#1" data-toggle="tab"><?php echo JText::_('FLEXI_ADMIN_TAB_CREATE_D'); ?></a></li> <?php endif; ?>
<?php if ($displaymanagetab) : ?><li class=""><a href="#2" data-toggle="tab"><?php echo JText::_('FLEXI_ADMIN_TAB_MANAGE_D'); ?></a></li> <?php endif; ?>
<?php if ($displayadmintab) : ?><li class=""><a href="#3" data-toggle="tab"><?php echo JText::_('FLEXI_ADMIN_TAB_ADMIN_D'); ?></a></li> <?php endif; ?>
</ul>

<?php endif; ?>
<?php if ($tabmodsidebar) : ?>
<div class="tab-content">
<?php endif; ?>
<?php if ($displaycustomtab) : ?>
<div class="tab-pane active" id="0">
<ul class="j-links-group nav nav-list">
<?php if ($tabmodsidebar == 0) : ?>
<li><h2 class="nav-header"><?php echo JText::_($nametab); ?></h2></li>
<?php endif; ?>
<?php if ($namebutton1) : ?>
<li>
<a href="index.php?option=com_flexicontent&controller=items&task=items.add&typeid=<?php echo $type1;?>&maincat=<?php echo $maincat1; ?>" >
Expand Down Expand Up @@ -489,6 +497,9 @@
<?php if ($displaycreattab) : ?>
<div class="tab-pane" id="1">
<ul class="j-links-group nav nav-list">
<?php if ($tabmodsidebar == 0) : ?>
<li><h2 class="nav-header"><?php echo JText::_('FLEXI_ADMIN_TAB_CREATE_D'); ?></h2></li>
<?php endif; ?>
<?php if($hiddebuttonadditem): ?>
<li>
<a href="index.php?option=com_flexicontent&view=types&format=raw"
Expand Down Expand Up @@ -537,6 +548,9 @@ class="modal"
<?php if ($displaymanagetab) : ?>
<div class="tab-pane" id="2">
<ul class="j-links-group nav nav-list">
<?php if ($tabmodsidebar == 0) : ?>
<li><h2 class="nav-header"><?php echo JText::_('FLEXI_ADMIN_TAB_MANAGE_D'); ?></h2></li>
<?php endif; ?>
<?php if($hiddebuttonmanageitems): ?>
<li>
<a href="index.php?option=com_flexicontent&view=items">
Expand Down Expand Up @@ -604,7 +618,11 @@ class="modal"
<?php endif; ?>
<?php if ($displayadmintab) : ?>
<div class="tab-pane" id="3">

<ul class="j-links-group nav nav-list">
<?php if ($tabmodsidebar == 0) : ?>
<li><h2 class="nav-header"><?php echo JText::_('FLEXI_ADMIN_TAB_ADMIN_D'); ?></h2></li>
<?php endif; ?>
<?php if($hiddebuttonmanagetypes): ?>
<li>
<a href="index.php?option=com_flexicontent&view=types">
Expand Down Expand Up @@ -686,8 +704,10 @@ class="modal"
<?php endif; ?>
</ul>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if ($tabmodsidebar) : ?>
</div>
<?php endif; ?>
</div>

<?php endif; ?>
Expand Down

0 comments on commit c55d3d2

Please sign in to comment.