diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index abfd29a..f47b90d 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -13,4 +13,15 @@ def sortable(column, title=nil) direction = (column == sort_column or join_column == sort_column) && sort_direction == "asc" ? "desc" : "asc" link_to title, params.permit!.merge({:sort => column, :direction => direction}), {:class => css_class} end + + def title + if content_for?(:title) + # allows the title to be set in the view by using t(".title") + content_for :title + else + # look up translation key based on controller path, action name and .title + # this works identical to the built-in lazy lookup + t("#{ controller_path.tr('/', '.') }.#{ action_name }.title", default: :site_name) + end + end end diff --git a/app/views/check_ins/index.html.erb b/app/views/check_ins/index.html.erb index 1153df9..47b06ff 100644 --- a/app/views/check_ins/index.html.erb +++ b/app/views/check_ins/index.html.erb @@ -1,10 +1,9 @@ - +<% end %>
diff --git a/app/views/check_ins/new.html.erb b/app/views/check_ins/new.html.erb index 7323e57..7452d30 100644 --- a/app/views/check_ins/new.html.erb +++ b/app/views/check_ins/new.html.erb @@ -1,9 +1,8 @@ - +<% end %>
diff --git a/app/views/cohorts/edit.html.erb b/app/views/cohorts/edit.html.erb index a49d17a..39000f7 100644 --- a/app/views/cohorts/edit.html.erb +++ b/app/views/cohorts/edit.html.erb @@ -1,4 +1,4 @@ - +<% end %> <%= render 'form' %> diff --git a/app/views/cohorts/index.html.erb b/app/views/cohorts/index.html.erb index f16d88b..9911a4f 100644 --- a/app/views/cohorts/index.html.erb +++ b/app/views/cohorts/index.html.erb @@ -1,10 +1,9 @@ - +<% end %>
diff --git a/app/views/cohorts/new.html.erb b/app/views/cohorts/new.html.erb index ec3f74c..1136a09 100644 --- a/app/views/cohorts/new.html.erb +++ b/app/views/cohorts/new.html.erb @@ -1,9 +1,8 @@ - +<% end %> <%= render 'form' %> diff --git a/app/views/cohorts/show.html.erb b/app/views/cohorts/show.html.erb index 07b289b..a835419 100644 --- a/app/views/cohorts/show.html.erb +++ b/app/views/cohorts/show.html.erb @@ -1,4 +1,4 @@ - +<% end %>
Name:
diff --git a/app/views/common_tasks/edit.html.erb b/app/views/common_tasks/edit.html.erb index a749fa2..0f74698 100644 --- a/app/views/common_tasks/edit.html.erb +++ b/app/views/common_tasks/edit.html.erb @@ -1,4 +1,4 @@ - +<% end %> <%= render 'form' %> diff --git a/app/views/common_tasks/index.html.erb b/app/views/common_tasks/index.html.erb index 4068e4f..ccb2bdc 100644 --- a/app/views/common_tasks/index.html.erb +++ b/app/views/common_tasks/index.html.erb @@ -1,10 +1,9 @@ - +<% end %>
diff --git a/app/views/common_tasks/new.html.erb b/app/views/common_tasks/new.html.erb index bb2368a..fc82c1e 100644 --- a/app/views/common_tasks/new.html.erb +++ b/app/views/common_tasks/new.html.erb @@ -1,9 +1,8 @@ - +<% end %> <%= render 'form' %> diff --git a/app/views/common_tasks/show.html.erb b/app/views/common_tasks/show.html.erb index faa68a9..249557b 100644 --- a/app/views/common_tasks/show.html.erb +++ b/app/views/common_tasks/show.html.erb @@ -1,4 +1,4 @@ - +<% end %>
Name:
diff --git a/app/views/communications/edit.html.erb b/app/views/communications/edit.html.erb index 45b1a7e..a35b7d9 100644 --- a/app/views/communications/edit.html.erb +++ b/app/views/communications/edit.html.erb @@ -1,4 +1,4 @@ - +<% end %> <%= render 'form' %> diff --git a/app/views/communications/index.html.erb b/app/views/communications/index.html.erb index 3d5d46b..48ed052 100644 --- a/app/views/communications/index.html.erb +++ b/app/views/communications/index.html.erb @@ -1,10 +1,9 @@ - +<% end %>
diff --git a/app/views/communications/new.html.erb b/app/views/communications/new.html.erb index 17d8d9b..bc0ea38 100644 --- a/app/views/communications/new.html.erb +++ b/app/views/communications/new.html.erb @@ -1,10 +1,9 @@ - + <%= content_for :title, t(".title", name: @member.name) %> +<% end %> <%= render 'form' %> diff --git a/app/views/communications/show.html.erb b/app/views/communications/show.html.erb index ed133fc..429c88c 100644 --- a/app/views/communications/show.html.erb +++ b/app/views/communications/show.html.erb @@ -1,4 +1,4 @@ - +<% end %>
Date:
diff --git a/app/views/extracurricular_activities/edit.html.erb b/app/views/extracurricular_activities/edit.html.erb index 15108a2..d971669 100644 --- a/app/views/extracurricular_activities/edit.html.erb +++ b/app/views/extracurricular_activities/edit.html.erb @@ -1,4 +1,4 @@ - +<% end %> <%= render 'form' %> diff --git a/app/views/extracurricular_activities/index.html.erb b/app/views/extracurricular_activities/index.html.erb index c307c6d..b7dc722 100644 --- a/app/views/extracurricular_activities/index.html.erb +++ b/app/views/extracurricular_activities/index.html.erb @@ -1,10 +1,9 @@ - +<% end %>
diff --git a/app/views/extracurricular_activities/new.html.erb b/app/views/extracurricular_activities/new.html.erb index 311f481..cf867d5 100644 --- a/app/views/extracurricular_activities/new.html.erb +++ b/app/views/extracurricular_activities/new.html.erb @@ -1,9 +1,8 @@ - +<% end %> <%= render 'form' %> diff --git a/app/views/extracurricular_activities/show.html.erb b/app/views/extracurricular_activities/show.html.erb index 7c4183f..e527ba1 100644 --- a/app/views/extracurricular_activities/show.html.erb +++ b/app/views/extracurricular_activities/show.html.erb @@ -1,4 +1,4 @@ - +<% end %>
Name:
diff --git a/app/views/graduating_classes/edit.html.erb b/app/views/graduating_classes/edit.html.erb index 83c39d0..74a47f2 100644 --- a/app/views/graduating_classes/edit.html.erb +++ b/app/views/graduating_classes/edit.html.erb @@ -1,4 +1,4 @@ - +<% end %> <%= render 'form' %> diff --git a/app/views/graduating_classes/index.html.erb b/app/views/graduating_classes/index.html.erb index ad5aeee..2457dd9 100644 --- a/app/views/graduating_classes/index.html.erb +++ b/app/views/graduating_classes/index.html.erb @@ -1,10 +1,9 @@ - +<% end %>
diff --git a/app/views/graduating_classes/show.html.erb b/app/views/graduating_classes/show.html.erb index e2719c5..9cc17fb 100644 --- a/app/views/graduating_classes/show.html.erb +++ b/app/views/graduating_classes/show.html.erb @@ -1,4 +1,4 @@ - +<% end %>
Year:
diff --git a/app/views/identities/edit.html.erb b/app/views/identities/edit.html.erb index 35a0977..6d22e00 100644 --- a/app/views/identities/edit.html.erb +++ b/app/views/identities/edit.html.erb @@ -1,4 +1,4 @@ - +<% end %> <%= render 'form' %> diff --git a/app/views/identities/index.html.erb b/app/views/identities/index.html.erb index 70bc9a7..1fa265b 100644 --- a/app/views/identities/index.html.erb +++ b/app/views/identities/index.html.erb @@ -1,10 +1,9 @@ - +<% end %>
diff --git a/app/views/identities/new.html.erb b/app/views/identities/new.html.erb index 60a345f..353c206 100644 --- a/app/views/identities/new.html.erb +++ b/app/views/identities/new.html.erb @@ -1,9 +1,8 @@ - +<% end %> <%= render 'form' %> diff --git a/app/views/identities/show.html.erb b/app/views/identities/show.html.erb index 4383470..c3494ff 100644 --- a/app/views/identities/show.html.erb +++ b/app/views/identities/show.html.erb @@ -1,4 +1,4 @@ - +<% end %>
Name:
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 5ffd154..396c16d 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -71,6 +71,12 @@
+ <% if content_for? :page_header %> + + <% end %> <%= yield %>
diff --git a/app/views/locations/edit.html.erb b/app/views/locations/edit.html.erb index 55fcdfb..9239bd6 100644 --- a/app/views/locations/edit.html.erb +++ b/app/views/locations/edit.html.erb @@ -1,4 +1,4 @@ - +<% end %> <%= render 'form' %> diff --git a/app/views/locations/index.html.erb b/app/views/locations/index.html.erb index e170487..25efcf6 100644 --- a/app/views/locations/index.html.erb +++ b/app/views/locations/index.html.erb @@ -1,10 +1,9 @@ - +<% end %>
diff --git a/app/views/locations/new.html.erb b/app/views/locations/new.html.erb index 633268a..b0ac01b 100644 --- a/app/views/locations/new.html.erb +++ b/app/views/locations/new.html.erb @@ -1,9 +1,8 @@ - +<% end %> <%= render 'form' %> diff --git a/app/views/locations/show.html.erb b/app/views/locations/show.html.erb index 205d41a..119e24b 100644 --- a/app/views/locations/show.html.erb +++ b/app/views/locations/show.html.erb @@ -1,4 +1,4 @@ - +<% end %>
Name:
diff --git a/app/views/members/edit.html.erb b/app/views/members/edit.html.erb index 9a06b9d..d7ea70a 100644 --- a/app/views/members/edit.html.erb +++ b/app/views/members/edit.html.erb @@ -1,4 +1,4 @@ - +<% end %> <%= render 'form' %> diff --git a/app/views/members/index.html.erb b/app/views/members/index.html.erb index 6762948..244e8d3 100644 --- a/app/views/members/index.html.erb +++ b/app/views/members/index.html.erb @@ -1,10 +1,9 @@ - +<% end %>
diff --git a/app/views/members/new.html.erb b/app/views/members/new.html.erb index 37ea253..76f2cf9 100644 --- a/app/views/members/new.html.erb +++ b/app/views/members/new.html.erb @@ -1,9 +1,8 @@ - +<% end %> <%= render 'form' %> diff --git a/app/views/members/show.html.erb b/app/views/members/show.html.erb index 7a9d1c4..6d460d6 100644 --- a/app/views/members/show.html.erb +++ b/app/views/members/show.html.erb @@ -1,4 +1,4 @@ - +<% end %>
First name:
@@ -182,4 +181,4 @@ <% else %> No events attended yet. -<% end %> \ No newline at end of file +<% end %> diff --git a/app/views/neighborhoods/edit.html.erb b/app/views/neighborhoods/edit.html.erb index 32797e3..f7f97e2 100644 --- a/app/views/neighborhoods/edit.html.erb +++ b/app/views/neighborhoods/edit.html.erb @@ -1,4 +1,4 @@ - +<% end %> <%= render 'form' %> diff --git a/app/views/neighborhoods/index.html.erb b/app/views/neighborhoods/index.html.erb index 82c9fb3..3cac09d 100644 --- a/app/views/neighborhoods/index.html.erb +++ b/app/views/neighborhoods/index.html.erb @@ -1,10 +1,9 @@ - +<% end %>
diff --git a/app/views/neighborhoods/new.html.erb b/app/views/neighborhoods/new.html.erb index 2fab0a5..776d43b 100644 --- a/app/views/neighborhoods/new.html.erb +++ b/app/views/neighborhoods/new.html.erb @@ -1,9 +1,8 @@ - +<% end %> <%= render 'form' %> diff --git a/app/views/neighborhoods/show.html.erb b/app/views/neighborhoods/show.html.erb index 5d2e084..45beb51 100644 --- a/app/views/neighborhoods/show.html.erb +++ b/app/views/neighborhoods/show.html.erb @@ -1,4 +1,4 @@ - +<% end %>
Name:
diff --git a/app/views/network_actions/edit.html.erb b/app/views/network_actions/edit.html.erb index c175862..f0a8224 100644 --- a/app/views/network_actions/edit.html.erb +++ b/app/views/network_actions/edit.html.erb @@ -1,4 +1,4 @@ - +<% end %> <%= render 'form' %> diff --git a/app/views/network_actions/index.html.erb b/app/views/network_actions/index.html.erb index 0aec3eb..950d9d1 100644 --- a/app/views/network_actions/index.html.erb +++ b/app/views/network_actions/index.html.erb @@ -1,10 +1,9 @@ - +<% end %>
diff --git a/app/views/network_actions/new.html.erb b/app/views/network_actions/new.html.erb index b1d1bf4..ec4e135 100644 --- a/app/views/network_actions/new.html.erb +++ b/app/views/network_actions/new.html.erb @@ -1,9 +1,8 @@ - +<% end %> <%= render 'form' %> diff --git a/app/views/network_actions/show.html.erb b/app/views/network_actions/show.html.erb index 433435b..1f27076 100644 --- a/app/views/network_actions/show.html.erb +++ b/app/views/network_actions/show.html.erb @@ -1,4 +1,4 @@ - +<% end %>
Event:
diff --git a/app/views/network_event_tasks/index.html.erb b/app/views/network_event_tasks/index.html.erb index 70a4d30..3d75b3f 100644 --- a/app/views/network_event_tasks/index.html.erb +++ b/app/views/network_event_tasks/index.html.erb @@ -1,104 +1,103 @@ -
@@ -153,4 +152,4 @@
<%= paginate @network_event_tasks %> -
\ No newline at end of file +
diff --git a/app/views/network_event_tasks/update.html.erb b/app/views/network_event_tasks/update.html.erb index 84e8af9..deaebcc 100644 --- a/app/views/network_event_tasks/update.html.erb +++ b/app/views/network_event_tasks/update.html.erb @@ -1,4 +1 @@ -

Find me in app/views/network_event_tasks/update.html.erb

diff --git a/app/views/network_events/edit.html.erb b/app/views/network_events/edit.html.erb index e2b8942..96b0ee0 100644 --- a/app/views/network_events/edit.html.erb +++ b/app/views/network_events/edit.html.erb @@ -1,4 +1,4 @@ - +<% end %> <%= render 'form' %> diff --git a/app/views/network_events/index.html.erb b/app/views/network_events/index.html.erb index 2d32be5..6c047fb 100644 --- a/app/views/network_events/index.html.erb +++ b/app/views/network_events/index.html.erb @@ -1,154 +1,153 @@ -