diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-08-04 07:07:05 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-08-04 07:07:05 +0200 |
| commit | 409d71ed471703be8c56f2639a3ecb0fa387e6a7 (patch) | |
| tree | 0a7108786cb549e343d8926b232f52a191570422 /app/controllers | |
| parent | 974062f16169f6d07f2289564be6d72610b8770e (diff) | |
Give node lists a flag column and a shared action bar
Diffstat (limited to 'app/controllers')
| -rw-r--r-- | app/controllers/nodes_controller.rb | 4 | ||||
| -rw-r--r-- | app/controllers/users_controller.rb | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/app/controllers/nodes_controller.rb b/app/controllers/nodes_controller.rb index ca30976f..447d596d 100644 --- a/app/controllers/nodes_controller.rb +++ b/app/controllers/nodes_controller.rb | |||
| @@ -20,9 +20,7 @@ class NodesController < ApplicationController | |||
| 20 | ] | 20 | ] |
| 21 | 21 | ||
| 22 | def index | 22 | def index |
| 23 | @nodes = Node.root.descendants.includes(:head, :draft) | 23 | @nodes = index_matching(Node.root.descendants) |
| 24 | .order('id DESC') | ||
| 25 | .paginate(:page => params[:page], :per_page => 25) | ||
| 26 | end | 24 | end |
| 27 | 25 | ||
| 28 | def new | 26 | def new |
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index b06d11fd..20355aa8 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb | |||
| @@ -140,7 +140,7 @@ class UsersController < ApplicationController | |||
| 140 | 140 | ||
| 141 | def verify_status | 141 | def verify_status |
| 142 | @user ||= User.new | 142 | @user ||= User.new |
| 143 | unless @user.id == current_user.id || current_user.admin | 143 | unless @user.id == current_user.id || current_user.is_admin? |
| 144 | deny_user_access | 144 | deny_user_access |
| 145 | end | 145 | end |
| 146 | end | 146 | end |
