fix error
This commit is contained in:
parent
295b6cbf0f
commit
9b622b132a
|
@ -64,17 +64,17 @@ class Admin::JournalPapersController < OrbitMemberController
|
||||||
|
|
||||||
elsif !params[:author_members].blank?
|
elsif !params[:author_members].blank?
|
||||||
|
|
||||||
params[:author_members].each do |author_member|
|
#params[:author_members].each do |author_member|
|
||||||
|
|
||||||
journal_paper_params['member_profile_id'] = author_member
|
journal_paper_params['member_profile_id'] = params[:author_members]
|
||||||
@journal_paper = JournalPaper.new(journal_paper_params)
|
@journal_paper = JournalPaper.new(journal_paper_params)
|
||||||
@journal_paper.save
|
@journal_paper.save
|
||||||
|
|
||||||
if params[:desktop] == "true"
|
if params[:desktop] == "true"
|
||||||
render json: {"data" => get_paper_list}.to_json
|
render json: {"data" => get_paper_list}.to_json
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
#end
|
||||||
|
|
||||||
redirect_to params['referer_url']
|
redirect_to params['referer_url']
|
||||||
|
|
||||||
|
@ -96,7 +96,8 @@ class Admin::JournalPapersController < OrbitMemberController
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit
|
def edit
|
||||||
@member = @journal_paper.member_profile
|
@member = MemberProfile.find(@journal_paper.member_profile_id)
|
||||||
|
puts [@journal_paper.inspect,'help',@member.inspect]
|
||||||
if params[:desktop]
|
if params[:desktop]
|
||||||
render :layout => false
|
render :layout => false
|
||||||
end
|
end
|
||||||
|
|
|
@ -120,27 +120,17 @@
|
||||||
<!-- Basic Module -->
|
<!-- Basic Module -->
|
||||||
<div class="tab-pane fade in active" id="basic">
|
<div class="tab-pane fade in active" id="basic">
|
||||||
|
|
||||||
<% if !@member.nil? %>
|
|
||||||
|
|
||||||
<div class="control-group big-group">
|
<div class="control-group big-group">
|
||||||
<label class="control-label muted"><%= t("personal_plugins.author") %></label>
|
<label class="control-label muted"><%= t("personal_plugins.author") %></label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<%= @member.name rescue ''%>
|
<% if !@member.nil? %>
|
||||||
<%= f.hidden_field :member_profile_id, :value => @member.id %>
|
<%= render partial: 'admin/member_selects/email_selection_box', locals: {field: 'author_members[]', email_members:@member} %>
|
||||||
</div>
|
<% else %>
|
||||||
</div>
|
<%= render partial: 'admin/member_selects/email_selection_box', locals: {field: 'author_members[]', email_members:[]} %>
|
||||||
|
<% end %>
|
||||||
<% else %>
|
|
||||||
|
|
||||||
<div class="control-group big-group">
|
|
||||||
<label class="control-label muted"><%= t("personal_plugins.author") %></label>
|
|
||||||
<div class="controls">
|
|
||||||
<%= render partial: 'admin/member_selects/email_selection_box', locals: {field: 'author_members[]', email_members:[]} %>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<!-- year -->
|
<!-- year -->
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label muted"><%= t("personal_journal.year") %></label>
|
<label class="control-label muted"><%= t("personal_journal.year") %></label>
|
||||||
|
|
Loading…
Reference in New Issue