diff --git a/app/controllers/admin/journal_levels_controller.rb b/app/controllers/admin/journal_levels_controller.rb
index 6ddd63c..d502f9d 100644
--- a/app/controllers/admin/journal_levels_controller.rb
+++ b/app/controllers/admin/journal_levels_controller.rb
@@ -1,51 +1,43 @@
class Admin::JournalLevelsController < OrbitMemberController
before_action :allow_admin_only
- before_action :set_journal_level, only: [:edit, :update, :destroy]
-
- def initialize
- super
- @app_type = 'journal_level'
- end
-
+
def new
- @journal_level = JournalLevel.new
+ @paper_level = JournalLevel.new
+ @url = admin_journal_levels_path(@paper_level)
+ render :layout=>false
end
def create
- @journal_level = JournalLevel.new(journal_level_attributes)
- respond_to do |format|
- if @journal_level.save
- format.js { render 'create_writing_journal_setting' }
- end
- end
+ @paper_level = JournalLevel.new(paper_level_params)
+ @paper_level.save
+ @paper_levels = JournalLevel.all
+ render :partial=>'index', :layout=>false
end
def edit
+ @paper_level = JournalLevel.find(params[:id])
+ @url = admin_journal_level_path(@paper_level)
+ render :layout=>false
end
def update
- respond_to do |format|
- if @journal_level.update_attributes(journal_level_attributes)
- format.js { render 'update_writing_journal_setting' }
- end
- end
+ @paper_level = JournalLevel.find(params[:id])
+ @paper_level.update_attributes(paper_level_params)
+ @paper_level.save
+ @paper_levels = JournalLevel.all
+ render :partial=>'index', :layout=>false
end
def destroy
- @journal_level.destroy
- respond_to do |format|
- format.js { render 'delete_journal_setting' }
- end
+ paper_level = JournalLevel.find(params[:id])
+ paper_level.destroy
+ @paper_levels = JournalLevel.all
+ render :partial=>'index', :layout=>false
end
private
- def set_journal_level
- @journal_level = JournalLevel.find(params[:id])
- end
-
- def journal_level_attributes
+ def paper_level_params
params.require(:journal_level).permit! rescue nil
end
-
-end
+end
\ No newline at end of file
diff --git a/app/controllers/admin/journal_paper_author_types_controller.rb b/app/controllers/admin/journal_paper_author_types_controller.rb
index 6aa7110..5645a3d 100644
--- a/app/controllers/admin/journal_paper_author_types_controller.rb
+++ b/app/controllers/admin/journal_paper_author_types_controller.rb
@@ -1,51 +1,43 @@
class Admin::JournalPaperAuthorTypesController < OrbitMemberController
before_action :allow_admin_only
- before_action :set_journal_paper_author_type, only: [:edit, :update, :destroy]
-
- def initialize
- super
- @app_type = 'journal_paper_author_type'
- end
-
+
def new
- @journal_author_type = JournalPaperAuthorType.new
+ @author_type = JournalPaperAuthorType.new
+ @url = admin_journal_paper_author_types_path(@author_type)
+ render :layout=>false
end
def create
- @journal_author_type = JournalPaperAuthorType.new(journal_paper_author_type_attributes)
- respond_to do |format|
- if @journal_author_type.save
- format.js { render 'create_writing_journal_setting' }
- end
- end
+ @author_type = JournalPaperAuthorType.new(author_type_params)
+ @author_type.save
+ @author_types = JournalPaperAuthorType.all
+ render :partial=>'list', :layout=>false
end
def edit
+ @author_type = JournalPaperAuthorType.find(params[:id])
+ @url = admin_journal_paper_author_type_path(@author_type)
+ render :layout=>false
end
def update
- respond_to do |format|
- if @journal_author_type.update_attributes(journal_paper_author_type_attributes)
- format.js { render 'update_writing_journal_setting' }
- end
- end
+ @author_type = JournalPaperAuthorType.find(params[:id])
+ @author_type.update_attributes(author_type_params)
+ @author_type.save
+ @author_types = JournalPaperAuthorType.all
+ render :partial=>'list', :layout=>false
end
def destroy
- @journal_author_type.destroy
- respond_to do |format|
- format.js { render 'delete_journal_setting' }
- end
+ author_type = JournalPaperAuthorType.find(params[:id])
+ author_type.destroy
+ @author_types = JournalPaperAuthorType.all
+ render :partial=>'list', :layout=>false
end
private
- def set_journal_paper_author_type
- @journal_author_type = JournalPaperAuthorType.find(params[:id])
- end
-
- def journal_paper_author_type_attributes
+ def author_type_params
params.require(:journal_paper_author_type).permit! rescue nil
end
-
end
diff --git a/app/controllers/admin/journal_paper_intros_controller.rb b/app/controllers/admin/journal_paper_intros_controller.rb
deleted file mode 100644
index f2efd52..0000000
--- a/app/controllers/admin/journal_paper_intros_controller.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-class Admin::JournalPaperIntrosController < Admin::PersonalPluginIntrosController
- def initialize
- super
- @app_type = 'journal_paper_intro'
- @app_type_name = 'journal_paper'
- @reback_name = 'JournalPaper'
- end
-end
diff --git a/app/controllers/admin/journal_paper_types_controller.rb b/app/controllers/admin/journal_paper_types_controller.rb
index b7144a6..0adeeac 100644
--- a/app/controllers/admin/journal_paper_types_controller.rb
+++ b/app/controllers/admin/journal_paper_types_controller.rb
@@ -1,50 +1,43 @@
class Admin::JournalPaperTypesController < OrbitMemberController
before_action :allow_admin_only
- before_action :set_journal_paper_type, only: [:edit, :update, :destroy]
-
- def initialize
- super
- @app_type = 'journal_paper_type'
- end
-
+
def new
- @journal_paper_type = JournalPaperType.new
+ @paper_type = JournalPaperType.new
+ @url = admin_journal_paper_types_path(@paper_type)
+ render :layout=>false
end
def create
- @journal_paper_type = JournalPaperType.new(journal_paper_type_attributes)
- respond_to do |format|
- if @journal_paper_type.save
- format.js { render 'create_writing_journal_setting' }
- end
- end
+ @paper_type = JournalPaperType.new(paper_type_params)
+ @paper_type.save
+ @paper_types = JournalPaperType.all
+ render :partial=>'index', :layout=>false
end
def edit
+ @paper_type = JournalPaperType.find(params[:id])
+ @url = admin_journal_paper_type_path(@paper_type)
+ render :layout=>false
end
def update
- respond_to do |format|
- if @journal_paper_type.update_attributes(journal_paper_type_attributes)
- format.js { render 'update_writing_journal_setting' }
- end
- end
+ @paper_type = JournalPaperType.find(params[:id])
+ @paper_type.update_attributes(paper_type_params)
+ @paper_type.save
+ @paper_types = JournalPaperType.all
+ render :partial=>'index', :layout=>false
end
def destroy
- @journal_paper_type.destroy
- respond_to do |format|
- format.js { render 'delete_journal_setting' }
- end
+ paper_type = JournalPaperType.find(params[:id])
+ paper_type.destroy
+ @paper_types = JournalPaperType.all
+ render :partial=>'index', :layout=>false
end
private
- def set_journal_paper_type
- @journal_paper_type = JournalPaperType.find(params[:id])
- end
-
- def journal_paper_type_attributes
+ def paper_type_params
params.require(:journal_paper_type).permit! rescue nil
end
end
diff --git a/app/controllers/admin/journal_papers_controller.rb b/app/controllers/admin/journal_papers_controller.rb
index e0ae30a..7166af5 100644
--- a/app/controllers/admin/journal_papers_controller.rb
+++ b/app/controllers/admin/journal_papers_controller.rb
@@ -2,177 +2,104 @@ class Admin::JournalPapersController < OrbitMemberController
include Admin::JournalPapersHelper
layout "member_plugin"
- before_action :set_journal_paper, only: [:show, :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 :find_journal_paper, only: [:destroy]
+ before_action :set_journal_paper, only: [:show, :edit , :update, :destroy]
before_action :set_plugin
+ before_action :get_settings,:only => [:new, :edit, :setting]
before_action :need_access_right
- before_action :allow_admin_only, :only => [:index, :writing_journal_setting]
+ before_action :allow_admin_only, :only => [:index, :setting]
def index
@writing_journals = JournalPaper.order_by(:year=>'desc').page(params[:page]).per(10)
- respond_to do |format|
- format.html # index.html.erb
- format.js { }
- format.xml { render :xml => @writing_journals }
- end
-
- end
-
- def show
- respond_to do |format|
- format.html # show.html.erb
- format.xml { render :xml => @journal_paper }
- end
end
def new
- @journal_paper = JournalPaper.new
@member = MemberProfile.find_by(:uid=>params['uid']) rescue nil
+ @journal_paper = JournalPaper.new
+
if params[:desktop]
render :layout => false
end
end
+ def create
+ @member = MemberProfile.find(journal_paper_params['member_profile_id']) rescue nil
+ @journal_paper = JournalPaper.new(journal_paper_params)
+ @journal_paper.save
+ if params[:desktop] == "true"
+ render json: {"data" => get_paper_list}.to_json
+ else
+ redirect_to params['referer_url']
+ end
+ end
+
def edit
@member = @journal_paper.member_profile
- if params[:desktop]
+ if params[:desktop]
render :layout => false
end
end
- def create
- @journal_paper = JournalPaper.new(journal_paper_attributes)
- respond_to do |format|
- if @journal_paper.save
- if params[:desktop] == "true"
- format.json { render json: get_paper_list }
- end
- format.html { redirect_to params['referer_url'] }
- format.json { render action: 'show', status: :created, location: @journal_paper }
- else
- format.html { render action: 'new' }
- format.json { render json: @journal_paper.errors, status: :unprocessable_entity }
- end
- end
- end
-
def update
- respond_to do |format|
- if @journal_paper.update_attributes(journal_paper_attributes)
- if params[:desktop] == "true"
- format.json { render json: get_paper_list }
- end
- format.html { redirect_to params['referer_url'] }
- # format.js { render 'toggle_enable' }
- format.json { head :no_content }
- else
- format.html { render action: "edit" }
- format.json { render json: @journal_paper.errors, status: :unprocessable_entity }
- end
+ @member = @journal_paper.member_profile
+ @journal_paper.update_attributes(journal_paper_params)
+ @journal_paper.save
+ if params[:desktop] == "true"
+ render json: {"data" => get_paper_list}.to_json
+ else
+ redirect_to params['referer_url']
end
end
def destroy
@journal_paper.destroy
- respond_to do |format|
- format.html { redirect_to(admin_journal_papers_url) }
+ respond_to do |format|
+ format.html { redirect_to(admin_journal_paper_url) }
# format.xml { head :ok }
format.js
format.json {render json: {"success" => true}}
end
end
- def delete
- end
-
- def writing_journal_setting
-
- @set_level_type = JournalLevel.new(display: 'List')
- @level_type_url = admin_journal_papers_path
-
- @set_author_type = JournalPaperAuthorType.new(display: 'List')
- @author_type_url = admin_journal_papers_path
-
- @set_paper_type = JournalPaperType.new(display: 'List')
- @paper_type_url = admin_journal_papers_path
- end
-
- def add_level
- @set_level_type = JournalLevel.new(display: 'List')
- @level_type_url = admin_journal_levels_path
- @set_level_type.id = params[:id]
-
- respond_to do |format|
- format.js
- end
- end
-
- def edit_level
- @set_level_type = JournalLevel.find(params[:journal_paper_id])
- @level_type_url = admin_journal_level_path(@set_level_type)
-
- respond_to do |format|
- format.js
- end
- end
-
- def add_author_type
- @set_author_type = JournalPaperAuthorType.new(display: 'List')
- @author_type_url = admin_journal_paper_author_types_path
- @set_author_type.id = params[:id]
-
- respond_to do |format|
- format.js
- end
- end
-
- def edit_author_type
- @set_author_type = JournalPaperAuthorType.find(params[:journal_paper_id])
- @author_type_url = admin_journal_paper_author_type_path(@set_author_type)
-
- respond_to do |format|
- format.js
- end
- end
-
- def add_paper_type
- @set_paper_type = JournalPaperType.new(:display => 'List')
- @paper_type_url = admin_journal_paper_types_path
- @set_paper_type.id = params[:id]
-
- respond_to do |format|
- format.js
- end
-
- end
-
- def edit_paper_type
- @set_paper_type = JournalPaperType.find(params[:journal_paper_id])
- @paper_type_url = admin_journal_paper_type_path(@set_paper_type)
-
- respond_to do |format|
- format.js
- end
- end
-
- def data_share
+ def toggle_hide
if params[:ids]
- @writing_journals = JournalPaper.any_in(_id: params[:ids])
+ @journal_papers = JournalPaper.any_in(_id: params[:ids])
- @writing_journals.each do |writing_journal|
- writing_journal.is_hidden = params[:disable]
- writing_journal.save
+ @journal_papers.each do |journal_paper|
+ journal_paper.is_hidden = params[:disable]
+ journal_paper.save
end
end
- respond_to do |format|
- format.html { redirect_to(admin_member_path(id: params[:member_profile_id],show_plugin_profile: "JournalPaper")) }
- format.json { render json: {"success"=>true}.to_json}
- end
+ render json: {"success"=>true}
+ end
+ def setting
+ end
+
+ def frontend_setting
+ @member = MemberProfile.find_by(:uid=>params['uid']) rescue nil
+ @intro = JournalPaperIntro.find_by(:member_profile_id=>@member.id) rescue nil
+ @intro = @intro.nil? ? JournalPaperIntro.new({:member_profile_id=>@member.id}) : @intro
+ end
+
+ def update_frontend_setting
+ @member = MemberProfile.find(intro_params['member_profile_id']) rescue nil
+ @intro = JournalPaperIntro.find_by(:member_profile_id=>@member.id) rescue nil
+ @intro = @intro.nil? ? JournalPaperIntro.new({:member_profile_id=>@member.id}) : @intro
+ @intro.update_attributes(intro_params)
+ @intro.save
+ redirect_to URI.encode('/admin/members/'+@member.to_param+'/JournalPaper')
+ end
+
+ def get_settings
+ @journal_levels = JournalLevel.all
+ @author_types = JournalPaperAuthorType.all
+ @paper_types = JournalPaperType.all
+ end
+
+ def set_plugin
+ @plugin = OrbitApp::Plugin::Registration.all.select{|plugin| plugin.app_name.eql? 'JournalPaper'}.first
end
private
@@ -186,29 +113,14 @@ class Admin::JournalPapersController < OrbitMemberController
uid = path[-2].split("-").last
uid = uid.split("?").first
end
- @journal_paper = JournalPaper.find_by(uid: uid)
+ @journal_paper = JournalPaper.find_by(:uid => uid) rescue JournalPaper.find(params[:id])
end
- def find_journal_paper
- @journal_paper = JournalPaper.find_by(id: params[:id])
+ def journal_paper_params
+ params.require(:journal_paper).permit! rescue nil
end
- def journal_paper_attributes
- params.require(:journal_paper).permit! rescue nil
+ def intro_params
+ params.require(:journal_paper_intro).permit! rescue nil
end
-
- def get_plugins
- @plugins = OrbitApp::Plugin::Registration.all rescue nil
- end
-
- def set_plugin
- @plugin = OrbitApp::Plugin::Registration.all.select{|plugin| plugin.app_name.eql? 'JournalPaper'}.first
- end
-
- def set_types
- @journal_levels = JournalLevel.all
- @author_types = JournalPaperAuthorType.all
- @paper_types = JournalPaperType.all
- end
-
end
diff --git a/app/controllers/journal_papers_controller.rb b/app/controllers/journal_papers_controller.rb
deleted file mode 100644
index cd2477c..0000000
--- a/app/controllers/journal_papers_controller.rb
+++ /dev/null
@@ -1,52 +0,0 @@
-class JournalPapersController < ApplicationController
- def index
- journal_papers = JournalPaper.where(:is_hidden=>false).order_by(:year=>'desc').page(OrbitHelper.params[:page_no]).per(OrbitHelper.page_data_count)
- journal_paper_list = journal_papers.collect do |journal_paper|
- {
- "year" => journal_paper.year,
- "paper_title" => journal_paper.create_link,
- "author" => journal_paper.authors,
- "link_to_show" => OrbitHelper.url_to_show(journal_paper.to_param)
- }
- end
- {
- "journal_papers" => journal_paper_list,
- "extras" => {
- "widget-title" => t("module_name.journal_paper"),
- "th_year" => t('personal_plugins.year'),
- "th_title" => t("personal_conference.paper_title"),
- "th_author" => t('personal_plugins.author')
- },
- "total_pages" => journal_papers.total_pages
- }
- end
-
- def show
- params = OrbitHelper.params
- plugin = JournalPaper.find_by(uid: params[:uid])
- fields_to_show = [
- "paper_title",
- "journal_title",
- "level_type",
- "paper_type",
- "author_name",
- "authors",
- "author_type",
- "year",
- "publication_date",
- "language",
- "vol_no",
- "issue_no",
- "form_to_start",
- "form_to_end",
- "total_pages",
- "isbn",
- "url",
- "associated_project",
- "note",
- "file"
- ]
-
- {"plugin_datas"=>plugin.get_plugin_data(fields_to_show)}
- end
-end
diff --git a/app/controllers/personal_journals_controller.rb b/app/controllers/personal_journals_controller.rb
new file mode 100644
index 0000000..fa0ee76
--- /dev/null
+++ b/app/controllers/personal_journals_controller.rb
@@ -0,0 +1,52 @@
+class PersonalJournalsController < ApplicationController
+ def index
+ journal_papers = JournalPaper.where(:is_hidden=>false).order_by(:year=>'desc').page(OrbitHelper.params[:page_no]).per(OrbitHelper.page_data_count)
+ journal_paper_list = journal_papers.collect do |journal_paper|
+ {
+ "year" => journal_paper.year,
+ "paper_title" => journal_paper.create_link,
+ "author" => journal_paper.authors,
+ "link_to_show" => OrbitHelper.url_to_show(journal_paper.to_param)
+ }
+ end
+ {
+ "journal_papers" => journal_paper_list,
+ "extras" => {
+ "widget-title" => t("module_name.journal_paper"),
+ "th_year" => t('personal_plugins.year'),
+ "th_title" => t("personal_conference.paper_title"),
+ "th_author" => t('personal_plugins.author')
+ },
+ "total_pages" => journal_papers.total_pages
+ }
+ end
+
+ def show
+ params = OrbitHelper.params
+ plugin = JournalPaper.where(:is_hidden=>false).find_by(uid: params[:uid])
+ fields_to_show = [
+ "year",
+ "author_name",
+ "authors",
+ "author_type",
+ "paper_title",
+ "journal_title",
+ "vol_no",
+ "issue_no",
+ "form_to_start",
+ "form_to_end",
+ "level_type",
+ "paper_type",
+ "total_pages",
+ "publication_date",
+ "isbn",
+ "abstract",
+ "language",
+ "url",
+ "associated_project",
+ "file"
+ ]
+
+ {"plugin_datas"=>plugin.get_plugin_data(fields_to_show)}
+ end
+end
diff --git a/app/helpers/admin/journal_levels_helper.rb b/app/helpers/admin/journal_levels_helper.rb
deleted file mode 100644
index 94b8fa6..0000000
--- a/app/helpers/admin/journal_levels_helper.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-module Admin::JournalLevelsHelper
-end
diff --git a/app/helpers/admin/journal_paper_author_types_helper.rb b/app/helpers/admin/journal_paper_author_types_helper.rb
deleted file mode 100644
index d3ca68e..0000000
--- a/app/helpers/admin/journal_paper_author_types_helper.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-module Admin::JournalPaperAuthorTypesHelper
-end
diff --git a/app/helpers/admin/journal_paper_intros_helper.rb b/app/helpers/admin/journal_paper_intros_helper.rb
deleted file mode 100644
index 3dc03bf..0000000
--- a/app/helpers/admin/journal_paper_intros_helper.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-module Admin::JournalPaperIntrosHelper
-end
diff --git a/app/helpers/admin/journal_paper_types_helper.rb b/app/helpers/admin/journal_paper_types_helper.rb
deleted file mode 100644
index bcb48da..0000000
--- a/app/helpers/admin/journal_paper_types_helper.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-module Admin::JournalPaperTypesHelper
-end
diff --git a/app/helpers/admin/journal_papers_helper.rb b/app/helpers/admin/journal_papers_helper.rb
index d3da186..3607785 100644
--- a/app/helpers/admin/journal_papers_helper.rb
+++ b/app/helpers/admin/journal_papers_helper.rb
@@ -7,30 +7,30 @@ module Admin::JournalPapersHelper
request.protocol+(request.host_with_port+journal_paper_page.url+'/'+journal_paper_object.to_param).gsub('//','/') rescue "/"
end
def get_paper_list
- user = current_user.nil? ? OrbitHelper.current_user : current_user
- user_profile = user.member_profile
- journals = JournalPaper.where(:member_profile_id => user_profile.id)
- journals = journals.collect do |j|
- files = j.journal_paper_files.collect do |jpf|
- {
- "title" => jpf.title,
- "description" => jpf.description,
- "link" => jpf.journal_file.url,
- "extension" => (jpf.journal_file.url.split(".").last rescue "")
- }
- end
-
+ user = current_user.nil? ? OrbitHelper.current_user : current_user
+ user_profile = user.member_profile
+ journals = JournalPaper.where(:member_profile_id => user_profile.id)
+ journals = journals.collect do |j|
+ files = j.journal_paper_files.collect do |jpf|
{
- "id" => j.id.to_s,
- "edit_url" => "/#{I18n.locale.to_s}/admin/journal_papers/#{j.to_param}/edit",
- "delete_url" => "/#{I18n.locale.to_s}/admin/journal_papers/#{j.id.to_s}",
- "paper_title" => j.paper_title,
- "journal_title" => j.journal_title,
- "keywords" => j.keywords,
- "abstract" => j.abstract,
- "files" => files
+ "title" => jpf.title,
+ "description" => jpf.description,
+ "link" => jpf.journal_file.url,
+ "extension" => (jpf.journal_file.url.split(".").last rescue "")
}
end
- journals
+
+ {
+ "id" => j.id.to_s,
+ "edit_url" => "/#{I18n.locale.to_s}/admin/members/#{user_profile.to_param}/journal_papers/#{j.to_param}/edit",
+ "delete_url" => "/#{I18n.locale.to_s}/admin/journal_papers/#{j.id.to_s}",
+ "paper_title" => j.paper_title,
+ "journal_title" => j.journal_title,
+ "keywords" => j.keywords,
+ "abstract" => j.abstract,
+ "files" => files
+ }
end
+ journals
+ end
end
diff --git a/app/helpers/journal_papers_helper.rb b/app/helpers/journal_papers_helper.rb
deleted file mode 100644
index 68f4404..0000000
--- a/app/helpers/journal_papers_helper.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-module JournalPapersHelper
-end
diff --git a/app/models/journal_level.rb b/app/models/journal_level.rb
index 070baf3..778fff2 100644
--- a/app/models/journal_level.rb
+++ b/app/models/journal_level.rb
@@ -1,9 +1,6 @@
class JournalLevel
include Mongoid::Document
include Mongoid::Timestamps
- include Mongoid::Attributes::Dynamic
-
- include OrbitCoreLib::ObjectDisable
field :key, type: String
field :title, type: String, localize: true
diff --git a/app/models/journal_paper.rb b/app/models/journal_paper.rb
index 09ba660..7051468 100644
--- a/app/models/journal_paper.rb
+++ b/app/models/journal_paper.rb
@@ -53,16 +53,17 @@ class JournalPaper
title << self.member_profile.name if self.member_profile_id.present?
title << (!self.authors.blank? ? self.authors : nil)
- if !self.publication_date.nil?
- pd = self.publication_date.strftime("%Y-%m-%d").split('-')
- title << pd[0]
- end
title << self.paper_title if self.paper_title.present?
title << self.journal_title if self.journal_title.present?
title << self.vol_no if (self.vol_no.present? && self.vol_no != "0")
title << self.issue_no if (self.issue_no.present? && self.issue_no != "0")
title << "pp"+self.form_to_start+"-"+self.form_to_end if (self.form_to_start.present? && self.form_to_start != "0")
title << ( !self.journal_levels.blank? ? "(#{self.journal_levels.collect{|x| x.title}.join(', ')})" : nil)
+ # if !self.publication_date.nil?
+ # pd = self.publication_date.strftime("%Y-%m-%d").split('-')
+ # title << pd[0]
+ # end
+ title << self.year
title.join(', ').gsub(', ,',',')
end
@@ -125,6 +126,8 @@ class JournalPaper
value = self.publication_date.to_date.strftime("%Y-%m-%d") rescue ""
when "language"
value = I18n.t(self.language) rescue ""
+ when "abstract"
+ value = nl2br(self.abstract)
when "file"
files = []
self.journal_paper_files.each do |file|
diff --git a/app/models/journal_paper_author_type.rb b/app/models/journal_paper_author_type.rb
index 97672dc..f14392f 100644
--- a/app/models/journal_paper_author_type.rb
+++ b/app/models/journal_paper_author_type.rb
@@ -1,8 +1,6 @@
class JournalPaperAuthorType
include Mongoid::Document
include Mongoid::Timestamps
- include Mongoid::Attributes::Dynamic
- include OrbitCoreLib::ObjectDisable
field :key, type: String
field :title, type: String, localize: true
diff --git a/app/models/journal_paper_type.rb b/app/models/journal_paper_type.rb
index b34bcbc..1f29c4f 100644
--- a/app/models/journal_paper_type.rb
+++ b/app/models/journal_paper_type.rb
@@ -1,8 +1,6 @@
class JournalPaperType
include Mongoid::Document
include Mongoid::Timestamps
- include Mongoid::Attributes::Dynamic
- include OrbitCoreLib::ObjectDisable
field :key, type: String
field :title, type: String, localize: true
diff --git a/app/views/admin/journal_levels/_form.html.erb b/app/views/admin/journal_levels/_form.html.erb
new file mode 100644
index 0000000..4e12886
--- /dev/null
+++ b/app/views/admin/journal_levels/_form.html.erb
@@ -0,0 +1,24 @@
+<%= form_for(@paper_level, :html =>{:class=>"form-horizontal", :style=>"margin: 0;"}, :remote => true, :url => @url ) do |f| %>
+
+
+
+ <%= f.fields_for :title_translations do |f| %>
+ <% @site_in_use_locales.each do |locale| %>
+
+ <%= label_tag t(locale), t(locale), :class => 'control-label' %>
+
+ <%= f.text_field locale, :value => (@paper_level.title_translations[locale] rescue nil) %>
+
+
+ <% end %>
+ <% end %>
+
+
+
+<% end %>
\ No newline at end of file
diff --git a/app/views/admin/journal_levels/_index.js.erb b/app/views/admin/journal_levels/_index.js.erb
new file mode 100644
index 0000000..63a5105
--- /dev/null
+++ b/app/views/admin/journal_levels/_index.js.erb
@@ -0,0 +1,2 @@
+$('#paper_levels tbody').html("<%= j render :partial => '/admin/journal_papers/list_level_type', :collection => @paper_levels %>");
+$('#paper_level_modal').modal('hide');
\ No newline at end of file
diff --git a/app/views/admin/journal_levels/create_writing_journal_setting.js.erb b/app/views/admin/journal_levels/create_writing_journal_setting.js.erb
deleted file mode 100644
index 319c3a8..0000000
--- a/app/views/admin/journal_levels/create_writing_journal_setting.js.erb
+++ /dev/null
@@ -1,2 +0,0 @@
-$("#myModal1").modal('hide');
-$('<%= j render :partial => 'admin/journal_papers/list_level_type', :collection => [@journal_level] %>').appendTo('#level_types').hide().fadeIn();
\ No newline at end of file
diff --git a/app/views/admin/journal_levels/delete_journal_setting.js.erb b/app/views/admin/journal_levels/delete_journal_setting.js.erb
deleted file mode 100644
index eb842a2..0000000
--- a/app/views/admin/journal_levels/delete_journal_setting.js.erb
+++ /dev/null
@@ -1,3 +0,0 @@
-$('.delete_level').bind('ajax:success', function() {
- $(this).closest('tr').fadeOut();
-});
\ No newline at end of file
diff --git a/app/views/admin/journal_levels/edit.js.erb b/app/views/admin/journal_levels/edit.js.erb
new file mode 100644
index 0000000..baee16d
--- /dev/null
+++ b/app/views/admin/journal_levels/edit.js.erb
@@ -0,0 +1 @@
+$('#paper_level_modal').html("<%= j render 'form' %>");
\ No newline at end of file
diff --git a/app/views/admin/journal_levels/new.js.erb b/app/views/admin/journal_levels/new.js.erb
new file mode 100644
index 0000000..baee16d
--- /dev/null
+++ b/app/views/admin/journal_levels/new.js.erb
@@ -0,0 +1 @@
+$('#paper_level_modal').html("<%= j render 'form' %>");
\ No newline at end of file
diff --git a/app/views/admin/journal_levels/update_writing_journal_setting.js.erb b/app/views/admin/journal_levels/update_writing_journal_setting.js.erb
deleted file mode 100644
index 5fcf715..0000000
--- a/app/views/admin/journal_levels/update_writing_journal_setting.js.erb
+++ /dev/null
@@ -1,2 +0,0 @@
-$("#myModal1").modal('hide');
-$("#<%= dom_id @journal_level %>").replaceWith("<%= j render :partial => 'admin/journal_papers/list_level_type', :collection => [@journal_level] %>");
\ No newline at end of file
diff --git a/app/views/admin/journal_paper_author_types/_form.html.erb b/app/views/admin/journal_paper_author_types/_form.html.erb
new file mode 100644
index 0000000..08b414e
--- /dev/null
+++ b/app/views/admin/journal_paper_author_types/_form.html.erb
@@ -0,0 +1,24 @@
+<%= form_for(@author_type, :html =>{:class=>"form-horizontal", :style=>"margin: 0;"}, :remote => true, :url => @url ) do |f| %>
+
+
+
+ <%= f.fields_for :title_translations do |f| %>
+ <% @site_in_use_locales.each do |locale| %>
+
+ <%= label_tag t(locale), t(locale), :class => 'control-label' %>
+
+ <%= f.text_field locale, :value => (@author_type.title_translations[locale] rescue nil) %>
+
+
+ <% end %>
+ <% end %>
+
+
+
+<% end %>
\ No newline at end of file
diff --git a/app/views/admin/journal_paper_author_types/_list.js.erb b/app/views/admin/journal_paper_author_types/_list.js.erb
new file mode 100644
index 0000000..5c83704
--- /dev/null
+++ b/app/views/admin/journal_paper_author_types/_list.js.erb
@@ -0,0 +1,2 @@
+$('#author_types tbody').html("<%= j render :partial => '/admin/journal_papers/list_author_type', :collection => @author_types %>");
+$('#author_type_modal').modal('hide');
\ No newline at end of file
diff --git a/app/views/admin/journal_paper_author_types/create_writing_journal_setting.js.erb b/app/views/admin/journal_paper_author_types/create_writing_journal_setting.js.erb
deleted file mode 100644
index 5dba121..0000000
--- a/app/views/admin/journal_paper_author_types/create_writing_journal_setting.js.erb
+++ /dev/null
@@ -1,2 +0,0 @@
-$("#myModal2").modal('hide');
-$('<%= j render :partial => 'admin/journal_papers/list_author_type', :collection => [@journal_author_type] %>').appendTo('#author_types').hide().fadeIn();
\ No newline at end of file
diff --git a/app/views/admin/journal_paper_author_types/delete_journal_setting.js.erb b/app/views/admin/journal_paper_author_types/delete_journal_setting.js.erb
deleted file mode 100644
index 1958000..0000000
--- a/app/views/admin/journal_paper_author_types/delete_journal_setting.js.erb
+++ /dev/null
@@ -1,3 +0,0 @@
-$('.delete_author').bind('ajax:success', function() {
- $(this).closest('tr').fadeOut();
-});
\ No newline at end of file
diff --git a/app/views/admin/journal_paper_author_types/edit.js.erb b/app/views/admin/journal_paper_author_types/edit.js.erb
new file mode 100644
index 0000000..3ac7380
--- /dev/null
+++ b/app/views/admin/journal_paper_author_types/edit.js.erb
@@ -0,0 +1 @@
+$('#author_type_modal').html("<%= j render 'form' %>");
\ No newline at end of file
diff --git a/app/views/admin/journal_paper_author_types/new.js.erb b/app/views/admin/journal_paper_author_types/new.js.erb
new file mode 100644
index 0000000..3ac7380
--- /dev/null
+++ b/app/views/admin/journal_paper_author_types/new.js.erb
@@ -0,0 +1 @@
+$('#author_type_modal').html("<%= j render 'form' %>");
\ No newline at end of file
diff --git a/app/views/admin/journal_paper_author_types/update_writing_journal_setting.js.erb b/app/views/admin/journal_paper_author_types/update_writing_journal_setting.js.erb
deleted file mode 100644
index 4f60ed1..0000000
--- a/app/views/admin/journal_paper_author_types/update_writing_journal_setting.js.erb
+++ /dev/null
@@ -1,2 +0,0 @@
-$("#myModal2").modal('hide');
-$("#<%= dom_id @journal_author_type %>").replaceWith("<%= j render :partial => 'admin/journal_papers/list_author_type', :collection => [@journal_author_type] %>");
\ No newline at end of file
diff --git a/app/views/admin/journal_paper_types/_form.html.erb b/app/views/admin/journal_paper_types/_form.html.erb
new file mode 100644
index 0000000..a69e8c5
--- /dev/null
+++ b/app/views/admin/journal_paper_types/_form.html.erb
@@ -0,0 +1,24 @@
+<%= form_for(@paper_type, :html =>{:class=>"form-horizontal", :style=>"margin: 0;"}, :remote => true, :url => @url ) do |f| %>
+
+
+
+ <%= f.fields_for :title_translations do |f| %>
+ <% @site_in_use_locales.each do |locale| %>
+
+ <%= label_tag t(locale), t(locale), :class => 'control-label' %>
+
+ <%= f.text_field locale, :value => (@paper_type.title_translations[locale] rescue nil) %>
+
+
+ <% end %>
+ <% end %>
+
+
+
+<% end %>
\ No newline at end of file
diff --git a/app/views/admin/journal_paper_types/_index.js.erb b/app/views/admin/journal_paper_types/_index.js.erb
new file mode 100644
index 0000000..0362d31
--- /dev/null
+++ b/app/views/admin/journal_paper_types/_index.js.erb
@@ -0,0 +1,2 @@
+$('#paper_types tbody').html("<%= j render :partial => '/admin/journal_papers/list_paper_type', :collection => @paper_types %>");
+$('#paper_type_modal').modal('hide');
\ No newline at end of file
diff --git a/app/views/admin/journal_paper_types/create_writing_journal_setting.js.erb b/app/views/admin/journal_paper_types/create_writing_journal_setting.js.erb
deleted file mode 100644
index d3aa9c4..0000000
--- a/app/views/admin/journal_paper_types/create_writing_journal_setting.js.erb
+++ /dev/null
@@ -1,2 +0,0 @@
-$("#myModal3").modal('hide');
-$('<%= j render :partial => 'admin/journal_papers/list_paper_type', :collection => [@journal_paper_type] %>').appendTo('#paper_types').hide().fadeIn();
\ No newline at end of file
diff --git a/app/views/admin/journal_paper_types/delete_journal_setting.js.erb b/app/views/admin/journal_paper_types/delete_journal_setting.js.erb
deleted file mode 100644
index a035d69..0000000
--- a/app/views/admin/journal_paper_types/delete_journal_setting.js.erb
+++ /dev/null
@@ -1,3 +0,0 @@
-$('.delete_paper').bind('ajax:success', function() {
- $(this).closest('tr').fadeOut();
-});
\ No newline at end of file
diff --git a/app/views/admin/journal_paper_types/edit.js.erb b/app/views/admin/journal_paper_types/edit.js.erb
new file mode 100644
index 0000000..e738913
--- /dev/null
+++ b/app/views/admin/journal_paper_types/edit.js.erb
@@ -0,0 +1 @@
+$('#paper_type_modal').html("<%= j render 'form' %>");
\ No newline at end of file
diff --git a/app/views/admin/journal_paper_types/new.js.erb b/app/views/admin/journal_paper_types/new.js.erb
new file mode 100644
index 0000000..e738913
--- /dev/null
+++ b/app/views/admin/journal_paper_types/new.js.erb
@@ -0,0 +1 @@
+$('#paper_type_modal').html("<%= j render 'form' %>");
\ No newline at end of file
diff --git a/app/views/admin/journal_paper_types/update_writing_journal_setting.js.erb b/app/views/admin/journal_paper_types/update_writing_journal_setting.js.erb
deleted file mode 100644
index 58128aa..0000000
--- a/app/views/admin/journal_paper_types/update_writing_journal_setting.js.erb
+++ /dev/null
@@ -1,2 +0,0 @@
-$("#myModal3").modal('hide');
-$("#<%= dom_id @journal_paper_type %>").replaceWith("<%= j render :partial => 'admin/journal_papers/list_paper_type', :collection => [@journal_paper_type] %>");
\ No newline at end of file
diff --git a/app/views/admin/journal_papers/_author_autocomplete.html.erb b/app/views/admin/journal_papers/_author_autocomplete.html.erb
deleted file mode 100644
index 1c0226c..0000000
--- a/app/views/admin/journal_papers/_author_autocomplete.html.erb
+++ /dev/null
@@ -1,33 +0,0 @@
-
\ No newline at end of file
diff --git a/app/views/admin/journal_papers/_author_type_qe.html.erb b/app/views/admin/journal_papers/_author_type_qe.html.erb
deleted file mode 100644
index 5ad6a8f..0000000
--- a/app/views/admin/journal_papers/_author_type_qe.html.erb
+++ /dev/null
@@ -1,33 +0,0 @@
-<% # encoding: utf-8 %>
-
-<%= form_for(@set_author_type, :remote => true, :url => @author_type_url ) do |f| %>
-
-
-
-
-
-
Key
-
- <%= f.text_field :key %>
-
-
- <%= f.fields_for :title_translations do |f| %>
- <% @site_in_use_locales.each do |locale| %>
-
- <%= label_tag "link-#{locale}", "Name-#{t(locale).to_s}", :class => 'control-label' %>
-
- <%= f.text_field locale, :class => 'control-label', :value => (@set_author_type.title_translations[locale] rescue nil) %>
-
-
- <% end %>
- <% end %>
-
-
-<% end %>
\ No newline at end of file
diff --git a/app/views/admin/journal_papers/_filter.html.erb b/app/views/admin/journal_papers/_filter.html.erb
deleted file mode 100644
index ad02d4d..0000000
--- a/app/views/admin/journal_papers/_filter.html.erb
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-<% content_for :page_specific_javascript do %>
- <%= javascript_include_tag "sort_header" %>
-<% end %>
\ No newline at end of file
diff --git a/app/views/admin/journal_papers/_form.html.erb b/app/views/admin/journal_papers/_form.html.erb
index 91dd14f..dcdc54f 100644
--- a/app/views/admin/journal_papers/_form.html.erb
+++ b/app/views/admin/journal_papers/_form.html.erb
@@ -3,6 +3,7 @@
<%= stylesheet_link_tag "lib/main-forms" %>
<%= stylesheet_link_tag "lib/fileupload" %>
<%= stylesheet_link_tag "lib/main-list" %>
+ <%= stylesheet_link_tag "lib/main-form-col2" %>
<% end %>
<% content_for :page_specific_javascript do %>
<%= javascript_include_tag "lib/bootstrap-fileupload" %>
@@ -19,201 +20,6 @@
+
+
+
+
+
+
+
+
+
+
+
<%= t("personal_plugins.author") %>
+
+ <%= @member.name rescue ''%>
+ <%= f.hidden_field :member_profile_id, :value => @member.id if !@member.nil? %>
+
+
+
+
+
+
<%= t("personal_journal.year") %>
+
+ <%= select_year((@journal_paper.year ? @journal_paper.year.to_i : DateTime.now.year), {:start_year => DateTime.now.year, :end_year => 1930}, {:name => 'journal_paper[year]', :class => "span1"} ) %>
+
+
+
+
+
+
<%= t("personal_journal.language") %>
+
+
+ <% @site_in_use_locales.each do |locale| %>
+ ><%= t(locale) %>
+ <% end %>
+
+
+
+
+
+
+
<%= t("personal_journal.vol_no") %>
+
+ <%= f.text_field :vol_no %>
+
+
+
+
+
+
<%= t("personal_journal.issue_no") %>
+
+ <%= f.text_field :issue_no %>
+
+
+
+
+
+
<%= t("personal_journal.form_to") %>
+
+ <%= f.text_field :form_to_start, :class=>'span1' %> ~ <%= f.text_field :form_to_end, :class=>'span1' %>
+
+
+
+
+
+
<%= t("personal_journal.total_pages") %>
+
+ <%= f.text_field :total_pages %>
+
+
+
+
+
+
<%= t("personal_journal.level_type") %>
+
+ <% @journal_levels.each do |level_type| %>
+ <%= content_tag :label,:class => "checkbox inline" do -%>
+ <%= check_box_tag 'journal_paper[journal_level_ids][]', level_type.id, @journal_paper.journal_level_ids.include?(level_type.id)%>
+ <%= level_type.title %>
+ <%= hidden_field_tag 'journal_paper[journal_level_ids][]', '' %>
+ <% end %>
+ <% end %>
+
+
+
+
+
+
<%= t("personal_journal.paper_type") %>
+
+ <%= f.select :journal_paper_type_id, @paper_types.collect {|t| [ t.title, t.id ]}, :class => "span3" %>
+
+
+
+
+
+
<%= t("personal_journal.author_type") %>
+
+ <% @author_types.each do |author_type| %>
+ <%= content_tag :label,:class => "checkbox inline" do -%>
+ <%= check_box_tag 'journal_paper[journal_paper_author_type_ids][]', author_type.id, @journal_paper.journal_paper_author_type_ids.include?(author_type.id)%>
+ <%= author_type.title %>
+ <% end %>
+ <% end %>
+
+
+
+
+
+
<%= t("personal_journal.number_of_authors") %>
+
+ <%= f.text_field :number_of_authors, :class=>'span1' %>
+
+
+
+
+
+
<%= t("personal_journal.isbn") %>
+
+ <%= f.text_field :isbn %>
+
+
+
+
+
+
<%= t("personal_journal.publication_date") %>
+
+ <%= f.datetime_picker :publication_date, :no_label => true, :format=>"yyyy/MM/dd", :placeholder=>"YYYY/MM/DD" %>
+
+
+
+
+
+
<%= t("personal_journal.url") %>
+
+ <%= f.text_field :url , :class => "span6" %>
+
+
+
+
+
+
<%= t("personal_journal.keywords") %>
+
+ <%= f.text_field :keywords %>
+
+
+
+
+
+
<%= t("personal_journal.abstract") %>
+
+ <%= f.text_area :abstract, rows: 2, class: "input-block-level" %>
+
+
+
+
+
+
<%= t("personal_journal.note") %>
+
+ <%= f.text_area :note, rows: 2, class: "input-block-level" %>
+
+
+
+
+
+
<%= t("personal_journal.associated_project") %>
+
+ <%= f.text_field :associated_project %>
+
+
+
+
+
+
+
+
+
+
+
<%= t(:status) %>
+
+
+ <%= f.check_box :is_hidden %> <%= t(:hide) %>
+
+
+
+
+
+
+
+
diff --git a/app/views/admin/journal_papers/_level_type_qe.html.erb b/app/views/admin/journal_papers/_level_type_qe.html.erb
deleted file mode 100644
index 22704c9..0000000
--- a/app/views/admin/journal_papers/_level_type_qe.html.erb
+++ /dev/null
@@ -1,34 +0,0 @@
-<% # encoding: utf-8 %>
-<%= form_for(@set_level_type, remote: true, url: @level_type_url) do |f| %>
-
-
-
-
-
-
Key
-
- <%= f.text_field :key %>
-
-
- <%= f.fields_for :title_translations do |f| %>
- <% @site_in_use_locales.each do |locale| %>
-
-
- <%= label_tag "link-#{locale}", "Name-#{t(locale).to_s}", :class => 'control-label' %>
-
- <%= f.text_field locale, :class => 'control-label', :value => (@set_level_type.title_translations[locale] rescue nil) %>
-
-
- <% end %>
- <% end %>
-
-
-<% end %>
-
\ No newline at end of file
diff --git a/app/views/admin/journal_papers/_list_author_type.html.erb b/app/views/admin/journal_papers/_list_author_type.html.erb
index 2f09ea0..41c6bbe 100644
--- a/app/views/admin/journal_papers/_list_author_type.html.erb
+++ b/app/views/admin/journal_papers/_list_author_type.html.erb
@@ -1,11 +1,10 @@
<% # encoding: utf-8 %>
-
- <%= list_author_type.title %>
-
-
- <%= t('edit')%>
- <%= link_to 'Delete',
- polymorphic_path([:admin, list_author_type]), data: { confirm: t('sure?') }, method: :delete, remote:true, class: "delete_author archive_toggle action" %>
-
-
\ No newline at end of file
+
+ <%= list_author_type.title %>
+
+
+ <%= t(:edit) %>
+ <%= link_to t(:delete_), admin_journal_paper_author_type_path(list_author_type), "data-confirm" => t('sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %>
+
+
diff --git a/app/views/admin/journal_papers/_list_level_type.html.erb b/app/views/admin/journal_papers/_list_level_type.html.erb
index c649db8..9b7aebe 100644
--- a/app/views/admin/journal_papers/_list_level_type.html.erb
+++ b/app/views/admin/journal_papers/_list_level_type.html.erb
@@ -1,11 +1,10 @@
<% # encoding: utf-8 %>
-
- <%= list_level_type.title %>
-
-
- <%= t('edit')%>
- <%= link_to 'Delete',
- polymorphic_path([:admin, list_level_type]), data: { confirm: t('sure?') }, method: :delete, remote: true, class: "delete_level archive_toggle action" %>
-
-
\ No newline at end of file
+
+ <%= list_level_type.title %>
+
+
+ <%= t(:edit) %>
+ <%= link_to t(:delete_), admin_journal_level_path(list_level_type), "data-confirm" => t('sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %>
+
+
\ No newline at end of file
diff --git a/app/views/admin/journal_papers/_list_paper_type.html.erb b/app/views/admin/journal_papers/_list_paper_type.html.erb
index ace5d16..efcc718 100644
--- a/app/views/admin/journal_papers/_list_paper_type.html.erb
+++ b/app/views/admin/journal_papers/_list_paper_type.html.erb
@@ -1,11 +1,10 @@
<% # encoding: utf-8 %>
-
- <%= list_paper_type.title %>
-
-
- <%= t('edit')%>
- <%= link_to 'Delete',
- polymorphic_path([:admin, list_paper_type]), data: { confirm: t('sure?') }, method: :delete, remote: true,class: "delete_paper archive_toggle action" %>
-
-
\ No newline at end of file
+
+ <%= list_paper_type.title %>
+
+
+ <%= t(:edit) %>
+ <%= link_to t(:delete_), admin_journal_paper_type_path(list_paper_type), "data-confirm" => t('sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %>
+
+
\ No newline at end of file
diff --git a/app/views/admin/journal_papers/_paper_type_qe.html.erb b/app/views/admin/journal_papers/_paper_type_qe.html.erb
deleted file mode 100644
index 9f86af0..0000000
--- a/app/views/admin/journal_papers/_paper_type_qe.html.erb
+++ /dev/null
@@ -1,29 +0,0 @@
-<% # encoding: utf-8 %>
-
-<%= form_for(@set_paper_type, remote: true, url: @paper_type_url ) do |f| %>
-
-
-
-
-
-
Key
-
- <%= f.text_field :key %>
-
-
-
-
Title
-
- <%= f.text_field :title %>
-
-
-
-<% end %>
-
\ No newline at end of file
diff --git a/app/views/admin/journal_papers/_sort_headers.html.erb b/app/views/admin/journal_papers/_sort_headers.html.erb
deleted file mode 100644
index e69de29..0000000
diff --git a/app/views/admin/journal_papers/_writing_journal.html.erb b/app/views/admin/journal_papers/_writing_journal.html.erb
index a365844..b348310 100644
--- a/app/views/admin/journal_papers/_writing_journal.html.erb
+++ b/app/views/admin/journal_papers/_writing_journal.html.erb
@@ -10,6 +10,6 @@
-
<%= writing_journal.authors%>
+
<%= writing_journal.member_profile.name rescue "" %>
<% end %>
\ No newline at end of file
diff --git a/app/views/admin/journal_papers/add_author_type.js.erb b/app/views/admin/journal_papers/add_author_type.js.erb
deleted file mode 100644
index d94a00e..0000000
--- a/app/views/admin/journal_papers/add_author_type.js.erb
+++ /dev/null
@@ -1 +0,0 @@
-$("#myModal2").html("<%= j render "author_type_qe" %>");
\ No newline at end of file
diff --git a/app/views/admin/journal_papers/add_level.js.erb b/app/views/admin/journal_papers/add_level.js.erb
deleted file mode 100644
index 6c61ff4..0000000
--- a/app/views/admin/journal_papers/add_level.js.erb
+++ /dev/null
@@ -1 +0,0 @@
-$("#myModal1").html("<%= j render "level_type_qe" %>");
\ No newline at end of file
diff --git a/app/views/admin/journal_papers/add_paper_type.js.erb b/app/views/admin/journal_papers/add_paper_type.js.erb
deleted file mode 100644
index f7c4cc9..0000000
--- a/app/views/admin/journal_papers/add_paper_type.js.erb
+++ /dev/null
@@ -1 +0,0 @@
-$("#myModal3").html("<%= j render "paper_type_qe" %>");
\ No newline at end of file
diff --git a/app/views/admin/journal_papers/create_writing_journal_setting.js.erb b/app/views/admin/journal_papers/create_writing_journal_setting.js.erb
deleted file mode 100644
index 12ef414..0000000
--- a/app/views/admin/journal_papers/create_writing_journal_setting.js.erb
+++ /dev/null
@@ -1,15 +0,0 @@
-
-<% if !@journal_level_type.blank? %>
-$("#myModal1").modal('hide');
-$('<%= j render :partial => 'list_level_type', :collection => [@journal_level_type] %>').appendTo('#level_types').hide().fadeIn();
-<% end %>
-
-<% if !@journal_author_type.blank? %>
-$("#myModal2").modal('hide');
-$('<%= j render :partial => 'list_author_type', :collection => [@journal_author_type] %>').appendTo('#author_types').hide().fadeIn();
-<% end %>
-
-<% if !@journal_paper_type.blank? %>
-$("#myModal3").modal('hide');
-$('<%= j render :partial => 'list_paper_type', :collection => [@journal_paper_type] %>').appendTo('#paper_types').hide().fadeIn();
-<% end %>
\ No newline at end of file
diff --git a/app/views/admin/journal_papers/edit_author_type.js.erb b/app/views/admin/journal_papers/edit_author_type.js.erb
deleted file mode 100644
index d94a00e..0000000
--- a/app/views/admin/journal_papers/edit_author_type.js.erb
+++ /dev/null
@@ -1 +0,0 @@
-$("#myModal2").html("<%= j render "author_type_qe" %>");
\ No newline at end of file
diff --git a/app/views/admin/journal_papers/edit_level.js.erb b/app/views/admin/journal_papers/edit_level.js.erb
deleted file mode 100644
index 6c61ff4..0000000
--- a/app/views/admin/journal_papers/edit_level.js.erb
+++ /dev/null
@@ -1 +0,0 @@
-$("#myModal1").html("<%= j render "level_type_qe" %>");
\ No newline at end of file
diff --git a/app/views/admin/journal_papers/edit_paper_type.js.erb b/app/views/admin/journal_papers/edit_paper_type.js.erb
deleted file mode 100644
index c9a4634..0000000
--- a/app/views/admin/journal_papers/edit_paper_type.js.erb
+++ /dev/null
@@ -1 +0,0 @@
-$("#myModal3").html("<%= j render "paper_type_qe" %>");
diff --git a/app/views/admin/journal_papers/frontend_setting.html.erb b/app/views/admin/journal_papers/frontend_setting.html.erb
new file mode 100644
index 0000000..629f865
--- /dev/null
+++ b/app/views/admin/journal_papers/frontend_setting.html.erb
@@ -0,0 +1,93 @@
+<% content_for :page_specific_css do %>
+ <%= stylesheet_link_tag "lib/main-forms" %>
+ <%= stylesheet_link_tag "lib/main-list" %>
+<% end %>
+
+<%= form_for(:journal_paper_intro, :url => update_frontend_setting_admin_journal_papers_path, :method => "post", html: {class: "form-horizontal main-forms previewable"} ) do |f| %>
+
+
+
+
+
+
+ <%= f.hidden_field :user_id, :value => params[:user_id] if !params[:user_id].blank? %>
+ <%= f.submit t('submit'), class: 'btn btn-primary' %>
+ <%= link_to t('cancel'), get_go_back, :class=>"btn" %>
+
+
+<% end %>
\ No newline at end of file
diff --git a/app/views/admin/journal_papers/index.html.erb b/app/views/admin/journal_papers/index.html.erb
index 0d05fc8..f15c993 100644
--- a/app/views/admin/journal_papers/index.html.erb
+++ b/app/views/admin/journal_papers/index.html.erb
@@ -3,7 +3,7 @@
<%= t('personal_journal.year') %>
<%= t('module_name.journal_paper') %>
- <%= t('personal_journal.authors') %>
+ <%= t("personal_plugins.author") %>
diff --git a/app/views/admin/journal_papers/level_type_quick_add.js.erb b/app/views/admin/journal_papers/level_type_quick_add.js.erb
deleted file mode 100644
index 6c61ff4..0000000
--- a/app/views/admin/journal_papers/level_type_quick_add.js.erb
+++ /dev/null
@@ -1 +0,0 @@
-$("#myModal1").html("<%= j render "level_type_qe" %>");
\ No newline at end of file
diff --git a/app/views/admin/journal_papers/setting.html.erb b/app/views/admin/journal_papers/setting.html.erb
new file mode 100644
index 0000000..af52d42
--- /dev/null
+++ b/app/views/admin/journal_papers/setting.html.erb
@@ -0,0 +1,116 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/admin/journal_papers/update_writing_journal_setting.js.erb b/app/views/admin/journal_papers/update_writing_journal_setting.js.erb
deleted file mode 100644
index d6332f1..0000000
--- a/app/views/admin/journal_papers/update_writing_journal_setting.js.erb
+++ /dev/null
@@ -1,14 +0,0 @@
-<% if !@journal_level_type.blank? %>
-$("#myModal1").modal('hide');
-$("#<%= dom_id @journal_level_type %>").replaceWith("<%= j render :partial => 'list_level_type', :collection => [@journal_level_type] %>");
-<% end %>
-
-<% if !@journal_author_type.blank? %>
-$("#myModal2").modal('hide');
-$("#<%= dom_id @journal_author_type %>").replaceWith("<%= j render :partial => 'list_author_type', :collection => [@journal_author_type] %>");
-<% end %>
-
-<% if !@journal_paper_type.blank? %>
-$("#myModal3").modal('hide');
-$("#<%= dom_id @journal_paper_type %>").replaceWith("<%= j render :partial => 'list_paper_type', :collection => [@journal_paper_type] %>");
-<% end %>
\ No newline at end of file
diff --git a/app/views/admin/journal_papers/writing_journal_setting.html.erb b/app/views/admin/journal_papers/writing_journal_setting.html.erb
deleted file mode 100644
index 6babb86..0000000
--- a/app/views/admin/journal_papers/writing_journal_setting.html.erb
+++ /dev/null
@@ -1,131 +0,0 @@
-<% # encoding: utf-8 %>
-
-
-
-
-
-
- <%= render "level_type_qe" %>
-
-
-
-
-
- <%= render "author_type_qe" %>
-
-
-
-
-
- <%= render "paper_type_qe" %>
-
-
-
-
\ No newline at end of file
diff --git a/app/views/journal_papers/index.html.erb b/app/views/personal_journals/index.html.erb
similarity index 100%
rename from app/views/journal_papers/index.html.erb
rename to app/views/personal_journals/index.html.erb
diff --git a/app/views/journal_papers/show.html.erb b/app/views/personal_journals/show.html.erb
similarity index 100%
rename from app/views/journal_papers/show.html.erb
rename to app/views/personal_journals/show.html.erb
diff --git a/app/views/plugin/journal_paper/_profile.html.erb b/app/views/plugin/personal_journal/_profile.html.erb
similarity index 68%
rename from app/views/plugin/journal_paper/_profile.html.erb
rename to app/views/plugin/personal_journal/_profile.html.erb
index 3925104..d818f0d 100644
--- a/app/views/plugin/journal_paper/_profile.html.erb
+++ b/app/views/plugin/personal_journal/_profile.html.erb
@@ -14,12 +14,12 @@
%>
<% if has_access? %>
-
-
- <%= link_to('Hide', '#', :class => "btn btn-mini list-active-btn disabled", "data-check-action" => "list-be-hide", :rel => data_share_admin_journal_papers_path(member_profile_id: params[:id], disable: 'true') ) %>
- <%= link_to('Show', '#', :class => "btn btn-mini list-active-btn disabled", "data-check-action" => "list-be-show", :rel => data_share_admin_journal_papers_path(member_profile_id: params[:id], disable: 'false') ) %>
+
+
+ <%= link_to('Hide', '#', :class => "btn btn-mini list-active-btn disabled", "data-check-action" => "list-be-hide", :rel => toggle_hide_admin_journal_papers_path(member_profile_id: params[:id], disable: 'true') ) %>
+ <%= link_to('Show', '#', :class => "btn btn-mini list-active-btn disabled", "data-check-action" => "list-be-show", :rel => toggle_hide_admin_journal_papers_path(member_profile_id: params[:id], disable: 'false') ) %>
+
-
<% end -%>
@@ -47,7 +47,7 @@
<% end -%>
<%= writing_journal.year %>
- <%= link_to writing_journal.create_link, page_for_journal_paper(writing_journal), target: "blank"%>
+ <%= link_to writing_journal.create_link, OrbitHelper.url_to_plugin_show(writing_journal.to_param,'personal_journal'), target: "blank"%>
<% if has_access? %>
@@ -66,19 +66,18 @@
-<% if has_access? %>
-
-
- <%= link_to content_tag(:i, nil, :class => 'icon-edit') +' '+ t('setting'),admin_journal_paper_intros_path(member_profile_id: @member.id), :class => 'btn btn-primary' %>
-
- <%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('new_'), '/admin/members/'+@member.to_param+'/journal_papers/new', :class => 'btn btn-primary' %>
-
+ <% if has_access? %>
+
+ <%= link_to content_tag(:i, nil, :class => 'icon-edit') +' '+ t('setting'),'/admin/members/'+@member.to_param+'/journal_papers/frontend_setting', :class => 'btn btn-primary' %>
+ <%= link_to content_tag(:i, nil, :class => 'icon-plus') +' '+ t('new_'),
+ '/admin/members/'+@member.to_param+'/journal_papers/new', :class => 'btn btn-primary' %>
+
+ <% end %>
-<% end %>