personal-journal/app/controllers/desktop/journal_papers_controller.rb

25 lines
629 B
Ruby

class Desktop::JournalPapersController < DesktopAdminController
include Admin::JournalPapersHelper
def menu
user = OrbitHelper.current_user
[
{
"title" => "List",
"layout" => "list",
"data" => get_paper_list
},
{
"title" => "Add/Edit",
"layout" => "form",
"new_file_attributes" => {
"file" => "journal_paper[journal_paper_files_attributes][{number}][journal_file]",
"title" => "journal_paper[journal_paper_files_attributes][{number}][title_translations][{langugae}]"
},
"new_path" => "/admin/members/#{user.member_profile.to_param}/journal_papers/new"
}
]
end
end