added edit and file stuff
This commit is contained in:
parent
b6c96acfe4
commit
06e5e37c0b
|
@ -38,6 +38,9 @@ class Admin::JournalPapersController < OrbitMemberController
|
|||
|
||||
def edit
|
||||
@member = @journal_paper.member_profile
|
||||
if params[:desktop]
|
||||
render :layout => false
|
||||
end
|
||||
end
|
||||
|
||||
def create
|
||||
|
|
|
@ -10,6 +10,7 @@ class Desktop::JournalPapersController < DesktopAdminController
|
|||
{
|
||||
"title" => "Add/Edit",
|
||||
"layout" => "form",
|
||||
"new_file_attributes" => "journal_paper[journal_paper_files_attributes][{number}][journal_file]",
|
||||
"new_path" => "/admin/members/#{user.member_profile.to_param}/journal_papers/new"
|
||||
}
|
||||
]
|
||||
|
@ -28,8 +29,10 @@ class Desktop::JournalPapersController < DesktopAdminController
|
|||
"extension" => (jpf.journal_file.url.split(".").last rescue "")
|
||||
}
|
||||
end
|
||||
|
||||
{
|
||||
"id" => j.id.to_s,
|
||||
"edit_url" => "/#{I18n.locale.to_s}/admin/jounal_papers/#{j.to_param}/edit",
|
||||
"paper_title" => j.paper_title,
|
||||
"journal_title" => j.journal_title,
|
||||
"keywords" => j.keywords,
|
||||
|
|
Loading…
Reference in New Issue