create function admin
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
-
Toggle commit list
-
Toggle commit list
-
app/controllers/admin_controller.rb 0 → 100644
1 # frozen_string_literal: true 2 3 # Admin controller 4 class AdminController < ApplicationController -
MasterEdited by Hoang Phuc Do
Những controller sử dụng trong trang admin nên nằm trong một namespace riêng (Vd: admin)
Vd:
Chức năng search trong admin sẽ có cấu trúc thư mục, file như sau:
app - controllers - admin - search_controller.rb -
Master
Dạ anh
-
-
-
app/assets/stylesheets/admin.scss 0 → 100644
1 // Place all the styles related to the admin controller here. 2 // They will automatically be included in application.css. 3 // You can use Sass (SCSS) here: http://sass-lang.com/ 4 .new_admin { 5 width: 100%; 6 } 7 8 @mixin admin_select { 9 margin-top: 10px; 10 border: 1px solid #ced4da; 11 border-radius: 0.25rem; 12 height: 40px; 13 padding-top: 0.375rem; 14 padding-right: 0.75rem; 15 padding-bottom: 0.375rem; 16 padding-left: 0.6rem; -
Edited
Em có thể gom lại nè
padding-top: 0.375rem; padding-right: 0.75rem; padding-bottom: 0.375rem; padding-left: 0.6rem;=> padding: 0.375rem 0.75rem 0.375rem 0.6rem;
-
Master
Thanks chị
-
-
-
-
-
-
app/forms/apply.rb 0 → 100644
7 8 def self.selected(params) 9 params.blank? ? '*' : params 10 end 11 12 def self.selected_date(params) 13 dt = {} 14 dt[:selected_past_year] = params.present? ? params['past_time(1i)'].to_i : Date.current.year 15 dt[:selected_past_month] = params.present? ? params['past_time(2i)'].to_i : Date.current.month 16 dt[:selected_past_day] = params.present? ? params['past_time(3i)'].to_i : Date.current.day 17 18 dt[:selected_current_year] = params.present? ? params['current_time(1i)'].to_i : Date.current.year 19 dt[:selected_current_month] = params.present? ? params['current_time(2i)'].to_i : Date.current.month 20 dt[:selected_current_day] = params.present? ? params['current_time(3i)'].to_i : Date.current.day 21 dt 22 end -
Toggle commit list
-
Toggle commit list
-
-
-
added 19 commits
-
9f4a0e4d...897ec388 - 18 commits from branch
master - f18b0d89 - Merge branch 'master' into 'admin'
Toggle commit list -
9f4a0e4d...897ec388 - 18 commits from branch
-
merged
Toggle commit list