From a7791635aa98f012d35f97c3c5288494bbb28e38 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Wed, 13 Mar 2024 18:03:43 +0100 Subject: Initial commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- app/views/shared_searches/index.html.erb | 13 +++++++++++++ app/views/shared_searches/show.html.erb | 28 ++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 app/views/shared_searches/index.html.erb create mode 100644 app/views/shared_searches/show.html.erb (limited to 'app/views/shared_searches') diff --git a/app/views/shared_searches/index.html.erb b/app/views/shared_searches/index.html.erb new file mode 100644 index 0000000..9a145f6 --- /dev/null +++ b/app/views/shared_searches/index.html.erb @@ -0,0 +1,13 @@ +

<%= I18n.t('searches.shared.title') %>

+ +<% if @searches.empty? %> +
<%= I18n.t('searches.shared.none') %>.
+<% else %> +
+ <% @searches.each do |s| %> +
+ <%= link_to s.name, search_shared_path(s) %> +
+ <% end %> +
+<% end %> diff --git a/app/views/shared_searches/show.html.erb b/app/views/shared_searches/show.html.erb new file mode 100644 index 0000000..1430529 --- /dev/null +++ b/app/views/shared_searches/show.html.erb @@ -0,0 +1,28 @@ + + <% @search.results.values.flatten.each do |res| %> + + + + <% end %> +
+
+ <% if res.is_a? Thing %> + <%= res.title %> +
+
Authors: <%= authors_or_editors(res) %>
+
Publisher: <%= string_maybe(res.publisher) %>
+
Year: <%= string_maybe(res.year) %>
+
Kind: <%= res.kind %>
+
Note: <%= string_maybe(res.note) %>
+ <% unless res.url.blank? %> + + <% end %> +
+ <% else %> + <%= I18n.t('comments.title') %> <%= I18n.t('general.in') %> «<%= res.thing.title %>» +
+ <%= res.content %> +
+ <% end %> +
+
-- cgit v1.2.3