diff --git a/app/views/content_viewer/article_versions.rhtml b/app/views/content_viewer/article_versions.rhtml index 7298b1e..0393f56 100644 --- a/app/views/content_viewer/article_versions.rhtml +++ b/app/views/content_viewer/article_versions.rhtml @@ -1,6 +1,6 @@ -<% button_bar do %> - <%= button(:back, _('Back to the post'), {:action => 'view_page'}) %> -<% end %> +
+ <%= button(:back, _('Go back to post'), {:action => 'view_page'}) %> +
<%= article_title(@page, :no_link => true) %> diff --git a/app/views/content_viewer/versioned_article.rhtml b/app/views/content_viewer/versioned_article.rhtml index c4efc0a..9b317e7 100644 --- a/app/views/content_viewer/versioned_article.rhtml +++ b/app/views/content_viewer/versioned_article.rhtml @@ -1,29 +1,30 @@ -<% button_bar do %> +
<%= button(:back, _('Back to the versions'), {:action => 'article_versions'}) %> -<% end %> - -<% button_bar do %> - <%= button(:back, _('Go to current version'), {:action => 'view_page'}) %> -<% end %> +
<%= button(:clock, _('All versions'), {:controller => 'content_viewer', :profile => profile.identifier, :action => 'article_versions'}, :id => 'article-versions-link') %> - <% if @page.allow_edit?(user) && !remove_content_button(:edit) %> + <% if @page.allow_edit?(user) && !remove_content_button(:undo) %> <% content = content_tag('span', _('Revert to this version')) %> <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'edit', :id => @page.id, :version => @version }) %> - <%= expirable_button @page, :edit, content, url, :id => 'article-revert-version-link' %> + <%= expirable_button @page, :undo, content, url, :id => 'article-revert-version-link' %> <% end %> -
+ + <%= button(:forward, _('Go to latest version'), {:action => 'view_page'}) %> +

<%= @versioned_article.name %>

<%= _("Version %{version} - %{author} on %{date}") % {:version => @version, :author => @page.author_name(@version), :date => show_time(@versioned_article.updated_at) } %>
-<%= _('This is not the current version.') %>. +

+ <%= _('This is not the latest version of this content.') %> +

+ <% if @page.version_license(@version).present? %>
diff --git a/app/views/content_viewer/versions_diff.html.erb b/app/views/content_viewer/versions_diff.html.erb index 869df23..cd3402a 100644 --- a/app/views/content_viewer/versions_diff.html.erb +++ b/app/views/content_viewer/versions_diff.html.erb @@ -1,14 +1,16 @@ -<% button_bar do %> - <%= button(:back, _('Back to the versions'), {:action => 'article_versions'}) %> -<% end %> +
+<%= button(:back, _('Back to the versions'), {:action => 'article_versions'}) %> +

<%= _('Changes on "%s"') % @page.title %>

<%= _('Changes from %s → %s') % [show_time(@v1.updated_at), show_time(@v2.updated_at)] %>

-<% temp = Diffy::Diff.new(@v1.body, @v2.body, :context => 1).to_s(:text).blank? %> -<% if temp %> - <%= _('These versions are equals!')%> +<% diffContent = Diffy::Diff.new(@v1.body, @v2.body, :context => 1) %> +<% if diffContent.to_s(:text).blank? %> +

+ <%= _('These versions range have no differences.')%> +

<% else %> - <%= Diffy::Diff.new(@v1.body, @v2.body, :context => 1).to_s(:html) %> + <%= diffContent.to_s(:html) %> <% end %> diff --git a/public/designs/icons/tango/style.css b/public/designs/icons/tango/style.css index cd3fd99..9225eb3 100644 --- a/public/designs/icons/tango/style.css +++ b/public/designs/icons/tango/style.css @@ -1,5 +1,6 @@ /******************SMALL ICONS********************/ .icon-edit { background-image: url(Tango/16x16/apps/text-editor.png) } +.icon-undo { background-image: url(Tango/16x16/actions/edit-undo.png) } .icon-home { background-image: url(Tango/16x16/actions/go-home.png) } .icon-home-not { background-image: url(mod/16x16/actions/go-home-not.png) } .icon-new, diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 0ce6d00..ce16b15 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -6558,6 +6558,23 @@ li.profile-activity-item.upload_image .activity-gallery-images-count-1 img { background: #ff9; } +#article-versions-no-diff { + text-align: center; + font-style: italic; +} + +#no-current-version { + text-align: center; + font-style: italic; + background: #faa; + padding: 3px; +} + +.article-versions { + margin: 5px 0px; + text-align: right; +} + .action-content_viewer-versions_diff .diff { text-align: justify; } -- libgit2 0.21.2