Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
synnefo
Commits
3f368f7c
Commit
3f368f7c
authored
May 27, 2013
by
Kostas Papadimitriou
Browse files
helpdesk: Configurable media url
parent
a979aa0e
Changes
2
Hide whitespace changes
Inline
Side-by-side
snf-cyclades-app/synnefo/helpdesk/templates/helpdesk/base.html
View file @
3f368f7c
...
...
@@ -3,9 +3,9 @@
<head>
<meta
charset=
"utf-8"
>
<title>
Cyclades helpdesk
</title>
<link
href=
"{{ MEDIA_URL }}
helpdesk/
css/bootstrap.css"
rel=
"stylesheet"
>
<link
href=
"{{ MEDIA_URL }}
helpdesk/
css/bootstrap-responsive.css"
rel=
"stylesheet"
>
<link
href=
"{{ MEDIA_URL }}
helpdesk/
css/extra.css"
rel=
"stylesheet"
>
<link
href=
"{{
HELPDESK_
MEDIA_URL }}css/bootstrap.css"
rel=
"stylesheet"
>
<link
href=
"{{
HELPDESK_
MEDIA_URL }}css/bootstrap-responsive.css"
rel=
"stylesheet"
>
<link
href=
"{{
HELPDESK_
MEDIA_URL }}css/extra.css"
rel=
"stylesheet"
>
<style>
</style>
</head>
...
...
snf-cyclades-app/synnefo/helpdesk/views.py
View file @
3f368f7c
...
...
@@ -54,6 +54,9 @@ from synnefo.logic import backend as servers_backend
logger
=
logging
.
getLogger
(
__name__
)
HELPDESK_MEDIA_URL
=
getattr
(
settings
,
'HELPDESK_MEDIA_URL'
,
settings
.
MEDIA_URL
+
'helpdesk/'
)
IP_SEARCH_REGEX
=
re
.
compile
(
'([0-9]+)(?:\.[0-9]+){3}'
)
UUID_SEARCH_REGEX
=
re
.
compile
(
'([0-9a-z]{8}-([0-9a-z]{4}-){3}[0-9a-z]{12})'
)
VM_SEARCH_REGEX
=
re
.
compile
(
'vm(-){0,}(?P<vmid>[0-9]+)'
)
...
...
@@ -154,7 +157,9 @@ def index(request):
search_query
=
account
)
# show index template
return
direct_to_template
(
request
,
"helpdesk/index.html"
)
return
direct_to_template
(
request
,
"helpdesk/index.html"
,
extra_context
=
{
'HELPDESK_MEDIA_URL'
:
HELPDESK_MEDIA_URL
})
@
helpdesk_user_required
...
...
@@ -240,7 +245,7 @@ def account(request, search_query):
'account_name'
:
account_name
,
'token'
:
request
.
user
[
'auth_token'
],
'networks'
:
networks
,
'
UI
_MEDIA_URL'
:
settings
.
UI
_MEDIA_URL
'
HELPDESK
_MEDIA_URL'
:
HELPDESK
_MEDIA_URL
}
return
direct_to_template
(
request
,
"helpdesk/account.html"
,
...
...
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