Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
b6741f5e
Commit
b6741f5e
authored
Feb 24, 2015
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add external links to menusystem
parent
19265d25
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
7 deletions
+33
-7
Menu.xml
src/opnsense/mvc/app/models/OPNsense/Base/Menu/Menu.xml
+6
-6
MenuItem.php
src/opnsense/mvc/app/models/OPNsense/Base/Menu/MenuItem.php
+24
-0
base_menu_system.volt
...sense/mvc/app/views/layout_partials/base_menu_system.volt
+3
-1
No files found.
src/opnsense/mvc/app/models/OPNsense/Base/Menu/Menu.xml
View file @
b6741f5e
...
...
@@ -202,12 +202,12 @@
</Diagnostics>
<Help
order=
"7"
cssClass=
"glyphicon glyphicon-question-sign"
>
<AboutThisPage
VisibleName=
"About this Page"
url=
"/help.php"
/>
<DevelopersWiki
VisibleName=
"Developers Wiki"
url=
"https://wiki.opnsense.org/index.php/developers"
/>
<Documentation
url=
"https://wiki.opnsense.org/"
/>
<FreeBSDHandbook
VisibleName=
"FreeBSD Handbook"
url=
"https://www.freebsd.org/doc/en/books/handbook/"
/>
<PaidSupport
VisibleName=
"Paid Support"
url=
"https://opnsense.org/support-overview/commercial-support/"
/>
<UserForum
VisibleName=
"UserForum"
url=
"https://forum.opnsense.org/"
/>
<AboutThisPage
VisibleName=
"About this Page"
url=
"/help.php"
IsExternal=
"Y"
/>
<DevelopersWiki
VisibleName=
"Developers Wiki"
url=
"https://wiki.opnsense.org/index.php/developers"
IsExternal=
"Y"
/>
<Documentation
url=
"https://wiki.opnsense.org/"
IsExternal=
"Y"
/>
<FreeBSDHandbook
VisibleName=
"FreeBSD Handbook"
url=
"https://www.freebsd.org/doc/en/books/handbook/"
IsExternal=
"Y"
/>
<PaidSupport
VisibleName=
"Paid Support"
url=
"https://opnsense.org/support-overview/commercial-support/"
IsExternal=
"Y"
/>
<UserForum
VisibleName=
"UserForum"
url=
"https://forum.opnsense.org/"
IsExternal=
"Y"
/>
</Help>
</menu>
src/opnsense/mvc/app/models/OPNsense/Base/Menu/MenuItem.php
View file @
b6741f5e
...
...
@@ -72,6 +72,12 @@ class MenuItem
*/
private
$Url
=
""
;
/**
* link to external page
* @var string
*/
private
$isExternal
=
"N"
;
/**
* parent node, used to mark active nodes
* @var null|MenuItem
...
...
@@ -195,6 +201,24 @@ class MenuItem
return
$this
->
Url
;
}
/**
* setter for isExternal
* @param $value
*/
public
function
setIsExternal
(
$value
)
{
$this
->
isExternal
=
$value
;
}
/**
* getter for isExternal
* @return string
*/
public
function
getIsExternal
()
{
return
$this
->
isExternal
;
}
/**
* @return bool is this item selected
*/
...
...
src/opnsense/mvc/app/views/layout_partials/base_menu_system.volt
View file @
b6741f5e
...
...
@@ -7,7 +7,9 @@
<a href="#{{ topMenuItem.Id }}" class="list-group-item {% if topMenuItem.Selected %} active-menu-title {% endif %}" data-toggle="collapse" data-parent="#mainmenu"><span class="{{ topMenuItem.CssClass }} __iconspacer"></span>{{ topMenuItem.VisibleName }} </a>
<div class="collapse {% if topMenuItem.Selected %} active-menu in {% endif %}" id="{{ topMenuItem.Id }}">
{% for subMenuItem in topMenuItem.Children %}
{% if acl.isPageAccessible(session.get('Username'),subMenuItem.Url) %}
{% if subMenuItem.IsExternal == "Y" %}
<a href="{{ subMenuItem.Url }}" target="_new" class="list-group-item {% if subMenuItem.Selected %} active {% endif %}">{{ subMenuItem.VisibleName }}</a>
{% elseif acl.isPageAccessible(session.get('Username'),subMenuItem.Url) %}
<a href="{{ subMenuItem.Url }}" class="list-group-item {% if subMenuItem.Selected %} active {% endif %}">{{ subMenuItem.VisibleName }}</a>
{% endif %}
{% endfor %}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment