Skip to content

Commit

Permalink
Merge branch 'master' of ssh://github.com/okfn/ckan
Browse files Browse the repository at this point in the history
  • Loading branch information
David Read committed Mar 26, 2012
2 parents 4181b42 + c9946d3 commit 8c04017
Show file tree
Hide file tree
Showing 53 changed files with 1,672 additions and 6,658 deletions.
3 changes: 2 additions & 1 deletion ckan/controllers/package.py
Expand Up @@ -375,7 +375,8 @@ def history(self, id):
)
feed.content_type = 'application/atom+xml'
return feed.writeString('utf-8')
return render( self._history_template(c.pkg_dict['type']))
package_type = self._get_package_type(id)
return render(self._history_template(package_type))

def new(self, data=None, errors=None, error_summary=None):

Expand Down
17 changes: 10 additions & 7 deletions ckan/lib/helpers.py
Expand Up @@ -156,10 +156,10 @@ def __html__(self):
class _Flash(object):

# List of allowed categories. If None, allow any category.
categories = ["warning", "notice", "error", "success"]
categories = ["", "alert-info", "alert-error", "alert-success"]

# Default category if none is specified.
default_category = "notice"
default_category = ""

def __init__(self, session_key="flash", categories=None, default_category=None):
self.session_key = session_key
Expand Down Expand Up @@ -207,13 +207,13 @@ def are_there_messages(self):
_flash = _Flash()

def flash_notice(message, allow_html=False):
_flash(message, category='notice', allow_html=allow_html)
_flash(message, category='alert-info', allow_html=allow_html)

def flash_error(message, allow_html=False):
_flash(message, category='error', allow_html=allow_html)
_flash(message, category='alert-error', allow_html=allow_html)

def flash_success(message, allow_html=False):
_flash(message, category='success', allow_html=allow_html)
_flash(message, category='alert-success', allow_html=allow_html)

def are_there_flash_messages():
return _flash.are_there_messages()
Expand Down Expand Up @@ -484,8 +484,8 @@ def time_ago_in_words_from_str(date_str, granularity='month'):

def button_attr(enable, type='primary'):
if enable:
return 'class="pretty-button %s"' % type
return 'disabled class="pretty-button disabled"'
return 'class="btn %s"' % type
return 'disabled class="btn disabled"'

def dataset_display_name(package_or_package_dict):
if isinstance(package_or_package_dict, dict):
Expand Down Expand Up @@ -547,3 +547,6 @@ def auto_log_message(context):
elif (context.action=='edit'):
return _('Edited settings.')
return ''

def content_span(body_class):
return body_class.__str__()
36 changes: 0 additions & 36 deletions ckan/public/css/blueprint/ie.css

This file was deleted.

29 changes: 0 additions & 29 deletions ckan/public/css/blueprint/print.css

This file was deleted.

0 comments on commit 8c04017

Please sign in to comment.