diff options
| author | Miquel Sabaté Solà <msabate@suse.com> | 2024-03-13 18:03:43 +0100 |
|---|---|---|
| committer | Miquel Sabaté Solà <msabate@suse.com> | 2024-03-13 18:03:43 +0100 |
| commit | a7791635aa98f012d35f97c3c5288494bbb28e38 (patch) | |
| tree | bad987e6b4d10ad2f7cd02e40658d464907595ee /app/views/shared_searches/show.html.erb | |
| download | operum-a7791635aa98f012d35f97c3c5288494bbb28e38.tar.gz operum-a7791635aa98f012d35f97c3c5288494bbb28e38.zip | |
Initial commit
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
Diffstat (limited to 'app/views/shared_searches/show.html.erb')
| -rw-r--r-- | app/views/shared_searches/show.html.erb | 28 |
1 files changed, 28 insertions, 0 deletions
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 @@ +<table id="public-search-table"> + <% @search.results.values.flatten.each do |res| %> + <tr> + <td> + <details> + <% if res.is_a? Thing %> + <summary><%= res.title %></summary> + <div class="details-flex"> + <div><span><b>Authors</b>: <%= authors_or_editors(res) %></span></div> + <div><span><b>Publisher</b>: <%= string_maybe(res.publisher) %></span></div> + <div><span><b>Year</b>: <%= string_maybe(res.year) %></span></div> + <div><span><b>Kind</b>: <%= res.kind %></span></div> + <div><span><b>Note</b>: <%= string_maybe(res.note) %></span></div> + <% unless res.url.blank? %> + <div><span><b>URL</b>: <a href="<%= res.url %>" target="_blank"><%= res.url %></a></span></div> + <% end %> + </div> + <% else %> + <summary><b><%= I18n.t('comments.title') %></b> <%= I18n.t('general.in') %> «<i><%= res.thing.title %></i>»</summary> + <div class="details-flex"> + <%= res.content %> + </div> + <% end %> + </details> + </td> + </tr> + <% end %> +</table> |
