From 734b0be16b40110b9c9d04b94cb231fedef62537 Mon Sep 17 00:00:00 2001 From: Alex Coles Date: Mon, 12 Jan 2015 15:30:19 +0100 Subject: [PATCH 1/4] Update views to use new button styles Signed-off-by: Alex Coles --- app/views/meeting_contents/_form.html.erb | 8 +++++--- app/views/meeting_contents/history.html.erb | 2 +- app/views/meetings/edit.html.erb | 4 +++- app/views/meetings/new.html.erb | 4 +++- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/app/views/meeting_contents/_form.html.erb b/app/views/meeting_contents/_form.html.erb index 17a64437ff..efad3e7913 100644 --- a/app/views/meeting_contents/_form.html.erb +++ b/app/views/meeting_contents/_form.html.erb @@ -26,10 +26,12 @@ See doc/COPYRIGHT.md for more details. :'data-wp_autocomplete_url' => work_packages_auto_complete_path(:project_id => @project, :format => :json) %>

<%= f.hidden_field :lock_version %>


<%= f.text_field :comment, :size => 120 %>

-

<%= submit_tag l(:button_save) %> +

<%= submit_tag l(:button_save), class: 'button -highlight' %> <% path = send("preview_#{content_type}_path", content.meeting) %> -<%= preview_link path, "#{content_type}_form", { class: 'preview' } %> -<%= link_to l(:button_cancel), "#", :onclick => "$$('.show-#{content_type}').invoke('show'); $$('.edit-#{content_type}').invoke('hide'); return false;" %>

+<%= preview_link path, "#{content_type}_form", { class: 'button preview' } %> +<%= link_to l(:button_cancel), "#", + :onclick => "$$('.show-#{content_type}').invoke('show'); $$('.edit-#{content_type}').invoke('hide'); return false;", + class: 'button' %>

<%= wikitoolbar_for "#{content_type}_text" %> <% end %> diff --git a/app/views/meeting_contents/history.html.erb b/app/views/meeting_contents/history.html.erb index e02065584d..759abbb789 100644 --- a/app/views/meeting_contents/history.html.erb +++ b/app/views/meeting_contents/history.html.erb @@ -53,7 +53,7 @@ See doc/COPYRIGHT.md for more details. <% end %> -<%= submit_tag l(:label_view_diff), :class => 'small' if show_diff %> +<%= submit_tag l(:label_view_diff), class: 'button -small -highlight' if show_diff %> <%= pagination_links_full @content_versions %> <% end %> diff --git a/app/views/meetings/edit.html.erb b/app/views/meetings/edit.html.erb index 293b2fc7a5..5c9dd5a6e2 100644 --- a/app/views/meetings/edit.html.erb +++ b/app/views/meetings/edit.html.erb @@ -24,5 +24,7 @@ See doc/COPYRIGHT.md for more details.

<%= l(:label_meeting) %> #<%= @meeting.id %>

<%= labelled_tabular_form_for @meeting, :url => {:controller => '/meetings', :action => 'update'}, :html => {:id => 'meeting-form', :method => :put} do |f| -%> <%= render :partial => 'form', :locals => {:f => f} %> -<%= submit_tag l(:button_save) %> <%= link_to l(:button_cancel), :action => 'show', :id => @meeting %> +<%= submit_tag l(:button_save), class: 'button -highlight' %> +<%= link_to l(:button_cancel), { :action => 'show', :id => @meeting }, + class: 'button' %> <% end if @project %> diff --git a/app/views/meetings/new.html.erb b/app/views/meetings/new.html.erb index 931f73c1f1..781ece0c8b 100644 --- a/app/views/meetings/new.html.erb +++ b/app/views/meetings/new.html.erb @@ -24,5 +24,7 @@ See doc/COPYRIGHT.md for more details.

<%= l(:label_meeting_new) %>

<%= labelled_tabular_form_for @meeting, :url => {:controller => '/meetings', :action => 'create', :project_id => @project}, :html => {:id => 'meeting-form'} do |f| -%> <%= render :partial => 'form', :locals => {:f => f} %> - <%= submit_tag l(:button_create) %> <%= link_to l(:button_cancel), :action => 'index', :project_id => @project %> + <%= submit_tag l(:button_create), class: 'button -highlight' %> + <%= link_to l(:button_cancel), { :action => 'index', :project_id => @project }, + class: 'button' %> <% end if @project %> From dfba197784612018d5792fb3b668424ff6ccdc1a Mon Sep 17 00:00:00 2001 From: Alex Coles Date: Mon, 12 Jan 2015 16:37:42 +0100 Subject: [PATCH 2/4] Fix time field, label spacing in Meetings form Signed-off-by: Alex Coles --- app/views/meetings/_form.html.erb | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/app/views/meetings/_form.html.erb b/app/views/meetings/_form.html.erb index 54a3a808c9..757997982a 100644 --- a/app/views/meetings/_form.html.erb +++ b/app/views/meetings/_form.html.erb @@ -24,8 +24,20 @@ See doc/COPYRIGHT.md for more details.

<%= f.text_field :title, :required => true, :size => 60, :class => "autofocus" %>

<%= f.text_field :location, :size => 60 %>

-

<%= f.text_field :start_date, :required => true, :size => 10 %><%= calendar_for('meeting_start_date') %> <%= accessible_time_select "meeting", "start_time", :ignore_date => true, :minute_step => 5 %> <%= Time.zone %>

-

<%= f.text_field :duration, :required => true, :size => 5 %>(<%=l :text_in_hours %>) +

+ <%= f.text_field :start_date, :required => true, :size => 10 %> + <%= calendar_for('meeting_start_date') %> + + <%= accessible_time_select "meeting", "start_time", :ignore_date => true, :minute_step => 5 %> + <%= Time.zone %> + +

+

+ + <%= f.text_field :duration, :required => true, :size => 5 %> + <%=l :text_in_hours %> + +

From a4818b49cf7295d7ba057dfb83859ff2f933c3a1 Mon Sep 17 00:00:00 2001 From: Alex Coles Date: Mon, 12 Jan 2015 16:51:11 +0100 Subject: [PATCH 3/4] Fix field spacing in Meetings content form Signed-off-by: Alex Coles --- app/views/meeting_contents/_form.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/meeting_contents/_form.html.erb b/app/views/meeting_contents/_form.html.erb index efad3e7913..077614b654 100644 --- a/app/views/meeting_contents/_form.html.erb +++ b/app/views/meeting_contents/_form.html.erb @@ -25,7 +25,7 @@ See doc/COPYRIGHT.md for more details.

<%= f.text_area :text, :cols => 100, :rows => 25, :class => 'wiki-edit', :accesskey => accesskey(:edit), :'data-wp_autocomplete_url' => work_packages_auto_complete_path(:project_id => @project, :format => :json) %>

<%= f.hidden_field :lock_version %> -


<%= f.text_field :comment, :size => 120 %>

+

<%= f.text_field :comment, :size => 120 %>

<%= submit_tag l(:button_save), class: 'button -highlight' %> <% path = send("preview_#{content_type}_path", content.meeting) %> <%= preview_link path, "#{content_type}_form", { class: 'button preview' } %> From 9d36a2092645f85fee834e38263b781d23245a62 Mon Sep 17 00:00:00 2001 From: Alex Coles Date: Fri, 16 Jan 2015 15:52:22 +0100 Subject: [PATCH 4/4] Replace splitcontent* usages with Foundation grid Signed-off-by: Alex Coles --- app/views/meetings/show.html.erb | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/app/views/meetings/show.html.erb b/app/views/meetings/show.html.erb index 370b3c7fd4..27d9c71974 100644 --- a/app/views/meetings/show.html.erb +++ b/app/views/meetings/show.html.erb @@ -34,17 +34,24 @@ See doc/COPYRIGHT.md for more details.

- <%= avatar(@meeting.author, :size => "64") %> -

<%= authoring @meeting.created_at, @meeting.author %>

-
-

<%= Meeting.human_attribute_name(:start_time) %>: <%= format_date @meeting.start_date %> <%= format_time @meeting.start_time, false %> - <%= format_time @meeting.end_time, false %> <%= Time.zone %>

+
+
+ <%= avatar(@meeting.author, :size => "64") %> +

<%= authoring @meeting.created_at, @meeting.author %>

+
+
+

<%= Meeting.human_attribute_name(:start_time) %>: <%= format_date @meeting.start_date %> <%= format_time @meeting.start_time, false %> - <%= format_time @meeting.end_time, false %> <%= Time.zone %>

+
+
+

<%= Meeting.human_attribute_name(:location) %>: <%=h @meeting.location %>

+
+
+

<%= Meeting.human_attribute_name(:participants_invited) %>: <%= format_participant_list @meeting.participants.invited %>

+
+
+

<%= Meeting.human_attribute_name(:participants_attended) %>: <%= format_participant_list @meeting.participants.attended %>

+
-
-

<%= Meeting.human_attribute_name(:location) %>: <%=h @meeting.location %>

-
-
-

<%= Meeting.human_attribute_name(:participants_invited) %>: <%= format_participant_list @meeting.participants.invited %>

-

<%= Meeting.human_attribute_name(:participants_attended) %>: <%= format_participant_list @meeting.participants.attended %>

<%= render_tabs [{:name => 'agenda', :action => :create_meeting_agendas, :partial => 'meeting_contents/show', :label => :label_meeting_agenda, :content => @meeting.agenda || @meeting.build_agenda, :content_type => "meeting_agenda"},