Kaynağa Gözat

[Administration] Icône et message indiquant que le développeur est actuellement en ligne

feature/souke
Guillaume Bourgeois 10 ay önce
ebeveyn
işleme
88f419e6de
7 değiştirilmiş dosya ile 55 ekleme ve 25 silme
  1. +9
    -3
      backend/views/layouts/left.php
  2. +1
    -1
      backend/views/setting-admin/index.php
  3. +10
    -3
      backend/views/support/index.php
  4. +11
    -11
      backend/web/css/screen.css
  5. +5
    -7
      backend/web/sass/setting/_form.scss
  6. +2
    -0
      common/logic/Setting/SettingDetails/Admin/AdminSettingDefinition.php
  7. +17
    -0
      common/logic/Setting/SettingDetails/Admin/General/SupportDeveloperOnlineAdminSetting.php

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

@@ -45,6 +45,7 @@ $userModule = UserModule::getInstance();
$userProducerModule = $this->getUserProducerModule();
$ticketModule = $this->getTicketModule();
$featureChecker = $this->getFeatureModule()->getChecker();
$adminSettingBag = $this->getSettingModule()->getAdminSettingBag();

$producer = GlobalParam::getCurrentProducer();
$userCurrent = GlobalParam::getCurrentUser();
@@ -67,7 +68,12 @@ $isUserCurrentGrantedAsProducer = $userModule->getAuthorizationChecker()->isGran
$countTicketsProducerUnreadLabel = '';
$countTicketsProducerUnread = $ticketModule->countTicketsUnreadByUser($this->getUserCurrent());
if($countTicketsProducerUnread && !$isUserCurrentGrantedAsAdministrator) {
$countTicketsProducerUnreadLabel = '<span class="pull-right-container"><small class="label pull-right bg-green">'.$countTicketsProducerUnread.'</small></span>';
$countTicketsProducerUnreadLabel = '<small class="label pull-right bg-blue">'.$countTicketsProducerUnread.'</small>';
}

$developerOnlineLabel = '';
if($adminSettingBag->get('supportDeveloperOnline')) {
$developerOnlineLabel = '<small class="label pull-right bg-green"><i class="fa fa-phone"></i></small>';
}

$countTicketsAdminUnreadLabel = '';
@@ -88,11 +94,11 @@ $isUserCurrentGrantedAsProducer = $userModule->getAuthorizationChecker()->isGran
'items' => [
['label' => "Besoin d'aide ?", 'options' => ['class' => 'header'], 'visible' => $isUserCurrentGrantedAsProducer],
[
'label' => 'Support',
'label' => 'Support',
'icon' => 'comments',
'url' => ['support/index'],
'visible' => $isUserCurrentGrantedAsProducer,
'template' => '<a href="{url}">{icon} {label}' . $countTicketsProducerUnreadLabel . '</a>'
'template' => '<a href="{url}">{icon} {label} <span class="pull-right-container">' . $developerOnlineLabel . $countTicketsProducerUnreadLabel . '</span></a>'
],
['label' => $producer->name, 'options' => ['class' => 'header'], 'visible' => $isUserCurrentGrantedAsProducer],
['label' => 'Tableau de bord', 'icon' => 'dashboard', 'url' => ['/dashboard/index'], 'visible' => $isUserCurrentGrantedAsProducer],

+ 1
- 1
backend/views/setting-admin/index.php Dosyayı Görüntüle

@@ -93,7 +93,7 @@ function field($form, $model, $settingDetail) {
return $field->checkbox();
}
elseif($settingDetail->getFormType() == 'toggle') {
return $form->field($model, $settingDetail->getName(), ['options' => ['class' => 'form-group form-toggle']])->widget(Toggle::class, ['options' => ['data-on' => 'Oui', 'data-off' => 'Non', 'data-offstyle' => 'default']]);
return $form->field($model, $settingDetail->getName(), ['options' => ['class' => 'form-group form-toggle']])->widget(Toggle::class, ['options' => ['data-on' => 'Oui', 'data-off' => 'Non', 'data-offstyle' => 'danger']]);
}
elseif($settingDetail->getFormType() == 'select') {
return $field->dropDownList($settingDetail->getOptions());

+ 10
- 3
backend/views/support/index.php Dosyayı Görüntüle

@@ -51,20 +51,27 @@ $userCurrent = $this->getUserCurrent();
$this->setTitle('Support & contact');
$this->addBreadcrumb($this->getTitle());

$supportDeveloperOnline = $adminSettingBag->get('supportDeveloperOnline');

?>

<div class="support-index">
<?php if($context == 'producer'): ?>

<div class="callout callout-info">
<p><i class="icon fa fa-info-circle"></i> Pour toutes vos remarques, suggestions et remontées de bugs.</p>
<p><i class="icon fa fa-info-circle"></i> Pour toutes vos questions, remarques, suggestions et remontées de bugs.</p>
</div>
<div>
<div class="col-md-6 col-left">
<div class="info-box">
<span class="info-box-icon bg-yellow"><i class="fa fa-phone"></i></span>
<span class="info-box-icon <?php if($supportDeveloperOnline): ?>bg-green<?php else: ?>bg-yellow<?php endif; ?>"><i class="fa fa-phone"></i></span>
<div class="info-box-content">
<span class="info-box-text">Me contacter directement</span>
<span class="info-box-text">
Me contacter directement
<?php if($supportDeveloperOnline): ?>
<br /><span class="label label-success">Disponible</span>
<?php endif; ?>
</span>
<span class="info-box-text">
<br/>
<strong><?= $adminSettingBag->get('administratorPhoneNumber'); ?></strong>

+ 11
- 11
backend/web/css/screen.css Dosyayı Görüntüle

@@ -2993,26 +2993,26 @@ termes.
top: -1px;
margin-right: 3px;
}
/* line 30, ../sass/setting/_form.scss */
/* line 29, ../sass/setting/_form.scss */
.setting-form .form-group.form-toggle .control-label {
position: relative;
/*position: relative;
top: 7px;
left: 10px;
left: 10px;*/
}
/* line 36, ../sass/setting/_form.scss */
/* line 35, ../sass/setting/_form.scss */
.setting-form .form-group.form-toggle .toggle {
-moz-border-radius: 20px;
-webkit-border-radius: 20px;
border-radius: 20px;
float: left;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
display: block;
}
/* line 41, ../sass/setting/_form.scss */
/* line 40, ../sass/setting/_form.scss */
.setting-form .form-group.form-toggle .toggle .toggle-group .btn.toggle-on {
color: white;
}
/* line 45, ../sass/setting/_form.scss */
/* line 43, ../sass/setting/_form.scss */
.setting-form .form-group.form-toggle .toggle .toggle-group .btn.toggle-off {
border-color: white;
color: white;
}

/**

+ 5
- 7
backend/web/sass/setting/_form.scss Dosyayı Görüntüle

@@ -26,24 +26,22 @@
}

&.form-toggle {

.control-label {
position: relative;
/*position: relative;
top: 7px;
left: 10px;
left: 10px;*/
}

.toggle {
@include border-radius(20px);
float: left;
@include border-radius(5px);
display: block;

.toggle-group {
.btn.toggle-on {
//border-color: white;
color: white;
}
.btn.toggle-off {
border-color: white;
color: white;
}
}
}

+ 2
- 0
common/logic/Setting/SettingDetails/Admin/AdminSettingDefinition.php Dosyayı Görüntüle

@@ -7,6 +7,7 @@ use common\logic\Setting\SettingDetails\Admin\General\AdministratorEmailAdminSet
use common\logic\Setting\SettingDetails\Admin\General\AdministratorPhoneNumberAdminSetting;
use common\logic\Setting\SettingDetails\Admin\General\ForumFlarumUrlAdminSetting;
use common\logic\Setting\SettingDetails\Admin\General\MaximumNumberProducersAdminSetting;
use common\logic\Setting\SettingDetails\Admin\General\SupportDeveloperOnlineAdminSetting;

class AdminSettingDefinition extends SettingDefinition
{
@@ -18,6 +19,7 @@ class AdminSettingDefinition extends SettingDefinition
return [
self::SECTION_GENERAL => [
self::SUBSECTION_GENERAL => [
new SupportDeveloperOnlineAdminSetting(),
new AdministratorEmailAdminSetting(),
new AdministratorPhoneNumberAdminSetting(),
new MaximumNumberProducersAdminSetting(),

+ 17
- 0
common/logic/Setting/SettingDetails/Admin/General/SupportDeveloperOnlineAdminSetting.php Dosyayı Görüntüle

@@ -0,0 +1,17 @@
<?php

namespace common\logic\Setting\SettingDetails\Admin\General;

use common\logic\Setting\SettingDetails\AbstractSettingDetail;

class SupportDeveloperOnlineAdminSetting extends AbstractSettingDetail
{
public function __construct()
{
$this
->setName('supportDeveloperOnline')
->setLabel("Support : développeur disponible")
->setTypeBoolean()
->setFormTypeToggle();
}
}

Yükleniyor…
İptal
Kaydet