From 9cc357fb17a1829c9f80704871a6c0750fa96504 Mon Sep 17 00:00:00 2001 From: Pfingstfrosch Date: Fri, 5 Jun 2020 00:41:18 +0200 Subject: [PATCH] add print button to all detail views --- app/views/crawlers/courses_crawler/show_detail.html.erb | 2 ++ app/views/crawlers/people_crawler/show_detail.html.erb | 2 ++ app/views/crawlers/projects_crawler/show_detail.html.erb | 2 ++ app/views/crawlers/theses_crawler/show_detail.html.erb | 2 ++ app/views/favorites/_nav.html.erb | 2 +- 5 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/views/crawlers/courses_crawler/show_detail.html.erb b/app/views/crawlers/courses_crawler/show_detail.html.erb index 780d1de..d8ad360 100644 --- a/app/views/crawlers/courses_crawler/show_detail.html.erb +++ b/app/views/crawlers/courses_crawler/show_detail.html.erb @@ -1,6 +1,8 @@ <% if @course != nil %> <%-# TODO parse more fields and style them appropriately -%>

Course: <%= @course['title']['de'] %>

+ <%= button_to "PRINT", '#', onclick: "print()" %> +
<%= @course['courseType'] %> <%= @course['semesterCode'] %>, <%= @course['weeklyHours'] %> SWS, <%= @course['instituteCode'] %> <%= @course['instituteName']['de'] %>
<%= button_to 'Add to favorites', action: :add_to_fav, number: @course['courseNumber'], semester: @course['semesterCode'] %> <% if @lecturers_names != nil %> diff --git a/app/views/crawlers/people_crawler/show_detail.html.erb b/app/views/crawlers/people_crawler/show_detail.html.erb index 5b6089d..6767af0 100644 --- a/app/views/crawlers/people_crawler/show_detail.html.erb +++ b/app/views/crawlers/people_crawler/show_detail.html.erb @@ -1,5 +1,7 @@ <% if @person != nil %>

Person: <%= @person['first_name'] %> <%= @person['last_name'] %>

+ <%= button_to "PRINT", '#', onclick: "print()" %> +
<% if @person['picture_uri'] != nil %> <%= image_tag @host + @person['picture_uri'] %> diff --git a/app/views/crawlers/projects_crawler/show_detail.html.erb b/app/views/crawlers/projects_crawler/show_detail.html.erb index f0709e7..92be9e7 100644 --- a/app/views/crawlers/projects_crawler/show_detail.html.erb +++ b/app/views/crawlers/projects_crawler/show_detail.html.erb @@ -1,5 +1,7 @@ <% if @project != nil %>

Project: <%= @project['titleDe'] %>

+ <%= button_to "PRINT", '#', onclick: "print()" %> +
<%= @project['contractBegin'] %> - <%= @project['contractEnd'] %>
<%= button_to 'Add to favorites', action: :add_to_fav, id: @id, title: @project['titleDe'] %> <% if @project['abstractDe'] != nil %> diff --git a/app/views/crawlers/theses_crawler/show_detail.html.erb b/app/views/crawlers/theses_crawler/show_detail.html.erb index ef18732..54cc904 100644 --- a/app/views/crawlers/theses_crawler/show_detail.html.erb +++ b/app/views/crawlers/theses_crawler/show_detail.html.erb @@ -1,5 +1,7 @@ <% if @thesis != nil %>

Thesis: <%= @thesis['title']['de'] %>

+ <%= button_to "PRINT", '#', onclick: "print()" %> +
<%= @thesis['thesisType'] %>, <%= @thesis['instituteCode'] %> <%= @thesis['instituteName']['de'] %>
<%= button_to 'Add to favorites', action: :add_to_fav, id: @id, title: @thesis['title']['de'] %> <% if @thesis['advisor'] != nil %> diff --git a/app/views/favorites/_nav.html.erb b/app/views/favorites/_nav.html.erb index 265a051..4a9c8e7 100644 --- a/app/views/favorites/_nav.html.erb +++ b/app/views/favorites/_nav.html.erb @@ -4,5 +4,5 @@ <%= link_to 'Theses', favorites_theses_url %> <%= link_to 'Projects', favorites_projects_url %> - <%= link_to "Print", '#', onclick: "print()" %> + <%= link_to "PRINT", '#', onclick: "print()" %>