mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
fixes cis4 Menu for longest matching urls
This commit is contained in:
@@ -20,13 +20,9 @@ export default {
|
||||
highestMatchingUrlCount: function(newValue)
|
||||
{
|
||||
// if this entry has the most matching url parts then it should be active
|
||||
if (newValue == this.urlCount)
|
||||
if (this.activeContent == null && newValue == this.urlCount)
|
||||
{
|
||||
this.entry.menu_open = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.entry.menu_open = false;
|
||||
this.$emit("activeEntry", this.entry.content_id);
|
||||
}
|
||||
},
|
||||
activeContent: function(newValue){
|
||||
@@ -55,7 +51,8 @@ export default {
|
||||
// only invokes .hide if this.collapse is not null
|
||||
this.collapse && this.collapse.hide();
|
||||
}
|
||||
// debugging helpers - console.log(this.entry.titel,newValue?"open":"close")
|
||||
// debugging helpers - console.log(this.entry.titel, newValue ? "open" : "close")
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
@@ -230,7 +227,7 @@ export default {
|
||||
</div>
|
||||
<ul ref="children"
|
||||
class="nav w-100 collapse">
|
||||
<cis-menu-entry @UrlCount="passUrlCount" @activeEntry="resendEmit" :activeContent="activeContent" v-for="child in entry.childs" :key="child" :entry="child" :level="level + 1"/>
|
||||
<cis-menu-entry @UrlCount="passUrlCount" :highestMatchingUrlCount="highestMatchingUrlCount" @activeEntry="resendEmit" :activeContent="activeContent" v-for="child in entry.childs" :key="child" :entry="child" :level="level + 1"/>
|
||||
</ul>
|
||||
</template>
|
||||
<a v-else
|
||||
|
||||
@@ -36,6 +36,15 @@ if ($result = @$db->db_query("SELECT * FROM campus.tbl_content WHERE beschreibun
|
||||
'redirect','etw',NOW(),null,null,null,TRUE,FALSE,'MEIN_STUDIUM'
|
||||
);
|
||||
|
||||
-- VPN_STUDIERENDE
|
||||
|
||||
INSERT INTO campus.tbl_content
|
||||
(template_kurzbz, oe_kurzbz, insertamum, insertvon, updateamum, updatevon, aktiv, menu_open, beschreibung)
|
||||
VALUES
|
||||
(
|
||||
'redirect','etw',NOW(),null,null,null,TRUE,FALSE,'VPN_STUDIERENDE'
|
||||
);
|
||||
|
||||
-- PROFIL
|
||||
|
||||
INSERT INTO campus.tbl_content
|
||||
@@ -136,6 +145,20 @@ if ($result = @$db->db_query("SELECT * FROM campus.tbl_content WHERE beschreibun
|
||||
null,null,null,null,NOW(),null,'Mein Studium',null
|
||||
);
|
||||
|
||||
-- VPN_STUDIERENDE
|
||||
|
||||
INSERT INTO campus.tbl_contentsprache
|
||||
(sprache, content_id, version, sichtbar, content, reviewvon, reviewamum, updateamum, updatevon, insertamum, insertvon, titel, gesperrt_uid)
|
||||
VALUES
|
||||
(
|
||||
'German',
|
||||
-- queries the content_id for the VPN_STUDIERENDE
|
||||
(SELECT content_id from campus.tbl_content WHERE beschreibung = 'VPN_STUDIERENDE'),
|
||||
1,TRUE,
|
||||
'<content><url><![CDATA[#VPN]]></url><target><![CDATA[_self]]></target></content>',
|
||||
null,null,null,null,NOW(),null,'VPN Neu - Zugang für Student*innen',null
|
||||
);
|
||||
|
||||
-- PROFIL
|
||||
|
||||
INSERT INTO campus.tbl_contentsprache
|
||||
@@ -270,8 +293,9 @@ if ($result = @$db->db_query("SELECT * FROM campus.tbl_content WHERE beschreibun
|
||||
(
|
||||
-- queries the content_id for the CIS4_ROOT
|
||||
(SELECT content_id from campus.tbl_content WHERE beschreibung = 'CIS4_ROOT'),
|
||||
-- 10882 is the content_id for VPN Neu - Zugang für Student*innen
|
||||
10882, NOW(), null, null, null, 2
|
||||
-- queries the content_id for the VPN_STUDIERENDE
|
||||
(SELECT content_id from campus.tbl_content WHERE beschreibung = 'VPN_STUDIERENDE'),
|
||||
NOW(), null, null, null, 2
|
||||
);
|
||||
|
||||
INSERT INTO campus.tbl_contentchild
|
||||
@@ -372,6 +396,28 @@ if ($result = @$db->db_query("SELECT * FROM campus.tbl_content WHERE beschreibun
|
||||
10795, NOW(), null, null, null, 4
|
||||
);
|
||||
|
||||
-- VPN_STUDIERENDE childs
|
||||
|
||||
INSERT INTO campus.tbl_contentchild
|
||||
(content_id, child_content_id, insertamum, insertvon, updateamum, updatevon, sort)
|
||||
VALUES
|
||||
(
|
||||
-- queries the content_id for the MEIN_STUDIUM
|
||||
(SELECT content_id from campus.tbl_content WHERE beschreibung = 'VPN_STUDIERENDE'),
|
||||
-- 10883 is the content_id for VPN Windows für Student*innen
|
||||
10883, NOW(), null, null, null, 1
|
||||
);
|
||||
|
||||
INSERT INTO campus.tbl_contentchild
|
||||
(content_id, child_content_id, insertamum, insertvon, updateamum, updatevon, sort)
|
||||
VALUES
|
||||
(
|
||||
-- queries the content_id for the MEIN_STUDIUM
|
||||
(SELECT content_id from campus.tbl_content WHERE beschreibung = 'VPN_STUDIERENDE'),
|
||||
-- 10884 is the content_id for VPN Linux für Student*innen
|
||||
10884, NOW(), null, null, null, 2
|
||||
);
|
||||
|
||||
-- Profil childs
|
||||
|
||||
INSERT INTO campus.tbl_contentchild
|
||||
|
||||
Reference in New Issue
Block a user