aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjpl2017-02-14 17:41:32 +0100
committerjpl2017-02-14 17:41:32 +0100
commitbbcb181145858f148c4eb5bcd8ed9e06582c535e (patch)
treec3cc0cfbe5b0f827775e3f6621aaf1c01485e772
parent5fbfc7f87bcae3fdccedbbbf8cb5134fd592ed50 (diff)
downloadchouette-core-bbcb181145858f148c4eb5bcd8ed9e06582c535e.tar.bz2
updating delete buttons on page header (adding icon)
-rw-r--r--app/assets/stylesheets/components/_buttons.sass5
-rw-r--r--app/views/referential_companies/show.html.slim4
-rw-r--r--app/views/referential_lines/show.html.slim5
-rw-r--r--app/views/referential_networks/show.html.slim4
-rw-r--r--app/views/referentials/show.html.slim4
5 files changed, 18 insertions, 4 deletions
diff --git a/app/assets/stylesheets/components/_buttons.sass b/app/assets/stylesheets/components/_buttons.sass
index 73f2e4317..2c270385f 100644
--- a/app/assets/stylesheets/components/_buttons.sass
+++ b/app/assets/stylesheets/components/_buttons.sass
@@ -5,6 +5,11 @@
.btn
font-weight: 700
+ .fa + span
+ padding-left: 0.5em
+ span + .fa
+ padding-left: 0.5em
+
&.btn-default
background-color: #fff
border-color: rgba(#fff, 0.5)
diff --git a/app/views/referential_companies/show.html.slim b/app/views/referential_companies/show.html.slim
index 99b08d8ff..4e3285dfb 100644
--- a/app/views/referential_companies/show.html.slim
+++ b/app/views/referential_companies/show.html.slim
@@ -12,7 +12,9 @@
- if policy(@company).update?
= link_to t('companies.actions.edit'), edit_referential_company_path(@referential, @company), class: 'btn btn-primary'
- if policy(@company).destroy?
- = link_to t('companies.actions.destroy'), referential_company_path(@referential, @company), method: :delete, data: {confirm: t('companies.actions.destroy_confirm')}, class: 'btn btn-primary'
+ = link_to referential_company_path(@referential, @company), method: :delete, data: {confirm: t('companies.actions.destroy_confirm')}, class: 'btn btn-primary' do
+ span.fa.fa-trash
+ span = t('companies.actions.destroy')
/ PageContent
.page_content
diff --git a/app/views/referential_lines/show.html.slim b/app/views/referential_lines/show.html.slim
index 0f7c4820f..11bd5bbc6 100644
--- a/app/views/referential_lines/show.html.slim
+++ b/app/views/referential_lines/show.html.slim
@@ -18,7 +18,10 @@
- if policy(@line).update?
= link_to t('lines.actions.edit'), edit_referential_line_path(@referential, @line), class: 'btn btn-primary'
- if policy(@line).destroy?
- = link_to t('lines.actions.destroy'), referential_line_path(@referential, @line), method: :delete, data: {confirm: t('lines.actions.destroy_confirm')}, class: 'btn btn-primary'
+ = link_to referential_line_path(@referential, @line), method: :delete, data: {confirm: t('lines.actions.destroy_confirm')}, class: 'btn btn-primary' do
+ span.fa.fa-trash
+ span = t('lines.actions.destroy')
+
- if !@line.hub_restricted? || (@line.hub_restricted? && @line.routes.size < 2)
- if policy(Chouette::Route).create? && @referential.organisation == current_organisation
= link_to t('routes.actions.new'), new_referential_line_route_path(@referential, @line), class: 'btn btn-primary'
diff --git a/app/views/referential_networks/show.html.slim b/app/views/referential_networks/show.html.slim
index b61fe3fb7..0e19e043d 100644
--- a/app/views/referential_networks/show.html.slim
+++ b/app/views/referential_networks/show.html.slim
@@ -12,7 +12,9 @@
- if policy(@network).update?
= link_to t('networks.actions.edit'), edit_referential_network_path(@referential, @network), class: 'btn btn-primary'
- if policy(@network).destroy?
- = link_to t('networks.actions.destroy'), referential_network_path(@referential, @network), method: :delete, data: { confirm: t('networks.actions.destroy_confirm')}, class: 'btn btn-primary'
+ = link_to referential_network_path(@referential, @network), method: :delete, data: { confirm: t('networks.actions.destroy_confirm')}, class: 'btn btn-primary' do
+ span.fa.fa-trash
+ span = t('networks.actions.destroy')
/ PageContent
.page_content
diff --git a/app/views/referentials/show.html.slim b/app/views/referentials/show.html.slim
index b3929d637..5cf81a697 100644
--- a/app/views/referentials/show.html.slim
+++ b/app/views/referentials/show.html.slim
@@ -18,7 +18,9 @@
- else
= link_to t('actions.archive'), archive_referential_path(@referential.id), method: :put, class: 'btn btn-primary'
- = link_to t('actions.destroy'), referential_path(@referential), method: :delete, data: {confirm: t('referentials.actions.destroy_confirm')}, class: 'btn btn-primary'
+ = link_to referential_path(@referential), method: :delete, data: {confirm: t('referentials.actions.destroy_confirm')}, class: 'btn btn-primary' do
+ span.fa.fa-trash
+ span = t('actions.destroy')
/ PageContent
.page_content