klastera 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/klastera/clusters_controller.rb +1 -1
- data/app/models/klastera/concerns/cluster.rb +1 -1
- data/app/views/klastera/clusters/_form.html.erb +3 -3
- data/app/views/klastera/clusters/_table.html.erb +8 -2
- data/config/locales/es.yml +2 -0
- data/db/migrate/20200330221601_add_order_field_to_clusters.rb +5 -0
- data/lib/klastera/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 280e925c5270bc97994f02d9a01833a0145faf0a23e7f6d4997d894917e72a6d
|
4
|
+
data.tar.gz: 4f59e0354a9f828f76fe0f07b35fe6edaff61cb5eccd58d910c13044aa776533
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a06f21fd4e70f4adc24e70aea484c2edf61b4263f6b197da3baeb18409e702caba181212e70876e1138b6bbc22562cb05bd793844d92a6b6dcb70b6a2448159
|
7
|
+
data.tar.gz: 84abb2005421a9aa81acfd33a5f96fe5077841c16287fe0434bdbeadd9427b67a2d0632f57c545b0e77821075713e4953e119451acf4af360512673cbddc6d0f
|
@@ -58,7 +58,7 @@ module Klastera
|
|
58
58
|
end
|
59
59
|
|
60
60
|
def cluster_params
|
61
|
-
parameters = params.require(:cluster).permit(:nid, :name, :color)
|
61
|
+
parameters = params.require(:cluster).permit(:nid, :name, :color, :order)
|
62
62
|
parameters[:organization_id]=current_organization.id
|
63
63
|
parameters
|
64
64
|
end
|
@@ -10,7 +10,7 @@ module Klastera::Concerns::Cluster
|
|
10
10
|
|
11
11
|
MODES = [ :suborganization, :required_filter, :optional_filter ].freeze
|
12
12
|
|
13
|
-
default_scope {
|
13
|
+
default_scope { order(id: :desc) }
|
14
14
|
belongs_to :organization, class_name: Klastera.organization_class
|
15
15
|
|
16
16
|
scope :all_clusters_of, lambda { |organization,except_ids=[]|
|
@@ -9,12 +9,12 @@
|
|
9
9
|
<div class="col-xs-12">
|
10
10
|
<%= f.input :nid, as: :string, label: t('klastera.cluster_nid') %>
|
11
11
|
</div>
|
12
|
-
<%# <div class="col-xs-12"> %>
|
13
|
-
<%# <%= f.input :organization_id, as: :string, label: t('klastera.organization_name') %>
|
14
|
-
<%# </div> %>
|
15
12
|
<div class="col-xs-12">
|
16
13
|
<%= f.input :color, as: :string, label: t('klastera.cluster_color'), input_html: { class: 'color-picker'} %>
|
17
14
|
</div>
|
15
|
+
<div class="col-xs-12">
|
16
|
+
<%= f.input :order, as: :string, label: t('klastera.cluster_order') %>
|
17
|
+
</div>
|
18
18
|
</div>
|
19
19
|
</div>
|
20
20
|
|
@@ -1,7 +1,9 @@
|
|
1
1
|
<table class="table table-striped table-hover table-condensed table-bordered datatable">
|
2
2
|
<thead>
|
3
3
|
<tr>
|
4
|
-
<th class="text-center cluster-
|
4
|
+
<th class="text-center cluster-id"><%=t('klastera.cluster_id')%></th>
|
5
|
+
<th class="text-center cluster-order"><%=t('klastera.cluster_order')%></th>
|
6
|
+
<th class="text-center cluster-color"><%=t('klastera.cluster_color')%></th>
|
5
7
|
<th class="text-center cluster-name"><%=t('klastera.cluster_name')%></th>
|
6
8
|
<th class="text-center cluster-nid"><%=t('klastera.cluster_nid')%></th>
|
7
9
|
<th class="cogs-actions four-icons"><span class="fa fa-cogs"></span></th>
|
@@ -10,9 +12,10 @@
|
|
10
12
|
<tbody>
|
11
13
|
<% @clusters.each do |cluster| %>
|
12
14
|
<tr>
|
15
|
+
<td class="text-center cluster-id"><%= cluster.id %></td>
|
16
|
+
<td class="text-center cluster-order"><%= cluster.order %></td>
|
13
17
|
<td class="text-center cluster-color">
|
14
18
|
<i style='<%="color:#{cluster.color}" if cluster.color.present?%>' class="fa fa-square fa-2x<%=' colorless' if cluster.color.blank?%>" aria-hidden="true"></i>
|
15
|
-
<span class="hide"><%=cluster.id%></span>
|
16
19
|
</td>
|
17
20
|
<td class="text-center cluster-name"><%= cluster.name %></td>
|
18
21
|
<td class="text-center cluster-nid"><%= cluster.nid %></td>
|
@@ -29,6 +32,9 @@
|
|
29
32
|
</tbody>
|
30
33
|
</table>
|
31
34
|
<style type="text/css">
|
35
|
+
.cluster-id { width: 70px; }
|
36
|
+
.cluster-order { width: 70px; }
|
37
|
+
.cluster-color { width: 70px; }
|
32
38
|
.odd .colorless { color: #F9F9F9 }
|
33
39
|
.even .colorless { color: #FFF }
|
34
40
|
tr:hover .colorless { color: #F5F5F5 }
|
data/config/locales/es.yml
CHANGED
@@ -12,6 +12,8 @@ es:
|
|
12
12
|
admin: Admin Cliente [ Ignora asignación, ve todos los clusters ]
|
13
13
|
user: Usuario normal [ Ve sólo los clusters asignados ]
|
14
14
|
using_cluster_as: Usando cluster como
|
15
|
+
cluster_order: Orden
|
16
|
+
cluster_id: ID
|
15
17
|
cluster_role: Cluster rol
|
16
18
|
cluster_name: Nombre
|
17
19
|
cluster_nid: Código
|
data/lib/klastera/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: klastera
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gino Barahona
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-03-
|
11
|
+
date: 2020-03-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -85,6 +85,7 @@ files:
|
|
85
85
|
- db/migrate/20200324203929_create_klastera_clusters.rb
|
86
86
|
- db/migrate/20200326111219_add_cluster_options_to_organizations.rb
|
87
87
|
- db/migrate/20200330010551_create_klastera_cluster_users.rb
|
88
|
+
- db/migrate/20200330221601_add_order_field_to_clusters.rb
|
88
89
|
- lib/klastera.rb
|
89
90
|
- lib/klastera/engine.rb
|
90
91
|
- lib/klastera/version.rb
|