diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..1463de6
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+.bundle/
+log/*.log
+pkg/
+test/dummy/db/*.sqlite3
+test/dummy/log/*.log
+test/dummy/tmp/
\ No newline at end of file
diff --git a/Gemfile b/Gemfile
new file mode 100644
index 0000000..b63cf62
--- /dev/null
+++ b/Gemfile
@@ -0,0 +1,17 @@
+source "http://rubygems.org"
+
+# Declare your gem's dependencies in personal_conference.gemspec.
+# Bundler will treat runtime dependencies like base dependencies, and
+# development dependencies will be added by default to the :development group.
+gemspec
+
+# jquery-rails is used by the dummy application
+gem "jquery-rails"
+
+# Declare any dependencies that are still in development here instead of in
+# your gemspec. These might include edge Rails or gems from your path or
+# Git. Remember to move these dependencies to your gemspec before releasing
+# your gem to rubygems.org.
+
+# To use debugger
+# gem 'ruby-debug19', :require => 'ruby-debug'
diff --git a/MIT-LICENSE b/MIT-LICENSE
new file mode 100644
index 0000000..406f17b
--- /dev/null
+++ b/MIT-LICENSE
@@ -0,0 +1,20 @@
+Copyright 2012 YOURNAME
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/README.rdoc b/README.rdoc
new file mode 100644
index 0000000..d918a8f
--- /dev/null
+++ b/README.rdoc
@@ -0,0 +1,3 @@
+= PersonalSeminar
+
+This project rocks and uses MIT-LICENSE.
\ No newline at end of file
diff --git a/Rakefile b/Rakefile
new file mode 100644
index 0000000..ea0eb18
--- /dev/null
+++ b/Rakefile
@@ -0,0 +1,39 @@
+#!/usr/bin/env rake
+begin
+ require 'bundler/setup'
+rescue LoadError
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
+end
+begin
+ require 'rdoc/task'
+rescue LoadError
+ require 'rdoc/rdoc'
+ require 'rake/rdoctask'
+ RDoc::Task = Rake::RDocTask
+end
+
+RDoc::Task.new(:rdoc) do |rdoc|
+ rdoc.rdoc_dir = 'rdoc'
+ rdoc.title = 'PersonalConference'
+ rdoc.options << '--line-numbers'
+ rdoc.rdoc_files.include('README.rdoc')
+ rdoc.rdoc_files.include('lib/**/*.rb')
+end
+
+APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
+load 'rails/tasks/engine.rake'
+
+
+Bundler::GemHelper.install_tasks
+
+require 'rake/testtask'
+
+Rake::TestTask.new(:test) do |t|
+ t.libs << 'lib'
+ t.libs << 'test'
+ t.pattern = 'test/**/*_test.rb'
+ t.verbose = false
+end
+
+
+task :default => :test
diff --git a/app/assets/images/personal_conference/.gitkeep b/app/assets/images/personal_conference/.gitkeep
new file mode 100644
index 0000000..e69de29
diff --git a/app/assets/javascripts/personal_conference.js b/app/assets/javascripts/personal_conference.js
new file mode 100644
index 0000000..20daf27
--- /dev/null
+++ b/app/assets/javascripts/personal_conference.js
@@ -0,0 +1 @@
+//= require_tree ./personal_conference/desktop
diff --git a/app/assets/javascripts/personal_conference/.gitkeep b/app/assets/javascripts/personal_conference/.gitkeep
new file mode 100644
index 0000000..e69de29
diff --git a/app/assets/javascripts/personal_conference/desktop/.gitkeep b/app/assets/javascripts/personal_conference/desktop/.gitkeep
new file mode 100644
index 0000000..e69de29
diff --git a/app/assets/javascripts/personal_conference/desktop/conference_pages.js b/app/assets/javascripts/personal_conference/desktop/conference_pages.js
new file mode 100644
index 0000000..613a9dd
--- /dev/null
+++ b/app/assets/javascripts/personal_conference/desktop/conference_pages.js
@@ -0,0 +1,155 @@
+orbitDesktop.prototype.initializeConferencePapers = function(target,url,cache){ // this init conference papers
+ this.initializeConferencePapers.formCallback = function(data){
+ if(data.success){
+ o.notify(data.msg,"success");
+ o.sub_menu_item($("div[content-type=menu] a").eq(0));
+ }else{
+ o.notify(data.msg,"alert");
+ }
+ }
+
+ this.initializeConferencePapers.list = function(){ // to open list part in conference papers page
+ var conferenceData;
+ var bindHandlers = function(){ // to bind handlers for list page
+
+ }
+ bindHandlers();
+
+ var bindSecondaryHandlers = function(){
+ $("#conference_p div#paper_list a.icon-check-empty").click(function(){
+ if($(this).hasClass("icon-check-empty")){
+ $(this).switchClass("icon-check-empty","icon-check",0);
+ } else if($(this) .hasClass("icon-check")) {
+ $(this).switchClass("icon-check","icon-check-empty",0);
+ } else if($(this).hasClass("icon-star")){
+ $(this).removeClass("icon-star").addClass("icon-star-empty");
+ } else if($(this).hasClass("icon-star-empty")){
+ $(this).removeClass("icon-star-empty").addClass("icon-star");
+ }
+ return false;
+ })
+ }
+ o.enableSharing("div.share_mode");
+ }
+ this.initializeConferencePapers.paperDelete = function(data,dom){
+ var parent = dom.parent().parent().parent();
+ if(data.success){
+ parent.hide("slide",function(){parent.remove();});
+ o.notify(data.msg,"success");
+ }
+ }
+
+ this.initializeConferencePapers.cancelpaper = function(){
+ o.highlight_sub_menu_item(0);
+ }
+
+ var uploadFiles = function(){
+ $('#add_plugin_file a.add').click(function(){
+ var new_id = $(this).prev().attr('value');
+ var old_id = new RegExp("new_writing_journal_files", "g");
+ $(this).prev().attr('value', parseInt(new_id) + 1);
+ var x = get_html(old_id,new_id);
+ var newfield = $(x);
+ $(this).parents('table').append(newfield);
+ newfield.find('.action a.delete').click(function(){
+ newfield.remove();
+ });
+ return false;
+ });
+ $('.action a.remove_existing_record').click(function(){
+ $(this).toggleClass("color-red",function(){
+ if($(this).hasClass('color-red')){
+ $(this).next('.should_destroy').attr('value', 1);
+ }else{
+ $(this).next('.should_destroy').removeAttr('value');
+ }
+ })
+ });
+ }
+
+ var languageSelect = function(){
+ $(".language_select a").click(function(event) {
+ $("*[data-language]").hide();
+ $("*[data-language="+$(this).data("lang")+"]").show();
+ return false;
+ });
+ }
+
+ this.initializeConferencePapers.editpaper = function(){
+ o.highlight_sub_menu_item(1);
+ uploadFiles();
+ languageSelect();
+ }
+
+ this.initializeConferencePapers.addpaper = function(){ // to open add pages in journal papers page
+ uploadFiles();
+ languageSelect();
+ }
+ this.initializeConferencePapers.brief = function(){
+ o.enablelanguageSelect();
+ $("textarea.editor").ckeditor({
+ height: 300,
+ width: $(".overview").width() - 20
+ });
+ }
+
+ this.initializeConferencePapers.conference = function(){ // to open add pages in conference papers page
+ var bindHandlers = function(){ // to bind handlers for add page
+
+ }
+ bindHandlers();
+ }
+
+ this.initializeConferencePapers.coAuthorformCallback = function(data){
+ if(data.success){
+ o.notify(data.msg,"success");
+ o.sub_menu_item($("div[content-type=menu] a").eq(3));
+ }else{
+ o.notify(data.msg,"alert");
+ }
+ }
+ this.initializeConferencePapers.coauthor = function(){ // to open add pages in coauthor page
+ var bindHandlers = function(){ // to bind handlers for add page
+
+ }
+ bindHandlers();
+ }
+ this.initializeConferencePapers.coauthorRelationForm = function(data){
+ if(data.success){
+ o.notify(data.msg,"success");
+ $("#co_author_relation_table").html(data.newvalue);
+ }else{
+ o.notify(data.msg,"alert");
+ }
+ }
+ this.initializeConferencePapers.coauthorRelationEditForm = function(data){
+ if(data.success){
+ o.notify(data.msg,"success");
+ var x = o.layout_data.generate_layout_html(data.newvalue);
+ $("div[container=true] div.overview").html(x.markup);
+ }else{
+ o.notify(data.msg,"alert");
+ }
+ }
+ this.initializeConferencePapers.allnone = function(d,o){
+ switch(o.attr("href")){
+ case "all":
+ $("div.overview a.icon-check-empty").removeClass("icon-check-empty").addClass("icon-check");
+ break;
+ case "none":
+ $("div.overview a.icon-check").removeClass("icon-check").addClass("icon-check-empty");
+ break;
+ }
+ }
+ this.initializeConferencePapers.allnone = function(d,o){
+ switch(o.attr("href")){
+ case "all":
+ $("div.overview a.icon-check-empty").removeClass("icon-check-empty").addClass("icon-check");
+ break;
+ case "none":
+ $("div.overview a.icon-check").removeClass("icon-check").addClass("icon-check-empty");
+ break;
+ }
+ }
+};
+
diff --git a/app/assets/stylesheets/personal_conference/.gitkeep b/app/assets/stylesheets/personal_conference/.gitkeep
new file mode 100644
index 0000000..e69de29
diff --git a/app/assets/stylesheets/personal_conference/desktop/personal_conference.css b/app/assets/stylesheets/personal_conference/desktop/personal_conference.css
new file mode 100644
index 0000000..7ecd9d3
--- /dev/null
+++ b/app/assets/stylesheets/personal_conference/desktop/personal_conference.css
@@ -0,0 +1,109 @@
+/* Conference Papers */
+[page-name="conference_p_list"] .list_t_item .inner {
+ padding-left: 30px; }
+[page-name="conference_p_list"] .list_item_action {
+ font-size: 12px;
+ float: left;
+ margin-left: -30px; }
+ [page-name="conference_p_list"] .list_item_action a {
+ display: block;
+ width: 20px;
+ height: 20px;
+ line-height: 20px;
+ margin: 1px 1px 6px 1px;
+ font-size: 20px; }
+ [page-name="conference_p_list"] .list_item_action .icon-star-empty, [page-name="conference_p_list"] .list_item_action .icon-check-empty {
+ color: #dddddd;
+ -webkit-transition: color 0.3s ease;
+ -moz-transition: color 0.3s ease;
+ transition: color 0.3s ease; }
+ [page-name="conference_p_list"] .list_item_action .icon-star-empty:hover, [page-name="conference_p_list"] .list_item_action .icon-check-empty:hover {
+ color: #aaaaaa; }
+ [page-name="conference_p_list"] .list_item_action .icon-star {
+ color: #faa732; }
+ [page-name="conference_p_list"] .list_item_action .icon-check {
+ color: #333; }
+[page-name="conference_p_list"] .file_view .list_t_des {
+ overflow: hidden; }
+[page-name="conference_p_list"] .file_view .file {
+ float: left;
+ width: 120px;
+ height: 50px;
+ padding: 6px;
+ margin: 1px;
+ position: relative;
+ -webkit-box-sizing: border-box;
+ /* webkit */
+ -khtml-box-sizing: border-box;
+ /* konqueror */
+ -moz-box-sizing: border-box;
+ /* firefox */
+ -ms-box-sizing: border-box;
+ /* ie */
+ box-sizing: border-box;
+ /* css3 */ }
+ [page-name="conference_p_list"] .file_view .file:hover {
+ background-color: #f7f7f7; }
+ [page-name="conference_p_list"] .file_view .file img {
+ width: 38px;
+ height: 38px;
+ position: absolute;
+ left: 6px;
+ top: 6px; }
+ [page-name="conference_p_list"] .file_view .file .filetitle {
+ display: block;
+ width: 100%;
+ height: 38px;
+ padding-left: 40px;
+ overflow: hidden;
+ -webkit-box-sizing: border-box;
+ /* webkit */
+ -khtml-box-sizing: border-box;
+ /* konqueror */
+ -moz-box-sizing: border-box;
+ /* firefox */
+ -ms-box-sizing: border-box;
+ /* ie */
+ box-sizing: border-box;
+ /* css3 */ }
+
+/* Conference Conference list */
+[page-name="conference_p_conference"] .datalist_item .inner {
+ padding-left: 30px; }
+[page-name="conference_p_conference"] .list_item_action {
+ font-size: 12px;
+ float: left;
+ margin-left: -30px; }
+[page-name="conference_p_conference"] .list_item_action i {
+ color: #999;
+ font-size: 20px;
+ display: block;
+ width: 20px;
+ height: 20px;
+ line-height: 20px;
+ margin: 1px 1px 6px 1px; }
+[page-name="conference_p_conference"] .list_t_desc {
+ font-family: Arial, sans-serif;
+ font-size: 12px;
+ color: #999; }
+
+/* Conference Co-Author */
+[page-name="conference_p_coauthor"] .list_t_item {
+ height: 110px; }
+[page-name="conference_p_coauthor"] .info {
+ font-family: Arial, sans-serif; }
+[page-name="conference_p_coauthor"] .info li {
+ margin-bottom: 8px;
+ color: #999; }
+[page-name="conference_p_coauthor"] .info .name {
+ font-size: 18px;
+ line-height: 24px;
+ color: #333; }
+
+/* Conference Co-Author Relationship*/
+[page-name="conference_p_coauthor_relation"] .edit_co_author_relation {
+ /*margin-left: -10px;*/ }
+[page-name="conference_p_coauthor_relation"] .form_space {
+ margin-bottom: 10px;
+ font-size: 18px;
+ font-family: Arial, sans-serif; }
diff --git a/app/assets/stylesheets/personal_conference/desktop/personal_conference.scss b/app/assets/stylesheets/personal_conference/desktop/personal_conference.scss
new file mode 100644
index 0000000..3fcc2d3
--- /dev/null
+++ b/app/assets/stylesheets/personal_conference/desktop/personal_conference.scss
@@ -0,0 +1,124 @@
+@import "desktop-helper";
+
+/* Conference Papers */
+[page-name="conference_p_list"] {
+ .list_t_item .inner { padding-left: 30px; }
+ .list_item_action {
+ font-size: 12px;
+ float: left;
+ margin-left: -30px;
+
+ a {
+ display: block;
+ width: 20px;
+ height: 20px;
+ line-height: 20px;
+ margin: 1px 1px 6px 1px;
+ font-size: 20px;
+ }
+ .icon-star-empty, .icon-check-empty {
+ color: $gray;
+ @include transition-type(color,0.3);
+
+ &:hover {
+ color: darken($gray, 20%);
+ }
+ }
+ .icon-star { color: #faa732; }
+ .icon-check { color: #333; }
+ }
+
+ .file_view {
+ .list_t_des {
+ overflow: hidden;
+ }
+ .file {
+ float: left;
+ width: 120px;
+ height: 50px;
+ padding: 6px;
+ margin: 1px;
+ position: relative;
+ @include box-sizing;
+
+ &:hover {
+ background-color: lighten($gray, 10%);
+ }
+ img {
+ width: 38px;
+ height: 38px;
+ position: absolute;
+ left: 6px;
+ top: 6px;
+ }
+ .filetitle {
+ display: block;
+ width: 100%;
+ height: 38px;
+ padding-left: 40px;
+ overflow: hidden;
+ @include box-sizing;
+ }
+ }
+ }
+}
+
+/* Conference Conference list */
+[page-name="conference_p_conference"] {
+
+ .datalist_item .inner {
+ padding-left: 30px;
+ }
+ .list_item_action {
+ font-size: 12px;
+ float: left;
+ margin-left: -30px;
+ }
+ .list_item_action i {
+ color: #999;
+ font-size: 20px;
+ display: block;
+ width: 20px;
+ height: 20px;
+ line-height: 20px;
+ margin: 1px 1px 6px 1px;
+ }
+ .list_t_desc {
+ font-family: Arial, sans-serif;
+ font-size: 12px;
+ color: #999;
+ }
+}
+
+/* Conference Co-Author */
+[page-name="conference_p_coauthor"] {
+ .list_t_item {
+ height: 110px;
+ }
+ .list_item_function {}
+ .list_item_function a {}
+ .info {
+ font-family: Arial, sans-serif;
+ }
+ .info li {
+ margin-bottom: 8px;
+ color: #999;
+ }
+ .info .name {
+ font-size: 18px;
+ line-height: 24px;
+ color: #333;
+ }
+}
+
+/* Conference Co-Author Relationship*/
+[page-name="conference_p_coauthor_relation"]{
+ .edit_co_author_relation {
+ /*margin-left: -10px;*/
+ }
+ .form_space {
+ margin-bottom: 10px;
+ font-size: 18px;
+ font-family: Arial, sans-serif;
+ }
+}
\ No newline at end of file
diff --git a/app/controllers/.gitkeep b/app/controllers/.gitkeep
new file mode 100644
index 0000000..e69de29
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
new file mode 100644
index 0000000..307a4ac
--- /dev/null
+++ b/app/controllers/application_controller.rb
@@ -0,0 +1,23 @@
+class ApplicationController < ActionController::Base
+ protect_from_forgery
+ before_filter :set_locale
+
+ # Set I18n.locale
+ def set_locale
+ # update session if passed
+ session[:locale] = params[:locale] if params[:locale]
+
+ # set locale based on session or default
+ begin
+ # check if locale is valid for non site pages
+ if !VALID_LOCALES.include?(session[:locale])
+ I18n.locale = I18n.default_locale
+ else
+ I18n.locale = session[:locale]
+ end
+ rescue
+ I18n.locale = I18n.default_locale
+ end
+ end
+
+end
diff --git a/app/controllers/panel/personal_conference/back_end/conference_author_types_controller.rb b/app/controllers/panel/personal_conference/back_end/conference_author_types_controller.rb
new file mode 100644
index 0000000..8fc2290
--- /dev/null
+++ b/app/controllers/panel/personal_conference/back_end/conference_author_types_controller.rb
@@ -0,0 +1,8 @@
+class Panel::PersonalConference::BackEnd::ConferenceAuthorTypesController < Panel::PersonalConference::BackEnd::WritingConferenceCategorysController
+
+ def initialize
+ super
+ @app_type = 'conference_author_type'
+ end
+
+end
diff --git a/app/controllers/panel/personal_conference/back_end/conference_paper_types_controller.rb b/app/controllers/panel/personal_conference/back_end/conference_paper_types_controller.rb
new file mode 100644
index 0000000..c251c25
--- /dev/null
+++ b/app/controllers/panel/personal_conference/back_end/conference_paper_types_controller.rb
@@ -0,0 +1,8 @@
+class Panel::PersonalConference::BackEnd::ConferencePaperTypesController < Panel::PersonalConference::BackEnd::WritingConferenceCategorysController
+
+ def initialize
+ super
+ @app_type = 'conference_paper_type'
+ end
+
+end
diff --git a/app/controllers/panel/personal_conference/back_end/personal_conference_intros_controller.rb b/app/controllers/panel/personal_conference/back_end/personal_conference_intros_controller.rb
new file mode 100644
index 0000000..bb7b75e
--- /dev/null
+++ b/app/controllers/panel/personal_conference/back_end/personal_conference_intros_controller.rb
@@ -0,0 +1,10 @@
+class Panel::PersonalConference::BackEnd::PersonalConferenceIntrosController < Admin::PersonalPluginIntrosController
+
+ def initialize
+ super
+ @app_type = 'personal_conference_intro'
+ @app_type_name = 'personal_conference'
+ @reback_name = 'WritingConference'
+ end
+
+end
diff --git a/app/controllers/panel/personal_conference/back_end/writing_conference_categorys_controller.rb b/app/controllers/panel/personal_conference/back_end/writing_conference_categorys_controller.rb
new file mode 100644
index 0000000..f8fdbfe
--- /dev/null
+++ b/app/controllers/panel/personal_conference/back_end/writing_conference_categorys_controller.rb
@@ -0,0 +1,143 @@
+class Panel::PersonalConference::BackEnd::WritingConferenceCategorysController < OrbitBackendController
+
+ include OrbitControllerLib::DivisionForDisable
+
+ open_for_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
diff --git a/app/controllers/panel/personal_conference/back_end/writing_conferences_controller.rb b/app/controllers/panel/personal_conference/back_end/writing_conferences_controller.rb
new file mode 100644
index 0000000..0ef42ba
--- /dev/null
+++ b/app/controllers/panel/personal_conference/back_end/writing_conferences_controller.rb
@@ -0,0 +1,317 @@
+class Panel::PersonalConference::BackEnd::WritingConferencesController < OrbitBackendController
+ include AdminHelper
+ include OrbitControllerLib::DivisionForDisable
+
+ before_filter :authenticate_user!
+
+ before_filter :only => [ :new,:edit,:update] do |controller|
+ controller.get_categorys('WritingConferenceCategory')
+ end
+
+ def index
+ get_plugins
+
+ # @tags = get_tags
+ # @categories = get_categories_for_index
+ # @statuses = get_statuses
+ # category_ids = @categories.collect{|t| t.id}
+ @paper_type_ids = ConferencePaperType.all.collect{|t| t.id.to_s} + [nil]
+
+ @writing_conferences = get_sorted_and_filtered("writing_conference", :conference_paper_type_id.in => @paper_type_ids)
+ respond_to do |format|
+ format.html # index.html.erb
+ format.js { }
+ format.xml { render :xml => @writing_conferences }
+ end
+ end
+
+ def writing_conference_setting
+
+ get_plugins
+
+ @author_types = ConferenceAuthorType.all
+ @paper_types = ConferencePaperType.all
+
+ @tags = 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
+
+ get_plugins
+
+ @writing_conference = WritingConference.new
+ # @writing_conference_files = WritingConferenceFile.all
+ # @paper_types = ConferenceLevelType.all
+ @author_types = ConferenceAuthorType.all
+ @paper_types = ConferencePaperType.all
+ @tags = 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
+
+ get_plugins
+
+ @writing_conference = WritingConference.find(params[:id])
+
+ # @paper_types = ConferenceLevelType.all
+ @author_types = ConferenceAuthorType.all
+ @paper_types = ConferencePaperType.all
+
+ @tags = 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
+ @tags = 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=>'WritingConference')) }
+ 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]).destroy_all
+ end
+ redirect_to panel_personal_conference_back_end_writing_conferences_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options])
+ end
+
+ def data_share
+
+ if params[:ids]
+
+ @writing_conferences = WritingConference.any_in(:_id => params[:ids])
+
+ @writing_conferences.each do |writing_conference|
+
+ writing_conference.is_hidden = params[:disable]
+
+ writing_conference.save
+ end
+
+ end
+
+ respond_to do |format|
+
+ format.html { redirect_to(admin_users_new_interface_url(:id=>params[:user_id],:show_plugin_profile=>"WritingConference")) }
+ format.json { render json: {"success"=>true}.to_json}
+ end
+
+ 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_plugins
+ @plugins = OrbitApp::Plugin::Registration.all
+ end
+
+end
diff --git a/app/controllers/panel/personal_conference/desktop/conference_co_author_relations_controller.rb b/app/controllers/panel/personal_conference/desktop/conference_co_author_relations_controller.rb
new file mode 100644
index 0000000..696cc49
--- /dev/null
+++ b/app/controllers/panel/personal_conference/desktop/conference_co_author_relations_controller.rb
@@ -0,0 +1,67 @@
+class Panel::PersonalConference::Desktop::ConferenceCoAuthorRelationsController < ApplicationController
+ def index
+ page = params[:page]
+ page ||= 1
+ @conference_co_author_relations = ConferenceCoAuthorRelation.all
+ new
+
+ @conference_co_author_relations = @conference_co_author_relations.page(page).per(50)
+ respond_to do |format|
+ format.html {render layout: false }
+ end
+ end
+
+ def edit
+ @conference_co_author_relation = ConferenceCoAuthorRelation.find(params[:id])
+ respond_to do |format|
+ format.html { render :layout => false}
+ end
+ end
+
+ def new
+ @conference_co_author_relation = ConferenceCoAuthorRelation.new
+ end
+
+ def create
+ @conference_co_author_relation = ConferenceCoAuthorRelation.new(params[:conference_co_author_relation])
+ @conference_co_author_relations = ConferenceCoAuthorRelation.all
+
+ if @conference_co_author_relation.save
+ newv = render_to_string partial: "show_form", object: @conference_co_author_relations
+ render json: {success: true, msg: t('create_success') , newvalue: newv}.to_json
+ else
+ error_msg = @conference_co_author_relation.errors.full_messages.join("
")
+ render json: {success: false, msg: error_msg}.to_json
+ end
+ end
+
+ def update
+ @conference_co_author_relation = ConferenceCoAuthorRelation.find(params[:id])
+ if @conference_co_author_relation.update_attributes(params[:conference_co_author_relation])
+ @conference_co_author_relations = ConferenceCoAuthorRelation.all
+ newv = render_to_string partial: "show_form", object: @conference_co_author_relations
+ newv = '
<%= t('writing_conference_category.key') %> | + <% if @types.is_localized?(:title) %> + <% @site_in_use_locales.each do |locale| %> +<%= I18nVariable.first(:conditions => {:key => locale})[I18n.locale] %> | + <% end %> + <% else %> +<%= t('writing_conference_category.title') %> | + <% end %> +
---|
+ <%= hidden_field_tag 'plugin_file_field_count', @writing_conference.writing_conference_files.count %> + <%= t(:add) %> +
+ +<%= t("personal_book.year") %> | +<%= t("module_name.personal_conference") %> | +<%= t("personal_plugins.author") %> | +
---|
+ <%= t('add')%> + <%= t("personal_conference.paper_type") %> +
++ <%= t('add')%> + <%= t("personal_conference.author_type") %> +
++ + 領域 +
+ +<%= t("personal_conference.file")%> | +<%= t("personal_conference.file_name")%> | +<%= t("personal_conference.description") %> | ++ |
---|---|---|---|
+
+ <%= hidden_field_tag 'plugin_file_field_count', @writing_conference.writing_conference_files.count %>
+ add
+
+ |
+
<%= t('personal_conference.year') %> | +<%= t('module_name.personal_conference') %> | +<%= t('personal_conference.authors') %> | +
---|---|---|
<%= writing_conference.year %> | ++ <%= link_to writing_conference.create_link, panel_personal_conference_front_end_writing_conference_path(writing_conference) %> + | +<%= User.find(writing_conference.create_user_id).name rescue '' %> | +
<%= t('personal_conference.year') %> | +<%= t('module_name.personal_conference') %> | +<%= t('personal_conference.authors') %> | +
---|---|---|
<%= writing_conference.year %> | ++ <%= link_to writing_conference.create_link, panel_personal_conference_front_end_writing_conference_path(writing_conference) %> + | +<%= User.find(writing_conference.create_user_id).name rescue '' %> | +
<%= t("personal_conference.year")%> | <%= @writing_conference.year %> |
---|---|
<%= t("personal_conference.language")%> | <%= @writing_conference.language %> |
<%= t("personal_conference.paper_title")%> | <%= @writing_conference.paper_title %> |
<%= t("personal_conference.conference_title")%> | <%= @writing_conference.conference_title %> |
<%= t("personal_conference.paper_type")%> | <%= @conference_paper_types %> |
<%= t("personal_conference.author_type")%> | <%= @conference_author_types %> |
<%= t("personal_conference.location")%> | <%= @writing_conference.location %> |
<%= t("personal_conference.sponsor")%> | <%= @writing_conference.sponsor %> |
<%= t("personal_conference.period_start_date")%> | <%= @writing_conference.period_start_date %> |
<%= t("personal_conference.period_end_date")%> | <%= @writing_conference.period_end_date %> |
<%= t("personal_conference.abstract")%> | <%= @writing_conference.abstract %> |
<%= t("personal_conference.publication_date")%> | <%= @writing_conference.publication_date %> |
<%= t("personal_conference.url")%> | <%= link_to t(:url), @writing_conference.url, {:target => '_blank', :title => @writing_conference.url} if !@writing_conference.url.blank? %> |
<%= t("personal_conference.authors")%> | <%= "#{User.from_id(@writing_conference.create_user_id).name rescue ''},#{@personal_conference.authors rescue ''}"%> |
<%= t("personal_conference.file")%> | +
+
+
+
+
+ <% @writing_conference.writing_conference_files.each do | wsfile | %>
+ <%= link_to !wsfile.title.blank? ? wsfile.title : 'file', wsfile.file.url, {:target => '_blank', :title => wsfile.title} if wsfile.file.file %>
+ <% end %>
+
+ |
+
+ <% end -%> + | <%= t('personal_conference.year') %> | +<%= t('module_name.personal_conference') %> | +
---|---|---|
+ <%= check_box_tag 'to_change[]', writing_conference.id.to_s, false, :class => "list-check" %> + | + <% end -%> +<%= writing_conference.year %> | ++ <%= link_to writing_conference.create_link, panel_personal_conference_front_end_writing_conference_path(writing_conference) %> + | +
File | +File Name | ++ |
---|---|---|
+
+ <%= hidden_field_tag 'plugin_file_field_count', @writing_conference.writing_conference_files.count %>
+ ADD/新增
+
+ |
+
+ | + | + | + | + |
---|