From b3fc5bc71a4fd7a5b13aee3cad1c527de244da4e Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Thu, 15 Oct 2020 16:25:33 +0200 Subject: [PATCH] WIP use flexbox to position the close icon on the sidebar --- app/views/application/_sidebar_header.html.erb | 10 ++++++++++ app/views/browse/changeset.html.erb | 5 +---- app/views/browse/history.html.erb | 5 +---- app/views/browse/not_found.html.erb | 5 +---- app/views/browse/note.html.erb | 5 +---- app/views/changesets/history.html.erb | 5 +---- 6 files changed, 15 insertions(+), 20 deletions(-) create mode 100644 app/views/application/_sidebar_header.html.erb diff --git a/app/views/application/_sidebar_header.html.erb b/app/views/application/_sidebar_header.html.erb new file mode 100644 index 0000000000..5413b4205d --- /dev/null +++ b/app/views/application/_sidebar_header.html.erb @@ -0,0 +1,10 @@ +
+
+

<%= title %>

+
+
+ + + +
+
diff --git a/app/views/browse/changeset.html.erb b/app/views/browse/changeset.html.erb index 1217c03be8..3019fba95f 100644 --- a/app/views/browse/changeset.html.erb +++ b/app/views/browse/changeset.html.erb @@ -1,9 +1,6 @@ <% set_title(t(".title", :id => @changeset.id)) %> -

- - <%= t(".title", :id => @changeset.id) %> -

+<%= render "sidebar_header", :title => t(".title", :id => @changeset.id) %>

diff --git a/app/views/browse/history.html.erb b/app/views/browse/history.html.erb index faa88359e6..ebf8bcb30e 100644 --- a/app/views/browse/history.html.erb +++ b/app/views/browse/history.html.erb @@ -1,9 +1,6 @@ <% set_title(t("browse.#{@type}.history_title_html", :name => printable_name(@feature))) %> -

- - <%= t("browse.#{@type}.history_title_html", :name => printable_name(@feature)) %> -

+<%= render "sidebar_header", :title => t("browse.#{@type}.history_title_html", :name => printable_name(@feature)) %> <%= render :partial => @type, :collection => @feature.send("old_#{@type}s").reverse %> diff --git a/app/views/browse/not_found.html.erb b/app/views/browse/not_found.html.erb index 3c4e8a4c83..39b3156ba2 100644 --- a/app/views/browse/not_found.html.erb +++ b/app/views/browse/not_found.html.erb @@ -1,4 +1 @@ -

- - <%= t ".sorry", :type => t(".type.#{@type}"), :id => params[:id] %> -

+<%= render "sidebar_header", :title => t(".sorry", :type => t(".type.#{@type}"), :id => params[:id]) %> diff --git a/app/views/browse/note.html.erb b/app/views/browse/note.html.erb index ab0344e35a..f94fda12ab 100644 --- a/app/views/browse/note.html.erb +++ b/app/views/browse/note.html.erb @@ -1,9 +1,6 @@ <% set_title(t(".title", :id => @note.id)) %> -

- - <%= t ".#{@note.status}_title", :note_name => @note.id %> -

+<%= render "sidebar_header", :title => t(".#{@note.status}_title", :note_name => @note.id) %>

<%= t(".description") %>

diff --git a/app/views/changesets/history.html.erb b/app/views/changesets/history.html.erb index e3df874903..f9eb01a6d6 100644 --- a/app/views/changesets/history.html.erb +++ b/app/views/changesets/history.html.erb @@ -11,10 +11,7 @@ @title end %> -

- - <%= @heading %> -

+<%= render "sidebar_header", :title => @heading %>
<%= image_tag "searching.gif", :class => "loader" %>