diff --git a/app/views/templates/_edit_template.html.erb b/app/views/templates/_edit_template.html.erb index d4eb721..b1656c0 100644 --- a/app/views/templates/_edit_template.html.erb +++ b/app/views/templates/_edit_template.html.erb @@ -22,7 +22,7 @@ <%= _('Status') %> <% if hash[:live].nil? %> - <%= _('Un-published') %> + <%= _('Unpublished') %> <% elsif hash[:current].dirty? %> <%= _('You have un-published changes') %> diff --git a/app/views/templates/_show_template.html.erb b/app/views/templates/_show_template.html.erb index 6a5ffa5..423dc5f 100644 --- a/app/views/templates/_show_template.html.erb +++ b/app/views/templates/_show_template.html.erb @@ -27,7 +27,7 @@ <%= _('Status') %> <% if hash[:live].nil? %> - <%= _('Un-published') %> + <%= _('Unpublished') %> <% elsif hash[:current].dirty? %> <%= _('You have un-published changes') %> diff --git a/app/views/templates/admin_index.html.erb b/app/views/templates/admin_index.html.erb index 1f7d88d..8e98fc4 100644 --- a/app/views/templates/admin_index.html.erb +++ b/app/views/templates/admin_index.html.erb @@ -45,10 +45,10 @@ <% if hash[:live].nil? %> - <%= _('Un-published') %> + <%= _('Unpublished') %> <% elsif hash[:current].dirty? %> - <%= _('You have un-published changes') %> + <%= _('Unpublished changes') %> <% else %> <%= _('Published') %> @@ -63,10 +63,11 @@ <%= link_to _('Edit'), admin_template_template_path(id: hash[:current].id, edit: "true"), class: "dmp_table_link" %> <%= link_to _('History'), admin_template_history_template_path(id: hash[:current].id), class: "dmp_table_link" %> - <% if hash[:live].nil? || hash[:current].dirty? %> + <% if hash[:live].nil? %> <%= link_to _('Publish'), admin_publish_template_path(hash[:current]), method: :put, class: "dmp_table_link" %> - <% end %> - <% if !hash[:live].nil? %> + <% elsif hash[:current].dirty? %> + <%= link_to _('Publish changes'), admin_publish_template_path(hash[:current]), method: :put, class: "dmp_table_link" %> + <% else %> <%= link_to _('Unpublish'), admin_unpublish_template_path(hash[:current]), method: :put, class: "dmp_table_link" %> <% end %> diff --git a/test/integration/template_versioning_test.rb b/test/integration/template_versioning_test.rb index 517ad26..9d98d85 100644 --- a/test/integration/template_versioning_test.rb +++ b/test/integration/template_versioning_test.rb @@ -80,7 +80,7 @@ end # ---------------------------------------------------------- - test 'template does NOT get versioned if its un-published' do + test 'template does NOT get versioned if its unpublished' do # Change the title after its been published put admin_update_template_path(@template), {template: {title: "Blah blah blah"}} @template = Template.current(@user.org, @dmptemplate_id)