Browse Source

[Administration] Paramètres : gestion des ancres pour aller sur une sectino particulière des paramètres

feature/souke
Guillaume Bourgeois 1 year ago
parent
commit
78ab8df870
4 changed files with 20 additions and 8 deletions
  1. +6
    -5
      backend/views/producer/update.php
  2. +1
    -1
      backend/web/css/screen.css
  3. +12
    -1
      backend/web/js/vuejs/producer-update.js
  4. +1
    -1
      backend/web/sass/screen.scss

+ 6
- 5
backend/views/producer/update.php View File

<div class="user-update" id="app-producer-update"> <div class="user-update" id="app-producer-update">


<div id="nav-params"> <div id="nav-params">
<button v-for="section in sectionsArray" v-if="!section.isAdminSection || (section.isAdminSection && isAdmin)"
<a v-for="section in sectionsArray" v-if="!section.isAdminSection || (section.isAdminSection && isAdmin)"
:class="'btn '+((currentSection == section.name) ? 'btn-primary' : 'btn-default')" :class="'btn '+((currentSection == section.name) ? 'btn-primary' : 'btn-default')"
@click="changeSection(section)">
@click="changeSection(section)" :href="'#'+section.name">
{{ section.nameDisplay }} {{ section.nameDisplay }}
<span class="glyphicon glyphicon-triangle-bottom"></span> <span class="glyphicon glyphicon-triangle-bottom"></span>
</button>
</a>
</div> </div>


<div class="user-form"> <div class="user-form">
<div v-show="currentSection == 'software'" class="panel panel-default"> <div v-show="currentSection == 'software'" class="panel panel-default">
<div class="panel-body"> <div class="panel-body">
<h4>Opendistrib</h4> <h4>Opendistrib</h4>
<?php $urlAboutPage = Yii::$app->urlManagerFrontend->createAbsoluteUrl(['site/about']); ?>
<?= $form->field($model, 'option_testimony') <?= $form->field($model, 'option_testimony')
->textarea(['rows' => 7]) ->textarea(['rows' => 7])
->hint("Écrivez ici votre témoignage concernant l'utilisation du logiciel. Il sera publié sur la page 'À propos' du site.") ; ?>
->hint("Écrivez ici votre témoignage concernant l'utilisation du logiciel. Il sera publié sur la page <a href=\"".$urlAboutPage."\" target=\"_blanck\">À propos</a> du site.") ; ?>
<?= $form->field($model, 'option_time_saved') <?= $form->field($model, 'option_time_saved')
->dropDownList([ ->dropDownList([
null => '--', null => '--',
7 => '7 heures', 7 => '7 heures',
8 => '8 heures', 8 => '8 heures',
]) ])
->hint("Sélectionnez le temps que vous estimez gagner chaque semaine en utilisant ce logiciel. Cette donnée sera utilisée sur la page 'À propos' du site.") ; ?>
->hint("Sélectionnez le temps que vous estimez gagner chaque semaine en utilisant ce logiciel. Cette donnée sera utilisée sur la page <a href=\"".$urlAboutPage."\" target=\"_blanck\">À propos</a> du site.") ; ?>
<?= $form->field($model, 'option_display_message_new_opendistrib_version') <?= $form->field($model, 'option_display_message_new_opendistrib_version')
->dropDownList([ ->dropDownList([
1 => 'Oui', 1 => 'Oui',

+ 1
- 1
backend/web/css/screen.css View File

margin-bottom: 30px; margin-bottom: 30px;
} }
/* line 347, ../sass/screen.scss */ /* line 347, ../sass/screen.scss */
#nav-params button {
#nav-params a {
margin-right: 10px; margin-right: 10px;
} }



+ 12
- 1
backend/web/js/vuejs/producer-update.js View File

el: '#app-producer-update', el: '#app-producer-update',
data() { data() {
return Object.assign({ return Object.assign({
currentSection: 'general',
currentSection: this.getInitialSection(),
sectionsArray: [ sectionsArray: [
{ {
name: 'general', name: 'general',
methods: { methods: {
changeSection: function(section) { changeSection: function(section) {
this.currentSection = section.name ; this.currentSection = section.name ;
},
getInitialSection: function() {
var hash = window.location.hash.substring(1);
if(hash && hash.length) {
return hash;
}

return 'general';
} }
},
mounted: function() {

} }
}); });



+ 1
- 1
backend/web/sass/screen.scss View File

#nav-params { #nav-params {
margin-bottom: 30px ; margin-bottom: 30px ;


button {
a {
margin-right: 10px ; margin-right: 10px ;
} }
} }

Loading…
Cancel
Save