From 6be92a42a8350efea86307c3e189ab05a8a552f5 Mon Sep 17 00:00:00 2001 From: Yomi Colledge Date: Wed, 21 Apr 2010 12:46:31 +0100 Subject: [PATCH] General improvements to the legends partial and the way it is displayed. --- app/stylesheets/partials/_legend.sass | 9 +++++---- app/views/features/_legend.html.erb | 2 +- app/views/features/merge.html.erb | 4 ++-- app/views/features/system_merge.html.erb | 4 ++-- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/app/stylesheets/partials/_legend.sass b/app/stylesheets/partials/_legend.sass index 6378bce2..acaf7a2e 100644 --- a/app/stylesheets/partials/_legend.sass +++ b/app/stylesheets/partials/_legend.sass @@ -1,6 +1,7 @@ span#legend - width: 250px - padding: 5px 0 10px 10px + width: 280px + padding: 5px 0 0 10px display: inline-block - height: 56px - margin: 0 10px 0 0 \ No newline at end of file + height: 45px + margin: 0 auto + float: right \ No newline at end of file diff --git a/app/views/features/_legend.html.erb b/app/views/features/_legend.html.erb index 9e8399e0..41775f49 100644 --- a/app/views/features/_legend.html.erb +++ b/app/views/features/_legend.html.erb @@ -1,5 +1,5 @@ -

Legend

+ Legend
<%= (defined? change)? "Changes to the" : "Removing from"%> <%=h diff_from %> <%= (defined? change)? "Changes to the" : "Adding to"%> <%=h diff_to %>
diff --git a/app/views/features/merge.html.erb b/app/views/features/merge.html.erb index 4fe3c68f..504dc5cd 100644 --- a/app/views/features/merge.html.erb +++ b/app/views/features/merge.html.erb @@ -2,13 +2,13 @@ <%= stylesheet_link_tag "pretty_diff" %> <% end %> -<%= render :partial => "legend", :locals => {:diff_from => "file", :diff_to => "file"} %> - <%= link_to 'Dry-run', file_merge_feature_path(@feature, :dry_run => true) %> <%= link_to 'Patch', file_merge_feature_path(@feature) %> +<%= render :partial => "legend", :locals => {:diff_from => "file", :diff_to => "file"} %> +
This will change the source file. Unless you use source control, you may lose all changes
<%= @pretty.to_html %> \ No newline at end of file diff --git a/app/views/features/system_merge.html.erb b/app/views/features/system_merge.html.erb index 1d5ac8fd..b4152874 100644 --- a/app/views/features/system_merge.html.erb +++ b/app/views/features/system_merge.html.erb @@ -2,12 +2,12 @@ <%= stylesheet_link_tag "pretty_diff" %> <% end %> -<%= render :partial => "legend", :locals => {:diff_from => "system", :diff_to => "system"} %> - <%= link_to 'Update', system_sync_feature_path(@feature) %> +<%= render :partial => "legend", :locals => {:diff_from => "system", :diff_to => "system"} %> +
This change will update the system feature
<%= @pretty.to_html %> \ No newline at end of file