my_admin 0.1.12 → 0.1.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1b3025ea7c01b9b5aa3486823d5ae2a437603dfe901972e4801d136b8aa1d937
4
- data.tar.gz: 71344e267110c7b9fa820fd7f358e6ab1dbf4e3f6234ca3bdc9af2e802181ef7
3
+ metadata.gz: ba067bcb11d7a210c2c251b76fe22f03a79e0afed4defc61f7c396b96f9bbbac
4
+ data.tar.gz: a68c60ab19bcda4becd38baabad69b13f2b9497a15cdb859edf4d4f69615bf54
5
5
  SHA512:
6
- metadata.gz: 926b53747840504d6258a9a0532cc4a2d84dca9fd65bd4e66562e0388f1253fe94a627b302de161ccc29871a1754e9dd9777558a71d865f4d2ab7192317270f3
7
- data.tar.gz: f00c7cc5f26af34f2cde4181b186918cf5b1195ee30b2377ca58a2db159516b8c1164d23f6f0ef0a1b8e566b4ab0af5463ad2e776ed319bfbf1840027392a57e
6
+ metadata.gz: 30b4a3eff562a1fec4f2933aebeb7fe2612c28cea271658b9ede18409889a990e883f296ed281970ca350cd396d1b9eebe9d2c48081d76cfc6511edb0f6f0c0a
7
+ data.tar.gz: d515df26069a7812109f4b44f9906a9891a8932b4bc02376abc360a538868cbd2947845ea611d839e9aa63e8de01e83038d149e9239616ed0209ce5c31898f33
@@ -0,0 +1,14 @@
1
+ <%= link_to(collection_model_link(@application, @model, :destroy_all), :class => "btn btn-danger btn-remove-all-selected") do %>
2
+ <i class="icon-trash"></i>
3
+ Excluir Selecionados
4
+ <% end if @model.my_admin.can?(:destroy, my_admin_user) %>
5
+
6
+ <%= link_to(new_model_link(@application, @model), :class => "btn btn-success") do %>
7
+ <i class="icon-plus"></i>
8
+ Adicionar
9
+ <% end if @model.my_admin.can?(:create, my_admin_user) %>
10
+
11
+ <%= link_to(collection_model_link(@application, @model, :export, params.clone), :class => "btn btn-inverse") do %>
12
+ <i class="glyphicon-file_export"></i>
13
+ <%= I18n.t('my_admin.titles.models.export', :model => @model.title) %>
14
+ <% end if @model.my_admin.can?(:export, my_admin_user) %>
@@ -5,57 +5,42 @@
5
5
  <% end %>
6
6
 
7
7
  <%= render model_template(@application, @model, 'filters'), { :url => model_link(@application, @model) } %>
8
-
9
- <div class="row-fluid">
8
+
9
+ <div class="row-fluid">
10
10
  <div class="span12">
11
-
11
+
12
12
  <div class="box list">
13
13
  <div class="box-title">
14
14
  <h3>
15
15
  <i class="icon-table"></i>
16
16
  <%= @model.title_plural %>
17
17
  </h3>
18
-
19
- <div class="pull-right">
20
-
21
- <%= link_to(collection_model_link(@application, @model, :destroy_all), :class => "btn btn-danger btn-remove-all-selected") do %>
22
- <i class="icon-trash"></i>
23
- Excluir Selecionados
24
- <% end if @model.my_admin.can?(:destroy, my_admin_user) %>
25
-
26
- <%= link_to(new_model_link(@application, @model), :class => "btn btn-success") do %>
27
- <i class="icon-plus"></i>
28
- Adicionar
29
- <%#= I18n.t('my_admin.titles.models.new', :model => @model.title) %>
30
- <% end if @model.my_admin.can?(:create, my_admin_user) %>
31
-
32
- <%= link_to(collection_model_link(@application, @model, :export, params.clone), :class => "btn btn-inverse") do %>
33
- <i class="glyphicon-file_export"></i>
34
- <%= I18n.t('my_admin.titles.models.export', :model => @model.title) %>
35
- <% end if @model.my_admin.can?(:export, my_admin_user) %>
36
18
 
19
+ <div class="pull-right">
20
+ <%= render model_template(@application, @model, 'actions_list'), params: params, my_admin_user: my_admin_user %>
37
21
  </div>
22
+
38
23
  <div class="actions pull-right">
39
24
  <div class="input-medium per_page">
40
25
  <%= select_tag :per_page, options_for_select([10,20,50,100].map { |i| ["#{i} por página", model_link(@application, @model, params.clone.update({:per_page => i}))]}, model_link(@application, @model, params.clone.update({:per_page => params[:per_page]}))), :class => 'chosen-select', "data-nosearch" => true %>
41
26
  </div>
42
27
  </div>
43
-
28
+
44
29
  </div>
45
30
 
46
31
  <div class="box-content nopadding">
47
32
 
48
-
33
+
49
34
  <table class="table table-hover table-nomargin table-bordered" data-nosort="0">
50
35
  <thead>
51
36
  <tr class='thefilter'>
52
37
  <% if @model.my_admin.can?(:destroy, my_admin_user) %>
53
38
  <th class='with-checkbox'><input type="checkbox" name="check_all" id="check_all"></th>
54
39
  <% end %>
55
-
40
+
56
41
  <% @model.my_admin.list_display.each do |field| %>
57
42
  <% order = (params[:order_by] == field.to_s && params[:order] == "asc") ? "desc" : "asc" %>
58
-
43
+
59
44
  <% if field_can_order(@application, @model, field) %>
60
45
  <th class="sorting<%= "_#{params[:order]}" if params[:order_by] == field.to_s %>">
61
46
  <%= link_to( field_title(@model, field), model_link(@application, @model, params.clone.update({:order => order, :order_by => field}))) %>
@@ -68,7 +53,7 @@
68
53
  </th>
69
54
  <% end %>
70
55
  <%= render model_template(@application, @model, 'actions_header') %>
71
-
56
+
72
57
  </tr>
73
58
  </thead>
74
59
  <% unless @objects.blank? %>
@@ -79,12 +64,12 @@
79
64
  </tbody>
80
65
  <% end %>
81
66
  </table>
82
-
67
+
83
68
  <%= render model_template(@application, @model, 'paginate') %>
84
69
 
85
70
  </div>
86
71
  </div>
87
-
88
-
72
+
73
+
89
74
  </div>
90
- </div>
75
+ </div>
@@ -1,3 +1,3 @@
1
1
  module MyAdmin
2
- VERSION = "0.1.12"
2
+ VERSION = "0.1.13"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: my_admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12
4
+ version: 0.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcos Vinicius von Gal dos Santos
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-09 00:00:00.000000000 Z
11
+ date: 2019-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -912,6 +912,7 @@ files:
912
912
  - app/views/my_admin/first_users/new.html.erb
913
913
  - app/views/my_admin/models/_actions.html.erb
914
914
  - app/views/my_admin/models/_actions_header.html.erb
915
+ - app/views/my_admin/models/_actions_list.html.erb
915
916
  - app/views/my_admin/models/_field.html.erb
916
917
  - app/views/my_admin/models/_filters.html.erb
917
918
  - app/views/my_admin/models/_form.html.erb