update(Dashboard Section description): adds phrases for the description of general/custom/other sections

This commit is contained in:
SimonGschnell
2025-04-22 11:40:58 +02:00
parent 8c00158d04
commit 0c95dbad1f
4 changed files with 130 additions and 6 deletions
@@ -127,7 +127,7 @@ class DashboardLib
$emptypreset->dashboard_id = $dashboard->dashboard_id;
$emptypreset->funktion_kurzbz = $funktion_kurzbz;
$section = ($funktion_kurzbz !== null) ? $funktion_kurzbz : self::SECTION_IF_FUNKTION_KURZBZ_IS_NULL;
$emptypreset->preset = '{"' . $section . '": { "widgets" : {}}}';
$emptypreset->preset = '{"' . $section . '": { "widgets" : {}},"custom": { "widgets" : {}}}';
return $emptypreset;
}
+2 -1
View File
@@ -143,7 +143,7 @@ export default {
}
},
created() {
this.$p.loadCategory('dashboard');
axios.get(this.apiurl + '/Widget/getWidgetsForDashboard', {
params: {
db: this.dashboard
@@ -175,6 +175,7 @@ export default {
});
remove.forEach(wid => this.widgetRemove(name, wid));
}
this.sections = this.sections.sort((section1, section2) => section2.widgets.length - section1.widgets.length);
}).catch(err => console.error('ERROR:', err));
},
async beforeMount() {
+24 -3
View File
@@ -93,8 +93,29 @@ export default {
},
methods: {
sectionNameTranslation(){
switch(this.name){
case "general":
return this.$p.t('dashboard',this.name);
break;
case "custom":
return this.$p.t('dashboard',this.name);
break;
default:
return this.name;
break;
}
},
showSectionInformation(){
SectionModal.popup(`this is the information for the section ${name}`);
if (this.name == "general"){
SectionModal.popup(this.$p.t('dashboard', 'dashboardGeneralSectionDescription'));
}
else if(this.name == "custom"){
SectionModal.popup(this.$p.t('dashboard', 'dashboardCustomSectionDescription'));
}
else{
SectionModal.popup(this.$p.t('dashboard', 'dashboardSectionDescription', [this.name]));
}
},
handleConfigOpened() {
this.configOpened = true
@@ -188,9 +209,9 @@ export default {
});
},
template: `
<h4 v-if="items.length>0 && editModeIsActive" class=" mb-0">
<h4 v-if="editModeIsActive" class=" mb-0">
<i @click="showSectionInformation(name)" class="fa-solid fa-circle-info section-info" ></i>
{{name}}:
{{sectionNameTranslation()}}:
</h4>
<div class="dashboard-section position-relative pb-3 border-bottom" ref="container" :style="getSectionStyle">
<drop-grid v-model:cols="gridWidth" :items="items" :itemsSetup="computedWidgetsSetup" :active="editModeIsActive" :resize-limit="checkResizeLimit" :margin-for-extra-row=".01" @draggedItem="draggedItem=$event" @rearrange-items="updatePositions" @gridHeight="gridHeight=$event" >
+103 -1
View File
@@ -38354,6 +38354,106 @@ array(
)
),
// ### STUDIENGANG_INFORMATIONEN PHRASEN ENDE
array(
'app' => 'core',
'category' => 'dashboard',
'phrase' => 'general',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Allgemein',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'General',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'dashboard',
'phrase' => 'custom',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Benutzerdefiniert',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Custom',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'dashboard',
'phrase' => 'dashboardGeneralSectionDescription',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Hier befinden sich die vordefinierten Widgets',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Here are the predefined widgets',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'dashboard',
'phrase' => 'dashboardCustomSectionDescription',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Hier befinden sich die Widgets Ihrer persönlichen Anpassungen',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Here are the widgets of your personal cutomizations',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'dashboard',
'phrase' => 'dashboardSectionDescription',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Hier befinden sich die Widgets der {0} Funktion',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Here are the widgets of the {0} function',
'description' => '',
'insertvon' => 'system'
)
)
),
// CIS4 phrases from legacy code end
array(
'app' => 'core',
@@ -38414,7 +38514,9 @@ array(
'insertvon' => 'system'
)
)
)
),
);