File tree Expand file tree Collapse file tree 4 files changed +74
-8
lines changed
openwisp_utils/admin_theme Expand file tree Collapse file tree 4 files changed +74
-8
lines changed Original file line number Diff line number Diff line change @@ -103,15 +103,9 @@ def __init__(self, config):
103103 raise ImproperlyConfigured (
104104 f'"url" should be a type of "str". Error for the config- { config } '
105105 )
106- self .url = self . make_django_url ( url )
106+ self .url = url
107107 self .icon = config .get ('icon' )
108108
109- def make_django_url (self , url ):
110- # Add "/" at the end of link
111- if url [- 1 ] != '/' :
112- return url + '/'
113- return url
114-
115109
116110class MenuGroup (BaseMenuItem ):
117111 """
Original file line number Diff line number Diff line change @@ -1470,6 +1470,10 @@ body::-webkit-scrollbar {
14701470 mask-image : url(../ ../ ui/openwisp/images/logout.svg);
14711471 -webkit-mask-image : url(../ ../ ui/openwisp/images/logout.svg);
14721472}
1473+ .ow-help {
1474+ mask-image : url(../ ../ ui/openwisp/images/help.svg);
1475+ -webkit-mask-image : url(../ ../ ui/openwisp/images/help.svg);
1476+ }
14731477
14741478/* USERS ICONS */
14751479
Original file line number Diff line number Diff line change @@ -204,7 +204,7 @@ def test_menu_link(self):
204204 menu_link = MenuLink (config = _config )
205205 context = menu_link .create_context ()
206206 self .assertEqual (context .get ('label' ), _config ['label' ])
207- self .assertEqual (context .get ('url' ), _config ['url' ] + '/' )
207+ self .assertEqual (context .get ('url' ), _config ['url' ])
208208 self .assertEqual (context .get ('icon' ), _config ['icon' ])
209209
210210 with self .subTest ('Menu Link without icon' ):
@@ -213,6 +213,13 @@ def test_menu_link(self):
213213 context = menu_link .create_context ()
214214 self .assertEqual (context .get ('icon' ), None )
215215
216+ with self .subTest ('Menu Link test mailto' ):
217+ mailto = 'mailto:[email protected] ' 218+ _config = self ._get_menu_link_config (url = mailto )
219+ menu_link = MenuLink (config = _config )
220+ context = menu_link .create_context ()
221+ self .assertEqual (context .get ('url' ), mailto )
222+
216223 def test_model_link (self ):
217224
218225 with self .subTest ('Model Link without name' ):
You can’t perform that action at this time.
0 commit comments