personal-journal/app/controllers/desktop/personal_journals_controlle...

27 lines
635 B
Plaintext

class Desktop::PersonalJournalsController < DesktopAdminController
include Admin::JournalPapersHelper
def menu
user = OrbitHelper.current_user
[
{
"title" => "List",
"layout" => "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
def list
get_paper_list
end
end