Fix journal paper layout and member list
This commit is contained in:
parent
a845f16162
commit
285189e190
|
@ -1,5 +1,7 @@
|
||||||
class Admin::JournalPapersController < OrbitMemberController
|
class Admin::JournalPapersController < OrbitMemberController
|
||||||
include Admin::JournalPapersHelper
|
include Admin::JournalPapersHelper
|
||||||
|
layout "member_plugin"
|
||||||
|
|
||||||
before_action :set_journal_paper, only: [:show, :edit , :update, :destroy]
|
before_action :set_journal_paper, only: [:show, :edit , :update, :destroy]
|
||||||
before_action :get_plugins, only: [:index, :writing_journal_setting, :new, :create, :edit, :update]
|
before_action :get_plugins, only: [:index, :writing_journal_setting, :new, :create, :edit, :update]
|
||||||
before_action :set_types, only: [:writing_journal_setting, :new, :edit, :create, :update]
|
before_action :set_types, only: [:writing_journal_setting, :new, :edit, :create, :update]
|
||||||
|
@ -24,6 +26,7 @@ class Admin::JournalPapersController < OrbitMemberController
|
||||||
def new
|
def new
|
||||||
@journal_paper = JournalPaper.new
|
@journal_paper = JournalPaper.new
|
||||||
@members_data = JournalPaper.member_data rescue nil
|
@members_data = JournalPaper.member_data rescue nil
|
||||||
|
Rails.logger.info"@@@@@@@@@@@@"+@members_data.inspect
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html # new.html.erb
|
format.html # new.html.erb
|
||||||
|
|
|
@ -71,8 +71,12 @@ class JournalPaper
|
||||||
def self.member_data
|
def self.member_data
|
||||||
members = MemberProfile.all
|
members = MemberProfile.all
|
||||||
member_data = []
|
member_data = []
|
||||||
members.each do |m|
|
members.each do |m|
|
||||||
member_data << {"memberId" => m.id.to_s, "memberName" => m.name}
|
if (m.first_name || m.last_name)
|
||||||
|
member_data << {"memberId" => m.id.to_s, "memberName" => m.name}
|
||||||
|
else
|
||||||
|
member_data << {"memberId" => m.id.to_s, "memberName" => "No Name"}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
member_data.to_json
|
member_data.to_json
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,13 +1,3 @@
|
||||||
<% content_for :side_bar do %>
|
|
||||||
<%= render :partial => 'layouts/side_bar', :locals => {:link_name => t(:user), :link_url => admin_site_site_info_path(site_id: current_site.id), :icon => 'icons-users', :side_bar_content => 'admin/members/side_bar'} %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<div class="subnav">
|
|
||||||
|
|
||||||
<%= render :partial => 'admin/personal_plugins/plugin_list' %>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<%= form_for @journal_paper, url: admin_journal_paper_path(@journal_paper), html: {class: "form-horizontal main-forms previewable"} do |f| %>
|
<%= form_for @journal_paper, url: admin_journal_paper_path(@journal_paper), html: {class: "form-horizontal main-forms previewable"} do |f| %>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<%= render partial: 'form', locals: {f: f} %>
|
<%= render partial: 'form', locals: {f: f} %>
|
||||||
|
|
|
@ -1,13 +1,3 @@
|
||||||
<% content_for :side_bar do %>
|
|
||||||
<%= render :partial => 'layouts/side_bar', :locals => {:link_name => t(:user), :link_url => admin_site_site_info_path(site_id: current_site.id), :icon => 'icons-users', :side_bar_content => 'admin/members/side_bar'} %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<div class="subnav">
|
|
||||||
|
|
||||||
<%= render 'admin/personal_plugins/plugin_list' %>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<table class="table main-list">
|
<table class="table main-list">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -1,13 +1,3 @@
|
||||||
<% content_for :side_bar do %>
|
|
||||||
<%= render :partial => 'layouts/side_bar', :locals => {:link_name => t(:user), :link_url => admin_site_site_info_path(site_id: current_site.id), :icon => 'icons-users', :side_bar_content => 'admin/members/side_bar'} %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<div class="subnav">
|
|
||||||
|
|
||||||
<%= render :partial => 'admin/personal_plugins/plugin_list' %>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<%= form_for @journal_paper, url: admin_journal_papers_path, html: {class: "form-horizontal main-forms previewable"} do |f| %>
|
<%= form_for @journal_paper, url: admin_journal_papers_path, html: {class: "form-horizontal main-forms previewable"} do |f| %>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<%= render partial: 'form', locals: {f: f} %>
|
<%= render partial: 'form', locals: {f: f} %>
|
||||||
|
|
|
@ -1,15 +1,4 @@
|
||||||
<% # encoding: utf-8 %>
|
<% # encoding: utf-8 %>
|
||||||
|
|
||||||
<% content_for :side_bar do %>
|
|
||||||
<%= render :partial => 'layouts/side_bar', :locals => {:link_name => t(:user), :link_url => admin_site_site_info_path(site_id: current_site.id), :icon => 'icons-users', :side_bar_content => 'admin/members/side_bar'} %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<div class="subnav">
|
|
||||||
|
|
||||||
<%= render :partial => 'admin/personal_plugins/plugin_list' %>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="isotope">
|
<div id="isotope">
|
||||||
<div class="item element">
|
<div class="item element">
|
||||||
<div class="detail w-a h-a">
|
<div class="detail w-a h-a">
|
||||||
|
|
Loading…
Reference in New Issue