personal-thesis-guidance/app/controllers/desktop/personal_thesis_guidances_c...

27 lines
697 B
Plaintext

class Desktop::PersonalThesisGuidancesController < DesktopAdminController
include Admin::ThesisGuidancePapersHelper
def menu
user = OrbitHelper.current_user
[
{
"title" => "List",
"layout" => "list"
},
{
"title" => "Add/Edit",
"layout" => "form",
"new_file_attributes" => {
"file" => "thesis_guidance_paper[thesis_guidance_paper_files_attributes][{number}][thesis_guidance_file]",
"title" => "thesis_guidance_paper[thesis_guidance_paper_files_attributes][{number}][title_translations][{langugae}]"
},
"new_path" => "/admin/members/#{user.member_profile.to_param}/thesis_guidance_papers/new"
}
]
end
def list
get_paper_list
end
end