relpace seminar to conference

This commit is contained in:
Rueshyna 2013-01-23 18:35:00 +08:00 committed by chris
parent e0fedb4454
commit d4df7c82d3
170 changed files with 2229 additions and 1494 deletions

View File

@ -15,4 +15,4 @@
//= require orbitTimeline //= require orbitTimeline
//= require orbitdesktop //= require orbitdesktop
//= require desktop/books_pages //= require desktop/books_pages
//= require desktop/seminar_pages //= require desktop/conference_pages

View File

@ -1,6 +1,6 @@
orbitDesktop.prototype.initializeSeminar = function(target,url,cache){ orbitDesktop.prototype.initializeConference = function(target,url,cache){
this.initializeSeminar.list = function(){ this.initializeConference.list = function(){
var bindHandlers = function(){ var bindHandlers = function(){
o.tinyscrollbar_ext({ o.tinyscrollbar_ext({
main : ".tinycanvas", main : ".tinycanvas",
@ -13,7 +13,7 @@ orbitDesktop.prototype.initializeSeminar = function(target,url,cache){
} }
this.initializeSeminar.addseminar = function(){ this.initializeConference.addconference = function(){
var bindHandlers = function(){ var bindHandlers = function(){
o.simple_drop_down(); o.simple_drop_down();
@ -26,7 +26,7 @@ orbitDesktop.prototype.initializeSeminar = function(target,url,cache){
bindHandlers(); bindHandlers();
} }
this.initializeSeminar.seminar = function(){ this.initializeConference.conference = function(){
var bindHandlers = function(){ var bindHandlers = function(){
o.simple_drop_down(); o.simple_drop_down();
@ -39,7 +39,7 @@ orbitDesktop.prototype.initializeSeminar = function(target,url,cache){
bindHandlers(); bindHandlers();
} }
this.initializeSeminar.rues = function(){ this.initializeConference.rues = function(){
var bindHandlers = function(){ var bindHandlers = function(){
o.simple_drop_down(); o.simple_drop_down();
@ -53,6 +53,6 @@ orbitDesktop.prototype.initializeSeminar = function(target,url,cache){
} }
this.initializeSeminar.list(); this.initializeConference.list();
} }

View File

@ -1,75 +0,0 @@
class DesktopPublicationsController< ApplicationController
def journal_p
render "desktop/journal_p", :layout => false
end
def journal_p_list
render "desktop/journal_pages/list", :layout => false
end
def journal_p_add
debugger
render "desktop/journal_pages/add", :layout => false
end
def books
render "desktop/books", :layout => false
end
def books_list
render "desktop/books/list", :layout => false
end
def books_add
render "desktop/books/add", :layout => false
end
def seminar_p
render "desktop/seminar_p", :layout => false
end
def seminar_p_list
render "desktop/seminar_pages/list", :layout => false
end
def seminar_p_add
render "desktop/seminar_pages/add", :layout => false
end
def create_journal
Journal.create(user_id: current_user.id, title: "Ice Cream Sandwich")
b = Array.new
b << {"success"=>"true"}
render :json=>b.to_json
end
def getjournals
@journals = current_user.journals
data = Array.new
@journals.each do |journal|
@papers = journal.papers.all
data << {"title" => journal.title, "papers" => @papers}
end
render :json=>data.to_json
end
def delete_journal
@journals = Journal.find("")
@journals.delete
b = Array.new
b << {"success"=>"true"}
render :json=>b.to_json
end
def update_journal
@journal = Journal.find("4ff2d6ebbd98eb02b9000017")
@papers = @journal.papers
@papers.each do |paper|
paper.update_attributes(:user_id => current_user.id)
end
b = Array.new
b << {"success"=>"true"}
render :json=>b.to_json
end
end

View File

@ -17,16 +17,16 @@ class DesktopPublicationsController< ApplicationController
render "desktop/books/add", :layout => false render "desktop/books/add", :layout => false
end end
def seminar_p def conference_p
render "desktop/seminar_p", :layout => false render "desktop/conference_p", :layout => false
end end
def seminar_p_list def conference_p_list
render "desktop/seminar_pages/list", :layout => false render "desktop/conference_pages/list", :layout => false
end end
def seminar_p_add def conference_p_add
render "desktop/seminar_pages/add", :layout => false render "desktop/conference_pages/add", :layout => false
end end
# def create_journal # def create_journal

View File

@ -13,7 +13,7 @@
<li class="dock_item"><a callback-method='initializeJournalPapers' href="<%= panel_personal_journal_desktop_journal_p_path %>" class="widget_fn wh3 hh3" id='d_journal_p' custom-load="journal" onclick="return false;"><span class="widget_icon"><img src="" alt="Journal Papers" id="journal_p_icon" width="30" height="30"/></span></a></li> <li class="dock_item"><a callback-method='initializeJournalPapers' href="<%= panel_personal_journal_desktop_journal_p_path %>" class="widget_fn wh3 hh3" id='d_journal_p' custom-load="journal" onclick="return false;"><span class="widget_icon"><img src="" alt="Journal Papers" id="journal_p_icon" width="30" height="30"/></span></a></li>
<li class="dock_item"><a callback-method='initializeSeminar' href="<%= desktop_publications_seminar_p_path %>" class="widget_fn wh3 hh3" id='d_seminar_p' custom-load="seminar" onclick="return false;"><span class="widget_icon"><img src="" alt="Seminar Papers" id="seminar_p_icon" width="30" height="30"/></span></a></li> <li class="dock_item"><a callback-method='initializeConference' href="<%= desktop_publications_conference_p_path %>" class="widget_fn wh3 hh3" id='d_conference_p' custom-load="conference" onclick="return false;"><span class="widget_icon"><img src="" alt="Conference Papers" id="conference_p_icon" width="30" height="30"/></span></a></li>
<li class="dock_item"><a callback-method='initializeBooks' href="<%= desktop_publications_books_path %>" class="widget_fn wh3 hh3" id='d_books' onclick="return false;"><span class="widget_icon"><img src="" alt="Books" id="books_icon" width="30" height="30"/></span></a></li> <li class="dock_item"><a callback-method='initializeBooks' href="<%= desktop_publications_books_path %>" class="widget_fn wh3 hh3" id='d_books' onclick="return false;"><span class="widget_icon"><img src="" alt="Books" id="books_icon" width="30" height="30"/></span></a></li>

View File

@ -41,10 +41,10 @@
<div class="overview"> <div class="overview">
<div class="s_grid_con s_form"> <div class="s_grid_con s_form">
<ul> <ul>
<li class="s_grid_row"><textarea class="s_grid_6 s_grid" name="" id="">Seminar Title</textarea></li> <li class="s_grid_row"><textarea class="s_grid_6 s_grid" name="" id="">Conference Title</textarea></li>
<li class="s_grid_row"> <li class="s_grid_row">
<label>Paper type</label><input type="radio" name="" value="Books" />Oral<input type="radio" name="" value="Chapter" />Poster</li> <label>Paper type</label><input type="radio" name="" value="Books" />Oral<input type="radio" name="" value="Chapter" />Poster</li>
<li class="s_grid_row"><label>Seminar time</label></li> <li class="s_grid_row"><label>Conference time</label></li>
<li class="s_grid_row"><select name="" id="" class="s_grid s_grid_1"> <li class="s_grid_row"><select name="" id="" class="s_grid s_grid_1">
<option value=""></option> <option value=""></option>
@ -104,4 +104,4 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -41,10 +41,10 @@
<div class="overview"> <div class="overview">
<div class="s_grid_con s_form"> <div class="s_grid_con s_form">
<ul> <ul>
<li class="s_grid_row"><textarea class="s_grid_6 s_grid" name="" id="">Seminar Title</textarea></li> <li class="s_grid_row"><textarea class="s_grid_6 s_grid" name="" id="">Conference Title</textarea></li>
<li class="s_grid_row"> <li class="s_grid_row">
<label>Paper type</label><input type="radio" name="" value="Books" />Oral<input type="radio" name="" value="Chapter" />Poster</li> <label>Paper type</label><input type="radio" name="" value="Books" />Oral<input type="radio" name="" value="Chapter" />Poster</li>
<li class="s_grid_row"><label>Seminar time</label></li> <li class="s_grid_row"><label>Conference time</label></li>
<li class="s_grid_row"><select name="" id="" class="s_grid s_grid_1"> <li class="s_grid_row"><select name="" id="" class="s_grid s_grid_1">
<option value=""></option> <option value=""></option>
@ -104,4 +104,4 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -41,10 +41,10 @@
<div class="overview"> <div class="overview">
<div class="s_grid_con s_form"> <div class="s_grid_con s_form">
<ul> <ul>
<li class="s_grid_row"><textarea class="s_grid_6 s_grid" name="" id="">Seminar Title</textarea></li> <li class="s_grid_row"><textarea class="s_grid_6 s_grid" name="" id="">Conference Title</textarea></li>
<li class="s_grid_row"> <li class="s_grid_row">
<label>Paper type</label><input type="radio" name="" value="Books" />Oral<input type="radio" name="" value="Chapter" />Poster</li> <label>Paper type</label><input type="radio" name="" value="Books" />Oral<input type="radio" name="" value="Chapter" />Poster</li>
<li class="s_grid_row"><label>Seminar time</label></li> <li class="s_grid_row"><label>Conference time</label></li>
<li class="s_grid_row"><select name="" id="" class="s_grid s_grid_1"> <li class="s_grid_row"><select name="" id="" class="s_grid s_grid_1">
<option value=""></option> <option value=""></option>
@ -104,4 +104,4 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,8 +1,8 @@
<div id="seminar_p"> <div id="conference_p">
<div id="content"> <div id="content">
<div id="header" class="hh3"> <div id="header" class="hh3">
<div class="dtitle w2 hh3 hp"> <div class="dtitle w2 hh3 hp">
<span class="thmtxth">Seminar</span> <span class="thmtxth">Conference</span>
</div> </div>
<div id="search_app" class="hfn w2 hh2 hp thmc3"> <div id="search_app" class="hfn w2 hh2 hp thmc3">
<input type="text" class="ini_input form" value="Search" id="searchbox" /> <input type="text" class="ini_input form" value="Search" id="searchbox" />
@ -13,10 +13,10 @@
<div id="panel_l" class="ph"> <div id="panel_l" class="ph">
<div class="s_menu sm_v" content-type="menu"> <div class="s_menu sm_v" content-type="menu">
<ul id='setting_left_nav'> <ul id='setting_left_nav'>
<li><a href="<%= desktop_publications_seminar_p_list_path %>" callback-method="list" class="hh2 w2 hp active thmc1 thmtxt" onclick='return false;'>List</a></li> <li><a href="<%= desktop_publications_conference_p_list_path %>" callback-method="list" class="hh2 w2 hp active thmc1 thmtxt" onclick='return false;'>List</a></li>
<li><a href="<%= desktop_publications_seminar_p_add_path %>" callback-method="addseminar" custom-load="add" class="admtxt hh2 w2 hp" onclick='return false;'>Add/Edit</a></li> <li><a href="<%= desktop_publications_conference_p_add_path %>" callback-method="addconference" custom-load="add" class="admtxt hh2 w2 hp" onclick='return false;'>Add/Edit</a></li>
<li><a href="<%= desktop_publications_seminar_p_add_path %>" callback-method="seminar" class="admtxt hh2 w2 hp" onclick='return false;'>Seminar</a></li> <li><a href="<%= desktop_publications_conference_p_add_path %>" callback-method="conference" class="admtxt hh2 w2 hp" onclick='return false;'>Conference</a></li>
<li><a href="<%= desktop_publications_seminar_p_list_path %>" callback-method="rues" class="admtxt hh2 w2 hp" onclick='return false;'>Co-Authors</a></li> <li><a href="<%= desktop_publications_conference_p_list_path %>" callback-method="rues" class="admtxt hh2 w2 hp" onclick='return false;'>Co-Authors</a></li>
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Tags &amp; Keywords</a></li> <li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Tags &amp; Keywords</a></li>
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Analysis</a></li> <li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Analysis</a></li>
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Import</a></li> <li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Import</a></li>
@ -30,4 +30,4 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -41,10 +41,10 @@
<div class="overview"> <div class="overview">
<div class="s_grid_con s_form"> <div class="s_grid_con s_form">
<ul> <ul>
<li class="s_grid_row"><textarea class="s_grid_6 s_grid" name="" id="">Seminar Title</textarea></li> <li class="s_grid_row"><textarea class="s_grid_6 s_grid" name="" id="">Conference Title</textarea></li>
<li class="s_grid_row"> <li class="s_grid_row">
<label>Paper type</label><input type="radio" name="" value="Books" />Oral<input type="radio" name="" value="Chapter" />Poster</li> <label>Paper type</label><input type="radio" name="" value="Books" />Oral<input type="radio" name="" value="Chapter" />Poster</li>
<li class="s_grid_row"><label>Seminar time</label></li> <li class="s_grid_row"><label>Conference time</label></li>
<li class="s_grid_row"><select name="" id="" class="s_grid s_grid_1"> <li class="s_grid_row"><select name="" id="" class="s_grid s_grid_1">
<option value=""></option> <option value=""></option>
@ -104,4 +104,4 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -208,9 +208,9 @@ Orbit::Application.routes.draw do
match 'desktop_publications/books_list'=>'desktop_publications#books_list' match 'desktop_publications/books_list'=>'desktop_publications#books_list'
match 'desktop_publications/books_add'=>'desktop_publications#books_add' match 'desktop_publications/books_add'=>'desktop_publications#books_add'
match 'desktop_publications/seminar_p' => 'desktop_publications#seminar_p' match 'desktop_publications/conference_p' => 'desktop_publications#conference_p'
match 'desktop_publications/seminar_p_list/'=>'desktop_publications#seminar_p_list' match 'desktop_publications/conference_p_list/'=>'desktop_publications#conference_p_list'
match 'desktop_publications/seminar_p_add/'=>'desktop_publications#seminar_p_add' match 'desktop_publications/conference_p_add/'=>'desktop_publications#conference_p_add'
# end # end
# namespace :desktop_research do # namespace :desktop_research do

View File

@ -11,7 +11,7 @@
<li class="d_cate"><a href="" class="widget_fn wh3 hh3" id='d_publication' onclick="return false;"><span class="widget_icon"><img src="" alt="Publication" id="publication_icon" width="30" height="30"/></span></a> <li class="d_cate"><a href="" class="widget_fn wh3 hh3" id='d_publication' onclick="return false;"><span class="widget_icon"><img src="" alt="Publication" id="publication_icon" width="30" height="30"/></span></a>
<ul class="dock_child hh3 thmc4" style="width: 180px;"> <ul class="dock_child hh3 thmc4" style="width: 180px;">
<li class="dock_item"><a href="journal_p" class="widget_fn wh3 hh3" id='d_journal_p' onclick="return false;"><span class="widget_icon"><img src="" alt="Journal Papers" id="journal_p_icon" width="30" height="30"/></span></a></li> <li class="dock_item"><a href="journal_p" class="widget_fn wh3 hh3" id='d_journal_p' onclick="return false;"><span class="widget_icon"><img src="" alt="Journal Papers" id="journal_p_icon" width="30" height="30"/></span></a></li>
<li class="dock_item"><a href="seminar_p" class="widget_fn wh3 hh3" id='d_seminar_p' onclick="return false;"><span class="widget_icon"><img src="" alt="Seminar Papers" id="seminar_p_icon" width="30" height="30"/></span></a></li> <li class="dock_item"><a href="conference_p" class="widget_fn wh3 hh3" id='d_conference_p' onclick="return false;"><span class="widget_icon"><img src="" alt="Conference Papers" id="conference_p_icon" width="30" height="30"/></span></a></li>
<li class="dock_item"><a href="books" class="widget_fn wh3 hh3" id='d_books' onclick="return false;"><span class="widget_icon"><img src="" alt="Books" id="books_icon" width="30" height="30"/></span></a></li> <li class="dock_item"><a href="books" class="widget_fn wh3 hh3" id='d_books' onclick="return false;"><span class="widget_icon"><img src="" alt="Books" id="books_icon" width="30" height="30"/></span></a></li>
</ul> </ul>
</li> </li>

View File

@ -1,222 +0,0 @@
Sep 24, 2012 10:20:33 AM org.apache.solr.core.SolrResourceLoader locateSolrHome
INFO: JNDI not configured for solr (NoInitialContextEx)
Sep 24, 2012 10:20:33 AM org.apache.solr.core.SolrResourceLoader locateSolrHome
INFO: using system property solr.solr.home: /home/nccu/stage/NCCU/solr
Sep 24, 2012 10:20:33 AM org.apache.solr.core.SolrResourceLoader <init>
INFO: Solr home set to '/home/nccu/stage/NCCU/solr/'
Sep 24, 2012 10:20:33 AM org.apache.solr.servlet.SolrDispatchFilter init
INFO: SolrDispatchFilter.init()
Sep 24, 2012 10:20:33 AM org.apache.solr.core.SolrResourceLoader locateSolrHome
INFO: JNDI not configured for solr (NoInitialContextEx)
Sep 24, 2012 10:20:33 AM org.apache.solr.core.SolrResourceLoader locateSolrHome
INFO: using system property solr.solr.home: /home/nccu/stage/NCCU/solr
Sep 24, 2012 10:20:33 AM org.apache.solr.core.CoreContainer$Initializer initialize
INFO: looking for solr.xml: /home/nccu/stage/NCCU/solr/solr.xml
Sep 24, 2012 10:20:33 AM org.apache.solr.core.SolrResourceLoader <init>
INFO: Solr home set to '/home/nccu/stage/NCCU/solr/'
Sep 24, 2012 10:20:33 AM org.apache.solr.core.SolrConfig initLibs
INFO: Adding specified lib dirs to ClassLoader
Sep 24, 2012 10:20:33 AM org.apache.solr.core.SolrConfig <init>
INFO: Loaded SolrConfig: solrconfig.xml
Sep 24, 2012 10:20:33 AM org.apache.solr.core.SolrCore <init>
INFO: Opening new SolrCore at /home/nccu/stage/NCCU/solr/, dataDir=/home/nccu/stage/NCCU/solr/data/development/
Sep 24, 2012 10:20:33 AM org.apache.solr.schema.IndexSchema readSchema
INFO: Reading Solr Schema
Sep 24, 2012 10:20:33 AM org.apache.solr.schema.IndexSchema readSchema
INFO: Schema name=sunspot
Sep 24, 2012 10:20:33 AM org.apache.solr.util.plugin.AbstractPluginLoader load
INFO: created string: org.apache.solr.schema.StrField
Sep 24, 2012 10:20:33 AM org.apache.solr.util.plugin.AbstractPluginLoader load
INFO: created tdouble: org.apache.solr.schema.TrieDoubleField
Sep 24, 2012 10:20:33 AM org.apache.solr.util.plugin.AbstractPluginLoader load
INFO: created rand: org.apache.solr.schema.RandomSortField
Sep 24, 2012 10:20:33 AM org.apache.solr.util.plugin.AbstractPluginLoader load
INFO: created null: org.apache.solr.analysis.CJKTokenizerFactory
Sep 24, 2012 10:20:33 AM org.apache.solr.util.plugin.AbstractPluginLoader load
INFO: created null: org.apache.solr.analysis.StandardFilterFactory
Sep 24, 2012 10:20:33 AM org.apache.solr.util.plugin.AbstractPluginLoader load
INFO: created null: org.apache.solr.analysis.LowerCaseFilterFactory
Sep 24, 2012 10:20:33 AM org.apache.solr.util.plugin.AbstractPluginLoader load
INFO: created text: org.apache.solr.schema.TextField
Sep 24, 2012 10:20:33 AM org.apache.solr.util.plugin.AbstractPluginLoader load
INFO: created boolean: org.apache.solr.schema.BoolField
Sep 24, 2012 10:20:33 AM org.apache.solr.util.plugin.AbstractPluginLoader load
INFO: created date: org.apache.solr.schema.DateField
Sep 24, 2012 10:20:33 AM org.apache.solr.util.plugin.AbstractPluginLoader load
INFO: created sdouble: org.apache.solr.schema.SortableDoubleField
Sep 24, 2012 10:20:33 AM org.apache.solr.util.plugin.AbstractPluginLoader load
INFO: created sfloat: org.apache.solr.schema.SortableFloatField
Sep 24, 2012 10:20:33 AM org.apache.solr.util.plugin.AbstractPluginLoader load
INFO: created sint: org.apache.solr.schema.SortableIntField
Sep 24, 2012 10:20:33 AM org.apache.solr.util.plugin.AbstractPluginLoader load
INFO: created slong: org.apache.solr.schema.SortableLongField
Sep 24, 2012 10:20:33 AM org.apache.solr.util.plugin.AbstractPluginLoader load
INFO: created tint: org.apache.solr.schema.TrieIntField
Sep 24, 2012 10:20:33 AM org.apache.solr.util.plugin.AbstractPluginLoader load
INFO: created tfloat: org.apache.solr.schema.TrieFloatField
Sep 24, 2012 10:20:33 AM org.apache.solr.util.plugin.AbstractPluginLoader load
INFO: created tdate: org.apache.solr.schema.TrieDateField
Sep 24, 2012 10:20:33 AM org.apache.solr.schema.IndexSchema readSchema
INFO: default search field is text
Sep 24, 2012 10:20:33 AM org.apache.solr.schema.IndexSchema readSchema
INFO: query parser default operator is AND
Sep 24, 2012 10:20:33 AM org.apache.solr.schema.IndexSchema readSchema
INFO: unique key field: id
Sep 24, 2012 10:20:33 AM org.apache.solr.core.JmxMonitoredMap <init>
INFO: No JMX servers found, not exposing Solr information with JMX.
Sep 24, 2012 10:20:33 AM org.apache.solr.core.SolrCore initListeners
INFO: Added SolrEventListener: org.apache.solr.core.QuerySenderListener{queries=[]}
Sep 24, 2012 10:20:33 AM org.apache.solr.core.SolrCore initListeners
INFO: Added SolrEventListener: org.apache.solr.core.QuerySenderListener{queries=[{q=solr rocks,start=0,rows=10}, {q=static firstSearcher warming query from solrconfig.xml}]}
Sep 24, 2012 10:20:33 AM org.apache.solr.request.XSLTResponseWriter init
INFO: xsltCacheLifetimeSeconds=5
Sep 24, 2012 10:20:33 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: created standard: solr.SearchHandler
Sep 24, 2012 10:20:33 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: created dismax: solr.SearchHandler
Sep 24, 2012 10:20:33 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: created partitioned: solr.SearchHandler
Sep 24, 2012 10:20:33 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: created /spell: solr.SearchHandler
Sep 24, 2012 10:20:33 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: created tvrh: org.apache.solr.handler.component.SearchHandler
Sep 24, 2012 10:20:33 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: adding lazy requestHandler: org.apache.solr.handler.extraction.ExtractingRequestHandler
Sep 24, 2012 10:20:33 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: created /update/extract: org.apache.solr.handler.extraction.ExtractingRequestHandler
Sep 24, 2012 10:20:33 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: created /terms: org.apache.solr.handler.component.SearchHandler
Sep 24, 2012 10:20:33 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: adding lazy requestHandler: solr.SearchHandler
Sep 24, 2012 10:20:33 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: created /elevate: solr.SearchHandler
Sep 24, 2012 10:20:33 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: created /update: solr.XmlUpdateRequestHandler
Sep 24, 2012 10:20:33 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: created /update/javabin: solr.BinaryUpdateRequestHandler
Sep 24, 2012 10:20:33 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: created /analysis/document: solr.DocumentAnalysisRequestHandler
Sep 24, 2012 10:20:33 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: created /analysis/field: solr.FieldAnalysisRequestHandler
Sep 24, 2012 10:20:33 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: adding lazy requestHandler: solr.CSVRequestHandler
Sep 24, 2012 10:20:33 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: created /update/csv: solr.CSVRequestHandler
Sep 24, 2012 10:20:33 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: created /admin/: org.apache.solr.handler.admin.AdminHandlers
Sep 24, 2012 10:20:33 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: created /admin/ping: PingRequestHandler
Sep 24, 2012 10:20:33 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: created /debug/dump: solr.DumpRequestHandler
Sep 24, 2012 10:20:33 AM org.apache.solr.core.RequestHandlers initHandlersFromConfig
INFO: created /mlt: solr.MoreLikeThisHandler
Sep 24, 2012 10:20:33 AM org.apache.solr.search.SolrIndexSearcher <init>
INFO: Opening Searcher@6a510e39 main
Sep 24, 2012 10:20:33 AM org.apache.solr.update.DirectUpdateHandler2$CommitTracker <init>
INFO: AutoCommit: disabled
Sep 24, 2012 10:20:33 AM org.apache.solr.handler.component.SpellCheckComponent inform
INFO: Initializing spell checkers
Sep 24, 2012 10:20:33 AM org.apache.solr.spelling.AbstractLuceneSpellChecker init
INFO: Using WhitespaceAnalzyer for dictionary: default
Sep 24, 2012 10:20:33 AM org.apache.solr.handler.component.SpellCheckComponent inform
WARNING: No queryConverter defined, using default converter
Sep 24, 2012 10:20:33 AM org.apache.solr.handler.component.QueryElevationComponent inform
INFO: Loading QueryElevation from: /home/nccu/stage/NCCU/solr/conf/elevate.xml
Sep 24, 2012 10:20:33 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding component:org.apache.solr.handler.component.QueryComponent@3cc70b0d
Sep 24, 2012 10:20:33 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding component:org.apache.solr.handler.component.FacetComponent@2fa6a1a7
Sep 24, 2012 10:20:33 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding component:org.apache.solr.handler.component.MoreLikeThisComponent@64bef361
Sep 24, 2012 10:20:33 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding component:org.apache.solr.handler.component.HighlightComponent@345c98f3
Sep 24, 2012 10:20:33 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding component:org.apache.solr.handler.component.StatsComponent@2b3d9460
Sep 24, 2012 10:20:33 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding debug component:org.apache.solr.handler.component.DebugComponent@57d840cd
Sep 24, 2012 10:20:33 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding component:org.apache.solr.handler.component.QueryComponent@3cc70b0d
Sep 24, 2012 10:20:33 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding component:org.apache.solr.handler.component.FacetComponent@2fa6a1a7
Sep 24, 2012 10:20:33 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding component:org.apache.solr.handler.component.MoreLikeThisComponent@64bef361
Sep 24, 2012 10:20:33 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding component:org.apache.solr.handler.component.HighlightComponent@345c98f3
Sep 24, 2012 10:20:33 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding component:org.apache.solr.handler.component.StatsComponent@2b3d9460
Sep 24, 2012 10:20:33 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding debug component:org.apache.solr.handler.component.DebugComponent@57d840cd
Sep 24, 2012 10:20:33 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding component:org.apache.solr.handler.component.QueryComponent@3cc70b0d
Sep 24, 2012 10:20:33 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding component:org.apache.solr.handler.component.FacetComponent@2fa6a1a7
Sep 24, 2012 10:20:33 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding component:org.apache.solr.handler.component.MoreLikeThisComponent@64bef361
Sep 24, 2012 10:20:33 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding component:org.apache.solr.handler.component.HighlightComponent@345c98f3
Sep 24, 2012 10:20:33 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding component:org.apache.solr.handler.component.StatsComponent@2b3d9460
Sep 24, 2012 10:20:33 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding debug component:org.apache.solr.handler.component.DebugComponent@57d840cd
Sep 24, 2012 10:20:33 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding component:org.apache.solr.handler.component.QueryComponent@3cc70b0d
Sep 24, 2012 10:20:33 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding component:org.apache.solr.handler.component.FacetComponent@2fa6a1a7
Sep 24, 2012 10:20:33 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding component:org.apache.solr.handler.component.MoreLikeThisComponent@64bef361
Sep 24, 2012 10:20:33 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding component:org.apache.solr.handler.component.HighlightComponent@345c98f3
Sep 24, 2012 10:20:33 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding component:org.apache.solr.handler.component.StatsComponent@2b3d9460
Sep 24, 2012 10:20:33 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding component:org.apache.solr.handler.component.SpellCheckComponent@36867fc9
Sep 24, 2012 10:20:33 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding debug component:org.apache.solr.handler.component.DebugComponent@57d840cd
Sep 24, 2012 10:20:33 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding component:org.apache.solr.handler.component.QueryComponent@3cc70b0d
Sep 24, 2012 10:20:33 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding component:org.apache.solr.handler.component.FacetComponent@2fa6a1a7
Sep 24, 2012 10:20:33 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding component:org.apache.solr.handler.component.MoreLikeThisComponent@64bef361
Sep 24, 2012 10:20:33 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding component:org.apache.solr.handler.component.HighlightComponent@345c98f3
Sep 24, 2012 10:20:33 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding component:org.apache.solr.handler.component.StatsComponent@2b3d9460
Sep 24, 2012 10:20:33 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding component:org.apache.solr.handler.component.TermVectorComponent@382f8116
Sep 24, 2012 10:20:33 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding debug component:org.apache.solr.handler.component.DebugComponent@57d840cd
Sep 24, 2012 10:20:33 AM org.apache.solr.handler.component.SearchHandler inform
INFO: Adding component:org.apache.solr.handler.component.TermsComponent@36c3e82b
Sep 24, 2012 10:20:33 AM org.apache.solr.core.QuerySenderListener newSearcher
INFO: QuerySenderListener sending requests to Searcher@6a510e39 main
Sep 24, 2012 10:20:33 AM org.apache.solr.core.CoreContainer register
INFO: registering core:
Sep 24, 2012 10:20:33 AM org.apache.solr.servlet.SolrDispatchFilter init
INFO: user.dir=/home/nccu/.rvm/gems/ruby-1.9.2-p318@stage/gems/sunspot_solr-1.3.3/solr
Sep 24, 2012 10:20:33 AM org.apache.solr.servlet.SolrDispatchFilter init
INFO: SolrDispatchFilter.init() done
Sep 24, 2012 10:20:33 AM org.apache.solr.servlet.SolrServlet init
INFO: SolrServlet.init()
Sep 24, 2012 10:20:33 AM org.apache.solr.core.SolrResourceLoader locateSolrHome
INFO: JNDI not configured for solr (NoInitialContextEx)
Sep 24, 2012 10:20:33 AM org.apache.solr.core.SolrResourceLoader locateSolrHome
INFO: using system property solr.solr.home: /home/nccu/stage/NCCU/solr
Sep 24, 2012 10:20:33 AM org.apache.solr.servlet.SolrServlet init
INFO: SolrServlet.init() done
Sep 24, 2012 10:20:33 AM org.apache.solr.core.SolrResourceLoader locateSolrHome
INFO: JNDI not configured for solr (NoInitialContextEx)
Sep 24, 2012 10:20:33 AM org.apache.solr.core.SolrResourceLoader locateSolrHome
INFO: using system property solr.solr.home: /home/nccu/stage/NCCU/solr
Sep 24, 2012 10:20:33 AM org.apache.solr.servlet.SolrUpdateServlet init
INFO: SolrUpdateServlet.init() done
Sep 24, 2012 10:20:33 AM org.apache.solr.core.SolrCore execute
INFO: [] webapp=null path=null params={start=0&event=firstSearcher&q=solr+rocks&rows=10} hits=0 status=0 QTime=46
Sep 24, 2012 10:20:33 AM org.apache.solr.core.SolrCore execute
INFO: [] webapp=null path=null params={event=firstSearcher&q=static+firstSearcher+warming+query+from+solrconfig.xml} hits=0 status=0 QTime=4
Sep 24, 2012 10:20:33 AM org.apache.solr.core.QuerySenderListener newSearcher
INFO: QuerySenderListener done.
Sep 24, 2012 10:20:33 AM org.apache.solr.handler.component.SpellCheckComponent$SpellCheckerListener newSearcher
INFO: Loading spell index for spellchecker: default
Sep 24, 2012 10:20:33 AM org.apache.solr.core.SolrCore registerSearcher
INFO: [] Registered new searcher Searcher@6a510e39 main

1038
route Normal file

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
source "http://rubygems.org" 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 # Bundler will treat runtime dependencies like base dependencies, and
# development dependencies will be added by default to the :development group. # development dependencies will be added by default to the :development group.
gemspec gemspec

View File

@ -14,7 +14,7 @@ end
RDoc::Task.new(:rdoc) do |rdoc| RDoc::Task.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'rdoc' rdoc.rdoc_dir = 'rdoc'
rdoc.title = 'PersonalSeminar' rdoc.title = 'PersonalConference'
rdoc.options << '--line-numbers' rdoc.options << '--line-numbers'
rdoc.rdoc_files.include('README.rdoc') rdoc.rdoc_files.include('README.rdoc')
rdoc.rdoc_files.include('lib/**/*.rb') rdoc.rdoc_files.include('lib/**/*.rb')

View File

@ -0,0 +1,8 @@
class Panel::PersonalConference::BackEnd::ConferenceAuthorTypesController < Panel::PersonalConference::BackEnd::WritingConferenceCategorysController
def initialize
super
@app_type = 'conference_author_type'
end
end

View File

@ -0,0 +1,8 @@
class Panel::PersonalConference::BackEnd::ConferencePaperTypesController < Panel::PersonalConference::BackEnd::WritingConferenceCategorysController
def initialize
super
@app_type = 'conference_paper_type'
end
end

View File

@ -0,0 +1,8 @@
class Panel::PersonalConference::BackEnd::TagsController < Admin::TagsController
def initialize
super
@app_title = 'personal_conference'
end
end

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -0,0 +1,9 @@
# encoding: utf-8
class ConferenceAuthorType < WritingConferenceCategory
field :title, localize: true
has_and_belongs_to_many :writing_conferences
end

View File

@ -0,0 +1,9 @@
# encoding: utf-8
class ConferencePaperType < WritingConferenceCategory
field :title, localize: true
has_and_belongs_to_many :writing_conferences
end

View File

@ -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

View File

@ -1,6 +1,6 @@
# encoding: utf-8 # encoding: utf-8
class WritingSeminar class WritingConference
include Mongoid::Document include Mongoid::Document
include Mongoid::Timestamps include Mongoid::Timestamps
include Mongoid::MultiParameterAttributes include Mongoid::MultiParameterAttributes
@ -11,15 +11,15 @@ class WritingSeminar
field :paper_title, localize: true field :paper_title, localize: true
field :seminar_title, localize: true field :conference_title, localize: true
field :authors, localize: true field :authors, localize: true
field :location, localize: true field :location, localize: true
field :sponsor, 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 :conference_author_types
has_and_belongs_to_many :seminar_paper_types has_and_belongs_to_many :conference_paper_types
field :year field :year
@ -38,9 +38,9 @@ class WritingSeminar
# field :is_hot, :type => Boolean, :default => false # field :is_hot, :type => Boolean, :default => false
# field :is_hidden, :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 # before_save :update_avliable_language, :clean_checkboxs
@ -48,7 +48,7 @@ class WritingSeminar
before_validation :add_http 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?} 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 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 else
@ -91,8 +91,8 @@ class WritingSeminar
end end
end end
def save_writing_seminar_files def save_writing_conference_files
self.writing_seminar_files.each do |t| self.writing_conference_files.each do |t|
if t.should_destroy if t.should_destroy
t.destroy t.destroy
end end
@ -102,11 +102,11 @@ class WritingSeminar
def create_link def create_link
title = ["\"#{self.paper_title}\""] title = ["\"#{self.paper_title}\""]
title << self.seminar_title title << self.conference_title
title << self.sponsor title << self.sponsor
title << self.location title << self.location
title << "#{period_start_date}-#{period_end_date}" 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(', ') title.join(', ')
end end
@ -121,8 +121,8 @@ class WritingSeminar
def clean_checkboxs def clean_checkboxs
self.tag_ids.delete('') self.tag_ids.delete('')
self.seminar_author_type_ids.delete('') self.conference_author_type_ids.delete('')
self.seminar_level_type_ids.delete('') self.conference_level_type_ids.delete('')
end end
end end

View File

@ -1,30 +1,30 @@
# encoding: utf-8 # encoding: utf-8
class WritingSeminarCategory class WritingConferenceCategory
include Mongoid::Document include Mongoid::Document
include Mongoid::Timestamps include Mongoid::Timestamps
include OrbitCoreLib::ObjectAuthable include OrbitCoreLib::ObjectAuthable
include OrbitCoreLib::ObjectDisable include OrbitCoreLib::ObjectDisable
# include Mongoid::MultiParameterAttributes # include Mongoid::MultiParameterAttributes
AfterObjectAuthUrl = '/panel/personal_seminar/back_end/writing_seminar_categorys' AfterObjectAuthUrl = '/panel/personal_conference/back_end/writing_conference_categorys'
APP_NAME = 'writing_seminar' APP_NAME = 'writing_conference'
# ObjectAuthTitlesOptions = %W{edit} # ObjectAuthTitlesOptions = %W{edit}
ObjectAuthTitlesOptions = %W{submit_new fact_check} ObjectAuthTitlesOptions = %W{submit_new fact_check}
field :key field :key
has_many :writing_seminars has_many :writing_conferences
def pp_object def pp_object
title title
end end
def self.from_id(id) def self.from_id(id)
WritingSeminarCategory.find(id) rescue nil WritingConferenceCategory.find(id) rescue nil
end end
def self.is_localized?(field_name) def self.is_localized?(field_name)
self.fields[field_name.to_s].localized? self.fields[field_name.to_s].localized?
end end
end end

View File

@ -1,4 +1,4 @@
class WritingSeminarFile class WritingConferenceFile
include Mongoid::Document include Mongoid::Document
include Mongoid::Timestamps include Mongoid::Timestamps
@ -9,6 +9,6 @@ class WritingSeminarFile
field :should_destroy, :type => Boolean field :should_destroy, :type => Boolean
field :title, localize: true field :title, localize: true
belongs_to :writing_seminar belongs_to :writing_conference
end end

View File

@ -1,8 +1,8 @@
<% # encoding: utf-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"> <div id="widget-title">
<%= f.label :key %> <%= f.label :key %>
@ -16,7 +16,7 @@
<div class="control-group"> <div class="control-group">
<%= label_tag "name-#{locale}", "Name-#{I18nVariable.from_locale(locale)}", :class => 'control-label' %> <%= label_tag "name-#{locale}", "Name-#{I18nVariable.from_locale(locale)}", :class => 'control-label' %>
<div class="controls"> <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>
</div> </div>
<% end %> <% end %>
@ -41,4 +41,4 @@
</div> </div>
<% end %> <% end %>

View File

@ -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>

View File

@ -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();

View File

@ -0,0 +1 @@
$("#<%= dom_id @writing_conference_category %>").find(".archive_toggle").text("<%= show_toggle_archive_btn(@writing_conference_category) %> ");

View File

@ -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 %>

View File

@ -3,22 +3,22 @@
<%= @types %> <%= @types %>
<table id="writing_seminar_categorys" class="table main-list"> <table id="writing_conference_categorys" class="table main-list">
<thead> <thead>
<tr> <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) %> <% if @types.is_localized?(:title) %>
<% @site_valid_locales.each do |locale| %> <% @site_valid_locales.each do |locale| %>
<th class="span1-2"><%= I18nVariable.first(:conditions => {:key => locale})[I18n.locale] %></th> <th class="span1-2"><%= I18nVariable.first(:conditions => {:key => locale})[I18n.locale] %></th>
<% end %> <% end %>
<% else %> <% else %>
<th class="span1-2"><%= t('writing_seminar_category.title') %></th> <th class="span1-2"><%= t('writing_conference_category.title') %></th>
<% end %> <% end %>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<%= render :partial => 'writing_seminar_category', :collection => @writing_seminar_categorys %> <%= render :partial => 'writing_conference_category', :collection => @writing_conference_categorys %>
</tbody> </tbody>
</table> </table>

View File

@ -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 %>

View File

@ -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();

View File

@ -26,9 +26,9 @@
<% end %> <% end %>
</div> </div>
<div class="modal-footer"> <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' %> <%= f.submit t('submit'), :class=>'btn btn-primary' %>
<a class="btn" data-dismiss="modal"><%= t('cancel')%></a> <a class="btn" data-dismiss="modal"><%= t('cancel')%></a>
</div> </div>
<% end %> <% end %>

View File

@ -10,13 +10,13 @@
<div class="widget-action clear tip" title="Setting"> <div class="widget-action clear tip" title="Setting">
<a class="action"><i class="icon-cog icon-white"></i></a> <a class="action"><i class="icon-cog icon-white"></i></a>
</div> </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"> <div class="widget-content clear form-horizontal">
<% @paper_types.each do |paper_type| %> <% @paper_types.each do |paper_type| %>
<%= content_tag :label,:class => "checkbox inline" do -%> <%= 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 %> <%= paper_type.title %>
<%= hidden_field_tag 'writing_seminar[seminar_paper_type_ids][]', '' %> <%= hidden_field_tag 'writing_conference[conference_paper_type_ids][]', '' %>
<% end %> <% end %>
<% end %> <% end %>
</div> </div>
@ -26,13 +26,13 @@
<div class="widget-action clear tip" title="Setting"> <div class="widget-action clear tip" title="Setting">
<a class="action"><i class="icon-cog icon-white"></i></a> <a class="action"><i class="icon-cog icon-white"></i></a>
</div> </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"> <div class="widget-content clear form-horizontal">
<% @author_types.each do |author_type| %> <% @author_types.each do |author_type| %>
<%= content_tag :label,:class => "checkbox inline" do -%> <%= 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 %> <%= author_type.title %>
<%= hidden_field_tag 'writing_seminar[seminar_author_type_ids][]', '' %> <%= hidden_field_tag 'writing_conference[conference_author_type_ids][]', '' %>
<% end %> <% end %>
<% end %> <% end %>
</div> </div>
@ -47,9 +47,9 @@
<div class="widget-content clear form-horizontal"> <div class="widget-content clear form-horizontal">
<% @tags.each do |tag| %> <% @tags.each do |tag| %>
<%= content_tag :label,:class => "checkbox inline" do -%> <%= 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] %> <%= tag[I18n.locale] %>
<%= hidden_field_tag 'writing_seminar[tag_ids][]', '' %> <%= hidden_field_tag 'writing_conference[tag_ids][]', '' %>
<% end %> <% end %>
<% end %> <% end %>
</div> </div>
@ -74,8 +74,8 @@
<% end %> <% end %>
<div class="title"> <div class="title">
<%= f.label :year ,t("personal_seminar.year")%> <%= f.label :year ,t("personal_conference.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]'} ) %> <%= 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> </div>
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
@ -85,12 +85,12 @@
</ul> </ul>
<div class="title"> <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'} %> <%= 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>
<div class="title"> <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'} %> <%= 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> </div>
@ -100,34 +100,34 @@
<div class="<%= locale %> fade tab-pane <%= ( i == 0 ) ? "in active" : '' %>"> <div class="<%= locale %> fade tab-pane <%= ( i == 0 ) ? "in active" : '' %>">
<div class="title"> <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| %> <%= f.fields_for :paper_title_translations do |f| %>
<%= I18nVariable.from_locale(locale) %> <%= 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 %> <% end %>
</div> </div>
<div class="title"> <div class="title">
<%= f.label :seminar_title ,t("personal_seminar.seminar_title")%> <%= f.label :conference_title ,t("personal_conference.conference_title")%>
<%= f.fields_for :seminar_title_translations do |f| %> <%= f.fields_for :conference_title_translations do |f| %>
<%= I18nVariable.from_locale(locale) %> <%= 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 %> <% end %>
</div> </div>
<div class="title"> <div class="title">
<%= f.label :location ,t("personal_seminar.location")%> <%= f.label :location ,t("personal_conference.location")%>
<%= f.fields_for :location_translations do |f| %> <%= f.fields_for :location_translations do |f| %>
<%= I18nVariable.from_locale(locale) %> <%= 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 %> <% end %>
</div> </div>
<div class="title"> <div class="title">
<%= f.label :sponsor ,t("personal_seminar.sponsor")%> <%= f.label :sponsor ,t("personal_conference.sponsor")%>
<%= f.fields_for :sponsor_translations do |f| %> <%= f.fields_for :sponsor_translations do |f| %>
<%= I18nVariable.from_locale(locale) %> <%= 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 %> <% end %>
</div> </div>
@ -135,7 +135,7 @@
<%= f.label :authors,t("web_resource.authors") %> <%= f.label :authors,t("web_resource.authors") %>
<%= f.fields_for :authors_translations do |f| %> <%= f.fields_for :authors_translations do |f| %>
<%= I18nVariable.from_locale(locale) %> <%= 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 %> <% end %>
</div> </div>
@ -146,32 +146,32 @@
</div> </div>
<div class="title"> <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'} %> <%= 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>
<div class="title"> <div class="title">
<%= f.label :url, t("personal_seminar.url") %> <%= f.label :url, t("personal_conference.url") %>
<%= f.text_field :url %> <%= f.text_field :url %>
</div> </div>
<div class="title"> <div class="title">
<%= f.label :keywords, t("personal_seminar.keywords") %> <%= f.label :keywords, t("personal_conference.keywords") %>
<%= f.text_field :keywords %> <%= f.text_field :keywords %>
</div> </div>
<div class="title"> <div class="title">
<%= f.label :abstract, t("personal_seminar.abstract") %> <%= f.label :abstract, t("personal_conference.abstract") %>
<%= f.text_field :abstract %> <%= f.text_field :abstract %>
</div> </div>
<div class="title"> <div class="title">
<%= f.label :language, t("personal_journal.language") %> <%= 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>
<div class="title"> <div class="title">
<%= f.label :note, t("personal_seminar.note") %> <%= f.label :note, t("personal_conference.note") %>
<%= f.text_area :note, :size => "60x3" %> <%= f.text_area :note, :size => "60x3" %>
</div> </div>
@ -197,7 +197,7 @@
<tr> <tr>
<td style="text-align:center" colspan="3"> <td style="text-align:center" colspan="3">
<div id='add_plugin_file' class="info_input plugin_files_block"> <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> <a class="add"><span class="btn btn-primary btn-small"><i class="icon-plus icon-white"></i> ADD/新增</span></a>
</div> </div>
</td> </td>
@ -206,9 +206,9 @@
</tfoot> </tfoot>
<tbody> <tbody>
<% @writing_seminar.writing_seminar_files.each_with_index do |writing_seminar_file, i| %> <% @writing_conference.writing_conference_files.each_with_index do |writing_conference_file, i| %>
<%= f.fields_for :writing_seminar_files, writing_seminar_file do |f| %> <%= f.fields_for :writing_conference_files, writing_conference_file do |f| %>
<%= render :partial => 'form_file', :object => writing_seminar_file, :locals => {:f => f, :i => i} %> <%= render :partial => 'form_file', :object => writing_conference_file, :locals => {:f => f, :i => i} %>
<% end %> <% end %>
<% end %> <% end %>
</tbody> </tbody>
@ -242,7 +242,7 @@
var new_id = $(this).prev().attr('value'); var new_id = $(this).prev().attr('value');
var old_id = new RegExp("new_add_plugin_files", "g"); var old_id = new RegExp("new_add_plugin_files", "g");
$(this).prev().attr('value', parseInt(new_id) + 1); $(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(){ $('.add_plugin_files_block a.delete').live('click', function(){
@ -255,4 +255,4 @@
}); });
</script> </script>
<% end %> <% end %>

View File

@ -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>

View File

@ -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>

View File

@ -26,9 +26,9 @@
<% end %> <% end %>
</div> </div>
<div class="modal-footer"> <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' %> <%= f.submit t('submit'), :class=>'btn btn-primary' %>
<a class="btn" data-dismiss="modal"><%= t('cancel')%></a> <a class="btn" data-dismiss="modal"><%= t('cancel')%></a>
</div> </div>
<% end %> <% end %>

View File

@ -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 %>

View File

@ -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>

View File

@ -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 %>

View File

@ -0,0 +1 @@
$("#<%= dom_id @writing_conference %>").remove();

View File

@ -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 %>

View File

@ -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>

View File

@ -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} %>");

View File

@ -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 %>

View File

@ -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 %>

View File

@ -5,7 +5,7 @@
<div class="item element"> <div class="item element">
<div class="detail w-a h-a"> <div class="detail w-a h-a">
<p class="totle"> <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> <span>論文型態</span>
</p> </p>
<div class="detal-list my_scroll"> <div class="detal-list my_scroll">
@ -31,7 +31,7 @@
<div class="item element"> <div class="item element">
<div class="detail w-a h-a"> <div class="detail w-a h-a">
<p class="totle"> <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> <span>作者型態</span>
</p> </p>
<div class="detal-list my_scroll"> <div class="detal-list my_scroll">
@ -143,4 +143,4 @@
<% content_for :page_specific_css do %> <% content_for :page_specific_css do %>
<%= stylesheet_link_tag "item" %> <%= stylesheet_link_tag "item" %>
<% end %> <% end %>

View File

@ -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>

View File

@ -10,13 +10,13 @@
<div class="widget-action clear tip" title="Setting"> <div class="widget-action clear tip" title="Setting">
<a class="action"><i class="icon-cog icon-white"></i></a> <a class="action"><i class="icon-cog icon-white"></i></a>
</div> </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"> <div class="widget-content clear form-horizontal">
<% @paper_types.each do |paper_type| %> <% @paper_types.each do |paper_type| %>
<%= content_tag :label,:class => "checkbox inline" do -%> <%= 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 %> <%= paper_type.title %>
<%= hidden_field_tag 'writing_seminar[seminar_paper_type_ids][]', '' %> <%= hidden_field_tag 'writing_conference[conference_paper_type_ids][]', '' %>
<% end %> <% end %>
<% end %> <% end %>
</div> </div>
@ -26,13 +26,13 @@
<div class="widget-action clear tip" title="Setting"> <div class="widget-action clear tip" title="Setting">
<a class="action"><i class="icon-cog icon-white"></i></a> <a class="action"><i class="icon-cog icon-white"></i></a>
</div> </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"> <div class="widget-content clear form-horizontal">
<% @author_types.each do |author_type| %> <% @author_types.each do |author_type| %>
<%= content_tag :label,:class => "checkbox inline" do -%> <%= 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 %> <%= author_type.title %>
<%= hidden_field_tag 'writing_seminar[seminar_author_type_ids][]', '' %> <%= hidden_field_tag 'writing_conference[conference_author_type_ids][]', '' %>
<% end %> <% end %>
<% end %> <% end %>
</div> </div>
@ -47,9 +47,9 @@
<div class="widget-content clear form-horizontal"> <div class="widget-content clear form-horizontal">
<% @tags.each do |tag| %> <% @tags.each do |tag| %>
<%= content_tag :label,:class => "checkbox inline" do -%> <%= 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] %> <%= tag[I18n.locale] %>
<%= hidden_field_tag 'writing_seminar[tag_ids][]', '' %> <%= hidden_field_tag 'writing_conference[tag_ids][]', '' %>
<% end %> <% end %>
<% end %> <% end %>
</div> </div>
@ -65,8 +65,8 @@
<div id="post-body-content" class="clear"> <div id="post-body-content" class="clear">
<div class="title"> <div class="title">
<%= f.label :year ,t("personal_seminar.year")%> <%= f.label :year ,t("personal_conference.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]'} ) %> <%= 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> </div>
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
@ -76,12 +76,12 @@
</ul> </ul>
<div class="title"> <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'} %> <%= 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>
<div class="title"> <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'} %> <%= 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> </div>
@ -91,34 +91,34 @@
<div class="<%= locale %> fade tab-pane <%= ( i == 0 ) ? "in active" : '' %>"> <div class="<%= locale %> fade tab-pane <%= ( i == 0 ) ? "in active" : '' %>">
<div class="title"> <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| %> <%= f.fields_for :paper_title_translations do |f| %>
<%= I18nVariable.from_locale(locale) %> <%= 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 %> <% end %>
</div> </div>
<div class="title"> <div class="title">
<%= f.label :seminar_title ,t("personal_seminar.seminar_title")%> <%= f.label :conference_title ,t("personal_conference.conference_title")%>
<%= f.fields_for :seminar_title_translations do |f| %> <%= f.fields_for :conference_title_translations do |f| %>
<%= I18nVariable.from_locale(locale) %> <%= 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 %> <% end %>
</div> </div>
<div class="title"> <div class="title">
<%= f.label :location ,t("personal_seminar.location")%> <%= f.label :location ,t("personal_conference.location")%>
<%= f.fields_for :location_translations do |f| %> <%= f.fields_for :location_translations do |f| %>
<%= I18nVariable.from_locale(locale) %> <%= 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 %> <% end %>
</div> </div>
<div class="title"> <div class="title">
<%= f.label :sponsor ,t("personal_seminar.sponsor")%> <%= f.label :sponsor ,t("personal_conference.sponsor")%>
<%= f.fields_for :sponsor_translations do |f| %> <%= f.fields_for :sponsor_translations do |f| %>
<%= I18nVariable.from_locale(locale) %> <%= 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 %> <% end %>
</div> </div>
@ -126,7 +126,7 @@
<%= f.label :authors,t("web_resource.authors") %> <%= f.label :authors,t("web_resource.authors") %>
<%= f.fields_for :authors_translations do |f| %> <%= f.fields_for :authors_translations do |f| %>
<%= I18nVariable.from_locale(locale) %> <%= 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 %> <% end %>
</div> </div>
@ -137,32 +137,32 @@
</div> </div>
<div class="title"> <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'} %> <%= 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>
<div class="title"> <div class="title">
<%= f.label :url, t("personal_seminar.url") %> <%= f.label :url, t("personal_conference.url") %>
<%= f.text_field :url %> <%= f.text_field :url %>
</div> </div>
<div class="title"> <div class="title">
<%= f.label :keywords, t("personal_seminar.keywords") %> <%= f.label :keywords, t("personal_conference.keywords") %>
<%= f.text_field :keywords %> <%= f.text_field :keywords %>
</div> </div>
<div class="title"> <div class="title">
<%= f.label :abstract, t("personal_seminar.abstract") %> <%= f.label :abstract, t("personal_conference.abstract") %>
<%= f.text_field :abstract %> <%= f.text_field :abstract %>
</div> </div>
<div class="title"> <div class="title">
<%= f.label :language, t("personal_journal.language") %> <%= 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>
<div class="title"> <div class="title">
<%= f.label :note, t("personal_seminar.note") %> <%= f.label :note, t("personal_conference.note") %>
<%= f.text_area :note, :size => "60x3" %> <%= f.text_area :note, :size => "60x3" %>
</div> </div>
@ -188,7 +188,7 @@
<tr> <tr>
<td style="text-align:center" colspan="3"> <td style="text-align:center" colspan="3">
<div id='add_plugin_file' class="info_input plugin_files_block"> <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> <a class="add"><span class="btn btn-primary btn-small"><i class="icon-plus icon-white"></i> ADD/新增</span></a>
</div> </div>
</td> </td>
@ -197,9 +197,9 @@
</tfoot> </tfoot>
<tbody> <tbody>
<% @writing_seminar.writing_seminar_files.each_with_index do |writing_seminar_file, i| %> <% @writing_conference.writing_conference_files.each_with_index do |writing_conference_file, i| %>
<%= f.fields_for :writing_seminar_files, writing_seminar_file do |f| %> <%= f.fields_for :writing_conference_files, writing_conference_file do |f| %>
<%= render :partial => 'form_file', :object => writing_seminar_file, :locals => {:f => f, :i => i} %> <%= render :partial => 'form_file', :object => writing_conference_file, :locals => {:f => f, :i => i} %>
<% end %> <% end %>
<% end %> <% end %>
</tbody> </tbody>
@ -232,7 +232,7 @@
var new_id = $(this).prev().attr('value'); var new_id = $(this).prev().attr('value');
var old_id = new RegExp("new_add_plugin_files", "g"); var old_id = new RegExp("new_add_plugin_files", "g");
$(this).prev().attr('value', parseInt(new_id) + 1); $(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(){ $('.add_plugin_files_block a.delete').live('click', function(){
@ -245,4 +245,4 @@
}); });
</script> </script>
<% end %> <% end %>

View File

@ -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 %>

View File

@ -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>

View File

@ -0,0 +1 @@
$("#<%= dom_id @writing_conference %>").remove();

View File

@ -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 %>

View File

@ -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>

View File

@ -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} %>");

View File

@ -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 %>

View File

@ -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

View File

@ -1,8 +1,8 @@
module PersonalSeminar module PersonalConference
OrbitApp.registration "Seminar",:type=> 'ModuleApp' do OrbitApp.registration "Conference",:type=> 'ModuleApp' do
module_label 'miss_plugin_i18n.personal_seminar' module_label 'admin.personal_conference'
base_url File.expand_path File.dirname(__FILE__) 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 end
@ -22,4 +22,4 @@ end
# :priority=>1,:label=>I18n.t('announcement.add_new'), # :priority=>1,:label=>I18n.t('announcement.add_new'),
# :active_for_action=>{:news_bulletins=>:new} # :active_for_action=>{:news_bulletins=>:new}
# end # end

View File

@ -0,0 +1,4 @@
require "personal_conference/engine"
module PersonalConference
end

View File

@ -1,4 +1,4 @@
module PersonalSeminar module PersonalConference
class Engine < Rails::Engine class Engine < Rails::Engine
end end
end end

View File

@ -0,0 +1,3 @@
module PersonalConference
VERSION = "0.0.1"
end

View File

@ -1,4 +1,4 @@
# desc "Explaining what the task does" # desc "Explaining what the task does"
# task :personal_seminar do # task :personal_conference do
# # Task goes here # # Task goes here
# end # end

View File

@ -1,11 +1,11 @@
$:.push File.expand_path("../lib", __FILE__) $:.push File.expand_path("../lib", __FILE__)
# Maintain your gem's version: # Maintain your gem's version:
require "personal_seminar/version" require "personal_conference/version"
# Describe your gem and declare its dependencies: # Describe your gem and declare its dependencies:
Gem::Specification.new do |s| Gem::Specification.new do |s|
s.name = "personal_seminar" s.name = "personal_conference"
s.version = PersonalSeminar::VERSION s.version = PersonalSeminar::VERSION
s.authors = ["TODO: Your name"] s.authors = ["TODO: Your name"]
s.email = ["TODO: Your email"] s.email = ["TODO: Your email"]

View File

@ -1,13 +1,13 @@
{ {
"title": "personal_seminar", "title": "personal_conference",
"object": "writing_seminar", "object": "writing_conference",
"version": "0.1", "version": "0.1",
"organization": "Rulingcom", "organization": "Rulingcom",
"author": "RD dep", "author": "RD dep",
"intro": "A simple blog……", "intro": "A simple blog……",
"update_info": "Some info", "update_info": "Some info",
"create_date": "09-08-2012", "create_date": "09-08-2012",
"category": ["WritingSeminarCategory"], "category": ["WritingConferenceCategory"],
"enable_frontend": true, "enable_frontend": true,
"has_plugin": true "has_plugin": true
} }

Some files were not shown because too many files have changed in this diff Show More