Kaynağa Gözat

[Backend] Utilisateurs : accès rapide #427

refactoring
Guillaume Bourgeois 2 yıl önce
ebeveyn
işleme
8e151cc82a
2 değiştirilmiş dosya ile 26 ekleme ve 16 silme
  1. +16
    -16
      backend/views/layouts/left.php
  2. +10
    -0
      backend/web/js/backend.js

+ 16
- 16
backend/views/layouts/left.php Dosyayı Görüntüle

@@ -51,11 +51,11 @@ termes.
[
'label' => 'Produits',
'icon' => 'clone',
'url' => '#',
'url' => ['/product/index'],
'visible' => User::isCurrentProducer(),
'active' => Yii::$app->controller->id == 'product',
'items' => [
['label' => 'Liste','icon' => 'th-list','url' => ['/product/index'], 'visible' => User::isCurrentProducer()],
['label' => 'Liste','icon' => 'th-list', 'url' => ['/product/index'], 'visible' => User::isCurrentProducer()],
['label' => 'Catégories','icon' => 'book','url' => ['/product-category/index'], 'visible' => User::isCurrentProducer()],
]
],
@@ -63,35 +63,35 @@ termes.
[
'label' => 'Utilisateurs',
'icon' => 'users',
'url' => '#',
'url' => ['/user/index'],
'items' => [
['label' => 'Liste','icon' => 'th-list','url' => ['/user/index'], 'visible' => User::isCurrentProducer()],
['label' => 'Groupes','icon' => 'users','url' => ['/user-group/index'], 'visible' => User::isCurrentProducer()],
],
],
['label' => 'Abonnements','icon' => 'repeat','url' => ['/subscription/index'], 'visible' => User::isCurrentProducer(), 'active' => Yii::$app->controller->id == 'subscription'],
['label' => 'Paramètres','icon' => 'cog','url' => ['/producer/update'], 'visible' => User::isCurrentProducer()],
['label' => 'Communiquer','icon' => 'bullhorn','url' => ['/communicate/index'], 'visible' => User::isCurrentProducer()],
[
'label' => 'Statistiques',
'icon' => 'line-chart',
'url' => '#',
'items' => [
['label' => 'Rapports','icon' => 'pencil-square-o','url' => ['/report/index'], 'visible' => User::isCurrentProducer()],
['label' => 'Chiffre d\'affaire','icon' => 'line-chart','url' => ['/stats/index'], 'visible' => User::isCurrentProducer()],
['label' => 'Produits','icon' => 'table','url' => ['/stats/products'], 'visible' => User::isCurrentProducer()],
],
],
[
'label' => 'Documents',
'icon' => 'clone',
'url' => '#',
'url' => ['/delivery-note/index'],
'items' => [
['label' => 'Devis','icon' => 'sticky-note-o','url' => ['/quotation/index'], 'visible' => User::isCurrentProducer()],
['label' => 'Bons de livraison','icon' => 'sticky-note-o','url' => ['/delivery-note/index'], 'visible' => User::isCurrentProducer()],
['label' => 'Factures','icon' => 'sticky-note-o','url' => ['/invoice/index'], 'visible' => User::isCurrentProducer()],
['label' => 'Devis','icon' => 'sticky-note-o','url' => ['/quotation/index'], 'visible' => User::isCurrentProducer()],
],
],
[
'label' => 'Statistiques',
'icon' => 'line-chart',
'url' => ['/stats/index'],
'items' => [
['label' => 'Chiffre d\'affaire','icon' => 'line-chart','url' => ['/stats/index'], 'visible' => User::isCurrentProducer()],
['label' => 'Rapports','icon' => 'pencil-square-o','url' => ['/report/index'], 'visible' => User::isCurrentProducer()],
['label' => 'Produits','icon' => 'table','url' => ['/stats/products'], 'visible' => User::isCurrentProducer()],
],
],
['label' => 'Paramètres','icon' => 'cog','url' => ['/producer/update'], 'visible' => User::isCurrentProducer()],
['label' => 'Développement','icon' => 'wrench','url' => ['/development/index'], 'visible' => User::isCurrentProducer(), 'active' => Yii::$app->controller->id == 'development'],
['label' => 'Tarifs','icon' => 'euro','url' => ['/producer/billing'], 'visible' => User::isCurrentProducer()],
['label' => 'Accès','icon' => 'lock','url' => ['/access/index'], 'visible' => User::isCurrentProducer()],

+ 10
- 0
backend/web/js/backend.js Dosyayı Görüntüle

@@ -46,6 +46,7 @@ $(document).ready(function() {
opendistrib_product_prices() ;
opendistrib_confirm_delete() ;
opendistrib_product_availability_points_sale();
opendistrib_menu_treeview();
}) ;

var UrlManager = {
@@ -58,6 +59,15 @@ var UrlManager = {
}
};

function opendistrib_menu_treeview() {
$('li.treeview a').unbind('click').click(function() {
var href = $(this).attr('href');
if(href != '#') {
$(location).attr('href', href);
}
});
}

function opendistrib_product_availability_points_sale() {
$('input[name="Product[available_on_points_sale]"]').change(function() {
var available = parseInt($(this).val());

Yükleniyor…
İptal
Kaydet