diff options
author | David Cabo <david@calibea.com> | 2011-09-19 11:24:19 +0200 |
---|---|---|
committer | David Cabo <david@calibea.com> | 2011-09-19 11:26:37 +0200 |
commit | f8d7daaad3ff7f62d8dd0f7ecec7a8a11dc4addc (patch) | |
tree | 4c3f4be4e072ab2b3302ffd9ff1d9ecfe28ed640 /app/views | |
parent | 73ceb164768f4ae9d0b7c77e6b6ebd746421efc3 (diff) |
Wrap categories loading into singleton and add support for multiple locales simultaneously. Fixes #178
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/admin_public_body/_tag_help.rhtml | 2 | ||||
-rw-r--r-- | app/views/admin_public_body/import_csv.rhtml | 2 | ||||
-rw-r--r-- | app/views/public_body/list.rhtml | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/app/views/admin_public_body/_tag_help.rhtml b/app/views/admin_public_body/_tag_help.rhtml index 7954ff992..0d0f84dda 100644 --- a/app/views/admin_public_body/_tag_help.rhtml +++ b/app/views/admin_public_body/_tag_help.rhtml @@ -1,7 +1,7 @@ <div id="tag_help"> <h2>List of tags</h2> <% first_row = true %> - <% for row in PublicBodyCategories::CATEGORIES_WITH_HEADINGS %> + <% for row in PublicBodyCategories::get().with_headings() %> <% if row.instance_of?(Array) %> <% if row[0] != 'other' %> <strong><%= row[0] %></strong>=<%= row[1] %> diff --git a/app/views/admin_public_body/import_csv.rhtml b/app/views/admin_public_body/import_csv.rhtml index 1523ef289..a7a13f477 100644 --- a/app/views/admin_public_body/import_csv.rhtml +++ b/app/views/admin_public_body/import_csv.rhtml @@ -49,7 +49,7 @@ <hr> <p>Standard tags: - <% for category, description in PublicBodyCategories::CATEGORIES_BY_TAG %> + <% for category, description in PublicBodyCategories::get().by_tag() %> <% if category != "other" %> <strong><%= category %></strong>=<%= description %>; <% end %> diff --git a/app/views/public_body/list.rhtml b/app/views/public_body/list.rhtml index e4c803113..81593fcc7 100644 --- a/app/views/public_body/list.rhtml +++ b/app/views/public_body/list.rhtml @@ -7,7 +7,7 @@ </li></ul> <% first_row = true %> - <% for row in PublicBodyCategories::CATEGORIES_WITH_HEADINGS %> + <% for row in PublicBodyCategories::get().with_headings() %> <% if row.instance_of?(Array) %> <li> <%= link_to_unless (@tag == row[0]), row[1], list_public_bodies_url(:tag => row[0]) %> |