diff options
author | Louise Crow <louise.crow@gmail.com> | 2013-03-11 17:19:55 -0700 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2013-03-11 17:19:55 -0700 |
commit | 72357e351d9dbe312f978bc1e2ab0630ed4df03d (patch) | |
tree | e28775b2fcff8b0d17663e31219aac783cb53ba3 /app/helpers/admin_helper.rb | |
parent | 84e81cbd2b0f98196050d3f5f758ced8a4f841df (diff) | |
parent | 21ccc19acbe9d8c45c479917e6d53eb1d4a7f35c (diff) |
Merge remote-tracking branch 'openaustralia_github/make_ui_for_links_in_admin_interface_consistent' into develop
Conflicts:
app/views/admin_censor_rule/new.rhtml
app/views/admin_general/index.rhtml
app/views/admin_general/timeline.rhtml
app/views/admin_request/_some_requests.rhtml
app/views/admin_request/show.rhtml
app/views/admin_track/_some_tracks.rhtml
Diffstat (limited to 'app/helpers/admin_helper.rb')
-rw-r--r-- | app/helpers/admin_helper.rb | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/app/helpers/admin_helper.rb b/app/helpers/admin_helper.rb new file mode 100644 index 000000000..059cebdfa --- /dev/null +++ b/app/helpers/admin_helper.rb @@ -0,0 +1,37 @@ +module AdminHelper + def icon(name) + content_tag(:i, "", :class => "icon-#{name}") + end + + def eye + icon("eye-open") + end + + def chevron_right + icon("chevron-right") + end + + def chevron_down + icon("chevron-down") + end + + def arrow_right + icon("arrow-right") + end + + def request_both_links(info_request) + link_to(eye, request_path(info_request), :title => "view request on public website") + " " + + link_to(info_request.title, admin_request_show_path(info_request), :title => "view full details") + end + + def public_body_both_links(public_body) + link_to(eye, public_body_path(public_body), :title => "view authority on public website") + " " + + link_to(h(public_body.name), admin_body_show_path(public_body), :title => "view full details") + end + + def user_both_links(user) + link_to(eye, user_path(user), :title => "view user's page on public website") + " " + + link_to(h(user.name), admin_user_show_path(user), :title => "view full details") + end +end + |