summaryrefslogtreecommitdiff
path: root/app/views/common
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2014-07-04 15:40:54 +0200
committerAzul <azul@leap.se>2014-07-05 10:21:07 +0200
commit87e9ccbcdf4f99dd898b0715750092a27fff7e94 (patch)
tree9e49a287c6e95d92323253d899afa367a6f1e14e /app/views/common
parent24d108e15c38ca572d5339a39cb110d9067c0b3d (diff)
Enable unblocking handles in identities tab
There's an identities tab now for admins that will allow unblocking blocked handles. It should be easy to expand for aliases and forwards and other types of actions such as editing.
Diffstat (limited to 'app/views/common')
-rw-r--r--app/views/common/_action.html.haml2
-rw-r--r--app/views/common/_navigation_item.html.haml3
-rw-r--r--app/views/common/_table.html.haml18
3 files changed, 23 insertions, 0 deletions
diff --git a/app/views/common/_action.html.haml b/app/views/common/_action.html.haml
new file mode 100644
index 0000000..71ffd96
--- /dev/null
+++ b/app/views/common/_action.html.haml
@@ -0,0 +1,2 @@
+%li.action{class: action.class}
+ =link_to action.label, action.url, action.html_options
diff --git a/app/views/common/_navigation_item.html.haml b/app/views/common/_navigation_item.html.haml
new file mode 100644
index 0000000..02c54c8
--- /dev/null
+++ b/app/views/common/_navigation_item.html.haml
@@ -0,0 +1,3 @@
+- item = navigation_item.to_s
+%li{:class => ("active" if controller?(item))}
+ = link_to t(".#{item}", cascade: true), polymorphic_url(item)
diff --git a/app/views/common/_table.html.haml b/app/views/common/_table.html.haml
new file mode 100644
index 0000000..3c6bf2e
--- /dev/null
+++ b/app/views/common/_table.html.haml
@@ -0,0 +1,18 @@
+-#
+-# A simple table with headers, content and a message if there is no
+-# content.
+-# You can use the table helper method to translate the headers and
+-# error message.
+-#
+%table.table.table-striped.table-bordered
+ %thead
+ %tr
+ - headers.each do |header|
+ %th= header
+ %tbody
+ - if content.any?
+ = render content.all
+ - else
+ %tr
+ %td{:colspan=>headers.count}= none
+