Added option to remove arrow buttons

This commit is contained in:
PMKuipers 2024-08-08 19:27:51 +02:00
parent a9595974bb
commit 13523670cb
6 changed files with 25 additions and 13 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -8,7 +8,7 @@
import {loadStrings} from './util/string-helper'; import {loadStrings} from './util/string-helper';
import {formatDate, studyplanDates, studyplanTiming} from './util/date-helper'; import {formatDate, studyplanDates, studyplanTiming} from './util/date-helper';
import FitTextVue from './util/fittext-vue'; import FitTextVue from './util/fittext-vue';
import {settings} from "./util/settings";
export default { export default {
@ -498,6 +498,7 @@ export default {
}, },
data() { data() {
return { return {
showarrows: settings("showprevnextarrows"),
text: strings.prevnext, text: strings.prevnext,
}; };
}, },
@ -571,10 +572,12 @@ export default {
}, },
template: ` template: `
<div :class="'s-prevnext-selector '"> <div :class="'s-prevnext-selector '">
<b-button :variant='variant' @click="prev" :disabled="atFirst()" <template v-if="showarrows"
><b-button :variant='variant' @click="prev" :disabled="atFirst()"
><i v-if='arrows' class='fa fa-caret-left s-prevnext-arrow'></i ><i v-if='arrows' class='fa fa-caret-left s-prevnext-arrow'></i
><template v-else>{{text.prev}}</template></b-button> ><template v-else>{{text.prev}}</template></b-button
<b-form-select v-model="bubblevalue" >&nbsp;</template
><b-form-select v-model="bubblevalue"
@change='selectedchanged' @change='selectedchanged'
> >
<b-form-select-option <b-form-select-option
@ -604,10 +607,12 @@ export default {
:value="o" :value="o"
><slot :value="o">{{o[titlefield]}}</slot></b-form-select-option> ><slot :value="o">{{o[titlefield]}}</slot></b-form-select-option>
</template> </template>
</b-form-select> </b-form-select
<b-button :variant='variant' @click="next" :disabled="atLast()" ><template v-if="showarrows"
>&nbsp;<b-button :variant='variant' @click="next" :disabled="atLast()"
><i v-if='arrows' class='fa fa-caret-right s-prevnext-arrow'></i ><i v-if='arrows' class='fa fa-caret-right s-prevnext-arrow'></i
><template v-else>{{text.next}}</template></b-button> ><template v-else>{{text.next}}</template></b-button
></template>
</div> </div>
`, `,
}); });

View File

@ -128,12 +128,12 @@ $string["settingdesc_infofields_heading"] = 'Select up to 5 fields or custom fie
$string["setting_hivizdropslots"] = 'High visibility drop fields'; $string["setting_hivizdropslots"] = 'High visibility drop fields';
$string["settingdesc_hivizdropslots"] = 'Give the drop fields when editing a study plan extra visibility.'; $string["settingdesc_hivizdropslots"] = 'Give the drop fields when editing a study plan extra visibility.';
$string["setting_toolboxleft"] = 'Toolbar left side by default'; $string["setting_toolboxleft"] = 'Toolbar left side by default';
$string["settingdesc_toolboxleft"] = 'Show the course and component toolbar on the left by default, instead of the right side of the screen.'; $string["settingdesc_toolboxleft"] = 'Show the course and component toolbar on the left by default, instead of the right side of the screen.';
$string["setting_toolboxcoursesonly"] = 'Show only the courses in the toolbox'; $string["setting_toolboxcoursesonly"] = 'Show only the courses in the toolbox';
$string["settingdesc_toolboxcoursesonly"] = 'Hide the badges and flow tabs in the toolbox and show only the courses.'; $string["settingdesc_toolboxcoursesonly"] = 'Hide the badges and flow tabs in the toolbox and show only the courses.';
$string["setting_showprevnextarrows"] = 'Show arrows next to student selector dropdowns';
$string["settingdesc_showprevnextarrows"] = 'Show arrows for previous and next student in the student selector in coach and view mode.';
$string["drophere"] = "Drop here"; $string["drophere"] = "Drop here";
$string["infofield_position_above"] = 'Above course results'; $string["infofield_position_above"] = 'Above course results';

View File

@ -128,12 +128,12 @@ $string["settingdesc_infofields_heading"] = 'Kies tot 5 extra velden om in het c
$string["setting_hivizdropslots"] = 'Extra zichtbare sleepvelden'; $string["setting_hivizdropslots"] = 'Extra zichtbare sleepvelden';
$string["settingdesc_hivizdropslots"] = 'Maak de velden waar cursussen heen gesleept kunnen worden extra goed zichtbaar.'; $string["settingdesc_hivizdropslots"] = 'Maak de velden waar cursussen heen gesleept kunnen worden extra goed zichtbaar.';
$string["setting_toolboxleft"] = 'Toolbox standaard links'; $string["setting_toolboxleft"] = 'Toolbox standaard links';
$string["settingdesc_toolboxleft"] = 'Toon de toolbox met cursussen en componenten standaard links in plaats van rechts.'; $string["settingdesc_toolboxleft"] = 'Toon de toolbox met cursussen en componenten standaard links in plaats van rechts.';
$string["setting_toolboxcoursesonly"] = 'Toon alleen cursussen in toolbox'; $string["setting_toolboxcoursesonly"] = 'Toon alleen cursussen in toolbox';
$string["settingdesc_toolboxcoursesonly"] = 'Verberg de tabbladen "flow" en "badges" in de toolbox en toon alleen de cursussen.'; $string["settingdesc_toolboxcoursesonly"] = 'Verberg de tabbladen "flow" en "badges" in de toolbox en toon alleen de cursussen.';
$string["setting_showprevnextarrows"] = 'Toon pijltjes naast de studentselectie drop-down';
$string["settingdesc_showprevnextarrows"] = 'Laat pijltjes zien voor de vorige en volgende student naast de drop-down box om een student te selecteren.';
$string["drophere"] = "Sleep hierheen"; $string["drophere"] = "Sleep hierheen";
$string["infofield_position_above"] = 'Boven cursusresultaten'; $string["infofield_position_above"] = 'Boven cursusresultaten';

View File

@ -150,6 +150,12 @@ if ($hassiteconfig) {
false, false,
)); ));
$page->add(new admin_setting_configcheckbox('local_treestudyplan/showprevnextarrows',
get_string('setting_showprevnextarrows', 'local_treestudyplan'),
get_string('settingdesc_showprevnextarrows', 'local_treestudyplan'),
true,
));
$page->add(new admin_setting_configcheckbox('local_treestudyplan/copystudylinesnewpage', $page->add(new admin_setting_configcheckbox('local_treestudyplan/copystudylinesnewpage',
get_string('setting_copystudylinesnewpage', 'local_treestudyplan'), get_string('setting_copystudylinesnewpage', 'local_treestudyplan'),
get_string('settingdesc_copystudylinesnewpage', 'local_treestudyplan'), get_string('settingdesc_copystudylinesnewpage', 'local_treestudyplan'),
@ -234,6 +240,7 @@ if ($hassiteconfig) {
get_string('setting_competency_heading', 'local_treestudyplan'), get_string('setting_competency_heading', 'local_treestudyplan'),
get_string('settingdesc_competency_heading', 'local_treestudyplan') get_string('settingdesc_competency_heading', 'local_treestudyplan')
)); ));
$page->add(new admin_setting_configtext('local_treestudyplan/competency_thresh_completed', $page->add(new admin_setting_configtext('local_treestudyplan/competency_thresh_completed',
get_string('setting_competency_thresh_completed', 'local_treestudyplan'), get_string('setting_competency_thresh_completed', 'local_treestudyplan'),
get_string('settingdesc_competency_thresh_completed', 'local_treestudyplan'), get_string('settingdesc_competency_thresh_completed', 'local_treestudyplan'),