Revision 14fbb44a
Added by Serghei Mihai over 8 years ago
README.rst | ||
---|---|---|
44 | 44 |
For example, you might want to mention here which versions of CKAN this |
45 | 45 |
extension works with. |
46 | 46 |
|
47 |
The configuration variable ``ckanext.ozwillo_theme.plugin.ozwillo_url`` must be |
|
48 |
set(for example to https://ozwillo-preprod.eu) |
|
49 |
|
|
47 | 50 |
|
48 | 51 |
------------ |
49 | 52 |
Installation |
ckanext/ozwillo_theme/plugin.py | ||
---|---|---|
1 |
from pylons import config as pconfig |
|
2 |
|
|
1 | 3 |
import ckan.plugins as plugins |
2 | 4 |
import ckan.plugins.toolkit as toolkit |
5 |
from ckan.lib.app_globals import set_global |
|
3 | 6 |
|
4 | 7 |
|
5 | 8 |
class OzwilloThemePlugin(plugins.SingletonPlugin): |
6 | 9 |
plugins.implements(plugins.IConfigurer) |
7 | 10 |
|
8 | 11 |
def update_config(self, config_): |
12 |
set_global('ckan.ozwillo_url', |
|
13 |
pconfig.get('%s.ozwillo_url' % __name__)) |
|
14 |
|
|
9 | 15 |
toolkit.add_template_directory(config_, 'templates') |
10 | 16 |
toolkit.add_public_directory(config_, 'public') |
11 | 17 |
toolkit.add_resource('fanstatic', 'theme') |
ckanext/ozwillo_theme/templates/footer.html | ||
---|---|---|
1 |
{% set current_lang = request.environ.CKAN_LANG %} |
|
1 | 2 |
<footer id="t3-footer" class="wrap t3-footer"> |
2 | 3 |
|
3 | 4 |
<section class="t3-sitemap"> |
... | ... | |
23 | 24 |
</div> |
24 | 25 |
<div class=" col-lg-2 col-md-2 col-sm-3 col-xs-4"> |
25 | 26 |
<div class="t3-module module " id="Mod141"><div class="module-inner"><div class="module-ct"><ul class="nav navbar-nav navbar-right navbar-footer"> |
26 |
<li><a href="{% trans %}/en/oz/discover{% endtrans %}">{% trans %}Discovering{% endtrans %}</a></li>
|
|
27 |
<li><a href="{% trans %}/en/oz/news{% endtrans %}">{% trans %}News{% endtrans %}</a></li>
|
|
28 |
<li><a href="{% trans %}/en/oz/co-construct{% endtrans %}">{% trans %}Co-construct{% endtrans %}</a></li>
|
|
29 |
<li><a href="{% trans %}/en/oz/let-s-go{% endtrans %}">{% trans %}Let's go{% endtrans %}</a></li></ul>
|
|
27 |
<li><a href="{{ g.ozwillo_url }}/{{current_lang}}/oz/discover">{% trans %}Discovering{% endtrans %}</a></li>
|
|
28 |
<li><a href="{{ g.ozwillo_url }}/{{current_lang}}/oz/news">{% trans %}News{% endtrans %}</a></li>
|
|
29 |
<li><a href="{{ g.ozwillo_url }}/{{current_lang}}/oz/co-construct">{% trans %}Co-construct{% endtrans %}</a></li>
|
|
30 |
<li><a href="{{ g.ozwillo_url }}/{{current_lang}}/oz/let-s-go">{% trans %}Let's go{% endtrans %}</a></li></ul>
|
|
30 | 31 |
</div></div></div> |
31 | 32 |
</div> |
32 | 33 |
<div class=" col-lg-2 col-md-2 col-sm-3 col-xs-4"> |
33 | 34 |
<div class="t3-module module " id="Mod142"><div class="module-inner"><div class="module-ct"><ul class="nav navbar-nav navbar-right navbar-footer"> |
34 |
<li><a href="{% trans %}/en/contact{% endtrans %}">{% trans %}Contact{% endtrans %}</a></li>
|
|
35 |
<li><a href="{% trans %}/en/l-equipe-projet-oasis{% endtrans %}">{% trans %}Project team{% endtrans %}</a></li>
|
|
36 |
<li><a href="{% trans %}/en/oz/projects{% endtrans %}">{% trans %}Projects{% endtrans %}</a></li></ul>
|
|
35 |
<li><a href="{{ g.ozwillo_url }}/{{current_lang}}/contact">{% trans %}Contact{% endtrans %}</a></li>
|
|
36 |
<li><a href="{{ g.ozwillo_url }}/{{current_lang}}/l-equipe-projet-oasis">{% trans %}Project team{% endtrans %}</a></li>
|
|
37 |
<li><a href="{{ g.ozwillo_url }}/{{current_lang}}/oz/projects">{% trans %}Projects{% endtrans %}</a></li></ul>
|
|
37 | 38 |
</div></div></div> |
38 | 39 |
</div> |
39 | 40 |
<div class=" col-lg-2 col-md-2 col-sm-3 col-xs-4"> |
40 | 41 |
<div class="t3-module module " id="Mod143"><div class="module-inner"><div class="module-ct"><ul class="nav navbar-nav navbar-right navbar-footer"> |
41 |
<li><a href="{% trans %}/en/guide-utilisateur{% endtrans %}">{% trans %}User guide{% endtrans %}</a></li>
|
|
42 |
<li><a href="{% trans %}/en/terms{% endtrans %}">{% trans %}General terms of use{% endtrans %}</a></li>
|
|
43 |
<li><a href="{% trans %}/en/legal-notices{% endtrans %}">{% trans %}Legal Notices{% endtrans %}</a></li>
|
|
44 |
<li><a href="{% trans %}/en/oz/co-construct{% endtrans %}">{% trans %}Governance{% endtrans %}</a></li></ul>
|
|
42 |
<li><a href="{{ g.ozwillo_url }}/{{current_lang}}/guide-utilisateur">{% trans %}User guide{% endtrans %}</a></li>
|
|
43 |
<li><a href="{{ g.ozwillo_url }}/{{current_lang}}/terms">{% trans %}General terms of use{% endtrans %}</a></li>
|
|
44 |
<li><a href="{{ g.ozwillo_url }}/{{current_lang}}/legal-notices">{% trans %}Legal Notices{% endtrans %}</a></li>
|
|
45 |
<li><a href="{{ g.ozwillo_url }}/{{current_lang}}/oz/co-construct">{% trans %}Governance{% endtrans %}</a></li></ul>
|
|
45 | 46 |
</div></div></div> |
46 | 47 |
</div> |
47 | 48 |
</div> |
ckanext/ozwillo_theme/templates/header.html | ||
---|---|---|
20 | 20 |
|
21 | 21 |
<div class="t3-navbar navbar-collapse collapse"> |
22 | 22 |
<ul class="nav navbar-nav"> |
23 |
<li class="item-107 current active"> <a class="logo" href="/en/"><img src="/img/logo-100.png" alt="{% trans %}Home{% endtrans %}"></a>
|
|
24 |
</li><li class="item-108"> <a class="nav-apps" href="https://portal.ozwillo-preprod.eu/en/store?ui_locales={{current_lang}}">{% trans %}Catalog{% endtrans %}</a>
|
|
23 |
<li class="item-107 current"> <a class="logo" href="{{ g.ozwillo_url }}/{{current_lang}}"><img src="/img/logo-100.png" alt="{% trans %}Home{% endtrans %}"></a>
|
|
24 |
</li><li class="item-108"> <a class="nav-apps" href="{{ g.ozwillo_url }}/{{current_lang}}/store?ui_locales={{current_lang}}">{% trans %}Catalog{% endtrans %}</a>
|
|
25 | 25 |
</li> |
26 | 26 |
<li class="item-119 deeper dropdown parent"> |
27 | 27 |
<a class="dropdown-toggle nav-data" href="#" data-toggle="dropdown">{% trans %}Data{% endtrans %}<b class="caret"></b></a> |
... | ... | |
45 | 45 |
{% if c.userobj %} |
46 | 46 |
<a class="btn navbar-btn" href="{{ h.url_for('/user/slo') }}">{% trans %}Log out{% endtrans %}</a> |
47 | 47 |
{% else %} |
48 |
<a class="btn navbar-btn" href="https://portal.ozwillo-preprod.eu/my">{% trans %}Log in{% endtrans %}</a>
|
|
48 |
<a class="btn navbar-btn" href="{{ g.ozwillo_url }}/{{current_lang}}/my">{% trans %}Log in{% endtrans %}</a>
|
|
49 | 49 |
{% endif %} |
50 | 50 |
</li> |
51 | 51 |
<li class="item-112 deeper dropdown parent"><a class="dropdown-toggle" href="/en/oz/discover" data-toggle="dropdown">{% trans %}Discover{% endtrans %}<b class="caret"></b></a> |
52 | 52 |
<ul class="dropdown-menu"> |
53 |
<li><a href="/en/oz/discover">{% trans %}Discovering the Platform{% endtrans %}</a></li>
|
|
54 |
<li><a href="/en/oz/news">{% trans %}News{% endtrans %}</a></li>
|
|
55 |
<li><a href="/en/oz/co-construct">{% trans %}Co-construct{% endtrans %}</a></li>
|
|
56 |
<li><a href="/en/oz/let-s-go">{% trans %}Let's go{% endtrans %}</a></li>
|
|
57 |
<li><a href="/en/oz/projects">{% trans %}Projects{% endtrans %}</a></li>
|
|
53 |
<li><a href="{{ g.ozwillo_url }}/{{current_lang}}/oz/discover">{% trans %}Discovering the Platform{% endtrans %}</a></li>
|
|
54 |
<li><a href="{{ g.ozwillo_url }}/{{current_lang}}/oz/news">{% trans %}News{% endtrans %}</a></li>
|
|
55 |
<li><a href="{{ g.ozwillo_url }}/{{current_lang}}/oz/co-construct">{% trans %}Co-construct{% endtrans %}</a></li>
|
|
56 |
<li><a href="{{ g.ozwillo_url }}/{{current_lang}}/oz/let-s-go">{% trans %}Let's go{% endtrans %}</a></li>
|
|
57 |
<li><a href="{{ g.ozwillo_url }}/{{current_lang}}/oz/projects">{% trans %}Projects{% endtrans %}</a></li>
|
|
58 | 58 |
</ul></li></ul> |
59 | 59 |
|
60 | 60 |
<!-- //RIGHT NAV --> |
Also available in: Unified diff
ozwillo links built from a config var (#6604)