aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume2017-10-02 12:41:27 +0200
committerGuillaume2017-10-02 12:41:27 +0200
commit0f16c936c211a6ab7324e0765f0ef4a8bcf28aa8 (patch)
tree45e5c517e808bef6695b539c1a7132f8b19d7d21
parenteaf5b3fd868d68856ef94e18656dac39096d866b (diff)
downloadchouette-core-0f16c936c211a6ab7324e0765f0ef4a8bcf28aa8.tar.bz2
add show link for compliance_control_block, wording links Refs #4659
-rw-r--r--app/decorators/compliance_control_decorator.rb13
-rw-r--r--app/views/compliance_control_sets/show.html.slim3
-rw-r--r--config/locales/compliance_control_sets.en.yml1
-rw-r--r--config/locales/compliance_control_sets.fr.yml1
-rw-r--r--db/schema.rb2
5 files changed, 16 insertions, 4 deletions
diff --git a/app/decorators/compliance_control_decorator.rb b/app/decorators/compliance_control_decorator.rb
index 3a05a5c59..e70ff5350 100644
--- a/app/decorators/compliance_control_decorator.rb
+++ b/app/decorators/compliance_control_decorator.rb
@@ -9,16 +9,25 @@ class ComplianceControlDecorator < Draper::Decorator
content: h.destroy_link_content,
href: h.compliance_control_set_compliance_control_path(object.compliance_control_set.id, object.id),
method: :delete,
- data: { confirm: h.t('compliance_controls.actions.destroy_confirm') }
+ data: { confirm: h.t('compliance_control_sets.actions.destroy_confirm') }
)
# end
# if h.policy(object).edit?
links << Link.new(
- content: h.t('compliance_controls.actions.edit'),
+ content: h.t('compliance_control_sets.actions.edit'),
href: h.edit_compliance_control_set_compliance_control_path(object.compliance_control_set.id, object.id)
)
# end
+
+
+ # if h.policy(object).show?
+ links << Link.new(
+ content: h.t('compliance_control_sets.actions.show'),
+ href: h.compliance_control_set_compliance_control_path(object.compliance_control_set.id, object.id)
+ )
+ # end
+
links
end
diff --git a/app/views/compliance_control_sets/show.html.slim b/app/views/compliance_control_sets/show.html.slim
index 3b0a123aa..0de6fb359 100644
--- a/app/views/compliance_control_sets/show.html.slim
+++ b/app/views/compliance_control_sets/show.html.slim
@@ -14,7 +14,7 @@
method: link.method,
data: link.data,
class: 'btn btn-primary' do
- = link.content
+ = link.content
/ PageContent
.page_content
@@ -54,6 +54,7 @@
), \
],
sortable: true,
+ #links: [:show],
cls: 'table has-filter has-search'
.select_toolbox
diff --git a/config/locales/compliance_control_sets.en.yml b/config/locales/compliance_control_sets.en.yml
index 4e2c8f485..c2b6aae8e 100644
--- a/config/locales/compliance_control_sets.en.yml
+++ b/config/locales/compliance_control_sets.en.yml
@@ -7,6 +7,7 @@ en:
actions:
new: Add
edit: Edit
+ show: Show
destroy: Destroy
add_compliance_control: Add a compliance control
destroy_confirm: Are you sur ?
diff --git a/config/locales/compliance_control_sets.fr.yml b/config/locales/compliance_control_sets.fr.yml
index d808698c5..b7e93c40c 100644
--- a/config/locales/compliance_control_sets.fr.yml
+++ b/config/locales/compliance_control_sets.fr.yml
@@ -7,6 +7,7 @@ fr:
actions:
new: Ajouter
edit: Editer
+ show: Consulter
destroy: Supprimer
add_compliance_control: Ajouter un JDC
destroy_confirm: Etes vous sûr de supprimer ce jeux de contrôle ?
diff --git a/db/schema.rb b/db/schema.rb
index 792b42258..91ffdd60c 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -402,9 +402,9 @@ ActiveRecord::Schema.define(version: 20171002080526) do
t.string "type"
t.integer "parent_id", limit: 8
t.string "parent_type"
+ t.datetime "notified_parent_at"
t.integer "current_step", default: 0
t.integer "total_steps", default: 0
- t.datetime "notified_parent_at"
t.string "creator"
end