Browse Source

Added admin edit titles

development
Godwin 8 years ago
parent
commit
df063e20e0
  1. 2
      app/controllers/admin_controller.rb
  2. 2
      app/views/admin/new.html.haml
  3. 3
      config/locales/en.yml

2
app/controllers/admin_controller.rb

@ -4,7 +4,7 @@ class AdminController < ApplicationController
def new
return do_404 unless logged_in? && current_user.administrator?
@this_conference = Conference.new
@page_title = 'articles.conferences.headings.new'
@main_title = @page_title = 'articles.conferences.headings.new'
end
def edit

2
app/views/admin/new.html.haml

@ -5,7 +5,7 @@
= row do
= form_tag save_conference_path, class: 'composition' do
= columns(medium: 12) do
%h2=_@page_title, :t
%h2=_"articles.conferences.headings.#{@this_conference.id.present? ? 'edit' : 'new'}_conference", :t, vars: { title: @this_conference.title }
= hidden_field_tag :id, @this_conference.id if @this_conference.id.present?
= columns(medium: 12) do

3
config/locales/en.yml

@ -933,6 +933,9 @@ en:
conferences: National and Regional Conferences
Conference_List: Conferences
edit: Edit Conference
new: New Conference
edit_conference: Edit %{title}
new_conference: Create a new conference
types:
future: Upcoming conferences
passed: Passed conferences

Loading…
Cancel
Save