diff options
| author | Teddy Wing | 2017-06-08 15:37:49 +0200 |
|---|---|---|
| committer | Teddy Wing | 2017-06-08 15:37:49 +0200 |
| commit | 01417ebaeec1150be5ce976c70322ef4f91e22af (patch) | |
| tree | b6dc6c03d2958c1b9bf8bebca6eccefddf417e0a | |
| parent | 5166f0b6030b79d47b02743656eff835b523cae1 (diff) | |
| download | chouette-core-01417ebaeec1150be5ce976c70322ef4f91e22af.tar.bz2 | |
workbenches/show.html.slim: Temporarily change to `table_builder_2`
Use this page as a visual testing ground for the new table builder.
Currently just verifying that nothing obvious changes visually.
Eventually we'll convert this page for real, but the API for the updated
table builder isn't finalised yet.
Refs #3479
| -rw-r--r-- | app/views/workbenches/show.html.slim | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/app/views/workbenches/show.html.slim b/app/views/workbenches/show.html.slim index 77e670923..65fb4652b 100644 --- a/app/views/workbenches/show.html.slim +++ b/app/views/workbenches/show.html.slim @@ -22,7 +22,7 @@ - if @wbench_refs.any? .row .col-lg-12 - = table_builder @wbench_refs, + /= table_builder @wbench_refs, { :name => 'name', :status => Proc.new {|w| w.archived? ? ("<div class='td-block'><span class='fa fa-archive'></span><span>Conservé</span></div>").html_safe : ("<div class='td-block'><span class='sb sb-lg sb-preparing'></span><span>En préparation</span></div>").html_safe}, :organisation => Proc.new {|w| w.organisation.name}, @@ -34,6 +34,19 @@ [:show, :edit, :archive, :unarchive, :delete], [:delete], 'table has-filter has-search' + / TODO: change => to : + = table_builder_2 @wbench_refs, + { :name => 'name', + :status => Proc.new {|w| w.archived? ? ("<div class='td-block'><span class='fa fa-archive'></span><span>Conservé</span></div>").html_safe : ("<div class='td-block'><span class='sb sb-lg sb-preparing'></span><span>En préparation</span></div>").html_safe}, + :organisation => Proc.new {|w| w.organisation.name}, + :validity_period => Proc.new {|w| w.validity_period.nil? ? '-' : t('validity_range', debut: l(w.try(:validity_period).try(:begin), format: :short), end: l(w.try(:validity_period).try(:end), format: :short))}, + :lines => Proc.new {|w| w.lines.count}, + :created_at => Proc.new {|w| l(w.created_at, format: :short)}, + :updated_at => Proc.new {|w| l(w.updated_at, format: :short)}, + :published_at => ''}, + links: [:show, :edit, :archive, :unarchive, :delete], + cls: 'table has-filter has-search' + / [:delete], = new_pagination @wbench_refs, 'pull-right' |
