Merge branch 'sidebar_config' of github.com:Rulingcom/orbit into sidebar_config

This commit is contained in:
Fu Matthew 2013-02-04 18:19:47 +08:00
commit 8e7e601845
258 changed files with 3142 additions and 2442 deletions

View File

@ -1,5 +1,5 @@
source 'http://rubygems.org'
gem 'rails'
gem 'rails', "~> 3.2.9"
gem "brakeman"
gem 'mime-types'
@ -11,7 +11,7 @@ gem "net-ldap", "~> 0.3.1"
gem 'devise', '1.5.3'
gem 'exception_notification' # Send error trace
gem 'execjs'
gem 'jquery-rails'
gem 'jquery-rails', '2.1.4'
gem 'jquery-ui-rails'
gem 'kaminari', :git => 'git://github.com/amatsuda/kaminari.git'

View File

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

View File

@ -1,14 +1,14 @@
function checkSwitch() {
$(".groups").each(function() {
$(this).find('.form-horizontal > .hide').length < $(this).find('.form-horizontal > div').length ? $(this).removeClass("disabled") : $(this).addClass("disabled")
});
// $(".groups").each(function() {
// $(this).find('.form-horizontal > .hide').length < $(this).find('.form-horizontal > div').length ? $(this).removeClass("disabled") : $(this).addClass("disabled")
// });
// $(".groups").addClass('disabled').has('.groups > .form-horizontal > div:not(.hide)').removeClass('disabled');
}
$(document).ready(function(){
checkSwitch();
// checkSwitch();
$('.onoff').click(function () {
if($(this).parents("h4").length==1) {
if($(this).parent("h4").length==1) {
$(this).parents(".map-block").toggleClass("disabled");
$(this).parents(".map-block").find(".form-horizontal").toggleClass("hide");
if($(this).parents(".map-block").hasClass("disabled")){
@ -19,17 +19,17 @@ $(document).ready(function(){
$(this).siblings(".subrole_disable_field").val("false");
}
}
if($(this).parents("legend").length==1) {
if($(this).parent("legend").length==1) {
$(this).toggleClass("disabled");
$(this).parents("legend").next("div").toggleClass("hide");
if($(this).parents("legend").next("div").hasClass("hide")){
$(this).parent("legend").next("div").toggleClass("hide");
if($(this).parent("legend").next("div").hasClass("hide")){
$(this).text("OFF");
$(this).siblings(".subrole_disable_field").val("true");
}else{
$(this).text("ON");
$(this).siblings(".subrole_disable_field").val("false");
}
checkSwitch();
// checkSwitch();
}
return false;
});

View File

@ -25,8 +25,8 @@ $('#index').live('pageinit',function(){
$(".slideImg").muImageResize({width: $globalW, height: Math.floor($globalW/720*240)});
$(this).find(".newpic img").muImageResize({width: 280, height: 200});
$('.slideshow').cycle({
fx:'scrollLeft',
timeout: 6000,
fx: $effect,
timeout: $timeout
});
$(".newlist").css({
"width" : $(".newitem").outerWidth()*(Math.floor($globalW/$(".newitem").outerWidth()))+30,
@ -40,8 +40,9 @@ $('#index').live('pageinit',function(){
$('#announcement_content').live('pageinit',function(){
$(this).find(".newpic img").muImageResize({width: 320, height: 220});
});
var mobileDemo = { 'center': '24.987449, 121.576117', 'zoom': 17 };
$('#map').live('pageinit', function() {
var mobileDemo = { 'center': $map_center, 'zoom': $map_zoom };
var $windowH = $(window).height();
$("#map_canvas").css({
'height' : $windowH,
@ -50,7 +51,7 @@ $('#map').live('pageinit', function() {
$('#map_canvas').gmap({'center': mobileDemo.center, 'zoom': mobileDemo.zoom, 'disableDefaultUI':false, 'callback': function() {
var self = this;
self.addMarker({'position': this.get('map').getCenter() }).click(function() {
self.openInfoWindow({ 'content': "<%= I18n.t('mobile.location_description') %>" }, this);
self.openInfoWindow({ 'content': $info }, this);
});
}});
}).load('basic_map');

View File

@ -9,7 +9,6 @@
//= require jquery.form
//= require bootstrap
//= require jquery.masonry.min
//= require jquery.isotope.min
//= require jquery.tinyscrollbar.min
//= require orbit-1.0
//= require tinymce-jquery

View File

@ -1,28 +1,42 @@
$(document).on('click', '.orbit-bar-search', function (){
if ($(this).parents('.search').hasClass('visible')){
$(this).parents('.search').stop().animate({
'width':'28px',
},500);
$('.navbar-search').stop().animate({
'left':'30px',
'opacity':'0',
},200);
$(this).parents('.search').css({
'background-color': 'transparent',
});
$(this).parents('.search').removeClass('visible');
}
else{
$(this).parents('.search').stop().animate({
'width':'265px',
},200);
$('.navbar-search').stop().animate({
'left':'7px',
'opacity':'1'
},500);
$(this).parents('.search').css({
'background-color': 'rgba(0, 0, 0, 0.5)',
});
$(this).parents('.search').addClass('visible');
}
});
$(document).ready(function(){
$('.search').tooltip({
placement: "bottom"
});
});
$(document).on('mouseenter', '.orbit-bar-search', function (){
$(this).parents('.search').stop().animate({
'width':'265px',
},200);
$('.navbar-search').stop().animate({
'left':'4px',
'opacity':'1'
},500);
$(this).parents('.search').css({
'background-color': 'rgba(0, 0, 0, 0.5)',
});
$(this).parents('.search').addClass('visible');
});
$(document).on('mouseleave', '.search.visible', function (){
$(this).stop().animate({
'width':'28px',
},500);
$('.navbar-search').stop().animate({
'left':'30px',
'opacity':'0',
},200);
$(this).css({
'background-color': 'transparent',
});
$(this).removeClass('visible');
});
$(document).on("mouseenter",".orbit-bar-language, .language-menu",function(){
$(this).parents('.language').addClass("open")
})
$(document).on("mouseleave",".orbit-bar-language, .language-menu",function(){
$(this).parents('.language').removeClass("open")
})

View File

@ -10,7 +10,6 @@
//= require jquery.ui.sortable
//= require jquery_ujs
//= require bootstrap
//= require jquery.isotope.min
//= require jquery.tinyscrollbar.min
//= require orbit-1.0
//= require orbit-bar-search

View File

@ -29,3 +29,7 @@ label{
margin: 0 0 0 -25px;
white-space: normal;
}
label{
white-space: nowrap !important ;
}

View File

@ -13,7 +13,6 @@
*= require list
*= require widget
*= require scroll_style
*= require isotope
*= require icons
*= require site-map
*= require lib/bootstrap-datetimepicker

View File

@ -11,7 +11,10 @@ class Admin::InfosController < ApplicationController
@roles = Role.excludes('disabled' => true)
render :template => 'admin/attributes/index'
# render :template => 'admin/attributes/index'
redirect_to(edit_admin_info_path(Info.first.id.to_s))
end
def show

View File

@ -56,14 +56,12 @@ class Admin::PagePartsController < ApplicationController
def update
@part = PagePart.find(params[:id])
params[:page_part][:widget_field] = params[:page_part][:widget_field].zip( params[:page_part][:widget_field_type] ) if params[:page_part][:widget_field]
params[:page_part][:widget_field_type] = nil
if params[:page_part][:module_app].blank?
params[:page_part][:module_app] = nil
params[:page_part][:kind] = nil
end
params[:page_part][:widget_field] = params[:page_part][:widget_field].zip( params[:page_part][:widget_field_type] ) if params[:page_part][:widget_field]
params[:page_part][:widget_field_type] = nil
if params[:page_part][:module_app].blank?
params[:page_part][:module_app] = nil
end
if @part.update_attributes(params[:page_part])
set_children_sub_menu(@part) if @part.public_r_tag && @part.public_r_tag.eql?('sub_menu')
flash.now[:notice] = t('update.success.content')

View File

@ -130,7 +130,7 @@ class ApplicationController < ActionController::Base
respond_to do |format|
format.html { render :text => parse_page_content(@item), :layout => 'page_layout' }
format.rss { render_main_rss }
format.mobile { redirect_to mobile_path }
format.mobile { redirect_to mobile_path(:app => params[:app]) }
end
else
render :text => '404 Not Found'

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

@ -1,10 +1,6 @@
require 'mime/types'
class DesktopPublicationsController< ApplicationController
#def journal_p
# render "desktop/journal_p", :layout => false
#end
def books
render "desktop/books", :layout => false
end
@ -16,44 +12,4 @@ class DesktopPublicationsController< ApplicationController
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 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

@ -54,7 +54,7 @@ class MobileController < ApplicationController
protected
def no_footer_for_app
@no_footer = true if request.path.starts_with?("/app")
@no_footer = true if request.path =~ /app/
end
end

View File

@ -203,7 +203,6 @@ module ApplicationHelper
javascripts << "<script type='text/javascript' src='/static/jquery.js'></script>\n"
javascripts << "<script type='text/javascript' src='/assets/bootstrap.js'></script>\n"
javascripts << "<script type='text/javascript' src='/assets/jquery.tinyscrollbar.min.js'></script>\n"
javascripts << "<script type='text/javascript' src='/assets/jquery.isotope.min.js'></script>\n"
javascripts << "<script type='text/javascript' src='/assets/orbit-bar-member.js'></script>\n"
javascripts << "<script type='text/javascript' src='/assets/orbit_bar.js'></script>\n"
javascripts << "<script type='text/javascript' src='/assets/orbit-bar-search.js'></script>\n"

View File

@ -54,7 +54,7 @@
</div>
<div class="form-actions form-fixed pagination-right">
<%= f.submit t(:save),:class=>"btn btn-primary"%>
<%= f.submit t(:submit),:class=>"btn btn-primary"%>
<%= link_to t('cancel'), get_go_back, :class=>"btn" %>
</div>
<% end %>

View File

@ -26,7 +26,7 @@
<%= radio_button_tag field_name,"typeB_style2",style_checked_value(object,"typeB_style2") %>
2
<span class="style_img"><%=image_tag 'module/default_widgets/style02.png'%></span>
<span class="style_description"><%= t("default_widget.caption.typeA") %></span>
<span class="style_description"><%= t("default_widget.caption.typeB_style2") %></span>
</label>
</li>
<li>

View File

@ -21,7 +21,7 @@
<div class="form-actions form-fixed pagination-right">
<%#= f.hidden_field :id, :value => params[:role_id] if !params[:role_id].blank? %>
<%= hidden_field_tag 'id', params[:role_id] if !params[:role_id].blank? %>
<%= f.submit t(:save),:class=>"btn btn-primary"%>
<%= f.submit t(:submit),:class=>"btn btn-primary"%>
<%= link_to t('cancel'), get_go_back, :class=>"btn" %>
</div>

View File

@ -21,7 +21,7 @@
<div class="form-actions form-fixed pagination-right">
<%#= f.hidden_field :id, :value => params[:role_id] if !params[:role_id].blank? %>
<%= hidden_field_tag 'sub_role[id]', params[:role_id] if !params[:role_id].blank? %>
<%= f.submit t(:save),:class=>"btn btn-primary"%>
<%= f.submit t(:submit),:class=>"btn btn-primary"%>
<%= link_to t('cancel'), get_go_back, :class=>"btn" %>
</div>

View File

@ -11,7 +11,7 @@
</div>
<label>
<%= f.check_box :admin %>
<span><%= t(:admin) %></span>
<span><%= t("admin") %></span>
</label>
</div>

View File

@ -5,7 +5,6 @@
<% content_for :page_specific_css do -%>
<%= stylesheet_link_tag "member" %>
<%= stylesheet_link_tag "site-map" %>
<%= stylesheet_link_tag "isotope" %>
<% end -%>
<% content_for :page_specific_javascript do -%>
<%= javascript_include_tag "/static/jquery.cycle.all.latest.js" %>

View File

@ -5,7 +5,6 @@
<% content_for :page_specific_css do -%>
<%= stylesheet_link_tag "member" %>
<%= stylesheet_link_tag "site-map" %>
<%= stylesheet_link_tag "isotope" %>
<% end -%>
<% content_for :page_specific_javascript do -%>
<%= javascript_include_tag "/static/jquery.cycle.all.latest.js" %>

View File

@ -5,7 +5,6 @@
<% content_for :page_specific_css do -%>
<%= stylesheet_link_tag "member" %>
<%= stylesheet_link_tag "site-map" %>
<%= stylesheet_link_tag "isotope" %>
<% end -%>
<% content_for :page_specific_javascript do -%>
<%= javascript_include_tag "/static/jquery.cycle.all.latest.js" %>

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='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="<%= panel_personal_conference_desktop_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>
@ -103,3 +103,4 @@
o.notify("Welcome "+o.currentUsername+"!!","alert",3);
</script>
<%= javascript_include_tag "personal_journal" %>
<%= javascript_include_tag "personal_conference" %>

View File

@ -41,10 +41,10 @@
<div class="overview">
<div class="s_grid_con s_form">
<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">
<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">
<option value=""></option>
@ -104,4 +104,4 @@
</div>
</div>
</div>
</div>
</div>

View File

@ -41,10 +41,10 @@
<div class="overview">
<div class="s_grid_con s_form">
<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">
<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">
<option value=""></option>
@ -104,4 +104,4 @@
</div>
</div>
</div>
</div>
</div>

View File

@ -41,10 +41,10 @@
<div class="overview">
<div class="s_grid_con s_form">
<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">
<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">
<option value=""></option>
@ -104,4 +104,4 @@
</div>
</div>
</div>
</div>
</div>

View File

@ -1,33 +0,0 @@
<div id="seminar_p">
<div id="content">
<div id="header" class="hh3">
<div class="dtitle w2 hh3 hp">
<span class="thmtxth">Seminar</span>
</div>
<div id="search_app" class="hfn w2 hh2 hp thmc3">
<input type="text" class="ini_input form" value="Search" id="searchbox" />
<input type="submit" class="ini_input submit thmc1" value="Submit"/>
</div>
</div>
<div id="holder">
<div id="panel_l" class="ph">
<div class="s_menu sm_v" content-type="menu">
<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_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_seminar_p_add_path %>" callback-method="seminar" class="admtxt hh2 w2 hp" onclick='return false;'>Seminar</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="" 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;'>Import</a></li>
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Export</a></li>
</ul>
</div>
</div>
<div id="panel_r" container="true" class="ph pw admbg hp">
</div>
<div class="clear"></div>
</div>
</div>
</div>
</div>

View File

@ -10,25 +10,19 @@
</div>
<ul class="nav">
<li><a href="<%= root_path %>" data-icons="&#xe022;"></a></li>
<!-- <li><a href="<%= desktop_path %>" data-icons="&#xe060;"></a></li> -->
<li><a href="<%= desktop_path %>" data-icons="&#xe060;"></a></li>
</ul>
<ul class="nav pull-right">
<!--
<li class="dropdown">
<a class="dropdown-toggle" data-icons="&#xe02d;" href="#" data-toggle="dropdown"></a>
<ul class="dropdown-menu">
<% t('ntu.site_names').each do |site| %>
<li><%= link_to site[1], get_link(site[0]) %></li>
<% end %>
<% #t('ntu.site_names').each do |site| %>
<li><%#= link_to site[1], get_link(site[0]) %></li>
<%# end %>
</ul>
</li>
<li class="dropdown language">
<a class="dropdown-toggle" href="#" data-toggle="dropdown" data-icons="&#xe054;"></a>
<ul class="dropdown-menu language-menu">
<% @site_in_use_locales.each do |locale| %>
<%= content_tag :li, (link_to t(:_locale, :locale => locale), add_locale(remove_locale((referer rescue request.fullpath)), locale)), :class => (I18n.locale.eql?(locale.to_sym) ? 'active' : nil) %>
<% end %>
</ul>
</li>
-->
<li class="search clear" title="<%= t :search_google %>">
<a class="orbit-bar-search" href="#" data-icons="&#xe024;"></a>
<form class="navbar-search" method="get" action="http://www.google.com/custom">
@ -41,6 +35,14 @@
<%= text_field_tag 'q','',{:class => "search-query span3",:placeholder=> t(:search_google) ,:disabled=> ((@site.search["sitesearch"] || @site.search["domains"] ).blank? rescue true)}%>
</form>
</li>
<li class="dropdown language">
<a class="dropdown-toggle orbit-bar-language" href="#" data-toggle="dropdown" data-icons="&#xe054;"></a>
<ul class="dropdown-menu language-menu">
<% @site_in_use_locales.each do |locale| %>
<%= content_tag :li, (link_to t(:_locale, :locale => locale), add_locale(remove_locale((referer rescue request.fullpath)), locale)), :class => (I18n.locale.eql?(locale.to_sym) ? 'active' : nil) %>
<% end %>
</ul>
</li>
<% if user_signed_in? %>
<li class="dropdown active">
<a class="orbit-bar-account" href="#" data-toggle="dropdown">

View File

@ -7,12 +7,12 @@
<% end %>
</li>
<li>
<%= link_to mobile_map_path, {"data-transition" => "flip"} do %>
<%= link_to mobile_map_path(:app => params[:app]), {"data-transition" => "flip"} do %>
<i class="icons-location"></i>
<% end %>
</li>
<li>
<%= link_to mobile_dialog_contact_path, {"data-rel" => "dialog"} do %>
<%= link_to mobile_dialog_contact_path(:app => params[:app]), {"data-rel" => "dialog"} do %>
<i class="icons-phone"></i>
<% end %>
</li>

View File

@ -3,7 +3,7 @@
<%= image_tag asset_path('mobile/logo.png') %>
</h1>
<i class="openmenu icons-arrow-down-5"></i>
<%= link_to mobile_dialog_language_path, {:class => "ui-btn-right language", "data-iconpos" => "notext", "data-icon" => "search", "data-rel" => "dialog"} do %>
<%= link_to mobile_dialog_language_path(:app => params[:app]), {:class => "ui-btn-right language", "data-iconpos" => "notext", "data-icon" => "search", "data-rel" => "dialog"} do %>
<i class="icons-earth"></i>
<% end %>
</header>

View File

@ -1,7 +1,7 @@
<section class="main-menu">
<ul class="clear">
<li><%= link_to content_tag(:i, nil, :class => "icons-house") + content_tag(:span, t('mobile.home')), mobile_path %></li>
<li><%= link_to content_tag(:i, nil, :class => "icons-megaphone") + content_tag(:span, t('mobile.bulletin')), mobile_announcement_path %></li>
<li><%= link_to content_tag(:i, nil, :class => "icons-newspaper") + content_tag(:span, t('mobile.page')), mobile_page_path %></li>
<li><%= link_to content_tag(:i, nil, :class => "icons-house") + content_tag(:span, t('mobile.home')), mobile_path(:app => params[:app]) %></li>
<li><%= link_to content_tag(:i, nil, :class => "icons-megaphone") + content_tag(:span, t('mobile.bulletin')), mobile_announcement_path(:app => params[:app]) %></li>
<li><%= link_to content_tag(:i, nil, :class => "icons-newspaper") + content_tag(:span, t('mobile.page')), mobile_page_path(:app => params[:app]) %></li>
</ul>
</section>

View File

@ -1,7 +1,7 @@
<ul data-role="listview" class="list">
<% @bulletins.each do |bulletin| %>
<li data-corners="false" data-shadow="false" data-iconshadow="true" data-wrapperels="div" data-icon="arrow-r" data-iconpos="right" data-theme="c">
<%= link_to mobile_announcement_content_path(bulletin), :class => "ui-link-inherit" do %>
<%= link_to mobile_announcement_content_path(:app => params[:app], :id => bulletin), :class => "ui-link-inherit" do %>
<%= image_tag bulletin.image.url, :class => "ui-li-thumb" %>
<h3><%= bulletin.title %></h3>
<p class="ui-li-aside ui-li-desc"><%= display_date(bulletin.postdate) %></p>

View File

@ -2,5 +2,5 @@
<%= render 'header_dialog_copyright' %>
<% end %>
<p>本網站著作權屬於國立政治大學。</p>
<p>RulingDigital 銳綸數位建置</p>
<p><%= t('mobile.copytight') %></p>
<p><%= t('mobile.copytight_orbit') %></p>

View File

@ -12,7 +12,7 @@
<%= image_tag bulletin.image.url %>
</div>
<h3 class="newstitle">
<%= link_to bulletin.title, mobile_announcement_content_path(bulletin) %>
<%= link_to bulletin.title, mobile_announcement_content_path(:app => params[:app], :id => bulletin) %>
</h3>
<p class="newsDate"><%= display_date(bulletin.postdate) %></p>
<div class="newsummary"><%= bulletin.subtitle %></div>
@ -23,4 +23,5 @@
<script type='text/javascript'>
var $effect = "<%= @ad_banner.ad_fx.nil? ? 'fade': @ad_banner.ad_fx %>"
var $timeout = "<%= @ad_banner.transition_msec %>"
var $info = "<%= t('mobile.location_description').html_safe %>"
</script>

View File

@ -2,4 +2,9 @@
<%= render 'header_map' %>
<% end %>
<div id='map_canvas'></div>
<div id='map_canvas'></div>
<script type='text/javascript'>
var $map_center = "24.987449, 121.576117"
var $map_zoom = 17
</script>

View File

@ -1,7 +1,7 @@
<ul data-role="listview" class="list">
<% @page_contexts.each do |page_context| %>
<li>
<%= link_to mobile_page_content_path(page_context) do %>
<%= link_to mobile_page_content_path(:app => params[:app], :id => page_context) do %>
<h3><%= page_context.page.title %></h3>
<% end %>
</li>

View File

@ -2,7 +2,7 @@
<div class="control-group">
<%= hidden_field_tag "#{temp_field_name}[count]",((values.keys.collect{|t| t.to_i}.max rescue nil) || 0 ),:class=>"list_count"%>
<%= hidden_field_tag "#{temp_field_name}[name]",field_name,:class=>"field_name"%>
<label class="control-label" ><%= t(:list)%></label>
<label class="control-label" ><%= t(:list_)%></label>
<div class="multipleInput">
<%if values.blank? %>
<div class="controls">

View File

@ -4,8 +4,10 @@ en:
bulletin: Bulletin
contact: Contact
copyright: Copyright
copyright_text: National Chengchi University © All RIGHTS RESERVED.
copyright_orbit: Developed by RulingDigital
home: Home
language: Language
location: Location
location_description: '<h3>國立政治大學</h3>11605 臺北市文山區指南路二段64號'
location_description: '<h3>National Chengchi University</h3>NO.64,Sec.2,ZhiNan Rd.,Wenshan District,Taipei City 11605,Taiwan (R.O.C)'
page: Page

View File

@ -4,6 +4,8 @@ zh_tw:
bulletin: 公告
contact: 聯絡資訊
copyright: 版權宣告
copyright_text: 本網站著作權屬於國立政治大學。
copyright_orbit: 銳綸數位建置
home: 首頁
language: 語言
location: 地理位置

View File

@ -208,9 +208,9 @@ Orbit::Application.routes.draw do
match 'desktop_publications/books_list'=>'desktop_publications#books_list'
match 'desktop_publications/books_add'=>'desktop_publications#books_add'
match 'desktop_publications/seminar_p' => 'desktop_publications#seminar_p'
match 'desktop_publications/seminar_p_list/'=>'desktop_publications#seminar_p_list'
match 'desktop_publications/seminar_p_add/'=>'desktop_publications#seminar_p_add'
match 'desktop_publications/conference_p' => 'desktop_publications#conference_p'
match 'desktop_publications/conference_p_list/'=>'desktop_publications#conference_p_list'
match 'desktop_publications/conference_p_add/'=>'desktop_publications#conference_p_add'
# end
# namespace :desktop_research do
@ -244,7 +244,7 @@ Orbit::Application.routes.draw do
#match '/desktop_orbit/eventajaxload' => 'desktop_publications#delete_journal'
# match '/desktop_orbit/eventajaxload' => 'desktop_publications#update_journal'
def controller_paths(controller, actions)
def controller_paths(controller, actions, scope=nil)
actions.each do |action|
if action.eql? 'index'
match "#{controller}" => "#{controller}##{action}", :as => "#{controller}"
@ -255,21 +255,21 @@ Orbit::Application.routes.draw do
end
controller_paths :front, %w[show_banner show_footer show_menu show_page_sub_menu show_site_sub_menu show_sitemap]
controller_paths :mobile, %w[index announcement announcement_content dialog_contact dialog_copyright dialog_language map page page_content]
# controller_paths :mobile, %w[index announcement announcement_content dialog_contact dialog_copyright dialog_language map page page_content]
scope 'app' do
controller_paths :mobile, %w[index announcement announcement_content dialog_contact dialog_copyright dialog_language map page page_content]
end
# scope 'app' do
# controller_paths :mobile, %w[index announcement announcement_content dialog_contact dialog_copyright dialog_language map page page_content]
# end
scope '/mobile' do
match 'announcement' => 'mobile#announcement', :as => 'mobile_announcement'
match 'announcement_content/:id' => 'mobile#announcement_content', :as => 'mobile_announcement_content'
match 'dialog_contact' => 'mobile#dialog_contact', :as => 'mobile_dialog_contact'
match 'dialog_copyright' => 'mobile#dialog_copyright', :as => 'mobile_dialog_copyright'
match 'dialog_language' => 'mobile#dialog_language', :as => 'mobile_dialog_language'
match 'map' => 'mobile#map', :as => 'mobile_map'
match 'page' => 'mobile#page', :as => 'mobile_page'
match 'page_content/:id' => 'mobile#page_content', :as => 'mobile_page_content'
scope '/mobile(/:app)' do
match '/announcement' => 'mobile#announcement', :as => 'mobile_announcement'
match '/announcement_content/:id' => 'mobile#announcement_content', :as => 'mobile_announcement_content'
match '/dialog_contact' => 'mobile#dialog_contact', :as => 'mobile_dialog_contact'
match '/dialog_copyright' => 'mobile#dialog_copyright', :as => 'mobile_dialog_copyright'
match '/dialog_language' => 'mobile#dialog_language', :as => 'mobile_dialog_language'
match '/map' => 'mobile#map', :as => 'mobile_map'
match '/page' => 'mobile#page', :as => 'mobile_page'
match '/page_content/:id' => 'mobile#page_content', :as => 'mobile_page_content'
root :to => 'mobile#index', :as => 'mobile'
end

View File

@ -1,6 +1,11 @@
require 'factory_girl'
require 'faker'
FactoryGirl.definition_file_paths = Dir["#{Rails.root}/vendor/built_in_modules/*/spec/factories"]
FactoryGirl.find_definitions
CoAuthorRelation.destroy_all
CoAuthor.destroy_all
JournalLevelType.destroy_all
@ -8,7 +13,8 @@ WritingJournalFile.destroy_all
WritingJournal.destroy_all
#Dir[Rails.root.join("spec/factories/*.rb")].each {|f| require f}
10.times do
10.size.times do
FactoryGirl.create(:journal_level)
end

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>
<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="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>
</ul>
</li>

View File

@ -102,7 +102,7 @@ module ParserFrontEnd
if page.app_frontend_url == 'default_widget'
url = "/panel/orbit_app/widget/#{page.frontend_style}?inner=true"
else
"/panel/#{page.module_app.key}/front_end/#{page.app_frontend_url}\#{(\"/\" + params[:id]) if params[:id] && !params[:id].eql?(page.id.to_s)}\#{(\"/\" + params[:controller_action]) if params[:controller_action] && params[:id]}?inner=true"
url = "/panel/#{page.module_app.key}/front_end/#{page.app_frontend_url}\#{(\"/\" + params[:id]) if params[:id] && !params[:id].eql?(page.id.to_s)}\#{(\"/\" + params[:controller_action]) if params[:controller_action] && params[:id]}?inner=true"
end

View File

@ -351,7 +351,8 @@ namespace :migrate do
end
task :make_default_widget_work_config => :environment do
task :make_default_widget_work_config_for_announcement => :environment do
a = ModuleApp.where(:key=>'announcement').first
a.widgets[:default_widget] = ['typeA','typeC','typeB_style2','typeB_style3','typeB_style4']
a.widgets = {"index"=>["1", "2"], "default_widget"=>["typeA", "typeC", "typeB_style2", "typeB_style3", "typeB_style4"]}
@ -371,6 +372,24 @@ namespace :migrate do
a.save
end
task :make_default_widget_work_config_for_web_link => :environment do
a = ModuleApp.where(:key=>'web_resource').first
a.widgets = { "default_widget"=>["typeA", "typeC", "typeB_style2", "typeB_style3", "typeB_style4"]}
a.widget_fields = [
["title","web_link.default_widget.title"],
["web_link_with_title","web_link.default_widget.bulletin_category_with_title"]
]
a.get_default_widget = {:query=>'WebLink.all'}
a.widget_fields_link_method = {
"title"=>{:method => 'panel_web_resource_front_end_web_link_path',
:args=>:self},
"web_link_with_title"=>{
:method => 'panel_web_resource_front_end_web_link_path',
:args=>{:category_id => [:web_link_category,:id]}}
}
a.save
end
task :reorder_items => :environment do
reorder_children(Item.root)
@ -412,4 +431,13 @@ namespace :migrate do
end
task :clean_module_app_objects => :environment do
ModuleApp.all.each do |ma|
%w{intro widget_fields_link_method widgets get_default_widget app_pages author enable_frontend get_widget_style get_widget_style organization update_info using_default_widget version widget_fields version create_date}.each do |field|
ma.unset field
end
ma.save
end
end
end

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

@ -20,313 +20,7 @@ zh_tw:
update: 更新
yes_: "Yes"
admin:
action: 行動
add_language: 新增語言
admin: 管理
action: 行動
announcement: 公告
asset: 資產
attributes: 屬性
cant_delete_self: 您不可以刪除自己。
cant_revoke_self_admin: 您不可以撤銷自己的管理作用。
class: 階級
content: 內容
create_error_link: 創建連接時出錯。
create_error_page: 創建頁面時出錯。
create_success_home: 首頁已成功創建。
create_success_layout: 樣板已成功創建。
create_success_link: 連結已成功創建。
create_success_page: 頁面已成功創建。
create_success_snippet: 片段已成功創建
create_success_user: 用戶已成功創建。。
data: 數據
delete_language: 刪除語言
description: 描述
disable_language: 禁用語言
editing_home: 編輯首頁
editing_layout: 編輯樣板
editing_link: 編輯連結
editing_page: 編輯頁面
editing_snippet: 編輯片段
editing_user_info: 編輯用戶資料
editing_user_role: 編輯用戶角色
email: Email
enable_language: 啟用語言
file_name: 檔名
file_size: 檔案大小
format: 格式
home: 首頁
id: ID
info: 資料
is_published: 被出版
item: 項目
key: 關鍵
language: 語言
layout: 佈局
layout_name: 佈局名字
list_assets: 資產清單
list_items: 項目清單
list_layouts: 佈局清單
list_snippets: 斷片清單
list_users: 使用清單
list_user_infos: 用戶資料清單
list_user_roles: 用戶角色清單
member: 會員
move_down: 往下移
move_up: 往上移
multilingual: 多種語言
my_avatar: 我的頭像
no_home_page: 您沒有首頁
no_layout: 您沒有佈局
name: 名稱
new_asset: 新增資產
new_component: 新增元件
new_home: 新增首頁
new_layout: 新增樣板
new_link: 新增連結
new_page: 新增頁面
new_snippet: 新增片段
new_user: 新增使用
new_user_info: 新增用戶資料
new_user_role: 新增用戶角色
non_multilingual: 非多種語言
options: 選項
orig_upload_file: 原上傳檔名
position: 位置
published?: 發布?
role: 角色
roles: 角色。
title: 標題
translation: 翻譯
type: 類型
update_error_link: 更新鏈接時出現錯誤。
update_error_page: 更新頁面時出現錯誤。
update_success_content: 內容已成功更新。
update_success_home: 首頁已成功更新。
update_success_layout: 樣板已成功更新。
update_success_link: 連結已成功更新。
update_success_page: 頁面已成功更新。
update_success_snippet: 片段已成功更新。
update_success_user: 用戶已成功更新
url: URL
user: 用戶
user_info: 用戶資料
user_panel: 用戶面板
user_role: 用戶角色
panel:
# Chinese (Taiwan) translations for Ruby on Rails
# by tsechingho (http://github.com/tsechingho)
date:
formats:
default: "%Y-%m-%d"
short: "%b%d日"
long: "%Y年%b%d日"
day_names: [星期日, 星期一, 星期二, 星期三, 星期四, 星期五, 星期六]
abbr_day_names: [日, 一, 二, 三, 四, 五, 六]
month_names: [~, 一月, 二月, 三月, 四月, 五月, 六月, 七月, 八月, 九月, 十月, 十一月, 十二月]
abbr_month_names: [~, 1月, 2月, 3月, 4月, 5月, 6月, 7月, 8月, 9月, 10月, 11月, 12月]
order: [ :year, :month, :day ]
time:
formats:
default: "%Y年%b%d日 %A %H:%M:%S %Z"
short: "%b%d日 %H:%M"
long: "%Y年%b%d日 %H:%M"
am: "上午"
pm: "下午"
datetime:
distance_in_words:
half_a_minute: "半分鐘"
less_than_x_seconds:
one: "不到一秒"
other: "不到 %{count} 秒"
x_seconds:
one: "一秒"
other: "%{count} 秒"
less_than_x_minutes:
one: "不到一分鐘"
other: "不到 %{count} 分鐘"
x_minutes:
one: "一分鐘"
other: "%{count} 分鐘"
about_x_hours:
one: "大約一小時"
other: "大約 %{count} 小時"
x_days:
one: "一天"
other: "%{count} 天"
about_x_months:
one: "大約一個月"
other: "大約 %{count} 個月"
x_months:
one: "一個月"
other: "%{count} 個月"
about_x_years:
one: "大約一年"
other: "大約 %{count} 年"
over_x_years:
one: "一年多"
other: "%{count} 年多"
almost_x_years:
one: "接近一年"
other: "接近 %{count} 年"
prompts:
year: "年"
month: "月"
day: "日"
hour: "時"
minute: "分"
second: "秒"
number:
format:
separator: "."
delimiter: ","
precision: 3
significant: false
strip_insignificant_zeros: false
currency:
format:
format: "%u %n"
unit: "NT$"
separator: "."
delimiter: ","
precision: 2
significant: false
strip_insignificant_zeros: false
percentage:
format:
delimiter: ""
precision:
format:
delimiter: ""
human:
format:
delimiter: ""
precision: 1
significant: false
strip_insignificant_zeros: false
storage_units:
format: "%n %u"
units:
byte:
one: "Byte"
other: "Bytes"
kb: "KB"
mb: "MB"
gb: "GB"
tb: "TB"
decimal_units:
format: "%n %u"
units:
# 10^-21 zepto, 10^-24 yocto
atto: "渺" # 10^-18
femto: "飛" # 10^-15 毫微微
pico: "漠" # 10^-12 微微
nano: "奈" # 10^-9 毫微
micro: "微" # 10^-6
mili: "毫" # 10^-3 milli
centi: "厘" # 10^-2
deci: "分" # 10^-1
unit: ""
ten:
one: "十"
other: "十" # 10^1
hundred: "百" # 10^2
thousand: "千" # 10^3 kilo
million: "百萬" # 10^6 mega
billion: "十億" # 10^9 giga
trillion: "兆" # 10^12 tera
quadrillion: "千兆" # 10^15 peta
# 10^18 exa, 10^21 zetta, 10^24 yotta
support:
array:
words_connector: ", "
two_words_connector: " 和 "
last_word_connector: ", 和 "
select:
prompt: "請選擇"
activerecord:
errors:
template: # ~ 2.3.5 backward compatible
header:
one: "有 1 個錯誤發生使得「%{model}」無法被儲存。"
other: "有 %{count} 個錯誤發生使得「%{model}」無法被儲存。"
body: "以下欄位發生問題:"
full_messages:
format: "%{attribute} %{message}"
messages:
inclusion: "沒有包含在列表中"
exclusion: "是被保留的關鍵字"
invalid: "是無效的"
confirmation: "不符合確認值"
accepted: "必須是可被接受的"
empty: "不能留空"
blank: "不能是空白字元"
too_long: "過長(最長是 %{count} 個字)"
too_short: "過短(最短是 %{count} 個字)"
wrong_length: "字數錯誤(必須是 %{count} 個字)"
not_a_number: "不是數字"
not_an_integer: "必須是整數"
greater_than: "必須大於 %{count}"
greater_than_or_equal_to: "必須大於或等於 %{count}"
equal_to: "必須等於 %{count}"
less_than: "必須小於 %{count}"
less_than_or_equal_to: "必須小於或等於 %{count}"
odd: "必須是奇數"
even: "必須是偶數"
taken: "已經被使用"
record_invalid: "校驗失敗: %{errors}"
activemodel:
errors:
template:
header:
one: "有 1 個錯誤發生使得「%{model}」無法被儲存。"
other: "有 %{count} 個錯誤發生使得「%{model}」無法被儲存。"
body: "以下欄位發生問題:"
errors:
format: "%{attribute} %{message}"
messages:
inclusion: "沒有包含在列表中"
exclusion: "是被保留的關鍵字"
invalid: "是無效的"
confirmation: "不符合確認值"
accepted: "必須是可被接受的"
empty: "不能留空"
blank: "不能是空白字元"
too_long: "過長(最長是 %{count} 個字)"
too_short: "過短(最短是 %{count} 個字)"
wrong_length: "字數錯誤(必須是 %{count} 個字)"
not_a_number: "不是數字"
not_an_integer: "必須是整數"
greater_than: "必須大於 %{count}"
greater_than_or_equal_to: "必須大於或等於 %{count}"
equal_to: "必須等於 %{count}"
less_than: "必須小於 %{count}"
less_than_or_equal_to: "必須小於或等於 %{count}"
odd: "必須是奇數"
even: "必須是偶數"
template:
header:
one: "有 1 個錯誤發生使得「%{model}」無法被儲存。"
other: "有 %{count} 個錯誤發生使得「%{model}」無法被儲存。"
body: "以下欄位發生問題:"
helpers:
select:
prompt: "請選擇"
submit:
create: "新增%{model}"
update: "更新%{model}"
submit: "儲存%{model}"

View File

@ -1,30 +0,0 @@
<div class="control-group">
<label class="control-label" for="">Name</label>
<div class="controls">
<%= f.text_field :name, :class=>"span4", :placeholder => "Area" %>
</div>
</div>
<div class="control-group">
<label class="control-label" for="">Picture</label>
<div class="controls">
<%= f.file_field :file %>
</div>
</div>
<div class="control-group">
<label class="control-label" for="">Coordinates</label>
<div class="controls">
<%= f.text_field :longitude, :class=>"span2", :placeholder => "Longitude" %>
<%= f.text_field :latitude, :class=>"span2", :placeholder => "Langitude" %>
</div>
</div>
<div class="control-group">
<label class="control-label" for="">Description</label>
<div class="controls">
<%= f.text_area :description, :class=>"span4", :cols=>"30", :row=>"5" %>
</div>
</div>
<div class="control-group">
<div class="controls">
<%= f.submit "Save", :class=>"btn" %>
</div>
</div>

View File

@ -1,4 +0,0 @@
<%= form_for @location, :url=> panel_gprs_back_end_location_path(@location), :html => { :class=>"form-horizontal"} do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>
<% end %>

View File

@ -1,34 +0,0 @@
<table class="table main-list">
<thead>
<tr>
<th class="span1"><%= t('location.picture') %></th>
<th class="span1"><%= t('location.name') %></th>
<th class="span1"><%= t('location.longitude') %></th>
<th class="span1"><%= t('location.latitude') %></th>
<th class="span3"><%= t('location.description') %></th>
<%if is_manager? %>
<th class="span1"><%= t('location.edit') %></th>
<th class="span1"><%= t('location.delete') %></th>
<% end %>
</tr>
</thead>
<tbody id="tbody_locations" class="sort-holder">
<% @locations.each do |location| %>
<tr class="with_action">
<td><%= image_tag(location.file, alt: location.file, size: "50x50" ) if !location.file.blank? %></td>
<td><%= location.name%></td>
<td><%= location.longitude%></td>
<td><%= location.latitude%></td>
<td><%= location.description%></td>
<%if is_manager? %>
<td><%= link_to 'Edit', edit_panel_locations_back_end_location_path(location) %></td>
<td><%= link_to 'Destroy', panel_locations_back_end_location_path(location), method: :delete , :confirm => t(:sure?) %></td>
<%end%>
</tr>
<% end %>
</tbody>
</table>
<%if is_manager? %>
<td><%= link_to 'New', new_panel_locations_back_end_location_path %></td>
<% end %>

View File

@ -1,3 +0,0 @@
<%= form_for @location, :url=> panel_gprs_back_end_locations_path, :html => { :class=>"form-horizontal"} do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>
<% end %>

View File

@ -1,6 +1,6 @@
Rails.application.routes.draw do
namespace :panel do
namespace :locations do
namespace :location do
namespace :back_end do
match "locations/get_locations" => "locations#get_locations"

View File

@ -36,7 +36,7 @@ module Location
available_for [:admin,:guest,:manager,:sub_manager]
active_for_controllers ({:private=>['locations']})
head_link_path "panel_locations_back_end_locations_path"
head_link_path "panel_location_back_end_locations_path"
end
end

View File

@ -96,7 +96,11 @@ class Panel::PageContent::BackEnd::PageContextsController < OrbitBackendControll
@create_page_context.save
end
format.html { redirect_to(panel_page_content_back_end_page_contexts_url, :notice => t('page_content.update_page_content_success')) }
if !params[:page].blank?
format.html { redirect_to(panel_page_content_back_end_page_contexts_url(:page =>params[:page]), :notice => t('page_content.update_page_content_success')) }
else
format.html { redirect_to(panel_page_content_back_end_page_contexts_url, :notice => t('page_content.update_page_content_success')) }
end
format.js { render 'toggle_enable' }
format.xml { head :ok }
else

View File

@ -37,6 +37,7 @@
</div>
<div class="form-actions">
<%= hidden_field_tag 'page', params[:page] if !params[:page].blank? %>
<%= f.submit t('submit'), :class=>'btn btn-primary' %>
<%= link_to t('cancel'), get_go_back, :class=>"btn" %>
</div>

View File

@ -5,7 +5,7 @@
<div class="quick-edit">
<ul class="nav nav-pills hide">
<%if is_manager? || is_admin? || page_context.authed_users(:edit).include?(current_user)%>
<li><%= link_to t(:edit), edit_panel_page_content_back_end_page_context_path(page_context) %></li>
<li><%= link_to t(:edit), edit_panel_page_content_back_end_page_context_path(page_context, :page => params[:page]) %></li>
<%if (is_manager? || is_admin?) %>
<li><%=show_page_context_edit_auth_link page_context%></li>
<% end%>

View File

@ -0,0 +1,30 @@
class Panel::PersonalBook::FrontEnd::WritingBooksController < OrbitWidgetController
def initialize
super
@app_title = 'personal_book'
end
def index
@writing_books = WritingBook.desc(:year).page(params[:page]).per(10)
end
# GET /writing_books/1
# GET /writing_books/1.xml
def show
@writing_book = WritingBook.find(params[:id])
@book_author_types = ( !@writing_book.book_author_types.blank? ? @writing_book.book_author_types.collect{|x| x.title}.join(', ') : nil)
end
def get_tags
module_app = ModuleApp.first(:conditions => {:key => 'personal_book'})
@tags = Tag.all(:conditions => {:module_app_id => module_app.id})
end
end

View File

@ -1,9 +1,5 @@
# encoding: utf-8
class BookPaperType < WritingBookCategory
field :title, localize: true
has_and_belongs_to_many :writing_books
end

View File

@ -19,7 +19,7 @@
<div class="control-group">
<%= label_tag "link-#{locale}", "Name-#{I18nVariable.from_locale(locale)}", :class => 'control-label' %>
<div class="controls">
<%= f.text_field locale, :class => 'control-label', :value => (@set_author_type.title_translations[locale] rescue nil) %>
<%= f.text_field locale, :class => 'control-label', :value => (@set_paper_type.title_translations[locale] rescue nil) %>
</div>
</div>
<% end %>

View File

@ -15,6 +15,7 @@
</table>
<div class="form-actions form-fixed pagination-right">
<%= link_to content_tag(:i, nil, :class => 'icon-cog icon-white') + t('setting'), panel_personal_book_back_end_writing_book_setting_path, :class => 'btn btn-primary pull-right' %>
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_personal_book_back_end_writing_book_path, :class => 'btn btn-primary pull-right' %>
<div id="writing_book_pagination" class="paginationFixed">
<%= paginate @writing_books, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>

View File

@ -0,0 +1,27 @@
<% # encoding: utf-8 %>
<%= flash_messages %>
<h1><%= t('writing_book.list_writing_book') %></h1>
<table>
<tr>
<th><%= t(:year) %></th>
<th><%= t(:title) %></th>
</tr>
<% @writing_books.each do |post| %>
<tr>
<td><%= post.year %></td>
<td>
<%= link_to post.create_link , panel_personal_book_front_end_writing_book_path(post) %>
</td>
</tr>
<% end %>
</table>
<%= paginate @writing_books, :params => {:inner => false}%>

View File

@ -0,0 +1,37 @@
<% # encoding: utf-8 %>
<table>
<caption> <%= t("writing_book") %> </caption>
<tbody>
<tr><th><%= t("writing_book.year")%></th><td><%= @writing_book.year %></td></tr>
<tr><th><%= t("writing_book.language")%></th><td><%= @writing_book.language %></td></tr>
<tr><th><%= t("writing_book.paper_title")%></th><td><%= @writing_book.paper_title %></td></tr>
<tr><th><%= t("writing_book.book_title")%></th><td><%= @writing_book.book_title %></td></tr>
<tr><th><%= t("writing_book.book_paper_type")%></th><td><%= @writing_book.book_paper_type.title if !@writing_book.book_paper_type.blank? %></td></tr>
<tr><th><%= t("writing_book.book_author_types")%></th><td><%= @book_author_types %></td></tr>
<tr><th><%= t("writing_book.extracted_chapters")%></th><td><%= @writing_book.extracted_chapters %></td></tr>
<tr><th><%= t("writing_book.publisher")%></th><td><%= @writing_book.publisher %></td></tr>
<tr><th><%= t("writing_book.editor")%></th><td><%= @writing_book.editor %></td></tr>
<tr><th><%= t("writing_book.publish_date")%></th><td><%= @writing_book.publish_date %></td></tr>
<tr><th><%= t("writing_book.pages")%></th><td><%= @writing_book.pages %></td></tr>
<tr><th><%= t("writing_book.isbn")%></th><td><%= @writing_book.isbn %></td></tr>
<tr><th><%= t("writing_book.publication_date")%></th><td><%= @writing_book.publication_date %></td></tr>
<tr><th><%= t("writing_book.url")%></th><td><%= link_to t(:url), @writing_book.url, {:target => '_blank', :title => @writing_book.book_title} if !@writing_book.url.blank? %></td></tr>
<tr><th><%= t("writing_book.note")%></th><td><%= @writing_book.note %></td></tr>
<tr><th><%= t("writing_book.authors")%></th><td><%= "#{User.from_id(@writing_book.create_user_id).name rescue ''},#{@writing_book.authors rescue ''}"%></td></tr>
<tr><th><%= t("writing_book.files")%></th>
<td>
<% if @writing_book.writing_book_files.size > 0 %>
<div>
<i class="icons-paperclip"></i>
<div class="showFile">
<% @writing_book.writing_book_files.each do | wjfile | %>
<%= link_to wjfile.title, wjfile.file.url, {:target => '_blank', :title => wjfile.title} if wjfile.file.file %>
<% end %>
</div>
</div>
<% end %>
</td>
</tr>
</tbody>
</table>

View File

@ -1,6 +1,6 @@
source "http://rubygems.org"
# Declare your gem's dependencies in personal_seminar.gemspec.
# Declare your gem's dependencies in personal_conference.gemspec.
# Bundler will treat runtime dependencies like base dependencies, and
# development dependencies will be added by default to the :development group.
gemspec

View File

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

View File

@ -0,0 +1 @@
//= require_tree ./personal_conference/desktop

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

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,5 @@
class Panel::PersonalConference::Desktop::ConferencePController < ApplicationController
def conference_p
render panel_personal_conference_desktop_conference_p_path, :layout => false
end
end

View File

@ -0,0 +1,14 @@
class Panel::PersonalConference::Desktop::ConferencePagesController < ApplicationController
def index
respond_to do |format|
format.html { render :layout => false}
end
end
def new
respond_to do |format|
format.html { render :layout => false}
end
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
class WritingSeminar
class WritingConference
include Mongoid::Document
include Mongoid::Timestamps
include Mongoid::MultiParameterAttributes
@ -11,15 +11,15 @@ class WritingSeminar
field :paper_title, localize: true
field :seminar_title, localize: true
field :conference_title, localize: true
field :authors, localize: true
field :location, localize: true
field :sponsor, localize: true
has_and_belongs_to_many :tags, :class_name => "PersonalSeminarTag"
has_and_belongs_to_many :tags, :class_name => "PersonalConferenceTag"
has_and_belongs_to_many :seminar_author_types
has_and_belongs_to_many :seminar_paper_types
has_and_belongs_to_many :conference_author_types
has_and_belongs_to_many :conference_paper_types
field :year
@ -38,9 +38,9 @@ class WritingSeminar
# field :is_hot, :type => Boolean, :default => false
# field :is_hidden, :type => Boolean, :default => false
has_many :writing_seminar_files, :autosave => true, :dependent => :destroy
has_many :writing_conference_files, :autosave => true, :dependent => :destroy
accepts_nested_attributes_for :writing_seminar_files, :allow_destroy => true
accepts_nested_attributes_for :writing_conference_files, :allow_destroy => true
# before_save :update_avliable_language, :clean_checkboxs
@ -48,7 +48,7 @@ class WritingSeminar
before_validation :add_http
after_save :save_writing_seminar_files
after_save :save_writing_conference_files
validates :url, :format => /^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$/ix, :unless => Proc.new{self.url.blank?}
@ -56,7 +56,7 @@ class WritingSeminar
if category_id.to_s.size > 0
find(:all, :conditions => {writing_seminar_category_id: category_id}).desc( :is_top, :title )
find(:all, :conditions => {writing_conference_category_id: category_id}).desc( :is_top, :title )
else
@ -91,8 +91,8 @@ class WritingSeminar
end
end
def save_writing_seminar_files
self.writing_seminar_files.each do |t|
def save_writing_conference_files
self.writing_conference_files.each do |t|
if t.should_destroy
t.destroy
end
@ -102,11 +102,11 @@ class WritingSeminar
def create_link
title = ["\"#{self.paper_title}\""]
title << self.seminar_title
title << self.conference_title
title << self.sponsor
title << self.location
title << "#{period_start_date}-#{period_end_date}"
# title << "(#{self.seminar_paper_types.collect{|x| x.title}.join(', ')})"
# title << "(#{self.conference_paper_types.collect{|x| x.title}.join(', ')})"
title.join(', ')
end
@ -121,8 +121,8 @@ class WritingSeminar
def clean_checkboxs
self.tag_ids.delete('')
self.seminar_author_type_ids.delete('')
self.seminar_level_type_ids.delete('')
self.conference_author_type_ids.delete('')
self.conference_level_type_ids.delete('')
end
end
end

View File

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

View File

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

View File

@ -1,8 +1,8 @@
<% # encoding: utf-8 %>
<%= form_for(:writing_seminar_category, :remote => true, :url => @url, :method => @verb, :html => { :id => 'form_writing_seminar_category' } ) do |f| %>
<%= form_for(:writing_conference_category, :remote => true, :url => @url, :method => @verb, :html => { :id => 'form_writing_conference_category' } ) do |f| %>
<h2><%= (@writing_seminar_category.new_record? ? 'Add' : 'Edit') %></h2>
<h2><%= (@writing_conference_category.new_record? ? 'Add' : 'Edit') %></h2>
<div id="widget-title">
<%= f.label :key %>
@ -16,7 +16,7 @@
<div class="control-group">
<%= label_tag "name-#{locale}", "Name-#{I18nVariable.from_locale(locale)}", :class => 'control-label' %>
<div class="controls">
<%= f.text_field locale, :class => 'input-xxlarge', :value => (@writing_seminar_category.title_translations[locale] rescue nil) %>
<%= f.text_field locale, :class => 'input-xxlarge', :value => (@writing_conference_category.title_translations[locale] rescue nil) %>
</div>
</div>
<% end %>
@ -41,4 +41,4 @@
</div>
<% end %>

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

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