From 1221eda459b3a82274ea4d744b88ac2a407a0345 Mon Sep 17 00:00:00 2001 From: Junior Silva Date: Thu, 20 Feb 2014 19:56:28 -0300 Subject: [PATCH] versions-diff: included js to radio_button control and adjusts on look-and-feel AI2822 --- app/controllers/public/content_viewer_controller.rb | 2 +- app/views/content_viewer/article_versions.rhtml | 48 +++++++++++++++++++++++++++++++++++++++++------- public/stylesheets/application.css | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 108 insertions(+), 10 deletions(-) diff --git a/app/controllers/public/content_viewer_controller.rb b/app/controllers/public/content_viewer_controller.rb index 5be5dbf..0a910b4 100644 --- a/app/controllers/public/content_viewer_controller.rb +++ b/app/controllers/public/content_viewer_controller.rb @@ -127,7 +127,7 @@ class ContentViewerController < ApplicationController def versions_diff path = params[:page].join('/') @page = profile.articles.find_by_path(path) - @v1, @v2 = @page.versions.find_by_version(params[:v1]).body, @page.versions.find_by_version(params[:v2]).body + @v1, @v2 = @page.versions.find_by_version(params[:v1]), @page.versions.find_by_version(params[:v2]) p params end diff --git a/app/views/content_viewer/article_versions.rhtml b/app/views/content_viewer/article_versions.rhtml index 56ef20f..055b439 100644 --- a/app/views/content_viewer/article_versions.rhtml +++ b/app/views/content_viewer/article_versions.rhtml @@ -2,20 +2,54 @@

<%= _('This is the list of all versions of this content. Select a version to see it and then revert to it.') %>.

-<% form_tag({:controller => 'content_viewer', :action => 'versions_diff', :profile => profile.identifier, :page => @page.path.split('/')}) do %> -