diff --git a/app/assets/stylesheets/style.css.erb b/app/assets/stylesheets/style.css.erb index fa79084f..0a3ba76a 100644 --- a/app/assets/stylesheets/style.css.erb +++ b/app/assets/stylesheets/style.css.erb @@ -722,6 +722,9 @@ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 1); } +#category_id, #module_app_id { + width: auto; +} [class^="icons-"] { display: inline-block; diff --git a/app/controllers/orbit_backend_controller.rb b/app/controllers/orbit_backend_controller.rb index 339f7ede..28f99fa2 100644 --- a/app/controllers/orbit_backend_controller.rb +++ b/app/controllers/orbit_backend_controller.rb @@ -155,7 +155,7 @@ class OrbitBackendController< ApplicationController def get_viewable(object_class) - objects = get_objects(object_class) + objects = get_objects(object_class).order_by(:created_at, :desc) Kaminari.paginate_array(objects).page(params[:page]).per(10) end diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index 1fbb8d48..a4516ee5 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -39,7 +39,7 @@ zh_tw: submit: 送出 sure?: 您肯定嗎? update: 更新 - update: 更新失敗 + update_failed: 更新失敗 view: 檢視 view_count: 查看次數 yes_: "Yes" diff --git a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb index 420b0143..9cba6794 100644 --- a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb +++ b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb @@ -137,6 +137,7 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController else @bulletin = Bulletin.new(params[:bulletin]) + @bulletin.deadline = nil if @bulletin.deadline < @bulletin.postdate @bulletin.create_user_id = current_user.id @bulletin.update_user_id = current_user.id @@ -245,6 +246,7 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController else @bulletin = Bulletin.find(params[:id]) + @bulletin.deadline = nil if @bulletin.deadline < @bulletin.postdate @bulletin.update_user_id = current_user.id diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form.html.erb index 05247251..c515dc65 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form.html.erb @@ -15,7 +15,7 @@