aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/assets/stylesheets/components/_tables.sass38
-rw-r--r--app/helpers/newapplication_helper.rb22
-rw-r--r--app/views/workbenches/show.html.slim2
3 files changed, 62 insertions, 0 deletions
diff --git a/app/assets/stylesheets/components/_tables.sass b/app/assets/stylesheets/components/_tables.sass
index e97ee3d7a..caebc22e0 100644
--- a/app/assets/stylesheets/components/_tables.sass
+++ b/app/assets/stylesheets/components/_tables.sass
@@ -52,3 +52,41 @@
text-decoration: none
font-weight: 700
color: inherit
+
+// select_toolbox
+.select_toolbox
+ padding: 10px
+ background-color: #fff
+ box-shadow: 0 0 3px $darkgrey
+ position: fixed
+ z-index: 999
+ right: 50px
+ bottom: 15px
+
+ > ul
+ display: block
+ margin: 0
+ padding: 0
+ text-align: center
+
+ > .st_action
+ display: inline-block
+ width: 35px
+ height: 35px
+ margin: 5px
+
+ > a
+ display: block
+ height: 35px
+ text-align: center
+ line-height: 35px
+ border-radius: 50%
+ background-color: $blue
+ color: #fff
+
+ &:hover
+ background-color: rgba($blue, 0.5)
+
+ > .info-msg
+ font-style: italic
+ font-size: 0.85em
diff --git a/app/helpers/newapplication_helper.rb b/app/helpers/newapplication_helper.rb
index 70b16ce01..0311019cd 100644
--- a/app/helpers/newapplication_helper.rb
+++ b/app/helpers/newapplication_helper.rb
@@ -150,6 +150,28 @@ module NewapplicationHelper
end
end
+ # Actions on select toolbox
+ def select_toolbox collection, actions
+ tools = content_tag :ul do
+ actions.collect do |action|
+
+ actitem = link_to '#', title: t("table.#{action}") do
+ if action == :edit
+ content_tag :span, '', class: 'fa fa-pencil'
+ elsif action == :delete
+ content_tag :span, '', class: 'fa fa-trash'
+ end
+ end
+
+ content_tag :li, actitem, class: 'st_action'
+ end.join.html_safe
+
+ end
+ content_tag :div, '', class: 'select_toolbox' do
+ tools.concat(content_tag(:span, "n élément(s) sélectionné(s)", class: 'info-msg'))
+ end
+ end
+
# Replacement message
def replacement_msg text
content_tag :div, '', class: 'alert alert-warning' do
diff --git a/app/views/workbenches/show.html.slim b/app/views/workbenches/show.html.slim
index 61175db98..a8cc585f3 100644
--- a/app/views/workbenches/show.html.slim
+++ b/app/views/workbenches/show.html.slim
@@ -46,6 +46,8 @@
:selectable,
'table'
+ = select_toolbox [:edit, :delete]
+
= new_pagination @wbench_refs, 'pull-right'
- else