Skip to content

Commit

Permalink
Merge branch 'release/ODN_v1.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Marcek committed May 29, 2015
2 parents 83c6d97 + 41a0f89 commit 157a7d9
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 18 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@ To enable plugin, change property in your production.ini:
ckan.plugins = odn_theme odn_package_extras
# version displayed in header and About page (current version)
ckan.odn_version = 0.11
ckan.odn_version = 1.0.2
# link to midpoint in the header: Tools > User management
ckan.user_management.url = https://host/midpoint
# link to midpoint in the header: Tools > Unified Views
odn.uv.url = http://host/unifiedviews
```

set in .ini:
Expand Down
33 changes: 20 additions & 13 deletions ckanext/i18n/sk/LC_MESSAGES/ckanext.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ckanext-odn-theme 0.1.1-SNAPSHOT\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2015-04-27 02:51-0700\n"
"POT-Creation-Date: 2015-05-28 14:46+0200\n"
"PO-Revision-Date: 2015-02-23 10:46+0100\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: sk <LL@li.org>\n"
Expand Down Expand Up @@ -123,6 +123,18 @@ msgstr "O ODN"
msgid "Project Comsode"
msgstr "Projekt Comsode"

#: ckanext/odn_theme/templates/header.html:118
msgid "Tools"
msgstr "Nástroje"

#: ckanext/odn_theme/templates/header.html:123
msgid "User management"
msgstr "Správa používateľov"

#: ckanext/odn_theme/templates/header.html:126
msgid "Unified Views"
msgstr ""

#: ckanext/odn_theme/templates/admin/config.html:6
msgid "Version"
msgstr "Verzia"
Expand Down Expand Up @@ -158,17 +170,12 @@ msgid ""
"datasets (using integrated tool <a "
"href=\"http://www.comsode.eu/index.php/2014/04/unifiedviews-an-etl-"
"framework-for-sustainable-rdf-data-processing/\">UnifiedViews</a>).</p> "
"<h2>Documentation</h2> <p>Documentation is and will be available here: <a"
" href=\"https://github.com/OpenDataNode/open-data-"
"node\">https://github.com/OpenDataNode/open-data-node</a></p> <h2>Release"
" Plan</h2> <ul> <li> 5.12.2014 - Ver. 0.9 pilot with limited "
"functionality </li> <li> 10.2.2015 - Ver. 0.10 beta version for testing "
"</li> <li> 9.3.2015 - Ver. 0.11 beta version for testing </li> <li> "
"31.3.2015 - Ver. 1.0 - first version - may be used for pilots and early "
"adopters </li> <li> 31.4.2015 - Ver. 1.1 - version for pilot "
"installations </li> <li> 29.5.2015 - Ver. 1.1.x - big fix release </li> "
"<li> 30.6.2015 - Ver. 1.2 - final Comsode release for evaluation </li> "
"<li> 31.7.2015 - Ver. 1.2.x - final bugfix </li> </ul> <h2>Licensing</h2>"
"<h2>Documentation</h2> <p>Documentation is and will be available here: "
"<ul> <li> <a href=\"https://utopia.sk/wiki/x/6IIuAw\">documentation at "
"utopia.sk</a></p> </li> <li> <a href=\"https://github.com/OpenDataNode"
"/open-data-node\">documentation at github.com</a></p> </li> </ul> "
"<h2>Release Plan</h2> <p>Release plan is and will be available <a "
"href=\"https://utopia.sk/wiki/x/nID5Ag\">here</a>.</p> <h2>Licensing</h2>"
" <p>ODN consists from several modules, each with its own license. But "
"overall, ODN is <a href=\"https://en.wikipedia.org/wiki/FOSS\">free and "
"open-source</a>. For more information please take a look at <a "
Expand All @@ -177,7 +184,7 @@ msgid ""
"node#license</a>.</p> <h2>So, what it does?</h2> "
msgstr ""

#: ckanext/odn_theme/templates/home/snippets/about_text.html:40
#: ckanext/odn_theme/templates/home/snippets/about_text.html:23
msgid ""
" <p>Organizations, companies or even individuals wishing to publish Open "
"Data from existing information systems usually face a lot of troubles "
Expand Down
12 changes: 10 additions & 2 deletions ckanext/odn_theme/plugin.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
import ckan.plugins as plugins
import ckan.plugins.toolkit as toolkit
import ckan.lib.helpers as h
import os
from ckan.lib.app_globals import auto_update
from pylons import config

auto_update.append('ckan.odn_version')

def localized_url_for_static(link):
return h.url_for_static("{lang}/{link}".format(lang=h.lang(), link=link))

def get_uv_url():
return config.get('odn.uv.url', '')

def get_user_management_url():
return config.get('ckan.user_management.url', '')

class OdnThemePlugin(plugins.SingletonPlugin):
'''An comsode theme plugin.
Expand All @@ -24,4 +30,6 @@ def update_config(self, config):
toolkit.add_public_directory(config, '../i18n')

def get_helpers(self):
return {'localized_url_for_static': localized_url_for_static}
return {'localized_url_for_static': localized_url_for_static,
'get_uv_url': get_uv_url,
'get_user_management_url': get_user_management_url}
14 changes: 14 additions & 0 deletions ckanext/odn_theme/public/css/odn_theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,20 @@ body, .account-masthead, .masthead { background: none; }
.account-masthead .account ul li { border-left: 0; }
.account-masthead .account ul li a { color: #555555; font-size:11px; }

.masthead .navigation .nav-pills .dropdown {
margin-top: 2px;
margin-bottom: 2px;
line-height: 34px;
}

.masthead .navigation .nav-pills .dropdown > a {
line-height: 24px;
}

.masthead .navigation .nav-pills .dropdown > ul > li > a {
background-color: white;
}

.masthead .navigation .nav-pills li a,.masthead .navigation .nav-pills li.active a{background-color:#2c3e50}
.masthead .navigation .nav-pills li a:hover,.account-masthead .account ul li a:hover{background-color:#909090;}
.account-masthead .account ul li a:hover { color:white; }
Expand Down
22 changes: 21 additions & 1 deletion ckanext/odn_theme/templates/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,27 @@ <h1>
('about', _('About ODN'))
) }}
{% endblock %}
<li><a target="_blank" href="http://www.comsode.eu">{{ _("Project Comsode") }}</a></li>
<li><a target="_blank" href="http://www.comsode.eu">{{ _("Project Comsode") }}</a></li>

{% if h.get_uv_url() or h.get_user_management_url() %}
<li>
<div class="dropdown btn-group">
<a href="#" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
<i class="icon-share-alt"></i>
{{ _('Tools') }}
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
{% if h.get_user_management_url() %}
<li><a target="_blank" href="{{ h.get_user_management_url() }}">{{ _("User management") }}</a></li>
{% endif %}
{% if h.get_uv_url() %}
<li><a target="_blank" href="{{ h.get_uv_url() }}">{{ _("Unified Views") }}</a></li>
{% endif %}
</ul>
</div>
</li>
{% endif %}
</ul>
</nav>
{% endblock %}
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages
import sys, os

version = '1.0.1'
version = '1.0.2'

setup(
name='ckanext-odn-theme',
Expand Down

0 comments on commit 157a7d9

Please sign in to comment.