From: NumbuhFour Date: Fri, 20 Feb 2015 23:05:48 +0000 (-0500) Subject: Implmented diary submit label changing depending on if new or editing X-Git-Tag: live~4573^2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/074031d64a53dfb54916ce7307cd8f2bb51ee817?hp=8e404f3a468a2636481d52f245b816c41e9d5ac0 Implmented diary submit label changing depending on if new or editing --- diff --git a/app/views/diary_entry/edit.html.erb b/app/views/diary_entry/edit.html.erb index 4021eaa4d..f29dc30ff 100644 --- a/app/views/diary_entry/edit.html.erb +++ b/app/views/diary_entry/edit.html.erb @@ -42,7 +42,10 @@ - <%= submit_tag t('diary_entry.edit.save_button') %> - <%# TODO: button should say 'publish' or 'save changes' depending on new/edit state %> + <% if action_name == 'new' %> + <%= submit_tag t('diary_entry.new.publish_button') %> + <% else %> + <%= submit_tag t('diary_entry.edit.save_button') %> + <% end %> <% end %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 3e3905298..795611a0c 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -248,6 +248,7 @@ en: diary_entry: new: title: New Diary Entry + publish_button: "Publish" list: title: "Users' diaries" title_friends: "Friends' diaries"