relpace seminar to conference
This commit is contained in:
1 parent
e0fedb4454
commit
d4df7c82d3
170 files changed
+2229
-1494
No files matched your search
File renamed without changes.
+1
-1
@@ -1,6 +1,6 @@
|
||||
source "http://rubygems.org"
|
||||
|
||||
# Declare your gem's dependencies in personal_seminar.gemspec.
|
||||
# Declare your gem's dependencies in personal_conference.gemspec.
|
||||
# Bundler will treat runtime dependencies like base dependencies, and
|
||||
# development dependencies will be added by default to the :development group.
|
||||
gemspec
|
||||
File renamed without changes.
File renamed without changes.
+1
-1
@@ -14,7 +14,7 @@ end
|
||||
|
||||
RDoc::Task.new(:rdoc) do |rdoc|
|
||||
rdoc.rdoc_dir = 'rdoc'
|
||||
rdoc.title = 'PersonalSeminar'
|
||||
rdoc.title = 'PersonalConference'
|
||||
rdoc.options << '--line-numbers'
|
||||
rdoc.rdoc_files.include('README.rdoc')
|
||||
rdoc.rdoc_files.include('lib/**/*.rb')
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+8
@@ -0,0 +1,8 @@
|
||||
class Panel::PersonalConference::BackEnd::ConferenceAuthorTypesController < Panel::PersonalConference::BackEnd::WritingConferenceCategorysController
|
||||
|
||||
def initialize
|
||||
super
|
||||
@app_type = 'conference_author_type'
|
||||
end
|
||||
|
||||
end
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
class Panel::PersonalConference::BackEnd::ConferencePaperTypesController < Panel::PersonalConference::BackEnd::WritingConferenceCategorysController
|
||||
|
||||
def initialize
|
||||
super
|
||||
@app_type = 'conference_paper_type'
|
||||
end
|
||||
|
||||
end
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
class Panel::PersonalConference::BackEnd::TagsController < Admin::TagsController
|
||||
|
||||
def initialize
|
||||
super
|
||||
@app_title = 'personal_conference'
|
||||
end
|
||||
|
||||
end
|
||||
+145
@@ -0,0 +1,145 @@
|
||||
class Panel::PersonalConference::BackEnd::WritingConferenceCategorysController < OrbitBackendController
|
||||
|
||||
include OrbitControllerLib::DivisionForDisable
|
||||
|
||||
before_filter :force_order_for_visitor,:only=>[:index,:show]
|
||||
before_filter :force_order_for_user,:except => [:index,:show]
|
||||
before_filter :for_app_manager,:except => [:index]
|
||||
|
||||
def index
|
||||
|
||||
get_types
|
||||
|
||||
@writing_conference_categorys = @types.all
|
||||
@writing_conference_category = @types.new(:display => 'List')
|
||||
|
||||
# @url = panel_personal_conference_back_end_writing_conference_categorys_path
|
||||
@url = eval("panel_personal_conference_back_end_#{@app_type}s_path")
|
||||
|
||||
respond_to do |format|
|
||||
format.html # index.html.erb
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
# GET /writing_conferences/1
|
||||
# GET /writing_conferences/1.xml
|
||||
def show
|
||||
|
||||
get_types
|
||||
|
||||
@writing_conference_category = @types.find(params[:id])
|
||||
|
||||
respond_to do |format|
|
||||
format.html # show.html.erb
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
# GET /writing_conferences/new
|
||||
# GET /writing_conferences/new.xml
|
||||
def new
|
||||
|
||||
get_types
|
||||
|
||||
@writing_conference_category = @types.new(:display => 'List')
|
||||
|
||||
@verb = :post
|
||||
|
||||
respond_to do |format|
|
||||
format.html # new.html.erb
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
# GET /writing_conferences/1/edit
|
||||
def edit
|
||||
|
||||
get_types
|
||||
|
||||
@writing_conference_category = @types.find(params[:id])
|
||||
|
||||
# @url = panel_personal_conference_back_end_writing_conference_category_path(@writing_conference_category)
|
||||
# @url = eval("panel_personal_conference_back_end_#{@app_type}_path(@writing_conference_category)")
|
||||
@url = polymorphic_path([:panel, :personal_conference, :back_end, @writing_conference_category])
|
||||
|
||||
@verb = :put
|
||||
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
# POST /writing_conferences
|
||||
# POST /writing_conferences.xml
|
||||
def create
|
||||
|
||||
get_types
|
||||
|
||||
@writing_conference_category = @types.new(params[:writing_conference_category])
|
||||
|
||||
respond_to do |format|
|
||||
if @writing_conference_category.save
|
||||
format.html { redirect_to(panel_personal_conference_back_end_writing_conference_categorys_url, :notice => t('writing_conference_category.create_writing_conference_category_success')) }
|
||||
format.js
|
||||
else
|
||||
format.html { render :action => "new" }
|
||||
format.js { render action: "new" }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# PUT /writing_conferences/1
|
||||
# PUT /writing_conferences/1.xml
|
||||
def update
|
||||
|
||||
get_types
|
||||
|
||||
@writing_conference_category = @types.find(params[:id])
|
||||
# debugger
|
||||
# @url = panel_personal_conference_back_end_writing_conference_category_path(@writing_conference_category)
|
||||
# @url = eval("panel_personal_conference_back_end_#{@app_type}_path(#{@writing_conference_category})")
|
||||
@url = polymorphic_path([:panel, :personal_conference, :back_end, @writing_conference_category])
|
||||
|
||||
respond_to do |format|
|
||||
if @writing_conference_category.update_attributes(params[:writing_conference_category])
|
||||
format.html { redirect_to(panel_personal_conference_back_end_writing_conference_categorys_url, :notice => t('writing_conference_category.update_writing_conference_category_success')) }
|
||||
# format.xml { head :ok }
|
||||
format.js
|
||||
else
|
||||
format.html { render :action => "edit" }
|
||||
format.js { render :action => "edit" }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# DELETE /writing_conferences/1
|
||||
# DELETE /writing_conferences/1.xml
|
||||
def destroy
|
||||
|
||||
get_types
|
||||
|
||||
@writing_conference_category = @types.find(params[:id])
|
||||
@writing_conference_category.disable = @writing_conference_category.disable ? false : true
|
||||
|
||||
if @writing_conference_category.save!
|
||||
respond_to do |format|
|
||||
format.html { redirect_to(panel_personal_conference_back_end_writing_conference_categorys_url) }
|
||||
# format.xml { head :ok }
|
||||
format.js
|
||||
end
|
||||
else
|
||||
flash[:error] = t("writing_conference_category.update_failed")
|
||||
format.html { render :action => "index" }
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def get_types
|
||||
@types = @app_type.classify.constantize
|
||||
end
|
||||
|
||||
end
|
||||
+309
@@ -0,0 +1,309 @@
|
||||
class Panel::PersonalConference::BackEnd::WritingConferencesController < OrbitBackendController
|
||||
include AdminHelper
|
||||
include OrbitControllerLib::DivisionForDisable
|
||||
|
||||
before_filter :authenticate_user!
|
||||
before_filter :force_order_for_visitor,:only=>[:index,:show]
|
||||
before_filter :force_order_for_user,:except => [:index,:show]
|
||||
|
||||
before_filter :only => [ :new,:edit,:update] do |controller|
|
||||
controller.get_categorys('WritingConferenceCategory')
|
||||
end
|
||||
|
||||
def index
|
||||
|
||||
get_categorys("ConferencePaperType",params[:conference_paper_type_id])
|
||||
@filter = params[:filter]
|
||||
new_filter = params[:new_filter]
|
||||
|
||||
if @filter && params[:clear]
|
||||
@filter.delete(params[:type])
|
||||
elsif @filter && new_filter
|
||||
if @filter.has_key?(new_filter[:type]) && @filter[new_filter[:type]].include?(new_filter[:id].to_s)
|
||||
@filter[new_filter[:type]].delete(new_filter[:id].to_s)
|
||||
elsif @filter.has_key?(new_filter[:type])
|
||||
@filter[new_filter[:type]] << new_filter[:id].to_s
|
||||
else
|
||||
@filter.merge!({new_filter[:type] => [new_filter[:id].to_s]})
|
||||
end
|
||||
elsif new_filter
|
||||
@filter = {new_filter[:type] => [new_filter[:id].to_s]}
|
||||
end
|
||||
|
||||
@paper_types = ConferencePaperType.all
|
||||
@paper_type_ids = @paper_types.collect{|t| t.id.to_s} + [nil]
|
||||
|
||||
|
||||
# @writing_conferences = WritingConference.search(params[:category_id])
|
||||
#@writing_conferences = (params[:sort] || @filter) ? get_sorted_and_filtered_writing_conferences : WritingConference.all.page(params[:page]).per(10)
|
||||
|
||||
@writing_conferences = (params[:sort] || @filter) ? get_sorted_and_filtered("writing_conference",:conference_paper_type_id.in => @paper_type_ids) : get_viewable("writing_conference",:conference_paper_type_id.in => @paper_type_ids)
|
||||
|
||||
|
||||
get_tags
|
||||
|
||||
respond_to do |format|
|
||||
format.html # index.html.erb
|
||||
format.xml { render :xml => @writing_conferences }
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
def writing_conference_setting
|
||||
|
||||
@author_types = ConferenceAuthorType.all
|
||||
@paper_types = ConferencePaperType.all
|
||||
|
||||
get_tags
|
||||
|
||||
@set_author_type = ConferenceAuthorType.new(:display => 'List')
|
||||
@author_type_url = panel_personal_conference_back_end_writing_conferences_path
|
||||
|
||||
@set_paper_type = ConferencePaperType.new(:display => 'List')
|
||||
@paper_type_url = panel_personal_conference_back_end_writing_conferences_path
|
||||
|
||||
|
||||
end
|
||||
|
||||
def paper_type_quick_add
|
||||
@set_paper_type = ConferencePaperType.new(:display => 'List')
|
||||
@paper_type_url = panel_personal_conference_back_end_writing_conferences_path
|
||||
@set_paper_type.id = params[:id]
|
||||
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def paper_type_quick_edit
|
||||
|
||||
@set_paper_type = ConferencePaperType.find(params[:writing_conference_id])
|
||||
@paper_type_url = panel_personal_conference_back_end_writing_conference_path(@set_paper_type)
|
||||
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
def author_type_quick_add
|
||||
@set_author_type = ConferenceAuthorType.new(:display => 'List')
|
||||
@author_type_url = panel_personal_conference_back_end_writing_conferences_path
|
||||
@set_author_type.id = params[:id]
|
||||
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def author_type_quick_edit
|
||||
|
||||
@set_author_type = ConferenceAuthorType.find(params[:writing_conference_id])
|
||||
@author_type_url = panel_personal_conference_back_end_writing_conference_path(@set_author_type)
|
||||
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
# GET /writing_conferences/1
|
||||
# GET /writing_conferences/1.xml
|
||||
def show
|
||||
@writing_conference = WritingConference.find(params[:id])
|
||||
respond_to do |format|
|
||||
format.html # show.html.erb
|
||||
format.xml { render :xml => @writing_conference }
|
||||
end
|
||||
end
|
||||
|
||||
# GET /writing_conferences/new
|
||||
# GET /writing_conferences/new.xml
|
||||
def new
|
||||
@writing_conference = WritingConference.new
|
||||
# @writing_conference_files = WritingConferenceFile.all
|
||||
# @paper_types = ConferenceLevelType.all
|
||||
@author_types = ConferenceAuthorType.all
|
||||
@paper_types = ConferencePaperType.all
|
||||
get_tags
|
||||
|
||||
respond_to do |format|
|
||||
format.html # new.html.erb
|
||||
format.xml { render :xml => @writing_conference }
|
||||
end
|
||||
end
|
||||
|
||||
# GET /writing_conferences/1/edit
|
||||
def edit
|
||||
@writing_conference = WritingConference.find(params[:id])
|
||||
|
||||
# @paper_types = ConferenceLevelType.all
|
||||
@author_types = ConferenceAuthorType.all
|
||||
@paper_types = ConferencePaperType.all
|
||||
|
||||
get_tags
|
||||
end
|
||||
|
||||
# POST /writing_conferences
|
||||
# POST /writing_conferences.xml
|
||||
def create
|
||||
|
||||
if params[:conference_paper_type]
|
||||
|
||||
@conference_paper_type = ConferencePaperType.new(params[:conference_paper_type])
|
||||
|
||||
respond_to do |format|
|
||||
if @conference_paper_type.save
|
||||
format.js { render 'create_writing_conference_setting' }
|
||||
end
|
||||
end
|
||||
|
||||
elsif params[:conference_author_type]
|
||||
|
||||
@conference_author_type = ConferenceAuthorType.new(params[:conference_author_type])
|
||||
|
||||
respond_to do |format|
|
||||
if @conference_author_type.save
|
||||
format.js { render 'create_writing_conference_setting' }
|
||||
end
|
||||
end
|
||||
|
||||
else
|
||||
|
||||
# @paper_types = ConferenceLevelType.all
|
||||
@author_types = ConferenceAuthorType.all
|
||||
@paper_types = ConferencePaperType.all
|
||||
get_tags
|
||||
|
||||
@writing_conference = WritingConference.new(params[:writing_conference])
|
||||
|
||||
if params[:writing_conference][:user_id]
|
||||
@writing_conference.create_user_id = params[:writing_conference][:user_id]
|
||||
@writing_conference.update_user_id = params[:writing_conference][:user_id]
|
||||
else
|
||||
@writing_conference.create_user_id = current_user.id
|
||||
@writing_conference.update_user_id = current_user.id
|
||||
end
|
||||
|
||||
respond_to do |format|
|
||||
if @writing_conference.save
|
||||
|
||||
if params[:writing_conference][:user_id]
|
||||
format.html { redirect_to(admin_users_new_interface_url(:id=>params[:writing_conference][:user_id],:show_plugin_profile=>'Conference')) }
|
||||
else
|
||||
format.html { redirect_to(panel_personal_conference_back_end_writing_conferences_url) }
|
||||
end
|
||||
|
||||
format.xml { render :xml => @writing_conference, :status => :created, :location => @writing_conference }
|
||||
else
|
||||
format.html { render :action => "new" }
|
||||
format.xml { render :xml => @writing_conference.errors, :status => :unprocessable_entity }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
# PUT /writing_conferences/1
|
||||
# PUT /writing_conferences/1.xml
|
||||
def update
|
||||
|
||||
if params[:conference_paper_type]
|
||||
|
||||
@conference_paper_type = ConferencePaperType.find(params[:id])
|
||||
|
||||
respond_to do |format|
|
||||
|
||||
if @conference_paper_type.update_attributes(params[:conference_paper_type])
|
||||
# format.html { redirect_to(panel_announcement_back_end_bulletins_url) }
|
||||
format.js { render 'update_writing_conference_setting' }
|
||||
end
|
||||
end
|
||||
|
||||
elsif params[:conference_author_type]
|
||||
|
||||
@conference_author_type = ConferenceAuthorType.find(params[:id])
|
||||
|
||||
respond_to do |format|
|
||||
|
||||
if @conference_author_type.update_attributes(params[:conference_author_type])
|
||||
# format.html { redirect_to(panel_announcement_back_end_bulletins_url) }
|
||||
format.js { render 'update_writing_conference_setting' }
|
||||
end
|
||||
end
|
||||
|
||||
else
|
||||
|
||||
@writing_conference = WritingConference.find(params[:id])
|
||||
|
||||
@writing_conference.update_user_id = current_user.id
|
||||
|
||||
params[:writing_conference][:tag_ids] ||=[]
|
||||
|
||||
respond_to do |format|
|
||||
if @writing_conference.update_attributes(params[:writing_conference])
|
||||
format.html { redirect_to(panel_personal_conference_back_end_writing_conferences_url) }
|
||||
# format.js { render 'toggle_enable' }
|
||||
format.xml { head :ok }
|
||||
else
|
||||
format.html { render :action => "edit" }
|
||||
format.xml { render :xml => @writing_conference.errors, :status => :unprocessable_entity }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
# DELETE /writing_conferences/1
|
||||
# DELETE /writing_conferences/1.xml
|
||||
def destroy
|
||||
@writing_conference = WritingConference.find(params[:id])
|
||||
@writing_conference.destroy
|
||||
|
||||
respond_to do |format|
|
||||
format.html { redirect_to(panel_personal_conference_back_end_writing_conferences_url) }
|
||||
# format.xml { head :ok }
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
def delete
|
||||
if params[:ids]
|
||||
writing_conferences = WritingConference.any_in(:_id => params[:ids]).delete_all
|
||||
end
|
||||
redirect_to panel_personal_conference_back_end_writing_conferences_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options])
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
|
||||
# def get_index_categories(id = nil)
|
||||
# @bulletin_categorys = []
|
||||
# if(is_manager? || is_admin?)
|
||||
# @bulletin_categorys = (id ? BulletinCategory.admin_manager_all.find(id).to_a : BulletinCategory.admin_manager_all)
|
||||
# elsif is_sub_manager?
|
||||
# @bulletin_categorys = BulletinCategory.all
|
||||
# end
|
||||
# @bulletin_categorys
|
||||
# end
|
||||
|
||||
|
||||
# def get_categorys(id = nil)
|
||||
# @writing_conference_categorys = []
|
||||
# if(is_manager? || is_admin?)
|
||||
# @writing_conference_categorys = (id ? WritingConferenceCategory.admin_manager_all.find(id).to_a : WritingConferenceCategory.admin_manager_all))
|
||||
# elsif is_sub_manager?
|
||||
# @writing_conference_categorys = WritingConferenceCategory.all.authed_for_user(current_user,'edit')
|
||||
# end
|
||||
# if @writing_conference_categorys.empty? && params[:action] != "index"
|
||||
# flash[:alert] = t("announcement.error.no_avilb_cate_for_posting")
|
||||
# redirect_to :action => :index
|
||||
# end
|
||||
# end
|
||||
|
||||
def get_tags
|
||||
module_app = ModuleApp.first(:conditions => {:key => 'personal_conference'})
|
||||
@tags = Tag.all(:conditions => {:module_app_id => module_app.id})
|
||||
end
|
||||
|
||||
end
|
||||
+187
@@ -0,0 +1,187 @@
|
||||
class Panel::PersonalConference::Plugin::WritingConferencesController < OrbitBackendController
|
||||
include AdminHelper
|
||||
include OrbitControllerLib::DivisionForDisable
|
||||
|
||||
before_filter :authenticate_user!
|
||||
before_filter :force_order_for_visitor,:only=>[:index,:show]
|
||||
before_filter :force_order_for_user,:except => [:index,:show]
|
||||
|
||||
before_filter :only => [ :new,:edit,:update] do |controller|
|
||||
controller.get_categorys('WritingConferenceCategory')
|
||||
end
|
||||
|
||||
|
||||
def index
|
||||
|
||||
get_categorys("ConferencePaperType",params[:conference_paper_type_id])
|
||||
@filter = params[:filter]
|
||||
new_filter = params[:new_filter]
|
||||
|
||||
if @filter && params[:clear]
|
||||
@filter.delete(params[:type])
|
||||
elsif @filter && new_filter
|
||||
if @filter.has_key?(new_filter[:type]) && @filter[new_filter[:type]].include?(new_filter[:id].to_s)
|
||||
@filter[new_filter[:type]].delete(new_filter[:id].to_s)
|
||||
elsif @filter.has_key?(new_filter[:type])
|
||||
@filter[new_filter[:type]] << new_filter[:id].to_s
|
||||
else
|
||||
@filter.merge!({new_filter[:type] => [new_filter[:id].to_s]})
|
||||
end
|
||||
elsif new_filter
|
||||
@filter = {new_filter[:type] => [new_filter[:id].to_s]}
|
||||
end
|
||||
@paper_types = ConferencePaperType.all
|
||||
@paper_type_ids = @paper_types.collect{|t| t.id.to_s} + [nil]
|
||||
|
||||
|
||||
# @writing_conferences = WritingConference.search(params[:category_id])
|
||||
#@writing_conferences = (params[:sort] || @filter) ? get_sorted_and_filtered_writing_conferences : WritingConference.all.page(params[:page]).per(10)
|
||||
@writing_conferences = (params[:sort] || @filter) ? get_sorted_and_filtered("writing_conference",:create_user_id => current_user.id) : get_viewable("writing_conference", :create_user_id => current_user.id)
|
||||
|
||||
get_tags
|
||||
|
||||
respond_to do |format|
|
||||
format.html # index.html.erb
|
||||
format.xml { render :xml => @writing_conferences }
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
# GET /writing_conferences/1
|
||||
# GET /writing_conferences/1.xml
|
||||
def show
|
||||
@writing_conference = WritingConference.find(params[:id])
|
||||
respond_to do |format|
|
||||
format.html # show.html.erb
|
||||
format.xml { render :xml => @writing_conference }
|
||||
end
|
||||
end
|
||||
|
||||
# GET /writing_conferences/new
|
||||
# GET /writing_conferences/new.xml
|
||||
def new
|
||||
|
||||
@writing_conference = WritingConference.new
|
||||
# @writing_conference_files = WritingConferenceFile.all
|
||||
# @level_types = ConferenceLevelType.all
|
||||
@author_types = ConferenceAuthorType.all
|
||||
@paper_types = ConferencePaperType.all
|
||||
|
||||
get_tags
|
||||
|
||||
respond_to do |format|
|
||||
format.html # new.html.erb
|
||||
format.xml { render :xml => @writing_conference }
|
||||
end
|
||||
end
|
||||
|
||||
# GET /writing_conferences/1/edit
|
||||
def edit
|
||||
@writing_conference = WritingConference.find(params[:id])
|
||||
|
||||
# @level_types = ConferenceLevelType.all
|
||||
@author_types = ConferenceAuthorType.all
|
||||
@paper_types = ConferencePaperType.all
|
||||
|
||||
get_tags
|
||||
end
|
||||
|
||||
# POST /writing_conferences
|
||||
# POST /writing_conferences.xml
|
||||
def create
|
||||
|
||||
# @level_types = ConferenceLevelType.all
|
||||
@author_types = ConferenceAuthorType.all
|
||||
@paper_types = ConferencePaperType.all
|
||||
get_tags
|
||||
|
||||
@writing_conference = WritingConference.new(params[:writing_conference])
|
||||
|
||||
@writing_conference.create_user_id = current_user.id
|
||||
@writing_conference.update_user_id = current_user.id
|
||||
|
||||
respond_to do |format|
|
||||
if @writing_conference.save
|
||||
format.html { redirect_to(panel_personal_conference_plugin_writing_conferences_url) }
|
||||
format.xml { render :xml => @writing_conference, :status => :created, :location => @writing_conference }
|
||||
else
|
||||
format.html { render :action => "new" }
|
||||
format.xml { render :xml => @writing_conference.errors, :status => :unprocessable_entity }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# PUT /writing_conferences/1
|
||||
# PUT /writing_conferences/1.xml
|
||||
def update
|
||||
@writing_conference = WritingConference.find(params[:id])
|
||||
|
||||
@writing_conference.update_user_id = current_user.id
|
||||
|
||||
params[:writing_conference][:tag_ids] ||=[]
|
||||
|
||||
respond_to do |format|
|
||||
if @writing_conference.update_attributes(params[:writing_conference])
|
||||
format.html { redirect_to(panel_personal_conference_plugin_writing_conferences_url) }
|
||||
# format.js { render 'toggle_enable' }
|
||||
format.xml { head :ok }
|
||||
else
|
||||
format.html { render :action => "edit" }
|
||||
format.xml { render :xml => @writing_conference.errors, :status => :unprocessable_entity }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# DELETE /writing_conferences/1
|
||||
# DELETE /writing_conferences/1.xml
|
||||
def destroy
|
||||
@writing_conference = WritingConference.find(params[:id])
|
||||
@writing_conference.destroy
|
||||
|
||||
respond_to do |format|
|
||||
format.html { redirect_to(panel_personal_conference_plugin_writing_conferences_url) }
|
||||
# format.xml { head :ok }
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
def delete
|
||||
if params[:ids]
|
||||
writing_conferences = WritingConference.any_in(:_id => params[:ids]).delete_all
|
||||
end
|
||||
redirect_to panel_personal_conference_plugin_writing_conferences_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options])
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
|
||||
# def get_index_categories(id = nil)
|
||||
# @bulletin_categorys = []
|
||||
# if(is_manager? || is_admin?)
|
||||
# @bulletin_categorys = (id ? BulletinCategory.admin_manager_all.find(id).to_a : BulletinCategory.admin_manager_all)
|
||||
# elsif is_sub_manager?
|
||||
# @bulletin_categorys = BulletinCategory.all
|
||||
# end
|
||||
# @bulletin_categorys
|
||||
# end
|
||||
|
||||
|
||||
# def get_categorys(id = nil)
|
||||
# @writing_conference_categorys = []
|
||||
# if(is_manager? || is_admin?)
|
||||
# @writing_conference_categorys = (id ? WritingConferenceCategory.admin_manager_all.find(id).to_a : WritingConferenceCategory.admin_manager_all))
|
||||
# elsif is_sub_manager?
|
||||
# @writing_conference_categorys = WritingConferenceCategory.all.authed_for_user(current_user,'edit')
|
||||
# end
|
||||
# if @writing_conference_categorys.empty? && params[:action] != "index"
|
||||
# flash[:alert] = t("announcement.error.no_avilb_cate_for_posting")
|
||||
# redirect_to :action => :index
|
||||
# end
|
||||
# end
|
||||
|
||||
def get_tags
|
||||
module_app = ModuleApp.first(:conditions => {:key => 'personal_conference'})
|
||||
@tags = Tag.all(:conditions => {:module_app_id => module_app.id})
|
||||
end
|
||||
|
||||
end
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
+9
@@ -0,0 +1,9 @@
|
||||
# encoding: utf-8
|
||||
|
||||
class ConferenceAuthorType < WritingConferenceCategory
|
||||
|
||||
field :title, localize: true
|
||||
|
||||
has_and_belongs_to_many :writing_conferences
|
||||
|
||||
end
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
# encoding: utf-8
|
||||
|
||||
class ConferencePaperType < WritingConferenceCategory
|
||||
|
||||
field :title, localize: true
|
||||
|
||||
has_and_belongs_to_many :writing_conferences
|
||||
|
||||
end
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
class PersonalConferenceTag < Tag
|
||||
|
||||
has_and_belongs_to_many :writing_conferences
|
||||
|
||||
def get_visible_links(sort = :title)
|
||||
self.writing_conferences.where(:is_hidden => false).desc(:is_top, sort)
|
||||
end
|
||||
|
||||
end
|
||||
+16
-16
@@ -1,6 +1,6 @@
|
||||
# encoding: utf-8
|
||||
|
||||
class WritingSeminar
|
||||
class WritingConference
|
||||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
include Mongoid::MultiParameterAttributes
|
||||
@@ -11,15 +11,15 @@ class WritingSeminar
|
||||
|
||||
|
||||
field :paper_title, localize: true
|
||||
field :seminar_title, localize: true
|
||||
field :conference_title, localize: true
|
||||
field :authors, localize: true
|
||||
field :location, localize: true
|
||||
field :sponsor, localize: true
|
||||
|
||||
has_and_belongs_to_many :tags, :class_name => "PersonalSeminarTag"
|
||||
has_and_belongs_to_many :tags, :class_name => "PersonalConferenceTag"
|
||||
|
||||
has_and_belongs_to_many :seminar_author_types
|
||||
has_and_belongs_to_many :seminar_paper_types
|
||||
has_and_belongs_to_many :conference_author_types
|
||||
has_and_belongs_to_many :conference_paper_types
|
||||
|
||||
|
||||
field :year
|
||||
@@ -38,9 +38,9 @@ class WritingSeminar
|
||||
# field :is_hot, :type => Boolean, :default => false
|
||||
# field :is_hidden, :type => Boolean, :default => false
|
||||
|
||||
has_many :writing_seminar_files, :autosave => true, :dependent => :destroy
|
||||
has_many :writing_conference_files, :autosave => true, :dependent => :destroy
|
||||
|
||||
accepts_nested_attributes_for :writing_seminar_files, :allow_destroy => true
|
||||
accepts_nested_attributes_for :writing_conference_files, :allow_destroy => true
|
||||
|
||||
# before_save :update_avliable_language, :clean_checkboxs
|
||||
|
||||
@@ -48,7 +48,7 @@ class WritingSeminar
|
||||
|
||||
before_validation :add_http
|
||||
|
||||
after_save :save_writing_seminar_files
|
||||
after_save :save_writing_conference_files
|
||||
|
||||
validates :url, :format => /^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$/ix, :unless => Proc.new{self.url.blank?}
|
||||
|
||||
@@ -56,7 +56,7 @@ class WritingSeminar
|
||||
|
||||
if category_id.to_s.size > 0
|
||||
|
||||
find(:all, :conditions => {writing_seminar_category_id: category_id}).desc( :is_top, :title )
|
||||
find(:all, :conditions => {writing_conference_category_id: category_id}).desc( :is_top, :title )
|
||||
|
||||
else
|
||||
|
||||
@@ -91,8 +91,8 @@ class WritingSeminar
|
||||
end
|
||||
end
|
||||
|
||||
def save_writing_seminar_files
|
||||
self.writing_seminar_files.each do |t|
|
||||
def save_writing_conference_files
|
||||
self.writing_conference_files.each do |t|
|
||||
if t.should_destroy
|
||||
t.destroy
|
||||
end
|
||||
@@ -102,11 +102,11 @@ class WritingSeminar
|
||||
def create_link
|
||||
|
||||
title = ["\"#{self.paper_title}\""]
|
||||
title << self.seminar_title
|
||||
title << self.conference_title
|
||||
title << self.sponsor
|
||||
title << self.location
|
||||
title << "#{period_start_date}-#{period_end_date}"
|
||||
# title << "(#{self.seminar_paper_types.collect{|x| x.title}.join(', ')})"
|
||||
# title << "(#{self.conference_paper_types.collect{|x| x.title}.join(', ')})"
|
||||
title.join(', ')
|
||||
|
||||
end
|
||||
@@ -121,8 +121,8 @@ class WritingSeminar
|
||||
|
||||
def clean_checkboxs
|
||||
self.tag_ids.delete('')
|
||||
self.seminar_author_type_ids.delete('')
|
||||
self.seminar_level_type_ids.delete('')
|
||||
self.conference_author_type_ids.delete('')
|
||||
self.conference_level_type_ids.delete('')
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
+6
-6
@@ -1,30 +1,30 @@
|
||||
# encoding: utf-8
|
||||
|
||||
class WritingSeminarCategory
|
||||
class WritingConferenceCategory
|
||||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
include OrbitCoreLib::ObjectAuthable
|
||||
include OrbitCoreLib::ObjectDisable
|
||||
# include Mongoid::MultiParameterAttributes
|
||||
AfterObjectAuthUrl = '/panel/personal_seminar/back_end/writing_seminar_categorys'
|
||||
APP_NAME = 'writing_seminar'
|
||||
AfterObjectAuthUrl = '/panel/personal_conference/back_end/writing_conference_categorys'
|
||||
APP_NAME = 'writing_conference'
|
||||
# ObjectAuthTitlesOptions = %W{edit}
|
||||
ObjectAuthTitlesOptions = %W{submit_new fact_check}
|
||||
|
||||
field :key
|
||||
|
||||
has_many :writing_seminars
|
||||
has_many :writing_conferences
|
||||
|
||||
def pp_object
|
||||
title
|
||||
end
|
||||
|
||||
def self.from_id(id)
|
||||
WritingSeminarCategory.find(id) rescue nil
|
||||
WritingConferenceCategory.find(id) rescue nil
|
||||
end
|
||||
|
||||
def self.is_localized?(field_name)
|
||||
self.fields[field_name.to_s].localized?
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
class WritingSeminarFile
|
||||
class WritingConferenceFile
|
||||
|
||||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
@@ -9,6 +9,6 @@ class WritingSeminarFile
|
||||
field :should_destroy, :type => Boolean
|
||||
field :title, localize: true
|
||||
|
||||
belongs_to :writing_seminar
|
||||
belongs_to :writing_conference
|
||||
|
||||
end
|
||||
File renamed without changes.
+4
-4
@@ -1,8 +1,8 @@
|
||||
<% # encoding: utf-8 %>
|
||||
|
||||
<%= form_for(:writing_seminar_category, :remote => true, :url => @url, :method => @verb, :html => { :id => 'form_writing_seminar_category' } ) do |f| %>
|
||||
<%= form_for(:writing_conference_category, :remote => true, :url => @url, :method => @verb, :html => { :id => 'form_writing_conference_category' } ) do |f| %>
|
||||
|
||||
<h2><%= (@writing_seminar_category.new_record? ? 'Add' : 'Edit') %></h2>
|
||||
<h2><%= (@writing_conference_category.new_record? ? 'Add' : 'Edit') %></h2>
|
||||
|
||||
<div id="widget-title">
|
||||
<%= f.label :key %>
|
||||
@@ -16,7 +16,7 @@
|
||||
<div class="control-group">
|
||||
<%= label_tag "name-#{locale}", "Name-#{I18nVariable.from_locale(locale)}", :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<%= f.text_field locale, :class => 'input-xxlarge', :value => (@writing_seminar_category.title_translations[locale] rescue nil) %>
|
||||
<%= f.text_field locale, :class => 'input-xxlarge', :value => (@writing_conference_category.title_translations[locale] rescue nil) %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -41,4 +41,4 @@
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
|
||||
|
||||
File renamed without changes.
+22
@@ -0,0 +1,22 @@
|
||||
|
||||
<tr id="<%= dom_id writing_conference_category %>" class="with_action">
|
||||
<td>
|
||||
<%= writing_conference_category.key %>
|
||||
<div class="quick-edit">
|
||||
<ul class="nav nav-pills hide">
|
||||
<% if is_admin?%>
|
||||
<li><%= link_to t('writing_conference_category.edit'),
|
||||
polymorphic_path([:panel, :personal_conference, :back_end, writing_conference_category], {:action => :edit}), :remote => true %></li>
|
||||
<li><%= link_to show_toggle_archive_btn(writing_conference_category), polymorphic_path([:panel, :personal_conference, :back_end, writing_conference_category]), :confirm => t('announcement.sure?'), :method => :delete, :remote => true,:class=>"archive_toggle" %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<% if @types.is_localized?(:title) %>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<td><%= writing_conference_category.title_translations[locale] rescue nil %></td>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<td><%= writing_conference_category.title %></td>
|
||||
<% end %>
|
||||
</tr>
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
$('<%= j render :partial => 'writing_conference_category', :collection => [@writing_conference_category] %>').appendTo('#writing_conference_categorys').hide().fadeIn();
|
||||
$("#form_writing_conference_category")[0].reset();
|
||||
+1
@@ -0,0 +1 @@
|
||||
$("#<%= dom_id @writing_conference_category %>").find(".archive_toggle").text("<%= show_toggle_archive_btn(@writing_conference_category) %> ");
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
<h1><%= t('personal_conference.editing_personal_conference_class') %></h1>
|
||||
|
||||
<%= form_for @writing_conference_category, :url => panel_personal_conference_back_end_writing_conference_category_path(@writing_conference_category) do |f| %>
|
||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||
<% end %>
|
||||
|
||||
<%= link_back %>
|
||||
File renamed without changes.
+4
-4
@@ -3,22 +3,22 @@
|
||||
|
||||
<%= @types %>
|
||||
|
||||
<table id="writing_seminar_categorys" class="table main-list">
|
||||
<table id="writing_conference_categorys" class="table main-list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="span1-2"><%= t('writing_seminar_category.key') %></th>
|
||||
<th class="span1-2"><%= t('writing_conference_category.key') %></th>
|
||||
<% if @types.is_localized?(:title) %>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<th class="span1-2"><%= I18nVariable.first(:conditions => {:key => locale})[I18n.locale] %></th>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<th class="span1-2"><%= t('writing_seminar_category.title') %></th>
|
||||
<th class="span1-2"><%= t('writing_conference_category.title') %></th>
|
||||
<% end %>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<%= render :partial => 'writing_seminar_category', :collection => @writing_seminar_categorys %>
|
||||
<%= render :partial => 'writing_conference_category', :collection => @writing_conference_categorys %>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
<% content_for :secondary do %>
|
||||
<%= render :partial => '/panel/personal_conference/back_end/personal_conference_secondary' %>
|
||||
<% end -%>
|
||||
|
||||
<%= flash_messages %>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<h1><%= t('writing_conference_category.new_personal_conference_class') %></h1>
|
||||
<%= form_for @writing_conference_category, :url => panel_personal_conference_back_end_writing_conference_categorys_path do |f| %>
|
||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||
<% end %>
|
||||
|
||||
<%= link_back %>
|
||||
|
||||
File renamed without changes.
+4
@@ -0,0 +1,4 @@
|
||||
$("#<%= dom_id @writing_conference_category %>").replaceWith("<%= j render :partial => 'writing_conference_category', :collection => [@writing_conference_category] %>");
|
||||
<% @writing_conference_category = @types.new(:display => 'List') # reset for new form %>
|
||||
$("#form_writing_conference_category").replaceWith("<%= j render "form" %>")
|
||||
$("#form_writing_conference_category")[0].reset();
|
||||
+2
-2
@@ -26,9 +26,9 @@
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<%= hidden_field_tag 'writing_seminar_category[author_type]', @set_author_type.id %>
|
||||
<%= hidden_field_tag 'writing_conference_category[author_type]', @set_author_type.id %>
|
||||
<%= f.submit t('submit'), :class=>'btn btn-primary' %>
|
||||
<a class="btn" data-dismiss="modal"><%= t('cancel')%></a>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
File renamed without changes.
+34
-34
@@ -10,13 +10,13 @@
|
||||
<div class="widget-action clear tip" title="Setting">
|
||||
<a class="action"><i class="icon-cog icon-white"></i></a>
|
||||
</div>
|
||||
<h3 class="widget-title"><i class="icons-tag"></i><%= f.label :paper_type ,t("personal_seminar.paper_type")%></h3>
|
||||
<h3 class="widget-title"><i class="icons-tag"></i><%= f.label :paper_type ,t("personal_conference.paper_type")%></h3>
|
||||
<div class="widget-content clear form-horizontal">
|
||||
<% @paper_types.each do |paper_type| %>
|
||||
<%= content_tag :label,:class => "checkbox inline" do -%>
|
||||
<%= check_box_tag 'writing_seminar[seminar_paper_type_ids][]', paper_type.id, @writing_seminar.seminar_paper_type_ids.include?(paper_type.id)%>
|
||||
<%= check_box_tag 'writing_conference[conference_paper_type_ids][]', paper_type.id, @writing_conference.conference_paper_type_ids.include?(paper_type.id)%>
|
||||
<%= paper_type.title %>
|
||||
<%= hidden_field_tag 'writing_seminar[seminar_paper_type_ids][]', '' %>
|
||||
<%= hidden_field_tag 'writing_conference[conference_paper_type_ids][]', '' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
@@ -26,13 +26,13 @@
|
||||
<div class="widget-action clear tip" title="Setting">
|
||||
<a class="action"><i class="icon-cog icon-white"></i></a>
|
||||
</div>
|
||||
<h3 class="widget-title"><i class="icons-tag"></i><%= f.label :author_type ,t("personal_seminar.author_type")%></h3>
|
||||
<h3 class="widget-title"><i class="icons-tag"></i><%= f.label :author_type ,t("personal_conference.author_type")%></h3>
|
||||
<div class="widget-content clear form-horizontal">
|
||||
<% @author_types.each do |author_type| %>
|
||||
<%= content_tag :label,:class => "checkbox inline" do -%>
|
||||
<%= check_box_tag 'writing_seminar[seminar_author_type_ids][]', author_type.id, @writing_seminar.seminar_author_type_ids.include?(author_type.id)%>
|
||||
<%= check_box_tag 'writing_conference[conference_author_type_ids][]', author_type.id, @writing_conference.conference_author_type_ids.include?(author_type.id)%>
|
||||
<%= author_type.title %>
|
||||
<%= hidden_field_tag 'writing_seminar[seminar_author_type_ids][]', '' %>
|
||||
<%= hidden_field_tag 'writing_conference[conference_author_type_ids][]', '' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
@@ -47,9 +47,9 @@
|
||||
<div class="widget-content clear form-horizontal">
|
||||
<% @tags.each do |tag| %>
|
||||
<%= content_tag :label,:class => "checkbox inline" do -%>
|
||||
<%= check_box_tag 'writing_seminar[tag_ids][]', tag.id, @writing_seminar.tag_ids.include?(tag.id)%>
|
||||
<%= check_box_tag 'writing_conference[tag_ids][]', tag.id, @writing_conference.tag_ids.include?(tag.id)%>
|
||||
<%= tag[I18n.locale] %>
|
||||
<%= hidden_field_tag 'writing_seminar[tag_ids][]', '' %>
|
||||
<%= hidden_field_tag 'writing_conference[tag_ids][]', '' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
@@ -74,8 +74,8 @@
|
||||
<% end %>
|
||||
|
||||
<div class="title">
|
||||
<%= f.label :year ,t("personal_seminar.year")%>
|
||||
<%= select_year((@writing_seminar.year ? @writing_seminar.year.to_i : DateTime.now.year), {:start_year => DateTime.now.year, :end_year => 1930}, {:name => 'writing_seminar[year]'} ) %>
|
||||
<%= f.label :year ,t("personal_conference.year")%>
|
||||
<%= select_year((@writing_conference.year ? @writing_conference.year.to_i : DateTime.now.year), {:start_year => DateTime.now.year, :end_year => 1930}, {:name => 'writing_conference[year]'} ) %>
|
||||
</div>
|
||||
|
||||
<ul class="nav nav-tabs">
|
||||
@@ -85,12 +85,12 @@
|
||||
</ul>
|
||||
|
||||
<div class="title">
|
||||
<%= f.label :period_start_date ,t("personal_seminar.period_start_date")%>
|
||||
<%= f.label :period_start_date ,t("personal_conference.period_start_date")%>
|
||||
<%= f.date_select :period_start_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year, :month, :day] }, {:class => 'span1'} %>
|
||||
</div>
|
||||
|
||||
<div class="title">
|
||||
<%= f.label :period_end_date ,t("personal_seminar.period_end_date")%>
|
||||
<%= f.label :period_end_date ,t("personal_conference.period_end_date")%>
|
||||
<%= f.date_select :period_end_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year, :month, :day] }, {:class => 'span1'} %>
|
||||
</div>
|
||||
|
||||
@@ -100,34 +100,34 @@
|
||||
|
||||
<div class="<%= locale %> fade tab-pane <%= ( i == 0 ) ? "in active" : '' %>">
|
||||
<div class="title">
|
||||
<%= f.label :paper_title ,t("personal_seminar.paper_title")%>
|
||||
<%= f.label :paper_title ,t("personal_conference.paper_title")%>
|
||||
<%= f.fields_for :paper_title_translations do |f| %>
|
||||
<%= I18nVariable.from_locale(locale) %>
|
||||
<%= f.text_field locale, :class=>'post-title', :value => (@writing_seminar.paper_title_translations[locale] rescue nil) %>
|
||||
<%= f.text_field locale, :class=>'post-title', :value => (@writing_conference.paper_title_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="title">
|
||||
<%= f.label :seminar_title ,t("personal_seminar.seminar_title")%>
|
||||
<%= f.fields_for :seminar_title_translations do |f| %>
|
||||
<%= f.label :conference_title ,t("personal_conference.conference_title")%>
|
||||
<%= f.fields_for :conference_title_translations do |f| %>
|
||||
<%= I18nVariable.from_locale(locale) %>
|
||||
<%= f.text_field locale, :class=>'post-title', :value => (@writing_seminar.seminar_title_translations[locale] rescue nil) %>
|
||||
<%= f.text_field locale, :class=>'post-title', :value => (@writing_conference.conference_title_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="title">
|
||||
<%= f.label :location ,t("personal_seminar.location")%>
|
||||
<%= f.label :location ,t("personal_conference.location")%>
|
||||
<%= f.fields_for :location_translations do |f| %>
|
||||
<%= I18nVariable.from_locale(locale) %>
|
||||
<%= f.text_field locale, :class=>'post-title', :value => (@writing_seminar.location_translations[locale] rescue nil) %>
|
||||
<%= f.text_field locale, :class=>'post-title', :value => (@writing_conference.location_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="title">
|
||||
<%= f.label :sponsor ,t("personal_seminar.sponsor")%>
|
||||
<%= f.label :sponsor ,t("personal_conference.sponsor")%>
|
||||
<%= f.fields_for :sponsor_translations do |f| %>
|
||||
<%= I18nVariable.from_locale(locale) %>
|
||||
<%= f.text_field locale, :class=>'post-title', :value => (@writing_seminar.sponsor_translations[locale] rescue nil) %>
|
||||
<%= f.text_field locale, :class=>'post-title', :value => (@writing_conference.sponsor_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
<%= f.label :authors,t("web_resource.authors") %>
|
||||
<%= f.fields_for :authors_translations do |f| %>
|
||||
<%= I18nVariable.from_locale(locale) %>
|
||||
<%= f.text_area locale, :size => "60x3", :value => (@writing_seminar.authors_translations[locale] rescue nil) %>
|
||||
<%= f.text_area locale, :size => "60x3", :value => (@writing_conference.authors_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -146,32 +146,32 @@
|
||||
</div>
|
||||
|
||||
<div class="title">
|
||||
<%= f.label :publication_date ,t("personal_seminar.publication_date")%>
|
||||
<%= f.label :publication_date ,t("personal_conference.publication_date")%>
|
||||
<%= f.date_select :publication_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1890, :order => [:year, :month, :day] }, {:class => 'span1'} %>
|
||||
</div>
|
||||
|
||||
<div class="title">
|
||||
<%= f.label :url, t("personal_seminar.url") %>
|
||||
<%= f.label :url, t("personal_conference.url") %>
|
||||
<%= f.text_field :url %>
|
||||
</div>
|
||||
|
||||
<div class="title">
|
||||
<%= f.label :keywords, t("personal_seminar.keywords") %>
|
||||
<%= f.label :keywords, t("personal_conference.keywords") %>
|
||||
<%= f.text_field :keywords %>
|
||||
</div>
|
||||
|
||||
<div class="title">
|
||||
<%= f.label :abstract, t("personal_seminar.abstract") %>
|
||||
<%= f.label :abstract, t("personal_conference.abstract") %>
|
||||
<%= f.text_field :abstract %>
|
||||
</div>
|
||||
|
||||
<div class="title">
|
||||
<%= f.label :language, t("personal_journal.language") %>
|
||||
<%= f.select :language, WritingSeminar::LANGUAGE_TYPES, :prompt => 'Select' %>
|
||||
<%= f.select :language, WritingConference::LANGUAGE_TYPES, :prompt => 'Select' %>
|
||||
</div>
|
||||
|
||||
<div class="title">
|
||||
<%= f.label :note, t("personal_seminar.note") %>
|
||||
<%= f.label :note, t("personal_conference.note") %>
|
||||
<%= f.text_area :note, :size => "60x3" %>
|
||||
</div>
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
<tr>
|
||||
<td style="text-align:center" colspan="3">
|
||||
<div id='add_plugin_file' class="info_input plugin_files_block">
|
||||
<%= hidden_field_tag 'plugin_file_field_count', @writing_seminar.writing_seminar_files.count %>
|
||||
<%= hidden_field_tag 'plugin_file_field_count', @writing_conference.writing_conference_files.count %>
|
||||
<a class="add"><span class="btn btn-primary btn-small"><i class="icon-plus icon-white"></i> ADD/新增</span></a>
|
||||
</div>
|
||||
</td>
|
||||
@@ -206,9 +206,9 @@
|
||||
</tfoot>
|
||||
<tbody>
|
||||
|
||||
<% @writing_seminar.writing_seminar_files.each_with_index do |writing_seminar_file, i| %>
|
||||
<%= f.fields_for :writing_seminar_files, writing_seminar_file do |f| %>
|
||||
<%= render :partial => 'form_file', :object => writing_seminar_file, :locals => {:f => f, :i => i} %>
|
||||
<% @writing_conference.writing_conference_files.each_with_index do |writing_conference_file, i| %>
|
||||
<%= f.fields_for :writing_conference_files, writing_conference_file do |f| %>
|
||||
<%= render :partial => 'form_file', :object => writing_conference_file, :locals => {:f => f, :i => i} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
@@ -242,7 +242,7 @@
|
||||
var new_id = $(this).prev().attr('value');
|
||||
var old_id = new RegExp("new_add_plugin_files", "g");
|
||||
$(this).prev().attr('value', parseInt(new_id) + 1);
|
||||
$(this).parents('table').append(("<%= escape_javascript(add_attribute 'form_file', f, :writing_seminar_files) %>").replace(old_id, new_id));
|
||||
$(this).parents('table').append(("<%= escape_javascript(add_attribute 'form_file', f, :writing_conference_files) %>").replace(old_id, new_id));
|
||||
});
|
||||
|
||||
$('.add_plugin_files_block a.delete').live('click', function(){
|
||||
@@ -255,4 +255,4 @@
|
||||
});
|
||||
|
||||
</script>
|
||||
<% end %>
|
||||
<% end %>
|
||||
File renamed without changes.
+11
@@ -0,0 +1,11 @@
|
||||
<% # encoding: utf-8 %>
|
||||
|
||||
<tr id="<%= dom_id list_author_type %>">
|
||||
<td><%= list_author_type.title %></td>
|
||||
<td class="span2">
|
||||
|
||||
<a href="<%= panel_personal_conference_back_end_writing_conference_author_type_quick_edit_path(list_author_type) %>#myModal2" data-toggle="modal" data-remote="true" class="action">編輯</a>
|
||||
<%= link_to show_toggle_archive_btn(list_author_type),
|
||||
polymorphic_path([:panel, :personal_conference, :back_end, list_author_type]), :confirm => t('announcement.sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %>
|
||||
</td>
|
||||
</tr>
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
<% # encoding: utf-8 %>
|
||||
|
||||
<tr id="<%= dom_id list_paper_type %>">
|
||||
<td><%= list_paper_type.title %></td>
|
||||
<td class="span2">
|
||||
|
||||
<a href="<%= panel_personal_conference_back_end_writing_conference_paper_type_quick_edit_path(list_paper_type) %>#myModal1" data-toggle="modal" data-remote="true" class="action">編輯</a>
|
||||
<%= link_to show_toggle_archive_btn(list_paper_type),
|
||||
polymorphic_path([:panel, :personal_conference, :back_end, list_paper_type]), :confirm => t('announcement.sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %>
|
||||
</td>
|
||||
</tr>
|
||||
+2
-2
@@ -26,9 +26,9 @@
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<%= hidden_field_tag 'writing_seminar_category[paper_type]', @set_paper_type.id %>
|
||||
<%= hidden_field_tag 'writing_conference_category[paper_type]', @set_paper_type.id %>
|
||||
<%= f.submit t('submit'), :class=>'btn btn-primary' %>
|
||||
<a class="btn" data-dismiss="modal"><%= t('cancel')%></a>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
<%= render_sort_bar(true, delete_panel_personal_conference_back_end_writing_conferences_path(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]),
|
||||
['year', 'year', 'span1', 'writing_conference.year'],
|
||||
['title', 'title','span3', 'writing_conference.title'],
|
||||
['create_modified', 'create_user_id','span1-3', 'writing_conference.create_modified']).html_safe %>
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
<tr id="<%= dom_id writing_conference %>" class="with_action">
|
||||
<td>
|
||||
<% if (writing_conference.create_user_id == current_user.id) || is_manager? %>
|
||||
<%= check_box_tag 'to_delete[]', writing_conference.id, false, :class => "checkbox_in_list" %>
|
||||
<% end -%>
|
||||
</td>
|
||||
<td><%= writing_conference.year %></td>
|
||||
<td>
|
||||
<%= link_to writing_conference.create_link, panel_personal_conference_front_end_writing_conference_path(writing_conference) %>
|
||||
<div class="quick-edit">
|
||||
<ul class="nav nav-pills hide">
|
||||
<%if at_least_module_manager || writing_conference.writing_conference_category.cur_user_is_sub_manager_of(:edit)%>
|
||||
<li><%= link_to t('edit'), edit_panel_personal_conference_back_end_writing_conference_path(writing_conference) %></li>
|
||||
<li><%= link_to t(:delete_), panel_personal_conference_back_end_writing_conference_path(writing_conference), :confirm => t('sure?'), :method => :delete, :remote => true %></li>
|
||||
<% end -%>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td><%= User.from_id(writing_conference.create_user_id).name rescue ''%></td>
|
||||
</tr>
|
||||
|
||||
File renamed without changes.
File renamed without changes.
+10
@@ -0,0 +1,10 @@
|
||||
|
||||
<% if !@conference_paper_type.blank? %>
|
||||
$("#myModal1").modal('hide');
|
||||
$('<%= j render :partial => 'list_paper_type', :collection => [@conference_paper_type] %>').appendTo('#paper_types').hide().fadeIn();
|
||||
<% end %>
|
||||
|
||||
<% if !@conference_author_type.blank? %>
|
||||
$("#myModal2").modal('hide');
|
||||
$('<%= j render :partial => 'list_author_type', :collection => [@conference_author_type] %>').appendTo('#author_types').hide().fadeIn();
|
||||
<% end %>
|
||||
+1
@@ -0,0 +1 @@
|
||||
$("#<%= dom_id @writing_conference %>").remove();
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
<h1><%= t('personal_conference.editing_personal_conference') %></h1>
|
||||
|
||||
<%= form_for @writing_conference, :url => panel_personal_conference_back_end_writing_conference_path(@writing_conference), :html => {:class => 'clear'} do |f| %>
|
||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||
<% end %>
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
<%= render 'filter' %>
|
||||
<table class="table main-list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="span1"></th>
|
||||
<th class="span1"></th>
|
||||
<th class="span2"></th>
|
||||
<th class="span3"></th>
|
||||
<th class="span2"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tbody_writing_conferences" class="sort-holder">
|
||||
<%= render :partial => 'writing_conference', :collection => @writing_conferences %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="form-actions form-fixed pagination-right">
|
||||
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_personal_conference_back_end_writing_conference_path, :class => 'btn btn-primary pull-right' %>
|
||||
<div id="writing_conference_pagination" class="paginationFixed">
|
||||
<%= paginate @writing_conferences, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>
|
||||
</div>
|
||||
</div>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
$("#sort_headers").html("<%= j render 'sort_headers' %>");
|
||||
$("#tbody_writing_conferences").html("<%= j render :partial => 'writing_conference', :collection => @writing_conferences %>");
|
||||
$("#writing_conference_pagination").html("<%= j paginate @writing_conferences, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>");
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
|
||||
<%= flash_messages %>
|
||||
<div id="poststuff">
|
||||
<h1><%= t('writing_conference.new_personal_conference') %></h1>
|
||||
<%= form_for @writing_conference, :url => panel_personal_conference_back_end_writing_conferences_path, :html => {:class => 'clear'} do |f| %>
|
||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||
<% end %>
|
||||
</div>
|
||||
<%#= link_back %>
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+10
@@ -0,0 +1,10 @@
|
||||
|
||||
<% if !@conference_paper_type.blank? %>
|
||||
$("#myModal1").modal('hide');
|
||||
$("#<%= dom_id @conference_paper_type %>").replaceWith("<%= j render :partial => 'list_paper_type', :collection => [@conference_paper_type] %>");
|
||||
<% end %>
|
||||
|
||||
<% if !@conference_author_type.blank? %>
|
||||
$("#myModal2").modal('hide');
|
||||
$("#<%= dom_id @conference_author_type %>").replaceWith("<%= j render :partial => 'list_author_type', :collection => [@conference_author_type] %>");
|
||||
<% end %>
|
||||
+3
-3
@@ -5,7 +5,7 @@
|
||||
<div class="item element">
|
||||
<div class="detail w-a h-a">
|
||||
<p class="totle">
|
||||
<a class="btn btn-small btn-primary pull-right" href="<%= panel_personal_seminar_back_end_writing_seminar_paper_type_quick_add_path('add') %>#myModal1" data-toggle="modal" data-remote="true"><i class="icon-plus"></i> <%= t('add')%></a>
|
||||
<a class="btn btn-small btn-primary pull-right" href="<%= panel_personal_conference_back_end_writing_conference_paper_type_quick_add_path('add') %>#myModal1" data-toggle="modal" data-remote="true"><i class="icon-plus"></i> <%= t('add')%></a>
|
||||
<span>論文型態</span>
|
||||
</p>
|
||||
<div class="detal-list my_scroll">
|
||||
@@ -31,7 +31,7 @@
|
||||
<div class="item element">
|
||||
<div class="detail w-a h-a">
|
||||
<p class="totle">
|
||||
<a class="btn btn-small btn-primary pull-right" href="<%= panel_personal_seminar_back_end_writing_seminar_author_type_quick_add_path('add') %>#myModal2" data-toggle="modal" data-remote="true"><i class="icon-plus"></i> <%= t('add')%></a>
|
||||
<a class="btn btn-small btn-primary pull-right" href="<%= panel_personal_conference_back_end_writing_conference_author_type_quick_add_path('add') %>#myModal2" data-toggle="modal" data-remote="true"><i class="icon-plus"></i> <%= t('add')%></a>
|
||||
<span>作者型態</span>
|
||||
</p>
|
||||
<div class="detal-list my_scroll">
|
||||
@@ -143,4 +143,4 @@
|
||||
|
||||
<% content_for :page_specific_css do %>
|
||||
<%= stylesheet_link_tag "item" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
<%
|
||||
@filter = params[:filter]
|
||||
new_filter = params[:new_filter]
|
||||
|
||||
if @filter && params[:clear]
|
||||
@filter.delete(params[:type])
|
||||
elsif @filter && new_filter
|
||||
if @filter.has_key?(new_filter[:type]) && @filter[new_filter[:type]].include?(new_filter[:id].to_s)
|
||||
@filter[new_filter[:type]].delete(new_filter[:id].to_s)
|
||||
elsif @filter.has_key?(new_filter[:type])
|
||||
@filter[new_filter[:type]] << new_filter[:id].to_s
|
||||
else
|
||||
@filter.merge!({new_filter[:type] => [new_filter[:id].to_s]})
|
||||
end
|
||||
elsif new_filter
|
||||
@filter = {new_filter[:type] => [new_filter[:id].to_s]}
|
||||
end
|
||||
|
||||
|
||||
if @user
|
||||
@writing_conferences = WritingConference.where(:create_user_id => @user.id).page(params[:page]).per(10)
|
||||
else
|
||||
@writing_conferences = WritingConference.all.page(params[:page]).per(10)
|
||||
end
|
||||
|
||||
|
||||
%>
|
||||
|
||||
<table class="table main-list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="span1"><%= t('writing_conference.year') %></th>
|
||||
<th class="span3"><%= t('writing_conference.title') %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tbody_writing_conferences" class="sort-holder">
|
||||
|
||||
|
||||
<% @writing_conferences.each do |writing_conference| %>
|
||||
|
||||
<tr id="<%= dom_id writing_conference %>" class="with_action">
|
||||
<td><%= writing_conference.year %></td>
|
||||
<td>
|
||||
<%= link_to writing_conference.create_link, panel_personal_conference_front_end_writing_conference_path(writing_conference) %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<% end %>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_personal_conference_back_end_writing_conference_path(:user_id => @user.id), :class => 'btn btn-primary pull-right' %>
|
||||
|
||||
|
||||
<div class="form-actions form-fixed pagination-right">
|
||||
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_personal_conference_plugin_writing_conference_path, :class => 'btn btn-primary pull-right' %>
|
||||
<div id="writing_conference_pagination" class="paginationFixed">
|
||||
<%= paginate @writing_conferences, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>
|
||||
</div>
|
||||
</div>
|
||||
File renamed without changes.
+34
-34
@@ -10,13 +10,13 @@
|
||||
<div class="widget-action clear tip" title="Setting">
|
||||
<a class="action"><i class="icon-cog icon-white"></i></a>
|
||||
</div>
|
||||
<h3 class="widget-title"><i class="icons-tag"></i><%= f.label :paper_type ,t("personal_seminar.paper_type")%></h3>
|
||||
<h3 class="widget-title"><i class="icons-tag"></i><%= f.label :paper_type ,t("personal_conference.paper_type")%></h3>
|
||||
<div class="widget-content clear form-horizontal">
|
||||
<% @paper_types.each do |paper_type| %>
|
||||
<%= content_tag :label,:class => "checkbox inline" do -%>
|
||||
<%= check_box_tag 'writing_seminar[seminar_paper_type_ids][]', paper_type.id, @writing_seminar.seminar_paper_type_ids.include?(paper_type.id)%>
|
||||
<%= check_box_tag 'writing_conference[conference_paper_type_ids][]', paper_type.id, @writing_conference.conference_paper_type_ids.include?(paper_type.id)%>
|
||||
<%= paper_type.title %>
|
||||
<%= hidden_field_tag 'writing_seminar[seminar_paper_type_ids][]', '' %>
|
||||
<%= hidden_field_tag 'writing_conference[conference_paper_type_ids][]', '' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
@@ -26,13 +26,13 @@
|
||||
<div class="widget-action clear tip" title="Setting">
|
||||
<a class="action"><i class="icon-cog icon-white"></i></a>
|
||||
</div>
|
||||
<h3 class="widget-title"><i class="icons-tag"></i><%= f.label :author_type ,t("personal_seminar.author_type")%></h3>
|
||||
<h3 class="widget-title"><i class="icons-tag"></i><%= f.label :author_type ,t("personal_conference.author_type")%></h3>
|
||||
<div class="widget-content clear form-horizontal">
|
||||
<% @author_types.each do |author_type| %>
|
||||
<%= content_tag :label,:class => "checkbox inline" do -%>
|
||||
<%= check_box_tag 'writing_seminar[seminar_author_type_ids][]', author_type.id, @writing_seminar.seminar_author_type_ids.include?(author_type.id)%>
|
||||
<%= check_box_tag 'writing_conference[conference_author_type_ids][]', author_type.id, @writing_conference.conference_author_type_ids.include?(author_type.id)%>
|
||||
<%= author_type.title %>
|
||||
<%= hidden_field_tag 'writing_seminar[seminar_author_type_ids][]', '' %>
|
||||
<%= hidden_field_tag 'writing_conference[conference_author_type_ids][]', '' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
@@ -47,9 +47,9 @@
|
||||
<div class="widget-content clear form-horizontal">
|
||||
<% @tags.each do |tag| %>
|
||||
<%= content_tag :label,:class => "checkbox inline" do -%>
|
||||
<%= check_box_tag 'writing_seminar[tag_ids][]', tag.id, @writing_seminar.tag_ids.include?(tag.id)%>
|
||||
<%= check_box_tag 'writing_conference[tag_ids][]', tag.id, @writing_conference.tag_ids.include?(tag.id)%>
|
||||
<%= tag[I18n.locale] %>
|
||||
<%= hidden_field_tag 'writing_seminar[tag_ids][]', '' %>
|
||||
<%= hidden_field_tag 'writing_conference[tag_ids][]', '' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
@@ -65,8 +65,8 @@
|
||||
<div id="post-body-content" class="clear">
|
||||
|
||||
<div class="title">
|
||||
<%= f.label :year ,t("personal_seminar.year")%>
|
||||
<%= select_year((@writing_seminar.year ? @writing_seminar.year.to_i : DateTime.now.year), {:start_year => DateTime.now.year, :end_year => 1930}, {:name => 'writing_seminar[year]'} ) %>
|
||||
<%= f.label :year ,t("personal_conference.year")%>
|
||||
<%= select_year((@writing_conference.year ? @writing_conference.year.to_i : DateTime.now.year), {:start_year => DateTime.now.year, :end_year => 1930}, {:name => 'writing_conference[year]'} ) %>
|
||||
</div>
|
||||
|
||||
<ul class="nav nav-tabs">
|
||||
@@ -76,12 +76,12 @@
|
||||
</ul>
|
||||
|
||||
<div class="title">
|
||||
<%= f.label :period_start_date ,t("personal_seminar.period_start_date")%>
|
||||
<%= f.label :period_start_date ,t("personal_conference.period_start_date")%>
|
||||
<%= f.date_select :period_start_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year, :month, :day] }, {:class => 'span1'} %>
|
||||
</div>
|
||||
|
||||
<div class="title">
|
||||
<%= f.label :period_end_date ,t("personal_seminar.period_end_date")%>
|
||||
<%= f.label :period_end_date ,t("personal_conference.period_end_date")%>
|
||||
<%= f.date_select :period_end_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year, :month, :day] }, {:class => 'span1'} %>
|
||||
</div>
|
||||
|
||||
@@ -91,34 +91,34 @@
|
||||
|
||||
<div class="<%= locale %> fade tab-pane <%= ( i == 0 ) ? "in active" : '' %>">
|
||||
<div class="title">
|
||||
<%= f.label :paper_title ,t("personal_seminar.paper_title")%>
|
||||
<%= f.label :paper_title ,t("personal_conference.paper_title")%>
|
||||
<%= f.fields_for :paper_title_translations do |f| %>
|
||||
<%= I18nVariable.from_locale(locale) %>
|
||||
<%= f.text_field locale, :class=>'post-title', :value => (@writing_seminar.paper_title_translations[locale] rescue nil) %>
|
||||
<%= f.text_field locale, :class=>'post-title', :value => (@writing_conference.paper_title_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="title">
|
||||
<%= f.label :seminar_title ,t("personal_seminar.seminar_title")%>
|
||||
<%= f.fields_for :seminar_title_translations do |f| %>
|
||||
<%= f.label :conference_title ,t("personal_conference.conference_title")%>
|
||||
<%= f.fields_for :conference_title_translations do |f| %>
|
||||
<%= I18nVariable.from_locale(locale) %>
|
||||
<%= f.text_field locale, :class=>'post-title', :value => (@writing_seminar.seminar_title_translations[locale] rescue nil) %>
|
||||
<%= f.text_field locale, :class=>'post-title', :value => (@writing_conference.conference_title_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="title">
|
||||
<%= f.label :location ,t("personal_seminar.location")%>
|
||||
<%= f.label :location ,t("personal_conference.location")%>
|
||||
<%= f.fields_for :location_translations do |f| %>
|
||||
<%= I18nVariable.from_locale(locale) %>
|
||||
<%= f.text_field locale, :class=>'post-title', :value => (@writing_seminar.location_translations[locale] rescue nil) %>
|
||||
<%= f.text_field locale, :class=>'post-title', :value => (@writing_conference.location_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="title">
|
||||
<%= f.label :sponsor ,t("personal_seminar.sponsor")%>
|
||||
<%= f.label :sponsor ,t("personal_conference.sponsor")%>
|
||||
<%= f.fields_for :sponsor_translations do |f| %>
|
||||
<%= I18nVariable.from_locale(locale) %>
|
||||
<%= f.text_field locale, :class=>'post-title', :value => (@writing_seminar.sponsor_translations[locale] rescue nil) %>
|
||||
<%= f.text_field locale, :class=>'post-title', :value => (@writing_conference.sponsor_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
<%= f.label :authors,t("web_resource.authors") %>
|
||||
<%= f.fields_for :authors_translations do |f| %>
|
||||
<%= I18nVariable.from_locale(locale) %>
|
||||
<%= f.text_area locale, :size => "60x3", :value => (@writing_seminar.authors_translations[locale] rescue nil) %>
|
||||
<%= f.text_area locale, :size => "60x3", :value => (@writing_conference.authors_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -137,32 +137,32 @@
|
||||
</div>
|
||||
|
||||
<div class="title">
|
||||
<%= f.label :publication_date ,t("personal_seminar.publication_date")%>
|
||||
<%= f.label :publication_date ,t("personal_conference.publication_date")%>
|
||||
<%= f.date_select :publication_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1890, :order => [:year, :month, :day] }, {:class => 'span1'} %>
|
||||
</div>
|
||||
|
||||
<div class="title">
|
||||
<%= f.label :url, t("personal_seminar.url") %>
|
||||
<%= f.label :url, t("personal_conference.url") %>
|
||||
<%= f.text_field :url %>
|
||||
</div>
|
||||
|
||||
<div class="title">
|
||||
<%= f.label :keywords, t("personal_seminar.keywords") %>
|
||||
<%= f.label :keywords, t("personal_conference.keywords") %>
|
||||
<%= f.text_field :keywords %>
|
||||
</div>
|
||||
|
||||
<div class="title">
|
||||
<%= f.label :abstract, t("personal_seminar.abstract") %>
|
||||
<%= f.label :abstract, t("personal_conference.abstract") %>
|
||||
<%= f.text_field :abstract %>
|
||||
</div>
|
||||
|
||||
<div class="title">
|
||||
<%= f.label :language, t("personal_journal.language") %>
|
||||
<%= f.select :language, WritingSeminar::LANGUAGE_TYPES, :prompt => 'Select' %>
|
||||
<%= f.select :language, WritingConference::LANGUAGE_TYPES, :prompt => 'Select' %>
|
||||
</div>
|
||||
|
||||
<div class="title">
|
||||
<%= f.label :note, t("personal_seminar.note") %>
|
||||
<%= f.label :note, t("personal_conference.note") %>
|
||||
<%= f.text_area :note, :size => "60x3" %>
|
||||
</div>
|
||||
|
||||
@@ -188,7 +188,7 @@
|
||||
<tr>
|
||||
<td style="text-align:center" colspan="3">
|
||||
<div id='add_plugin_file' class="info_input plugin_files_block">
|
||||
<%= hidden_field_tag 'plugin_file_field_count', @writing_seminar.writing_seminar_files.count %>
|
||||
<%= hidden_field_tag 'plugin_file_field_count', @writing_conference.writing_conference_files.count %>
|
||||
<a class="add"><span class="btn btn-primary btn-small"><i class="icon-plus icon-white"></i> ADD/新增</span></a>
|
||||
</div>
|
||||
</td>
|
||||
@@ -197,9 +197,9 @@
|
||||
</tfoot>
|
||||
<tbody>
|
||||
|
||||
<% @writing_seminar.writing_seminar_files.each_with_index do |writing_seminar_file, i| %>
|
||||
<%= f.fields_for :writing_seminar_files, writing_seminar_file do |f| %>
|
||||
<%= render :partial => 'form_file', :object => writing_seminar_file, :locals => {:f => f, :i => i} %>
|
||||
<% @writing_conference.writing_conference_files.each_with_index do |writing_conference_file, i| %>
|
||||
<%= f.fields_for :writing_conference_files, writing_conference_file do |f| %>
|
||||
<%= render :partial => 'form_file', :object => writing_conference_file, :locals => {:f => f, :i => i} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
@@ -232,7 +232,7 @@
|
||||
var new_id = $(this).prev().attr('value');
|
||||
var old_id = new RegExp("new_add_plugin_files", "g");
|
||||
$(this).prev().attr('value', parseInt(new_id) + 1);
|
||||
$(this).parents('table').append(("<%= escape_javascript(add_attribute 'form_file', f, :writing_seminar_files) %>").replace(old_id, new_id));
|
||||
$(this).parents('table').append(("<%= escape_javascript(add_attribute 'form_file', f, :writing_conference_files) %>").replace(old_id, new_id));
|
||||
});
|
||||
|
||||
$('.add_plugin_files_block a.delete').live('click', function(){
|
||||
@@ -245,4 +245,4 @@
|
||||
});
|
||||
|
||||
</script>
|
||||
<% end %>
|
||||
<% end %>
|
||||
File renamed without changes.
+3
@@ -0,0 +1,3 @@
|
||||
<%= render_sort_bar(true, delete_panel_personal_conference_back_end_writing_conferences_path(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]),
|
||||
['year', 'year', 'span1', 'writing_conference.year'],
|
||||
['title', 'title','span3', 'writing_conference.title']).html_safe %>
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
<tr id="<%= dom_id writing_conference %>" class="with_action">
|
||||
<td>
|
||||
<% if (writing_conference.create_user_id == current_user.id) || is_manager? %>
|
||||
<%= check_box_tag 'to_delete[]', writing_conference.id, false, :class => "checkbox_in_list" %>
|
||||
<% end -%>
|
||||
</td>
|
||||
<td><%= writing_conference.year %></td>
|
||||
<td>
|
||||
<%= link_to writing_conference.create_link, panel_personal_conference_front_end_writing_conference_path(writing_conference) %>
|
||||
<div class="quick-edit">
|
||||
<ul class="nav nav-pills hide">
|
||||
<%if at_least_module_manager || writing_conference.writing_conference_category.cur_user_is_sub_manager_of(:edit)%>
|
||||
<li><%= link_to t('edit'), edit_panel_personal_conference_plugin_writing_conference_path(writing_conference) %></li>
|
||||
<li><%= link_to t(:delete_), panel_personal_conference_plugin_writing_conference_path(writing_conference), :confirm => t('sure?'), :method => :delete, :remote => true %></li>
|
||||
<% end -%>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
$("#<%= dom_id @writing_conference %>").remove();
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
<h1><%= t('personal_conference.editing_personal_conference') %></h1>
|
||||
|
||||
<%= form_for @writing_conference, :url => panel_personal_conference_plugin_writing_conference_path(@writing_conference), :html => {:class => 'clear'} do |f| %>
|
||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||
<% end %>
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
<%= render 'filter' %>
|
||||
<table class="table main-list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="span1"></th>
|
||||
<th class="span1"></th>
|
||||
<th class="span2"></th>
|
||||
<th class="span3"></th>
|
||||
<th class="span2"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tbody_writing_conferences" class="sort-holder">
|
||||
<%= render :partial => 'writing_conference', :collection => @writing_conferences %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="form-actions form-fixed pagination-right">
|
||||
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_personal_conference_plugin_writing_conference_path, :class => 'btn btn-primary pull-right' %>
|
||||
<div id="writing_conference_pagination" class="paginationFixed">
|
||||
<%= paginate @writing_conferences, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>
|
||||
</div>
|
||||
</div>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
$("#sort_headers").html("<%= j render 'sort_headers' %>");
|
||||
$("#tbody_writing_conferences").html("<%= j render :partial => 'writing_conference', :collection => @writing_conferences %>");
|
||||
$("#writing_conference_pagination").html("<%= j paginate @writing_conferences, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>");
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
|
||||
<%= flash_messages %>
|
||||
<div id="poststuff">
|
||||
<h1><%= t('writing_conference.new_personal_conference') %></h1>
|
||||
<%= form_for @writing_conference, :url => panel_personal_conference_plugin_writing_conferences_path, :html => {:class => 'clear'} do |f| %>
|
||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||
<% end %>
|
||||
</div>
|
||||
<%#= link_back %>
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,36 @@
|
||||
Rails.application.routes.draw do
|
||||
|
||||
namespace :panel do
|
||||
namespace :personal_conference do
|
||||
namespace :back_end do
|
||||
match 'writing_conference_setting' => "writing_conferences#writing_conference_setting" ,:as => :writing_conference_setting
|
||||
resources :writing_conferences do
|
||||
collection do
|
||||
get 'delete'
|
||||
end
|
||||
match "author_type_quick_add" => "writing_conferences#author_type_quick_add" ,:as => :author_type_quick_add
|
||||
match "author_type_quick_edit" => "writing_conferences#author_type_quick_edit" ,:as => :author_type_quick_edit
|
||||
match "paper_type_quick_add" => "writing_conferences#paper_type_quick_add" ,:as => :paper_type_quick_add
|
||||
match "paper_type_quick_edit" => "writing_conferences#paper_type_quick_edit" ,:as => :paper_type_quick_edit
|
||||
end
|
||||
resources :conference_paper_types
|
||||
resources :conference_author_types
|
||||
# resources :conference_level_types
|
||||
resources :tags
|
||||
end
|
||||
namespace :front_end do
|
||||
resources :writing_conferences
|
||||
end
|
||||
namespace :plugin do
|
||||
resources :writing_conferences
|
||||
end
|
||||
namespace :widget do
|
||||
match "writing_conferences" => "writing_conferences#index"
|
||||
match "home_list" => "writing_conferences#home_list"
|
||||
match "reload_writing_conferences" => "writing_conferences#reload_writing_conferences"
|
||||
end
|
||||
end
|
||||
end
|
||||
match "/appfront/*path" => redirect("/panel/*path")
|
||||
|
||||
end
|
||||
+5
-5
@@ -1,8 +1,8 @@
|
||||
module PersonalSeminar
|
||||
OrbitApp.registration "Seminar",:type=> 'ModuleApp' do
|
||||
module_label 'miss_plugin_i18n.personal_seminar'
|
||||
module PersonalConference
|
||||
OrbitApp.registration "Conference",:type=> 'ModuleApp' do
|
||||
module_label 'admin.personal_conference'
|
||||
base_url File.expand_path File.dirname(__FILE__)
|
||||
personal_plugin :enable => true,:path=>"panel/personal_seminar/plugin/profile",:i18n=>'miss_plugin_i18n.personal_seminar'
|
||||
personal_plugin :enable => true,:path=>"panel/personal_conference/plugin/profile",:i18n=>'admin.personal_conference'
|
||||
|
||||
|
||||
end
|
||||
@@ -22,4 +22,4 @@ end
|
||||
# :priority=>1,:label=>I18n.t('announcement.add_new'),
|
||||
# :active_for_action=>{:news_bulletins=>:new}
|
||||
|
||||
# end
|
||||
# end
|
||||
@@ -0,0 +1,4 @@
|
||||
require "personal_conference/engine"
|
||||
|
||||
module PersonalConference
|
||||
end
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
module PersonalSeminar
|
||||
module PersonalConference
|
||||
class Engine < Rails::Engine
|
||||
end
|
||||
end
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
module PersonalConference
|
||||
VERSION = "0.0.1"
|
||||
end
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
# desc "Explaining what the task does"
|
||||
# task :personal_seminar do
|
||||
# task :personal_conference do
|
||||
# # Task goes here
|
||||
# end
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
$:.push File.expand_path("../lib", __FILE__)
|
||||
|
||||
# Maintain your gem's version:
|
||||
require "personal_seminar/version"
|
||||
require "personal_conference/version"
|
||||
|
||||
# Describe your gem and declare its dependencies:
|
||||
Gem::Specification.new do |s|
|
||||
s.name = "personal_seminar"
|
||||
s.name = "personal_conference"
|
||||
s.version = PersonalSeminar::VERSION
|
||||
s.authors = ["TODO: Your name"]
|
||||
s.email = ["TODO: Your email"]
|
||||
+3
-3
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"title": "personal_seminar",
|
||||
"object": "writing_seminar",
|
||||
"title": "personal_conference",
|
||||
"object": "writing_conference",
|
||||
"version": "0.1",
|
||||
"organization": "Rulingcom",
|
||||
"author": "RD dep",
|
||||
"intro": "A simple blog……",
|
||||
"update_info": "Some info",
|
||||
"create_date": "09-08-2012",
|
||||
"category": ["WritingSeminarCategory"],
|
||||
"category": ["WritingConferenceCategory"],
|
||||
"enable_frontend": true,
|
||||
"has_plugin": true
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+1
-1
@@ -3,7 +3,7 @@ require File.expand_path('../boot', __FILE__)
|
||||
require 'rails/all'
|
||||
|
||||
Bundler.require
|
||||
require "personal_seminar"
|
||||
require "personal_conference"
|
||||
|
||||
module Dummy
|
||||
class Application < Rails::Application
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 100 of 170 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user