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

25 lines
629 B
Ruby
Raw Normal View History

2014-11-18 11:03:18 +00:00
class Desktop::JournalPapersController < DesktopAdminController
2014-11-26 11:39:19 +00:00
include Admin::JournalPapersHelper
2014-11-18 12:55:07 +00:00
def menu
2014-11-21 06:13:38 +00:00
user = OrbitHelper.current_user
2014-11-18 12:55:07 +00:00
[
{
"title" => "List",
"layout" => "list",
2014-11-19 10:26:33 +00:00
"data" => get_paper_list
2014-11-18 12:55:07 +00:00
},
{
"title" => "Add/Edit",
"layout" => "form",
2014-11-26 08:21:35 +00:00
"new_file_attributes" => {
"file" => "journal_paper[journal_paper_files_attributes][{number}][journal_file]",
2014-11-26 08:30:22 +00:00
"title" => "journal_paper[journal_paper_files_attributes][{number}][title_translations][{langugae}]"
2014-11-26 08:27:15 +00:00
},
2014-11-21 06:13:38 +00:00
"new_path" => "/admin/members/#{user.member_profile.to_param}/journal_papers/new"
}
2014-11-18 12:55:07 +00:00
]
2014-11-18 11:03:18 +00:00
end
2014-11-19 10:26:33 +00:00
2014-11-26 08:09:45 +00:00
2014-11-19 10:26:33 +00:00
2014-11-18 11:03:18 +00:00
end