diff options
| author | vlatka pavisic | 2016-12-27 12:13:53 +0100 |
|---|---|---|
| committer | vlatka pavisic | 2016-12-27 12:13:53 +0100 |
| commit | 08b68565fb7f82bc7754bd62ad3f72efca6ea62d (patch) | |
| tree | 8ead4709d3ba3378f8bfb044ae05efb06914fde3 /app | |
| parent | 28be322127478599c138a08e818db37fd5f3cd25 (diff) | |
| download | chouette-core-08b68565fb7f82bc7754bd62ad3f72efca6ea62d.tar.bz2 | |
Refs #2260 : LinePolicy changes
Diffstat (limited to 'app')
| -rw-r--r-- | app/policies/line_policy.rb | 4 | ||||
| -rw-r--r-- | app/views/lines/_lines.html.slim | 2 | ||||
| -rw-r--r-- | app/views/referential_lines/_lines.html.slim | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/app/policies/line_policy.rb b/app/policies/line_policy.rb index 8ef2dcaed..9d1f55cf2 100644 --- a/app/policies/line_policy.rb +++ b/app/policies/line_policy.rb @@ -8,9 +8,9 @@ class LinePolicy < ApplicationPolicy def create? false end - def update? ; true end + def update? ; false end def new? ; create? end - def edit? ; true end + def edit? ; false end def destroy? ; create? end def update_footnote?; true end end diff --git a/app/views/lines/_lines.html.slim b/app/views/lines/_lines.html.slim index cdb90bbba..a9f0f4a14 100644 --- a/app/views/lines/_lines.html.slim +++ b/app/views/lines/_lines.html.slim @@ -2,7 +2,7 @@ = table_builder @lines, { 'Oid' => Proc.new { |n| n.objectid.local_id }, @lines.human_attribute_name(:id) => 'id', @lines.human_attribute_name(:number) => 'number', @lines.human_attribute_name(:name) => 'name', @lines.human_attribute_name(:network) => Proc.new { |n| n.try(:network).try(:name) }, @lines.human_attribute_name(:company) => Proc.new { |n| n.try(:company).try(:name) } }, - [:show, :edit, :delete], + [:show], 'table table-bordered' .text-center diff --git a/app/views/referential_lines/_lines.html.slim b/app/views/referential_lines/_lines.html.slim index cdb90bbba..a9f0f4a14 100644 --- a/app/views/referential_lines/_lines.html.slim +++ b/app/views/referential_lines/_lines.html.slim @@ -2,7 +2,7 @@ = table_builder @lines, { 'Oid' => Proc.new { |n| n.objectid.local_id }, @lines.human_attribute_name(:id) => 'id', @lines.human_attribute_name(:number) => 'number', @lines.human_attribute_name(:name) => 'name', @lines.human_attribute_name(:network) => Proc.new { |n| n.try(:network).try(:name) }, @lines.human_attribute_name(:company) => Proc.new { |n| n.try(:company).try(:name) } }, - [:show, :edit, :delete], + [:show], 'table table-bordered' .text-center |
