mirror of
https://github.com/astuto/astuto.git
synced 2025-12-16 03:37:56 +01:00
Add setting to manage visibility of vote count, vote button and decide root page (#197)
This commit is contained in:
committed by
GitHub
parent
d4242dd78e
commit
e7335f5622
@@ -1,14 +1,19 @@
|
||||
class StaticPagesController < ApplicationController
|
||||
skip_before_action :load_tenant_data, only: [:showcase, :pending_tenant, :blocked_tenant]
|
||||
|
||||
def roadmap
|
||||
@post_statuses = PostStatus
|
||||
.find_roadmap
|
||||
.select(:id, :name, :color)
|
||||
def root
|
||||
@board = Board.find_by(id: Current.tenant.tenant_setting.root_board_id)
|
||||
|
||||
@posts = Post
|
||||
.find_with_post_status_in(@post_statuses)
|
||||
.select(:id, :title, :board_id, :post_status_id, :user_id, :created_at)
|
||||
if @board
|
||||
render 'boards/show'
|
||||
else
|
||||
get_roadmap_data
|
||||
render 'static_pages/roadmap'
|
||||
end
|
||||
end
|
||||
|
||||
def roadmap
|
||||
get_roadmap_data
|
||||
end
|
||||
|
||||
def showcase
|
||||
@@ -20,4 +25,16 @@ class StaticPagesController < ApplicationController
|
||||
|
||||
def blocked_tenant
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def get_roadmap_data
|
||||
@post_statuses = PostStatus
|
||||
.find_roadmap
|
||||
.select(:id, :name, :color)
|
||||
|
||||
@posts = Post
|
||||
.find_with_post_status_in(@post_statuses)
|
||||
.select(:id, :title, :board_id, :post_status_id, :user_id, :created_at)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user