mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-10-28 14:53:01 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe638e926a |
@@ -281,10 +281,6 @@ class LvMenu extends FHCAPI_Controller
|
||||
$params
|
||||
);
|
||||
|
||||
$this->fhc_menu_filter_eval_versions_by_semester($menu, $studiensemester_kurzbz);
|
||||
|
||||
|
||||
|
||||
// Menu sortieren
|
||||
// ##########################################################################################
|
||||
|
||||
@@ -554,49 +550,4 @@ class LvMenu extends FHCAPI_Controller
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
private function fhc_menu_filter_eval_versions_by_semester(&$menu, $studiensemester_kurzbz)
|
||||
{
|
||||
if (intval(substr($studiensemester_kurzbz, -2)) > 25 && $studiensemester_kurzbz !== "SS2026") {
|
||||
$menu = array_filter(
|
||||
$menu,
|
||||
function ($menuItem) {
|
||||
return $menuItem['id'] !== 'addon_lvevaluierung_menu_lvevaluierung';
|
||||
}
|
||||
);
|
||||
} else if (intval(substr($studiensemester_kurzbz, -2)) < 25) {
|
||||
$menu = array_filter(
|
||||
$menu,
|
||||
function ($menuItem) {
|
||||
return $menuItem['id'] !== 'extension_lvevaluierung_menu_initiierung';
|
||||
}
|
||||
);
|
||||
} else {
|
||||
$oldEval = current(array_filter(
|
||||
$menu,
|
||||
function ($menuItem) {
|
||||
return $menuItem['id'] === 'addon_lvevaluierung_menu_lvevaluierung';
|
||||
}
|
||||
));
|
||||
$newEval = current(array_filter(
|
||||
$menu,
|
||||
function ($menuItem) {
|
||||
return $menuItem['id'] === 'extension_lvevaluierung_menu_initiierung';
|
||||
}
|
||||
));
|
||||
if ($oldEval && $newEval) {
|
||||
$this->load->library('PhrasesLib');
|
||||
$p = $this->p;
|
||||
$menu = array_map(
|
||||
function ($menuItem) use ($p) {
|
||||
if ($menuItem['id'] === 'addon_lvevaluierung_menu_lvevaluierung') {
|
||||
$menuItem['name'] .= ' (' . $p->t('global', 'old') . ')';
|
||||
}
|
||||
return $menuItem;
|
||||
},
|
||||
$menu
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,10 +31,24 @@ export default {
|
||||
return {};
|
||||
},
|
||||
methods: {
|
||||
printDokument(url, scope){
|
||||
printDokument(url, scope, event){
|
||||
let output = 'pdf';
|
||||
|
||||
if(this.showAllFormats)
|
||||
{
|
||||
console.log("BERECHTIUNG VORHANDEN");
|
||||
if (event.ctrlKey) {
|
||||
output = 'doc';
|
||||
} else if (event.shiftKey) {
|
||||
output = 'odt';
|
||||
}
|
||||
url = url.replace("output=pdf","output="+output);
|
||||
}
|
||||
//TODO Manu(check if logic not in content (Zutrittkarte also in content folder))
|
||||
let linkToPdf = FHC_JS_DATA_STORAGE_OBJECT.app_root + 'content/' + url;
|
||||
window.open(linkToPdf, '_blank');
|
||||
let linkToDocument = FHC_JS_DATA_STORAGE_OBJECT.app_root + 'content/' + url;
|
||||
|
||||
console.log('Documentlink:', linkToDocument);
|
||||
window.open(linkToDocument, '_blank');
|
||||
}
|
||||
},
|
||||
template: `
|
||||
@@ -53,7 +67,7 @@ export default {
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
<template v-for="doc in documents" :key="doc.id">
|
||||
<li v-if="doc.type === 'documenturl'">
|
||||
<button class="dropdown-item" type="button" @click="printDokument(doc.url, doc.scope)">
|
||||
<button class="dropdown-item" type="button" @click="printDokument(doc.url, doc.scope, $event)">
|
||||
{{ doc.name }}
|
||||
</button>
|
||||
</li>
|
||||
@@ -72,7 +86,7 @@ export default {
|
||||
<ul class="dropdown-menu">
|
||||
<template v-for="child in doc.data" :key="child.id">
|
||||
<li v-if="child.type === 'documenturl'">
|
||||
<button class="dropdown-item" type="button" @click="printDokument(child.url, child.scope)">
|
||||
<button class="dropdown-item" type="button" @click="printDokument(child.url, child.scope, $event)">
|
||||
{{ child.name }}
|
||||
</button>
|
||||
</li>
|
||||
|
||||
@@ -68199,26 +68199,6 @@ I have been informed that I am under no obligation to consent to the transmissio
|
||||
)
|
||||
),
|
||||
// Zeitsperren Sancho Subjects end
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'global',
|
||||
'phrase' => 'old',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'alt',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'old',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user