From 41a0f898d4942fffeb7c95749284526fc4228cbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Vir=C3=A1g?= Date: Thu, 28 May 2015 14:54:02 +0200 Subject: [PATCH] version set to 1.0.2 Tools button to header: links to User management and Unified Views --- README.md | 8 +++++- ckanext/i18n/sk/LC_MESSAGES/ckanext.po | 33 +++++++++++++--------- ckanext/odn_theme/plugin.py | 12 ++++++-- ckanext/odn_theme/public/css/odn_theme.css | 14 +++++++++ ckanext/odn_theme/templates/header.html | 22 ++++++++++++++- setup.py | 2 +- 6 files changed, 73 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 0d31f53..a6d44e1 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/ckanext/i18n/sk/LC_MESSAGES/ckanext.po b/ckanext/i18n/sk/LC_MESSAGES/ckanext.po index f13efe4..f603c90 100644 --- a/ckanext/i18n/sk/LC_MESSAGES/ckanext.po +++ b/ckanext/i18n/sk/LC_MESSAGES/ckanext.po @@ -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 \n" "Language-Team: sk \n" @@ -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" @@ -158,17 +170,12 @@ msgid "" "datasets (using integrated tool UnifiedViews).

" -"

Documentation

Documentation is and will be available here: https://github.com/OpenDataNode/open-data-node

Release" -" Plan

  • 5.12.2014 - Ver. 0.9 pilot with limited " -"functionality
  • 10.2.2015 - Ver. 0.10 beta version for testing " -"
  • 9.3.2015 - Ver. 0.11 beta version for testing
  • " -"31.3.2015 - Ver. 1.0 - first version - may be used for pilots and early " -"adopters
  • 31.4.2015 - Ver. 1.1 - version for pilot " -"installations
  • 29.5.2015 - Ver. 1.1.x - big fix release
  • " -"
  • 30.6.2015 - Ver. 1.2 - final Comsode release for evaluation
  • " -"
  • 31.7.2015 - Ver. 1.2.x - final bugfix

Licensing

" +"

Documentation

Documentation is and will be available here: " +"

" +"

Release Plan

Release plan is and will be available here.

Licensing

" "

ODN consists from several modules, each with its own license. But " "overall, ODN is free and " "open-source. For more information please take a look at .

So, what it does?

" msgstr "" -#: ckanext/odn_theme/templates/home/snippets/about_text.html:40 +#: ckanext/odn_theme/templates/home/snippets/about_text.html:23 msgid "" "

Organizations, companies or even individuals wishing to publish Open " "Data from existing information systems usually face a lot of troubles " diff --git a/ckanext/odn_theme/plugin.py b/ckanext/odn_theme/plugin.py index 23bf266..d408328 100644 --- a/ckanext/odn_theme/plugin.py +++ b/ckanext/odn_theme/plugin.py @@ -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. @@ -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} diff --git a/ckanext/odn_theme/public/css/odn_theme.css b/ckanext/odn_theme/public/css/odn_theme.css index 0b50b3f..3626461 100644 --- a/ckanext/odn_theme/public/css/odn_theme.css +++ b/ckanext/odn_theme/public/css/odn_theme.css @@ -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; } diff --git a/ckanext/odn_theme/templates/header.html b/ckanext/odn_theme/templates/header.html index 347bcb2..ebd0d83 100644 --- a/ckanext/odn_theme/templates/header.html +++ b/ckanext/odn_theme/templates/header.html @@ -108,7 +108,27 @@

('about', _('About ODN')) ) }} {% endblock %} -
  • {{ _("Project Comsode") }}
  • +
  • {{ _("Project Comsode") }}
  • + + {% if h.get_uv_url() or h.get_user_management_url() %} +
  • + +
  • + {% endif %} {% endblock %} diff --git a/setup.py b/setup.py index 8cc5b4e..ad857bf 100644 --- a/setup.py +++ b/setup.py @@ -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',