aboutsummaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
authorVlatka Pavisic2017-01-06 17:42:46 +0100
committerVlatka Pavisic2017-01-06 17:42:59 +0100
commit51534c59d3ddebf72a186cfc120d0481fab95d78 (patch)
tree24ed8f0c7d5e8a8bfdb2d86d0f441002c17226f9 /app/views
parentb6cd50e722136033c0e579ebfadd855d5fe7de7d (diff)
downloadchouette-core-51534c59d3ddebf72a186cfc120d0481fab95d78.tar.bz2
Refs #2347 : TimeTable with Calendar
Diffstat (limited to 'app/views')
-rw-r--r--app/views/time_tables/_form.html.slim14
-rw-r--r--app/views/time_tables/_show_time_table.html.slim9
2 files changed, 16 insertions, 7 deletions
diff --git a/app/views/time_tables/_form.html.slim b/app/views/time_tables/_form.html.slim
index 7194ce363..8652f7cb5 100644
--- a/app/views/time_tables/_form.html.slim
+++ b/app/views/time_tables/_form.html.slim
@@ -5,9 +5,11 @@
= form.input :tag_search, as: :tags, :input_html => { :id => "tag_search",:placeholder => t("formtastic.placeholders.time_table.tag_search") }
= form.input :tag_list, as: :hidden, :input_html => { :id => "tag_list" }
= form.input :objectid, :required => !@time_table.new_record?, :input_html => { :title => t("formtastic.titles#{format_restriction_for_locales(@referential)}.time_table.objectid")}
-
+ - if @time_table.new_record?
+ = form.input :calendar, as: :select, collection: current_organisation.calendars
+
h3.time_table_periods = @time_table.human_attribute_name("periods")
-
+
#periods_content
= form.inputs class: 'day_type' do
label.day_type_label = @time_table.human_attribute_name("day_types")
@@ -24,7 +26,7 @@
== render "period_fields", :f => p
= link_to_add_association t("time_tables.actions.add_period"), form, :periods , :"data-association-insertion-method" => "append", :"data-association-insertion-node" => "div#periods"
-
+
h3.time_table_dates = @time_table.human_attribute_name("dates")
#dates_content
@@ -53,9 +55,9 @@ javascript:
$("#tag_search").tagsManager({
prefilled: items,
output: '#tag_list',
- tagsContainer: '#tagsContainer'
+ tagsContainer: '#tagsContainer'
});
-
+
var time_tables_tag_list = new Bloodhound({
datumTokenizer: Bloodhound.tokenizers.obj.whitespace('name'),
queryTokenizer: Bloodhound.tokenizers.whitespace,
@@ -68,4 +70,4 @@ javascript:
name: 'time_tables_tag_list',
displayKey: 'name',
source: time_tables_tag_list.ttAdapter()
- }); \ No newline at end of file
+ });
diff --git a/app/views/time_tables/_show_time_table.html.slim b/app/views/time_tables/_show_time_table.html.slim
index ccdc4187f..419d13c96 100644
--- a/app/views/time_tables/_show_time_table.html.slim
+++ b/app/views/time_tables/_show_time_table.html.slim
@@ -24,6 +24,13 @@
#my-tab-content.tab-content
#time_tables.tab-pane.active
+ #associated_calendar
+ => "#{t('calendars.standard_calendar')} : "
+ - if @time_table.calendar
+ = link_to @time_table.calendar.name, @time_table.calendar
+ - else
+ = '--'
+
.well.legend
span.title = t(".legend")
span.label.excluded_date X
@@ -84,4 +91,4 @@
- if @time_table.dates.where("in_out = false").present?
h3.time_table_dates = @time_table.human_attribute_name("excluded_dates")
.excluded_dates.content
- == render "time_tables/excluded_dates" \ No newline at end of file
+ == render "time_tables/excluded_dates"