mirror of
https://github.com/astuto/astuto.git
synced 2025-12-15 03:07:52 +01:00
40 lines
806 B
Ruby
40 lines
806 B
Ruby
class StaticPagesController < ApplicationController
|
|
skip_before_action :load_tenant_data, only: [:showcase, :pending_tenant, :blocked_tenant]
|
|
|
|
def root
|
|
@board = Board.find_by(id: Current.tenant.tenant_setting.root_board_id)
|
|
|
|
if @board
|
|
render 'boards/show'
|
|
else
|
|
get_roadmap_data
|
|
render 'static_pages/roadmap'
|
|
end
|
|
end
|
|
|
|
def roadmap
|
|
get_roadmap_data
|
|
end
|
|
|
|
def showcase
|
|
render html: 'Showcase home page.'
|
|
end
|
|
|
|
def pending_tenant
|
|
end
|
|
|
|
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 |