diff of c50b4f187ea8f9551fb1d736cd87fe02e4a74fbd
c50b4f187ea8f9551fb1d736cd87fe02e4a74fbd
diff --git a/src/genurl.lisp b/src/genurl.lisp
index c32dfbd..99c46a9 100644
--- a/src/genurl.lisp
+++ b/src/genurl.lisp
@@ -1,5 +1,8 @@
(in-package :murja.genurl)
+(defun add-prefix (url)
+ (format nil "~a~a" (settings:prefix) url))
+
(defun route->url (symbol &rest params)
"A server side route->url transformer. Symbol and params are passed on into #'easy-routes:genurl, refer to its documentation or murja's genurl-tests.lisp for usage"
(format nil "~a~a"
diff --git a/src/packages/genurl.lisp b/src/packages/genurl.lisp
index b5b2346..edc643a 100644
--- a/src/packages/genurl.lisp
+++ b/src/packages/genurl.lisp
@@ -1,5 +1,5 @@
(defpackage :murja.genurl
(:use :cl :ps)
- (:export :route->url-ps-m :route->url :route->url-ps)
+ (:export :route->url-ps-m :route->url :route->url-ps :add-prefix)
(:documentation "Provides functions for transforming murja.view.components.tabs:deftab'bed and easy-routes:defroute'd url symbols into correctly prefixed url strings")
(:local-nicknames (:settings :murja.setting-definitions)))
diff --git a/src/view/components/tabs.lisp b/src/view/components/tabs.lisp
index d879ae3..cb782d1 100644
--- a/src/view/components/tabs.lisp
+++ b/src/view/components/tabs.lisp
@@ -36,7 +36,7 @@
&body rst)
`(progn
(setf (gethash (quote ,sym) *tabs*)
- (make-instance 'tab :url ,url
+ (make-instance 'tab :url ,url
:abilities (list ,@needed-abilities)
:require-login ,require-login
:subtab (quote ,subtab)
@@ -75,7 +75,9 @@
""))
;; wonder if this is actually necessary or just an artifact of the old newui branch?
:data-href (tab-url tab)
- (:a :href (tab-url tab)
+
+ ;;tab-urls go to view, so they have to be prefixed
+ (:a :href (murja.genurl:add-prefix (tab-url tab))
(title tab))))))
(apply (tab-component selected-tab) tab-parameters)))))