1
+ <% html_title(t('label_module')) %>
2
+
1
3
<% content_for :header_tags do %>
2
4
<%= stylesheet_link_tag "font-awesome.css", :plugin => "vault" %>
3
5
<%= stylesheet_link_tag "font-awesome.min.css", :plugin => "vault" %>
12
14
<%= t ( 'key.title.list' ) %>
13
15
<%= form_tag ( { controller : :keys , action : :all } , method : 'get' , class : 'keys-search-form' ) do %>
14
16
<%= text_field_tag ( :query , @query , class : 'autocomplete' ) %>
15
- <%= select_tag "project_id" , options_from_collection_for_select ( @projects , 'id' , 'name' , params [ :project_id ] ) , :prompt => "Please select" %>
17
+
16
18
<%= submit_tag ( t ( 'key.btn.find' ) ) %>
17
19
<% end %>
18
20
<%= button_to ( t ( 'button_clear' ) , { query : '' } , method : 'get' ) %>
19
21
</ h2 >
20
22
21
- <%= form_tag ( { } , :data => { :cm_url => keys_all_path } ) do %>
23
+ <%= form_tag ( { } , :data => { :cm_url => @project } ) do %>
22
24
< table class ='list ' id ='keys_table '>
23
25
< thead >
24
26
< tr >
25
- < th > <%= t ( 'field_project' ) %> </ th >
26
- < th > <%= t ( 'key.attr.name' ) %> </ th >
27
+ < th class ="checkbox hide-when-print ">
28
+ <%= check_box_tag 'check_all' , '' , false , :class => 'toggle-selection' ,
29
+ :title => "#{ l ( :button_check_all ) } /#{ l ( :button_uncheck_all ) } " %>
30
+ </ th >
31
+ < th > <%= t ( 'key.attr.type' ) %> </ th >
32
+ <%= sort_header_tag ( 'name' , caption : t ( 'key.attr.name' ) ) %>
27
33
< th > <%= t ( 'key.attr.url' ) %> </ th >
28
34
< th > <%= t ( 'key.attr.login' ) %> </ th >
29
35
< th > <%= t ( 'key.attr.body' ) %> </ th >
36
+ < th > <%= t ( 'key.btn.actions' ) %> </ th >
30
37
</ tr >
31
38
</ thead >
32
39
< tbody >
33
40
<% @keys . each do |key | %>
34
- <% parity = cycle ( 'odd' , 'even' ) %>
35
- < tr class ='hascontextmenu key <%= defined? ( parity ) ? parity : '' %> '>
36
- < td > <%= key . project . name %> </ td >
37
- < td > <%= key . name %> </ td >
38
- < td >
39
- <% unless key . url . blank? %>
40
- <% if /:\/ \/ / . match ( key . url ) %>
41
- <%= link_to "#{ key . url } " , key . url , id : "url_#{ key . id } " %>
42
- <% else %>
43
- < a align ="left " class ='keys-links ' data-clipboard-target ='url_ <%= key . id%> ' id ='d_clip_url_ <%= key . id %> '>
44
- <%= label_tag key . url , key . url , id : "url_#{ key . id } " %>
45
- </ a >
46
- <% end %>
47
- <% end %>
48
- </ td >
49
- < td >
50
- <% unless key . login . blank? %>
51
- < a align ="left " class ='keys-links ' data-clipboard-target ='login_ <%= key . id%> ' id ='d_clip_login_ <%= key . id%> '>
52
- < label id ="login_ <%= key . id %> "> <%= key . login %> </ label >
53
- </ a >
54
- <% end %>
55
- </ td >
56
- < td class ='key-password-column '>
57
- <% unless key . body . blank? %>
58
- < label > *********</ label >
59
- < label id ='plain_pass_ <%= key . id %> ' style ='display:none; '> <%= key . body . force_encoding ( 'UTF-8' ) %> </ label >
60
- < a align ="left " class ='keys-actions copy-key ' data-clipboard-target ='plain_pass_ <%= key . id%> ' title ='<%= t ( 'key.btn.clipboard' ) %> '>
61
- < i class ="fa fa-clipboard fa-fw "> </ i >
62
- </ a >
63
- <% end %>
64
- </ td >
65
- </ tr >
41
+ <%= render partial : key , locals : { parity : cycle ( 'odd' , 'even' ) } %>
66
42
<% end %>
67
43
</ tbody >
68
44
</ table >
69
45
<% end %>
70
46
71
- < span class ='pagination '> <%= pagination_links_full @key_pages , @key_count %> </ span >
47
+ < span class ='pagination '>
48
+ <%= pagination_links_full @key_pages , @key_count %>
49
+ </ span >
50
+
51
+ <% other_formats_links do |f | %>
52
+ <%= f . link_to_with_query_parameters t ( 'export.title.pdf' ) if User . current . allowed_to? ( :view_keys , @project ) if User . current . allowed_to? ( :export_keys , @project ) %>
53
+ <% end %>
72
54
73
55
<% content_for :sidebar do %>
74
56
< h3 > <%= t ( 'tag.title.popular' ) %> </ h3 >
83
65
</ div >
84
66
<% end %>
85
67
68
+ <%= context_menu %>
69
+
86
70
< script type ="text/javascript ">
87
71
$ ( 'a[href^="http://"]' ) . attr ( 'target' , '_blank' ) ;
88
72
$ ( 'a[href^="https://"]' ) . attr ( 'target' , '_blank' ) ;
89
- </ script >
73
+ </ script >
0 commit comments