summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2014-07-09 12:51:16 +0200
committerAzul <azul@leap.se>2014-07-09 12:51:16 +0200
commit0cc11ebb609de225fbeacbf80788b992b88b6ce6 (patch)
tree3dbf8562e91ac7d7c8759a0516efbdca93cbdeff /app/views
parentbdb4b0e275c205b0b44bbe3cc4ec4c162b309b37 (diff)
list identities based on search only
Diffstat (limited to 'app/views')
-rw-r--r--app/views/common/_search.html.haml8
-rw-r--r--app/views/common/_table.html.haml2
-rw-r--r--app/views/identities/index.html.haml1
-rw-r--r--app/views/users/index.html.haml13
4 files changed, 12 insertions, 12 deletions
diff --git a/app/views/common/_search.html.haml b/app/views/common/_search.html.haml
new file mode 100644
index 0000000..9f14903
--- /dev/null
+++ b/app/views/common/_search.html.haml
@@ -0,0 +1,8 @@
+= form_tag path, :method => :get, :class => "form-search" do
+ .input-append
+ = text_field_tag :query, params[:query],
+ id: "#{id}-typeahead",
+ class: "search-query",
+ autocomplete: :off
+ %button.btn{:type => :submit}= submit_label
+
diff --git a/app/views/common/_table.html.haml b/app/views/common/_table.html.haml
index 3c6bf2e..44762da 100644
--- a/app/views/common/_table.html.haml
+++ b/app/views/common/_table.html.haml
@@ -10,7 +10,7 @@
- headers.each do |header|
%th= header
%tbody
- - if content.any?
+ - if content.present?
= render content.all
- else
%tr
diff --git a/app/views/identities/index.html.haml b/app/views/identities/index.html.haml
index cabcccd..e4f48eb 100644
--- a/app/views/identities/index.html.haml
+++ b/app/views/identities/index.html.haml
@@ -1,4 +1,5 @@
-@show_navigation = false
+= search :identities
= table @identities, %w(type username destination actions)
-# = paginate @identities
diff --git a/app/views/users/index.html.haml b/app/views/users/index.html.haml
index fc1001e..3ed8835 100644
--- a/app/views/users/index.html.haml
+++ b/app/views/users/index.html.haml
@@ -1,13 +1,4 @@
- @show_navigation = false
-= form_tag users_path, :method => :get, :class => "form-search" do
- .input-append
- = text_field_tag :query, params[:query], :id => 'user-typeahead', :class => "search-query", :autocomplete => :off
- %button.btn{:type => :submit}= t(:search)
-
-%table.table.table-striped
- %tr
- %th= t(:username)
- %th= t(:created)
- %th= t(:updated)
- = render @users.all
+= search :users
+= table @users, %w(username, created, updated)