diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/general/_localised_datepicker.rhtml | 18 | ||||
-rw-r--r-- | app/views/general/search.rhtml | 10 | ||||
-rw-r--r-- | app/views/request/_request_filter_form.rhtml | 6 |
3 files changed, 24 insertions, 10 deletions
diff --git a/app/views/general/_localised_datepicker.rhtml b/app/views/general/_localised_datepicker.rhtml new file mode 100644 index 000000000..5fdd63644 --- /dev/null +++ b/app/views/general/_localised_datepicker.rhtml @@ -0,0 +1,18 @@ +<script type="text/javascript"> + $(function() { + $(".use-datepicker").datepicker( + {closeText: '<%= _("Done") %>', + prevText: '<%= _("Prev") %>', + nextText: '<%= _("Next") %>', + currentText: '<%= _("Today") %>', + monthNames: <%= I18n.translate('date.month_names')[1..-1].to_json %>, + monthNamesShort: <%= I18n.translate('date.abbr_month_names')[1..-1].to_json %>, + dayNames: <%= I18n.translate('date.day_names').to_json %>, + dayNamesShort: <%= I18n.translate('date.abbr_day_names').to_json %>, + dayNamesMin: <%= I18n.translate('date.abbr_day_names').collect{|x| x[0..0]}.to_json %>, + weekHeader: '<%= _("Wk") %>', + dateFormat: '<%= I18n.translate('date.formats.default').sub("%Y", "yy").sub("%m", "mm").sub("%d", "dd").gsub("-", "/") %>'} + ); + }); +</script> + diff --git a/app/views/general/search.rhtml b/app/views/general/search.rhtml index 694ab932f..3e6a89582 100644 --- a/app/views/general/search.rhtml +++ b/app/views/general/search.rhtml @@ -10,12 +10,8 @@ <% @include_request_link_in_authority_listing = true %> <h1><%=@title%></h1> -<script type="text/javascript"> - $(function() { - $(".use-datepicker").datepicker({dateFormat: 'yy-mm-dd'}); - }); -</script> +<%= render :partial => 'localised_datepicker' %> <% if @advanced %> <p><%= _('To use the advanced search, combine phrases and labels as described in the search tips below.') %></p> @@ -168,7 +164,11 @@ <% if @xapian_requests_hits == 1 && @page == 1 %> <h1><%= _("One FOI request matching your search", :user_search_query => h(@query)) %></h1> <% else %> +<<<<<<< HEAD + <h1><%= _("FOI requests {{start_count}} to {{end_count}} of {{total_count}}", :start_count => ((@page-1)*@requests_per_page+1).to_s, :end_count => [@page*@requests_per_page, @xapian_requests.matches_estimated].min.to_s, :total_count => @xapian_requests.matches_estimated.to_s, :user_search_query => h(@query)) %></h1> +======= <h1><%= _("FOI requests {{start_count}} to {{end_count}} of {{total_count}}", :start_count => ((@page-1)*@requests_per_page+1).to_s, :end_count => [@page*@requests_per_page, @xapian_requests.matches_estimated].min.to_s, :total_count => @xapian_requests.matches_estimated.to_s, :user_search_query => h(@query)) %></h1> +>>>>>>> e8ff6d861faefb76c11475a112002cd1b0095590 <% end %> <% if @track_thing %> diff --git a/app/views/request/_request_filter_form.rhtml b/app/views/request/_request_filter_form.rhtml index 122da9d33..33b7bfb27 100644 --- a/app/views/request/_request_filter_form.rhtml +++ b/app/views/request/_request_filter_form.rhtml @@ -1,8 +1,4 @@ -<script type="text/javascript"> - $(function() { - $(".use-datepicker").datepicker(); - }); -</script> +<%= render :partial => 'general/localised_datepicker' %> <div id="list-filter"> <div class="list-filter-item"> |