Revision e4ac2d18
b/snf-pithos-webclient/pithos_webclient/views.py | ||
---|---|---|
35 | 35 |
|
36 | 36 |
from pithos_webclient import settings |
37 | 37 |
from pithos_webclient.version import __version__ |
38 |
|
|
38 | 39 |
from django.conf import settings as django_settings |
39 | 40 |
|
41 |
from synnefo_branding.utils import get_branding_dict |
|
42 |
|
|
40 | 43 |
MEDIA_URL = getattr(settings, "PITHOS_WEB_CLIENT_MEDIA_URL", \ |
41 | 44 |
getattr(django_settings, "MEDIA_URL", "/static/")) |
42 | 45 |
|
46 |
|
|
43 | 47 |
def index(request): |
48 |
branding_settings = get_branding_dict("") |
|
44 | 49 |
return direct_to_template(request, 'pithos_webclient/index.html', \ |
45 | 50 |
{'settings': settings, |
46 | 51 |
'MEDIA_URL': MEDIA_URL, |
47 | 52 |
'CLIENT_VERSION': __version__, |
48 |
'PITHOS_UI_CLOUDBAR_ACTIVE_SERVICE': settings.CLOUDBAR_ACTIVE_SERVICE |
|
53 |
'PITHOS_UI_CLOUDBAR_ACTIVE_SERVICE': |
|
54 |
settings.CLOUDBAR_ACTIVE_SERVICE, |
|
55 |
'branding_settings': branding_settings |
|
49 | 56 |
}) |
50 | 57 |
|
b/snf-pithos-webclient/setup.py | ||
---|---|---|
250 | 250 |
</script> |
251 | 251 |
""") |
252 | 252 |
|
253 |
index_data = index_data.replace("{{ EXTEND_OTHER_PROPERTIES }}", """ |
|
254 |
{% for key, value in branding_settings.items %} |
|
255 |
otherProperties.{{ key }} = "{{ value }}"; |
|
256 |
{% endfor %} |
|
257 |
""") |
|
258 |
|
|
253 | 259 |
ifile = file(index, "w+") |
254 | 260 |
ifile.write(index_data) |
255 | 261 |
ifile.close() |
b/src/gr/grnet/pithos/web/public/index.html | ||
---|---|---|
63 | 63 |
feedbackUrl: "/feedback", |
64 | 64 |
authCookie: "_pithos2_a", |
65 | 65 |
version: "" |
66 |
} |
|
66 |
}; |
|
67 |
{{ EXTEND_OTHER_PROPERTIES }} |
|
67 | 68 |
</script> |
68 | 69 |
</head> |
69 | 70 |
<body> |
Also available in: Unified diff