Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 2021-08-26 05:47:39 #3177

Merged
merged 11 commits into from
Aug 26, 2021
Merged
138 changes: 69 additions & 69 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,40 +10,40 @@ GIT
GEM
remote: https://rubygems.org/
specs:
actioncable (6.1.3.2)
actionpack (= 6.1.3.2)
activesupport (= 6.1.3.2)
actioncable (6.1.4.1)
actionpack (= 6.1.4.1)
activesupport (= 6.1.4.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.1.3.2)
actionpack (= 6.1.3.2)
activejob (= 6.1.3.2)
activerecord (= 6.1.3.2)
activestorage (= 6.1.3.2)
activesupport (= 6.1.3.2)
actionmailbox (6.1.4.1)
actionpack (= 6.1.4.1)
activejob (= 6.1.4.1)
activerecord (= 6.1.4.1)
activestorage (= 6.1.4.1)
activesupport (= 6.1.4.1)
mail (>= 2.7.1)
actionmailer (6.1.3.2)
actionpack (= 6.1.3.2)
actionview (= 6.1.3.2)
activejob (= 6.1.3.2)
activesupport (= 6.1.3.2)
actionmailer (6.1.4.1)
actionpack (= 6.1.4.1)
actionview (= 6.1.4.1)
activejob (= 6.1.4.1)
activesupport (= 6.1.4.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.1.3.2)
actionview (= 6.1.3.2)
activesupport (= 6.1.3.2)
actionpack (6.1.4.1)
actionview (= 6.1.4.1)
activesupport (= 6.1.4.1)
rack (~> 2.0, >= 2.0.9)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.1.3.2)
actionpack (= 6.1.3.2)
activerecord (= 6.1.3.2)
activestorage (= 6.1.3.2)
activesupport (= 6.1.3.2)
actiontext (6.1.4.1)
actionpack (= 6.1.4.1)
activerecord (= 6.1.4.1)
activestorage (= 6.1.4.1)
activesupport (= 6.1.4.1)
nokogiri (>= 1.8.5)
actionview (6.1.3.2)
activesupport (= 6.1.3.2)
actionview (6.1.4.1)
activesupport (= 6.1.4.1)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
Expand All @@ -54,22 +54,22 @@ GEM
activerecord (>= 5)
active_storage_validations (0.9.2)
rails (>= 5.2.0)
activejob (6.1.3.2)
activesupport (= 6.1.3.2)
activejob (6.1.4.1)
activesupport (= 6.1.4.1)
globalid (>= 0.3.6)
activemodel (6.1.3.2)
activesupport (= 6.1.3.2)
activerecord (6.1.3.2)
activemodel (= 6.1.3.2)
activesupport (= 6.1.3.2)
activestorage (6.1.3.2)
actionpack (= 6.1.3.2)
activejob (= 6.1.3.2)
activerecord (= 6.1.3.2)
activesupport (= 6.1.3.2)
activemodel (6.1.4.1)
activesupport (= 6.1.4.1)
activerecord (6.1.4.1)
activemodel (= 6.1.4.1)
activesupport (= 6.1.4.1)
activestorage (6.1.4.1)
actionpack (= 6.1.4.1)
activejob (= 6.1.4.1)
activerecord (= 6.1.4.1)
activesupport (= 6.1.4.1)
marcel (~> 1.0.0)
mini_mime (~> 1.0.2)
activesupport (6.1.3.2)
mini_mime (>= 1.1.0)
activesupport (6.1.4.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
Expand Down Expand Up @@ -119,7 +119,7 @@ GEM
coffee-script-source (1.12.2)
commonmarker (0.21.1)
ruby-enum (~> 0.5)
concurrent-ruby (1.1.8)
concurrent-ruby (1.1.9)
connection_pool (2.2.3)
crack (0.4.5)
rexml
Expand All @@ -136,9 +136,9 @@ GEM
execjs (2.7.0)
faraday (0.17.4)
multipart-post (>= 1.2, < 3)
ffi (1.14.2)
globalid (0.4.2)
activesupport (>= 4.2.0)
ffi (1.15.3)
globalid (0.5.2)
activesupport (>= 5.0)
google-apis-core (0.2.1)
addressable (~> 2.5, >= 2.5.1)
googleauth (~> 0.14)
Expand Down Expand Up @@ -215,7 +215,7 @@ GEM
listen (3.4.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
loofah (2.9.1)
loofah (2.12.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
Expand All @@ -229,8 +229,8 @@ GEM
actionpack (>= 3.2.0, < 6.2)
method_source (1.0.0)
mini_magick (4.11.0)
mini_mime (1.0.3)
mini_portile2 (2.5.1)
mini_mime (1.1.1)
mini_portile2 (2.6.1)
minitest (5.14.4)
minitest-retry (0.2.2)
minitest (>= 5.0)
Expand All @@ -240,11 +240,11 @@ GEM
multipart-post (2.1.1)
net-http-persistent (3.1.0)
connection_pool (~> 2.2)
nio4r (2.5.7)
nokogiri (1.11.4)
mini_portile2 (~> 2.5.0)
nio4r (2.5.8)
nokogiri (1.12.3)
mini_portile2 (~> 2.6.1)
racc (~> 1.4)
nokogiri (1.11.4-x86_64-darwin)
nokogiri (1.12.3-x86_64-darwin)
racc (~> 1.4)
oauth (0.5.5)
oauth2 (1.4.4)
Expand Down Expand Up @@ -297,39 +297,39 @@ GEM
rack-user_agent (0.5.2)
rack (>= 1.5)
woothee (>= 1.0.0)
rails (6.1.3.2)
actioncable (= 6.1.3.2)
actionmailbox (= 6.1.3.2)
actionmailer (= 6.1.3.2)
actionpack (= 6.1.3.2)
actiontext (= 6.1.3.2)
actionview (= 6.1.3.2)
activejob (= 6.1.3.2)
activemodel (= 6.1.3.2)
activerecord (= 6.1.3.2)
activestorage (= 6.1.3.2)
activesupport (= 6.1.3.2)
rails (6.1.4.1)
actioncable (= 6.1.4.1)
actionmailbox (= 6.1.4.1)
actionmailer (= 6.1.4.1)
actionpack (= 6.1.4.1)
actiontext (= 6.1.4.1)
actionview (= 6.1.4.1)
activejob (= 6.1.4.1)
activemodel (= 6.1.4.1)
activerecord (= 6.1.4.1)
activestorage (= 6.1.4.1)
activesupport (= 6.1.4.1)
bundler (>= 1.15.0)
railties (= 6.1.3.2)
railties (= 6.1.4.1)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.3.0)
rails-html-sanitizer (1.4.2)
loofah (~> 2.3)
rails-i18n (6.0.0)
i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 7)
rails_autolink (1.1.6)
rails (> 3.1)
railties (6.1.3.2)
actionpack (= 6.1.3.2)
activesupport (= 6.1.3.2)
railties (6.1.4.1)
actionpack (= 6.1.4.1)
activesupport (= 6.1.4.1)
method_source
rake (>= 0.8.7)
rake (>= 0.13)
thor (~> 1.0)
rainbow (3.0.0)
rake (13.0.3)
rake (13.0.6)
ransack (2.4.2)
activerecord (>= 5.2.4)
activesupport (>= 5.2.4)
Expand Down Expand Up @@ -474,7 +474,7 @@ GEM
railties (>= 5.2)
semantic_range (>= 2.3.0)
webrick (1.7.0)
websocket-driver (0.7.3)
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
woothee (1.11.1)
Expand Down
8 changes: 8 additions & 0 deletions app/assets/stylesheets/atoms/_a-button.sass
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,14 @@ input[type="button"]
.a-button
border-radius: 0

.is-inline-buttons
display: flex
+margin(horizontal, -.25rem)
.is-text-align-center &
justify-content: center
>li
+padding(horizontal, .25rem)

.a-welcome-button
+size(auto 4rem)
+text-block(1.125rem 1, flex 700 $welcome-default-text)
Expand Down
12 changes: 7 additions & 5 deletions app/assets/stylesheets/blocks/admin/_admin-table.sass
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
width: 100%

.admin-table__header
background-color: $background
border: solid 1px #aaaaaa
background-color: $background-shade
border: solid 1px #bbbbbb
+border-radius(top, .25rem)

.admin-table__items
Expand All @@ -26,7 +26,7 @@

.admin-table__label
+text-block(.75rem 1.4, $main center 600)
border: solid 1px #aaaaaa
border: solid 1px #bbbbbb
white-space: nowrap
height: 2rem
+padding(horizontal, .5rem)
Expand All @@ -36,7 +36,8 @@
font-size: .75rem
margin-left: .5rem
+padding(horizontal, .375rem)
background-color: #dedede
background-color: $base
border-color: #bbbbbb
color: $default-text

.admin-table__item
Expand All @@ -48,6 +49,7 @@
+border-radius(bottom, .25rem)
&.sortable-chosen
background-color: tint($warning, 80%)
&:hover,
.admin-table.is-grab &:hover
background-color: tint($warning, 90%)
&[draggable="false"]
Expand All @@ -70,7 +72,7 @@

.admin-table__item-logo-image
border: solid 1px $border
width: 5rem
width: 2.5rem
border-radius: .25rem

.admin-table-item__body
Expand Down
7 changes: 7 additions & 0 deletions app/controllers/admin/courses_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

class Admin::CoursesController < AdminController
def index
@courses = Course.order(created_at: :desc)
end
end
2 changes: 1 addition & 1 deletion app/javascript/categories.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
td.admin-table__item-value
| {{ category.slug }}
td.admin-table__item-value.is-text-align-center
ul.is-button-group
ul.is-inline-buttons
li
a.a-button.is-sm.is-secondary.is-icon.spec-edit(
:href='`/admin/categories/${category.id}/edit`'
Expand Down
4 changes: 4 additions & 0 deletions app/views/admin/_admin_page_tabs.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
= link_to 'カテゴリー',
admin_categories_path,
class: "page-tabs__item-link #{current_link(/^admin-categories/)}"
li.page-tabs__item
= link_to 'コース',
admin_courses_path,
class: "page-tabs__item-link #{current_link(/^admin-courses/)}"
li.page-tabs__item
= link_to '企業',
admin_companies_path,
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/books/_table.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
= link_to admin_books_qrcode_path(book), class: 'a-button is-sm is-secondary is-icon', target: '_blank', rel: 'noopener' do
i.fas.fa-print
td.admin-table__item-value.is-text-align-center
ul.is-button-group
ul.is-inline-buttons
li
= link_to edit_admin_book_path(book), class: 'a-button is-sm is-secondary is-icon' do
i.fas.fa-pen
Expand Down
4 changes: 2 additions & 2 deletions app/views/admin/companies/index.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ header.page-header
td.admin-table__item-value
- if company.present?
= company.name
td.admin-table__item-value
td.admin-table__item-value.is-text-align-center
- if company.logo.attached?
= image_tag company.logo_url, class: 'admin-table__item-logo-image'
td.admin-table__item-value
Expand All @@ -46,7 +46,7 @@ header.page-header
class: 'a-button is-sm is-secondary is-icon' do
i.fas.fa-user-plus
td.admin-table__item-value.is-text-align-center
ul.is-button-group
ul.is-inline-buttons
li
= link_to edit_admin_company_path(company), class: 'a-button is-sm is-secondary is-icon' do
i.fas.fa-pen
Expand Down
16 changes: 16 additions & 0 deletions app/views/admin/courses/_course.html.slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
tr.admin-table__item(id="course_#{course.id}")
td.admin-table__item-value
= link_to course.title, [course, :practices], class: 'courses-item__title-link'
td.admin-table__item-value
= course.description.truncate(100)
td.admin-table__item-value.admin-table__item-value.is-text-align-center
ul.is-inline-buttons
li
= link_to edit_course_path(course), class: 'a-button is-sm is-secondary is-icon is-block' do
i.fas.fa-pen
li
= link_to course_categories_path(course), class: 'a-button is-sm is-secondary is-icon is-block' do
i.fas.fa-align-justify
li
= link_to course, method: :delete, class: 'a-button is-sm is-danger is-icon is-block js-delete', data: { confirm: '本当によろしいですか?' } do
i.far.fa-trash-alt
29 changes: 29 additions & 0 deletions app/views/admin/courses/index.html.slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
- title 'コース一覧'
header.page-header
.container
.page-header__inner
h2.page-header__title = title
.page-header-actions
ul.page-header-actions__items
li.page-header-actions__item
= link_to new_course_path, class: 'a-button is-md is-secondary is-block' do
i.fas.fa-plus
| コース作成

.page-tools
= render 'admin/admin_page_tabs'

.page-body
.container.is-padding-horizontal-0-sm-down
.admin-table
table.admin-table__table
thead.admin-table__header
tr.admin-table__labels
th.admin-table__label
| コース名
th.admin-table__label
| 説明文
th.admin-table__label
| 操作
tbody.admin-table__items
= render @courses.order(:created_at)
Loading