From 32ec7c49ff37d3c4d05fbe5c9f7756f061e84404 Mon Sep 17 00:00:00 2001 From: Pfingstfrosch Date: Sun, 31 May 2020 13:50:07 +0200 Subject: [PATCH] make favorite view more mobile friendly append buttons under each row of data instead besides append a line which separates the tables beneath every odd line to group data and buttons --- app/assets/stylesheets/favorites.scss | 32 ++++++--------------------- app/views/favorites/courses.html.erb | 4 ++-- app/views/favorites/people.html.erb | 2 -- app/views/favorites/projects.html.erb | 4 ++-- 4 files changed, 11 insertions(+), 31 deletions(-) diff --git a/app/assets/stylesheets/favorites.scss b/app/assets/stylesheets/favorites.scss index 0d9f5ff..bc9b6ce 100644 --- a/app/assets/stylesheets/favorites.scss +++ b/app/assets/stylesheets/favorites.scss @@ -36,30 +36,12 @@ width: 100%; } - th, td { - padding: 8px; - text-align: left; - border-bottom: 1px solid #ddd; + tr:nth-child(odd) { + th, td { + //padding: 8px; + text-align: left; + border-bottom: 1px solid #ddd; + } + } - - -} - -.thumb { - width: 3em; -} - -.table_wrapper { - table { - border-collapse: collapse; - width: 100%; - } - - th, td { - padding: 8px; - text-align: left; - border-bottom: 1px solid #ddd; - } - - } \ No newline at end of file diff --git a/app/views/favorites/courses.html.erb b/app/views/favorites/courses.html.erb index bad85bf..7ff1469 100644 --- a/app/views/favorites/courses.html.erb +++ b/app/views/favorites/courses.html.erb @@ -8,8 +8,6 @@ <%= sortable "Title", "title" %> <%= sortable "Registration Date", "created_at" %> - - <% for course in @favorite_courses %> @@ -19,6 +17,8 @@ <%= course['created_at'] %> + + <%= button_to 'Details', crawlers_courses_crawler_show_detail_url(:number => course['number'], :semester => course['semester']) %> diff --git a/app/views/favorites/people.html.erb b/app/views/favorites/people.html.erb index dbf82e3..53cd576 100644 --- a/app/views/favorites/people.html.erb +++ b/app/views/favorites/people.html.erb @@ -32,8 +32,6 @@ <%= sortable "First Name", "first_name" %> <%= sortable "Last Name", "last_name" %> <%= sortable "Registration Date", "created_at" %> - - <% for person in @favorite_people %> diff --git a/app/views/favorites/projects.html.erb b/app/views/favorites/projects.html.erb index 61868b2..b873367 100644 --- a/app/views/favorites/projects.html.erb +++ b/app/views/favorites/projects.html.erb @@ -8,8 +8,6 @@ <%= sortable "Title", "title" %> <%= sortable "Registration Date", "created_at" %> - - <% for project in @favorite_projects %> @@ -19,6 +17,8 @@ <%= project['created_at'] %> + + <%= button_to 'Details', crawlers_projects_crawler_show_detail_url(:id => project['id']) %>