diff options
| author | Luc Donnet | 2017-12-21 12:03:20 +0100 |
|---|---|---|
| committer | Luc Donnet | 2017-12-21 13:57:03 +0100 |
| commit | 9a090ecdedac38eeff0aed137e311525e73832e9 (patch) | |
| tree | 2578a07ed502062e8fb8116202cf7eb673c3dc10 /app | |
| parent | b6606b25148b958a1f8d5502d95c7db12ef224b0 (diff) | |
| download | chouette-core-9a090ecdedac38eeff0aed137e311525e73832e9.tar.bz2 | |
Fix edit, i18n and add feature spec for purchase window Refs #5301 @3
Diffstat (limited to 'app')
| -rw-r--r-- | app/decorators/purchase_window_decorator.rb | 4 | ||||
| -rw-r--r-- | app/views/purchase_windows/edit.html.slim | 7 | ||||
| -rw-r--r-- | app/views/purchase_windows/show.html.slim | 2 |
3 files changed, 10 insertions, 3 deletions
diff --git a/app/decorators/purchase_window_decorator.rb b/app/decorators/purchase_window_decorator.rb index a2060623e..13bc4d666 100644 --- a/app/decorators/purchase_window_decorator.rb +++ b/app/decorators/purchase_window_decorator.rb @@ -27,8 +27,8 @@ class PurchaseWindowDecorator < Draper::Decorator def bounding_dates unless object.date_ranges.empty? - object.date_ranges.min.begin..object.date_ranges.max.end + object.date_ranges.map(&:min).min..object.date_ranges.map(&:max).max end end -end
\ No newline at end of file +end diff --git a/app/views/purchase_windows/edit.html.slim b/app/views/purchase_windows/edit.html.slim new file mode 100644 index 000000000..6354db853 --- /dev/null +++ b/app/views/purchase_windows/edit.html.slim @@ -0,0 +1,7 @@ +- breadcrumb :purchase_window, @referential, @purchase_window +- page_header_content_for @purchase_window +.page_content + .container-fluid + .row + .col-lg-8.col-lg-offset-2.col-md-8.col-md-offset-2.col-sm-10.col-sm-offset-1 + = render 'form' diff --git a/app/views/purchase_windows/show.html.slim b/app/views/purchase_windows/show.html.slim index c039257f9..9f3abb267 100644 --- a/app/views/purchase_windows/show.html.slim +++ b/app/views/purchase_windows/show.html.slim @@ -1,4 +1,4 @@ -- breadcrumb :purchase_window, @purchase_window, @referential +- breadcrumb :purchase_window, @referential, @purchase_window - page_header_content_for @purchase_window - content_for :page_header_content do .row.mb-sm |
