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

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

No files matched your search

-306
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}"
@@ -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>
@@ -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 %>
@@ -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 %>
@@ -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 %>
+1 -1
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"
+1 -1
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
@@ -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
@@ -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>
@@ -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%>
@@ -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
@@ -1,9 +1,5 @@
# encoding: utf-8
class BookPaperType < WritingBookCategory
field :title, localize: true
has_and_belongs_to_many :writing_books
end
@@ -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 %>
@@ -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} %>
@@ -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}%>
@@ -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>
@@ -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
@@ -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')
@@ -0,0 +1 @@
//= require_tree ./personal_conference/desktop
@@ -0,0 +1,58 @@
orbitDesktop.prototype.initializeConference = function(target,url,cache){
this.initializeConference.list = function(){
var bindHandlers = function(){
o.tinyscrollbar_ext({
main : ".tinycanvas",
fill : ".list_t"
})
}
bindHandlers();
}
this.initializeConference.addconference = function(){
var bindHandlers = function(){
o.simple_drop_down();
o.tinyscrollbar_ext({
main: '.tinycanvas',
fill: '.s_grid_con'
})
}
bindHandlers();
}
this.initializeConference.conference = function(){
var bindHandlers = function(){
o.simple_drop_down();
o.tinyscrollbar_ext({
main: '.tinycanvas',
fill: '.s_grid_con'
})
}
bindHandlers();
}
this.initializeConference.coauthor = function(){
var bindHandlers = function(){
o.simple_drop_down();
o.tinyscrollbar_ext({
main: '.tinycanvas',
fill: '.s_grid_con'
})
}
bindHandlers();
}
this.initializeConference.list();
}
@@ -0,0 +1,8 @@
class Panel::PersonalConference::BackEnd::ConferenceAuthorTypesController < Panel::PersonalConference::BackEnd::WritingConferenceCategorysController
def initialize
super
@app_type = 'conference_author_type'
end
end
@@ -0,0 +1,8 @@
class Panel::PersonalConference::BackEnd::ConferencePaperTypesController < Panel::PersonalConference::BackEnd::WritingConferenceCategorysController
def initialize
super
@app_type = 'conference_paper_type'
end
end
@@ -0,0 +1,8 @@
class Panel::PersonalConference::BackEnd::TagsController < Admin::TagsController
def initialize
super
@app_title = 'personal_conference'
end
end
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -0,0 +1,9 @@
# encoding: utf-8
class ConferenceAuthorType < WritingConferenceCategory
field :title, localize: true
has_and_belongs_to_many :writing_conferences
end
@@ -0,0 +1,9 @@
# encoding: utf-8
class ConferencePaperType < WritingConferenceCategory
field :title, localize: true
has_and_belongs_to_many :writing_conferences
end
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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 %>
@@ -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>
@@ -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();
@@ -0,0 +1 @@
$("#<%= dom_id @writing_conference_category %>").find(".archive_toggle").text("<%= show_toggle_archive_btn(@writing_conference_category) %> ");
@@ -0,0 +1,7 @@
<h1><%= t('personal_conference.editing_personal_conference_class') %></h1>
<%= form_for @writing_conference_category, :url => panel_personal_conference_back_end_writing_conference_category_path(@writing_conference_category) do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>
<% end %>
<%= link_back %>
@@ -3,22 +3,22 @@
<%= @types %>
<table id="writing_seminar_categorys" class="table main-list">
<table id="writing_conference_categorys" class="table main-list">
<thead>
<tr>
<th class="span1-2"><%= t('writing_seminar_category.key') %></th>
<th class="span1-2"><%= t('writing_conference_category.key') %></th>
<% if @types.is_localized?(:title) %>
<% @site_valid_locales.each do |locale| %>
<th class="span1-2"><%= I18nVariable.first(:conditions => {:key => locale})[I18n.locale] %></th>
<% end %>
<% else %>
<th class="span1-2"><%= t('writing_seminar_category.title') %></th>
<th class="span1-2"><%= t('writing_conference_category.title') %></th>
<% end %>
</tr>
</thead>
<tbody>
<%= render :partial => 'writing_seminar_category', :collection => @writing_seminar_categorys %>
<%= render :partial => 'writing_conference_category', :collection => @writing_conference_categorys %>
</tbody>
</table>
@@ -0,0 +1,19 @@
<% content_for :secondary do %>
<%= render :partial => '/panel/personal_conference/back_end/personal_conference_secondary' %>
<% end -%>
<%= flash_messages %>
<br />
<br />
<br />
<br />
<br />
<h1><%= t('writing_conference_category.new_personal_conference_class') %></h1>
<%= form_for @writing_conference_category, :url => panel_personal_conference_back_end_writing_conference_categorys_path do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>
<% end %>
<%= link_back %>
@@ -0,0 +1,4 @@
$("#<%= dom_id @writing_conference_category %>").replaceWith("<%= j render :partial => 'writing_conference_category', :collection => [@writing_conference_category] %>");
<% @writing_conference_category = @types.new(:display => 'List') # reset for new form %>
$("#form_writing_conference_category").replaceWith("<%= j render "form" %>")
$("#form_writing_conference_category")[0].reset();
@@ -26,9 +26,9 @@
<% end %>
</div>
<div class="modal-footer">
<%= hidden_field_tag 'writing_seminar_category[author_type]', @set_author_type.id %>
<%= hidden_field_tag 'writing_conference_category[author_type]', @set_author_type.id %>
<%= f.submit t('submit'), :class=>'btn btn-primary' %>
<a class="btn" data-dismiss="modal"><%= t('cancel')%></a>
</div>
<% end %>
@@ -10,13 +10,13 @@
<div class="widget-action clear tip" title="Setting">
<a class="action"><i class="icon-cog icon-white"></i></a>
</div>
<h3 class="widget-title"><i class="icons-tag"></i><%= f.label :paper_type ,t("personal_seminar.paper_type")%></h3>
<h3 class="widget-title"><i class="icons-tag"></i><%= f.label :paper_type ,t("personal_conference.paper_type")%></h3>
<div class="widget-content clear form-horizontal">
<% @paper_types.each do |paper_type| %>
<%= content_tag :label,:class => "checkbox inline" do -%>
<%= check_box_tag 'writing_seminar[seminar_paper_type_ids][]', paper_type.id, @writing_seminar.seminar_paper_type_ids.include?(paper_type.id)%>
<%= check_box_tag 'writing_conference[conference_paper_type_ids][]', paper_type.id, @writing_conference.conference_paper_type_ids.include?(paper_type.id)%>
<%= paper_type.title %>
<%= hidden_field_tag 'writing_seminar[seminar_paper_type_ids][]', '' %>
<%= hidden_field_tag 'writing_conference[conference_paper_type_ids][]', '' %>
<% end %>
<% end %>
</div>
@@ -26,13 +26,13 @@
<div class="widget-action clear tip" title="Setting">
<a class="action"><i class="icon-cog icon-white"></i></a>
</div>
<h3 class="widget-title"><i class="icons-tag"></i><%= f.label :author_type ,t("personal_seminar.author_type")%></h3>
<h3 class="widget-title"><i class="icons-tag"></i><%= f.label :author_type ,t("personal_conference.author_type")%></h3>
<div class="widget-content clear form-horizontal">
<% @author_types.each do |author_type| %>
<%= content_tag :label,:class => "checkbox inline" do -%>
<%= check_box_tag 'writing_seminar[seminar_author_type_ids][]', author_type.id, @writing_seminar.seminar_author_type_ids.include?(author_type.id)%>
<%= check_box_tag 'writing_conference[conference_author_type_ids][]', author_type.id, @writing_conference.conference_author_type_ids.include?(author_type.id)%>
<%= author_type.title %>
<%= hidden_field_tag 'writing_seminar[seminar_author_type_ids][]', '' %>
<%= hidden_field_tag 'writing_conference[conference_author_type_ids][]', '' %>
<% end %>
<% end %>
</div>
@@ -47,9 +47,9 @@
<div class="widget-content clear form-horizontal">
<% @tags.each do |tag| %>
<%= content_tag :label,:class => "checkbox inline" do -%>
<%= check_box_tag 'writing_seminar[tag_ids][]', tag.id, @writing_seminar.tag_ids.include?(tag.id)%>
<%= check_box_tag 'writing_conference[tag_ids][]', tag.id, @writing_conference.tag_ids.include?(tag.id)%>
<%= tag[I18n.locale] %>
<%= hidden_field_tag 'writing_seminar[tag_ids][]', '' %>
<%= hidden_field_tag 'writing_conference[tag_ids][]', '' %>
<% end %>
<% end %>
</div>
@@ -74,8 +74,8 @@
<% end %>
<div class="title">
<%= f.label :year ,t("personal_seminar.year")%>
<%= select_year((@writing_seminar.year ? @writing_seminar.year.to_i : DateTime.now.year), {:start_year => DateTime.now.year, :end_year => 1930}, {:name => 'writing_seminar[year]'} ) %>
<%= f.label :year ,t("personal_conference.year")%>
<%= select_year((@writing_conference.year ? @writing_conference.year.to_i : DateTime.now.year), {:start_year => DateTime.now.year, :end_year => 1930}, {:name => 'writing_conference[year]'} ) %>
</div>
<ul class="nav nav-tabs">
@@ -85,12 +85,12 @@
</ul>
<div class="title">
<%= f.label :period_start_date ,t("personal_seminar.period_start_date")%>
<%= f.label :period_start_date ,t("personal_conference.period_start_date")%>
<%= f.date_select :period_start_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year, :month, :day] }, {:class => 'span1'} %>
</div>
<div class="title">
<%= f.label :period_end_date ,t("personal_seminar.period_end_date")%>
<%= f.label :period_end_date ,t("personal_conference.period_end_date")%>
<%= f.date_select :period_end_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year, :month, :day] }, {:class => 'span1'} %>
</div>
@@ -100,34 +100,34 @@
<div class="<%= locale %> fade tab-pane <%= ( i == 0 ) ? "in active" : '' %>">
<div class="title">
<%= f.label :paper_title ,t("personal_seminar.paper_title")%>
<%= f.label :paper_title ,t("personal_conference.paper_title")%>
<%= f.fields_for :paper_title_translations do |f| %>
<%= I18nVariable.from_locale(locale) %>
<%= f.text_field locale, :class=>'post-title', :value => (@writing_seminar.paper_title_translations[locale] rescue nil) %>
<%= f.text_field locale, :class=>'post-title', :value => (@writing_conference.paper_title_translations[locale] rescue nil) %>
<% end %>
</div>
<div class="title">
<%= f.label :seminar_title ,t("personal_seminar.seminar_title")%>
<%= f.fields_for :seminar_title_translations do |f| %>
<%= f.label :conference_title ,t("personal_conference.conference_title")%>
<%= f.fields_for :conference_title_translations do |f| %>
<%= I18nVariable.from_locale(locale) %>
<%= f.text_field locale, :class=>'post-title', :value => (@writing_seminar.seminar_title_translations[locale] rescue nil) %>
<%= f.text_field locale, :class=>'post-title', :value => (@writing_conference.conference_title_translations[locale] rescue nil) %>
<% end %>
</div>
<div class="title">
<%= f.label :location ,t("personal_seminar.location")%>
<%= f.label :location ,t("personal_conference.location")%>
<%= f.fields_for :location_translations do |f| %>
<%= I18nVariable.from_locale(locale) %>
<%= f.text_field locale, :class=>'post-title', :value => (@writing_seminar.location_translations[locale] rescue nil) %>
<%= f.text_field locale, :class=>'post-title', :value => (@writing_conference.location_translations[locale] rescue nil) %>
<% end %>
</div>
<div class="title">
<%= f.label :sponsor ,t("personal_seminar.sponsor")%>
<%= f.label :sponsor ,t("personal_conference.sponsor")%>
<%= f.fields_for :sponsor_translations do |f| %>
<%= I18nVariable.from_locale(locale) %>
<%= f.text_field locale, :class=>'post-title', :value => (@writing_seminar.sponsor_translations[locale] rescue nil) %>
<%= f.text_field locale, :class=>'post-title', :value => (@writing_conference.sponsor_translations[locale] rescue nil) %>
<% end %>
</div>
@@ -135,7 +135,7 @@
<%= f.label :authors,t("web_resource.authors") %>
<%= f.fields_for :authors_translations do |f| %>
<%= I18nVariable.from_locale(locale) %>
<%= f.text_area locale, :size => "60x3", :value => (@writing_seminar.authors_translations[locale] rescue nil) %>
<%= f.text_area locale, :size => "60x3", :value => (@writing_conference.authors_translations[locale] rescue nil) %>
<% end %>
</div>
@@ -146,32 +146,32 @@
</div>
<div class="title">
<%= f.label :publication_date ,t("personal_seminar.publication_date")%>
<%= f.label :publication_date ,t("personal_conference.publication_date")%>
<%= f.date_select :publication_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1890, :order => [:year, :month, :day] }, {:class => 'span1'} %>
</div>
<div class="title">
<%= f.label :url, t("personal_seminar.url") %>
<%= f.label :url, t("personal_conference.url") %>
<%= f.text_field :url %>
</div>
<div class="title">
<%= f.label :keywords, t("personal_seminar.keywords") %>
<%= f.label :keywords, t("personal_conference.keywords") %>
<%= f.text_field :keywords %>
</div>
<div class="title">
<%= f.label :abstract, t("personal_seminar.abstract") %>
<%= f.label :abstract, t("personal_conference.abstract") %>
<%= f.text_field :abstract %>
</div>
<div class="title">
<%= f.label :language, t("personal_journal.language") %>
<%= f.select :language, WritingSeminar::LANGUAGE_TYPES, :prompt => 'Select' %>
<%= f.select :language, WritingConference::LANGUAGE_TYPES, :prompt => 'Select' %>
</div>
<div class="title">
<%= f.label :note, t("personal_seminar.note") %>
<%= f.label :note, t("personal_conference.note") %>
<%= f.text_area :note, :size => "60x3" %>
</div>
@@ -197,7 +197,7 @@
<tr>
<td style="text-align:center" colspan="3">
<div id='add_plugin_file' class="info_input plugin_files_block">
<%= hidden_field_tag 'plugin_file_field_count', @writing_seminar.writing_seminar_files.count %>
<%= hidden_field_tag 'plugin_file_field_count', @writing_conference.writing_conference_files.count %>
<a class="add"><span class="btn btn-primary btn-small"><i class="icon-plus icon-white"></i> ADD/新增</span></a>
</div>
</td>
@@ -206,9 +206,9 @@
</tfoot>
<tbody>
<% @writing_seminar.writing_seminar_files.each_with_index do |writing_seminar_file, i| %>
<%= f.fields_for :writing_seminar_files, writing_seminar_file do |f| %>
<%= render :partial => 'form_file', :object => writing_seminar_file, :locals => {:f => f, :i => i} %>
<% @writing_conference.writing_conference_files.each_with_index do |writing_conference_file, i| %>
<%= f.fields_for :writing_conference_files, writing_conference_file do |f| %>
<%= render :partial => 'form_file', :object => writing_conference_file, :locals => {:f => f, :i => i} %>
<% end %>
<% end %>
</tbody>
@@ -242,7 +242,7 @@
var new_id = $(this).prev().attr('value');
var old_id = new RegExp("new_add_plugin_files", "g");
$(this).prev().attr('value', parseInt(new_id) + 1);
$(this).parents('table').append(("<%= escape_javascript(add_attribute 'form_file', f, :writing_seminar_files) %>").replace(old_id, new_id));
$(this).parents('table').append(("<%= escape_javascript(add_attribute 'form_file', f, :writing_conference_files) %>").replace(old_id, new_id));
});
$('.add_plugin_files_block a.delete').live('click', function(){
@@ -255,4 +255,4 @@
});
</script>
<% end %>
<% end %>
@@ -0,0 +1,11 @@
<% # encoding: utf-8 %>
<tr id="<%= dom_id list_author_type %>">
<td><%= list_author_type.title %></td>
<td class="span2">
<a href="<%= panel_personal_conference_back_end_writing_conference_author_type_quick_edit_path(list_author_type) %>#myModal2" data-toggle="modal" data-remote="true" class="action">編輯</a>
<%= link_to show_toggle_archive_btn(list_author_type),
polymorphic_path([:panel, :personal_conference, :back_end, list_author_type]), :confirm => t('announcement.sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %>
</td>
</tr>
@@ -0,0 +1,11 @@
<% # encoding: utf-8 %>
<tr id="<%= dom_id list_paper_type %>">
<td><%= list_paper_type.title %></td>
<td class="span2">
<a href="<%= panel_personal_conference_back_end_writing_conference_paper_type_quick_edit_path(list_paper_type) %>#myModal1" data-toggle="modal" data-remote="true" class="action">編輯</a>
<%= link_to show_toggle_archive_btn(list_paper_type),
polymorphic_path([:panel, :personal_conference, :back_end, list_paper_type]), :confirm => t('announcement.sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %>
</td>
</tr>
@@ -26,9 +26,9 @@
<% end %>
</div>
<div class="modal-footer">
<%= hidden_field_tag 'writing_seminar_category[paper_type]', @set_paper_type.id %>
<%= hidden_field_tag 'writing_conference_category[paper_type]', @set_paper_type.id %>
<%= f.submit t('submit'), :class=>'btn btn-primary' %>
<a class="btn" data-dismiss="modal"><%= t('cancel')%></a>
</div>
<% end %>
@@ -0,0 +1,4 @@
<%= render_sort_bar(true, delete_panel_personal_conference_back_end_writing_conferences_path(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]),
['year', 'year', 'span1', 'writing_conference.year'],
['title', 'title','span3', 'writing_conference.title'],
['create_modified', 'create_user_id','span1-3', 'writing_conference.create_modified']).html_safe %>
@@ -0,0 +1,21 @@
<tr id="<%= dom_id writing_conference %>" class="with_action">
<td>
<% if (writing_conference.create_user_id == current_user.id) || is_manager? %>
<%= check_box_tag 'to_delete[]', writing_conference.id, false, :class => "checkbox_in_list" %>
<% end -%>
</td>
<td><%= writing_conference.year %></td>
<td>
<%= link_to writing_conference.create_link, panel_personal_conference_front_end_writing_conference_path(writing_conference) %>
<div class="quick-edit">
<ul class="nav nav-pills hide">
<%if at_least_module_manager || writing_conference.writing_conference_category.cur_user_is_sub_manager_of(:edit)%>
<li><%= link_to t('edit'), edit_panel_personal_conference_back_end_writing_conference_path(writing_conference) %></li>
<li><%= link_to t(:delete_), panel_personal_conference_back_end_writing_conference_path(writing_conference), :confirm => t('sure?'), :method => :delete, :remote => true %></li>
<% end -%>
</ul>
</div>
</td>
<td><%= User.from_id(writing_conference.create_user_id).name rescue ''%></td>
</tr>
@@ -0,0 +1,10 @@
<% if !@conference_paper_type.blank? %>
$("#myModal1").modal('hide');
$('<%= j render :partial => 'list_paper_type', :collection => [@conference_paper_type] %>').appendTo('#paper_types').hide().fadeIn();
<% end %>
<% if !@conference_author_type.blank? %>
$("#myModal2").modal('hide');
$('<%= j render :partial => 'list_author_type', :collection => [@conference_author_type] %>').appendTo('#author_types').hide().fadeIn();
<% end %>
@@ -0,0 +1 @@
$("#<%= dom_id @writing_conference %>").remove();
@@ -0,0 +1,5 @@
<h1><%= t('personal_conference.editing_personal_conference') %></h1>
<%= form_for @writing_conference, :url => panel_personal_conference_back_end_writing_conference_path(@writing_conference), :html => {:class => 'clear'} do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>
<% end %>
@@ -0,0 +1,23 @@
<%= render 'filter' %>
<table class="table main-list">
<thead>
<tr>
<th class="span1"></th>
<th class="span1"></th>
<th class="span2"></th>
<th class="span3"></th>
<th class="span2"></th>
</tr>
</thead>
<tbody id="tbody_writing_conferences" class="sort-holder">
<%= render :partial => 'writing_conference', :collection => @writing_conferences %>
</tbody>
</table>
<div class="form-actions form-fixed pagination-right">
<%= link_to content_tag(:i, nil, :class => 'icon-cog icon-white') + t('setting'), panel_personal_conference_back_end_writing_conference_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_conference_back_end_writing_conference_path, :class => 'btn btn-primary pull-right' %>
<div id="writing_conference_pagination" class="paginationFixed">
<%= paginate @writing_conferences, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>
</div>
</div>
@@ -0,0 +1,3 @@
$("#sort_headers").html("<%= j render 'sort_headers' %>");
$("#tbody_writing_conferences").html("<%= j render :partial => 'writing_conference', :collection => @writing_conferences %>");
$("#writing_conference_pagination").html("<%= j paginate @writing_conferences, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>");
@@ -0,0 +1,10 @@
<%= flash_messages %>
<div id="poststuff">
<h1><%= t('writing_conference.new_personal_conference') %></h1>
<%= form_for @writing_conference, :url => panel_personal_conference_back_end_writing_conferences_path, :html => {:class => 'clear'} do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>
<% end %>
</div>
<%#= link_back %>
@@ -0,0 +1,10 @@
<% if !@conference_paper_type.blank? %>
$("#myModal1").modal('hide');
$("#<%= dom_id @conference_paper_type %>").replaceWith("<%= j render :partial => 'list_paper_type', :collection => [@conference_paper_type] %>");
<% end %>
<% if !@conference_author_type.blank? %>
$("#myModal2").modal('hide');
$("#<%= dom_id @conference_author_type %>").replaceWith("<%= j render :partial => 'list_author_type', :collection => [@conference_author_type] %>");
<% end %>
@@ -5,7 +5,7 @@
<div class="item element">
<div class="detail w-a h-a">
<p class="totle">
<a class="btn btn-small btn-primary pull-right" href="<%= panel_personal_seminar_back_end_writing_seminar_paper_type_quick_add_path('add') %>#myModal1" data-toggle="modal" data-remote="true"><i class="icon-plus"></i> <%= t('add')%></a>
<a class="btn btn-small btn-primary pull-right" href="<%= panel_personal_conference_back_end_writing_conference_paper_type_quick_add_path('add') %>#myModal1" data-toggle="modal" data-remote="true"><i class="icon-plus"></i> <%= t('add')%></a>
<span>論文型態</span>
</p>
<div class="detal-list my_scroll">
@@ -31,7 +31,7 @@
<div class="item element">
<div class="detail w-a h-a">
<p class="totle">
<a class="btn btn-small btn-primary pull-right" href="<%= panel_personal_seminar_back_end_writing_seminar_author_type_quick_add_path('add') %>#myModal2" data-toggle="modal" data-remote="true"><i class="icon-plus"></i> <%= t('add')%></a>
<a class="btn btn-small btn-primary pull-right" href="<%= panel_personal_conference_back_end_writing_conference_author_type_quick_add_path('add') %>#myModal2" data-toggle="modal" data-remote="true"><i class="icon-plus"></i> <%= t('add')%></a>
<span>作者型態</span>
</p>
<div class="detal-list my_scroll">
@@ -143,4 +143,4 @@
<% content_for :page_specific_css do %>
<%= stylesheet_link_tag "item" %>
<% end %>
<% end %>
@@ -0,0 +1,33 @@
<div id="conference_p">
<div id="content">
<div id="header" class="hh3">
<div class="dtitle w2 hh3 hp">
<span class="thmtxth">Conference</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="<%= panel_personal_conference_desktop_conference_pages_path %>" callback-method="list" class="hh2 w2 hp active thmc1 thmtxt" onclick='return false;'>List</a></li>
<li><a href="" callback-method="addconference" custom-load="add" class="admtxt hh2 w2 hp" onclick='return false;'>Add/Edit</a></li>
<li><a href="<%= new_panel_personal_conference_desktop_conference_page_path %>" callback-method="conference" class="admtxt hh2 w2 hp" onclick='return false;'>Conference</a></li>
<li><a href="" callback-method="coauthor" 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>
@@ -0,0 +1,75 @@
<div class="toolbar hh2">
<div class="hh2 hp sdm">
<div class="sdm_t hh2"><span class="icon-check"></span></div>
<div class="admbg sdm_o">
<ul id="journal_selection_options">
<li><a class="hp hh2 admtxt" href="all">All</a></li>
<li><a class="hp hh2 admtxt" href="none">None</a></li>
</ul>
</div>
</div>
<div class="hh2 hp sdm">
<div class="sdm_t hh2">More</div>
<div class="admbg sdm_o">
<ul>
<li><a class="hp hh2 admtxt" href="">Delete</a></li>
<li><a class="hp hh2 admtxt" href="">Tag</a></li>
</ul>
</div>
</div>
<div class="hh2 hp sdm">
<div class="sdm_t hh2">Tag</div>
<div class="admbg sdm_o">
<ul>
<li><a class="hp hh2 admtxt" href="">All</a></li>
<li><a class="hp hh2 admtxt" href="">Starred</a></li>
<li><a class="hp hh2 admtxt" href="">MIT</a></li>
</ul>
</div>
</div>
<div class="hh2 hp sdm">
<div class="sdm_t hh2">Status</div>
<div class="admbg sdm_o">
<ul>
<li><a class="hp hh2 admtxt" href="">All</a></li>
<li><a class="hp hh2 admtxt" href="">Published</a></li>
<li><a class="hp hh2 admtxt" href="">Pending</a></li>
</ul>
</div>
</div>
<div class="hh2 hp sdm">
<div class="sdm_t hh2">View</div>
<div class="admbg sdm_o">
<ul id="journal_view_selection">
<li><a class="hp hh2 admtxt" href="journal">Journal</a></li>
<li><a class="hp hh2 admtxt" href="title">Title</a></li>
<li><a class="hp hh2 admtxt" href="file">File</a></li>
<li><a class="hp hh2 admtxt" href="keywords">Keywords</a></li>
<li><a class="hp hh2 admtxt" href="abstract">Abstract</a></li>
</ul>
</div>
</div>
<div class="hh2 hp sdm">
<div class="sdm_t hh2">Share</div>
<div class="admbg sdm_o">
<ul>
<li><a class="hp hh2 admtxt" href="">Full</a></li>
<li><a class="hp hh2 admtxt" href="">Abstract</a></li>
<li><a class="hp hh2 admtxt" href="">Friends</a></li>
<li><a class="hp hh2 admtxt" href="">Private</a></li>
<li><a class="hp hh2 admtxt" href="">Group</a></li>
</ul>
</div>
</div>
<div class="hh2 hp sdm">
<div class="sdm_t hh2"><span class="icon-question-sign"></span></div>
</div>
</div>
<div id="paper_list" class="tinycanvas vp">
<div class="scrollbar sb_h vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div>
<div class="viewport">
<div class="overview">
</div>
</div>
</div>
@@ -0,0 +1,107 @@
<div class="toolbar hh2">
<div class="fn_g hp">
<button class="fn_btn hh2 thmc2 thmtxt">Save</button>
<button class="fn_btn hh2 admbg2">Cancel</button>
</div>
<div class="hh2 hp sdm">
<div class="sdm_t hh2">Year</div>
<div class="admbg sdm_o">
<ul>
<li><a class="hp hh2 admtxt" href="">2012</a></li>
<li><a class="hp hh2 admtxt" href="">2011</a></li>
<li><a class="hp hh2 admtxt" href="">2010</a></li>
<li><a class="hp hh2 admtxt" href="">2009</a></li>
<li><a class="hp hh2 admtxt" href="">2008</a></li>
<li><a class="hp hh2 admtxt" href="">2007</a></li>
<li><a class="hp hh2 admtxt" href="">2006</a></li>
<li><a class="hp hh2 admtxt" href="">2005</a></li>
<li><a class="hp hh2 admtxt" href="">2004</a></li>
<li><a class="hp hh2 admtxt" href="">2003</a></li>
<li><a class="hp hh2 admtxt" href="">2002</a></li>
<li><a class="hp hh2 admtxt" href="">2001</a></li>
</ul>
</div>
</div>
<div class="hh2 hp sdm">
<div class="sdm_t hh2">Language</div>
<div class="admbg sdm_o">
<ul>
<li><a class="hp hh2 admtxt" href="">English</a></li>
<li><a class="hp hh2 admtxt" href="">Chinese</a></li>
</ul>
</div>
</div>
<div class="hh2 hp sdm">
<div class="sdm_t hh2"><span class="icon-question-sign"></span></div>
</div>
</div>
<div id="paper_add" class="tinycanvas vp">
<div class="scrollbar sb_h vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div>
<div class="viewport">
<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="">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>Conference time</label></li>
<li class="s_grid_row"><select name="" id="" class="s_grid s_grid_1">
<option value=""></option>
</select>
<label class="s_grid s_grid_1">Year</label>
<select name="" id="" class="s_grid s_grid_1">
<option value=""></option>
</select>
<label class="s_grid s_grid_1">Month</label>
<select name="" id="" class="s_grid s_grid_1">
<option value=""></option>
</select>
<label class="s_grid s_grid_1">Day</label>
</li>
<li class="s_grid_row"><input class="s_grid s_grid_2" type="text" value="Location"><input class="s_grid s_grid_2" type="text" value="Sponsor"></li>
<li class="s_grid_row"><label class="s_grid_2 s_grid" for="">Reference URL</label><input class="s_grid_4 s_grid" type="text" value="www.sample.com"></li>
</ul>
</div>
<div class="s_grid_con s_form">
<ul>
<li class="s_grid_row"><textarea class="s_grid s_grid_6" name="" id="">Author</textarea><span class="icon-plus input_append"></span></li>
<li class="s_grid_row">
<select name="" id="" class="s_grid s_grid_4">
<option value="">Author Type</option>
<option value="">First Author</option>
<option value="">Corresponding Author</option>
<option value="">Second Author</option>
<option value="">Third Author</option>
<option value="">Fourth Author</option>
</select>
<select name="" id="" class="s_grid s_grid_2">
<option value="">Status</option>
<option value="">Published</option>
<option value="">Pending</option>
<option value="">Writing</option>
</select>
</li>
<li class="s_grid_row"><label class="s_grid s_grid_2" for="">Date of Publication</label><input class="s_grid s_grid_4" type="text" value="2012 / 05 / 01"></li>
<li class="s_grid_row"><input class="s_grid s_grid_6" type="text" value="Tags"><span class="icon-plus input_append"></li>
<li class="s_grid_row"><input class="s_grid s_grid_6" type="text" value="Keywords"><span class="icon-plus input_append"></li>
<li class="s_grid_row"><input class="s_grid s_grid_6" type="text" value="Associated Project"><span class="icon-plus input_append"></span></li>
<li class="s_grid_row"><label class="s_grid s_grid_2" for="">Abstract</label><input type="file"></li>
<li class="s_grid_row"><label class="s_grid s_grid_2" for="">Full Text</label><input type="file"></li>
</ul>
</div>
<div class="s_grid_con s_form">
<ul>
<li class="s_grid_row"><textarea name="" id="" rows="20" class="s_grid s_grid_6">Abstract</textarea></li>
<li class="s_grid_row"><textarea name="" id="" rows="6" class="s_grid s_grid_6">Note</textarea></li>
</ul>
</div>
</div>
</div>
</div>
@@ -0,0 +1,62 @@
<%
@filter = params[:filter]
new_filter = params[:new_filter]
if @filter && params[:clear]
@filter.delete(params[:type])
elsif @filter && new_filter
if @filter.has_key?(new_filter[:type]) && @filter[new_filter[:type]].include?(new_filter[:id].to_s)
@filter[new_filter[:type]].delete(new_filter[:id].to_s)
elsif @filter.has_key?(new_filter[:type])
@filter[new_filter[:type]] << new_filter[:id].to_s
else
@filter.merge!({new_filter[:type] => [new_filter[:id].to_s]})
end
elsif new_filter
@filter = {new_filter[:type] => [new_filter[:id].to_s]}
end
if @user
@writing_conferences = WritingConference.where(:create_user_id => @user.id).page(params[:page]).per(10)
else
@writing_conferences = WritingConference.all.page(params[:page]).per(10)
end
%>
<table class="table main-list">
<thead>
<tr>
<th class="span1"><%= t('writing_conference.year') %></th>
<th class="span3"><%= t('writing_conference.title') %></th>
</tr>
</thead>
<tbody id="tbody_writing_conferences" class="sort-holder">
<% @writing_conferences.each do |writing_conference| %>
<tr id="<%= dom_id writing_conference %>" class="with_action">
<td><%= writing_conference.year %></td>
<td>
<%= link_to writing_conference.create_link, panel_personal_conference_front_end_writing_conference_path(writing_conference) %>
</td>
</tr>
<% end %>
</tbody>
</table>
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_personal_conference_back_end_writing_conference_path(:user_id => @user.id), :class => 'btn btn-primary pull-right' %>
<div class="form-actions form-fixed pagination-right">
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_personal_conference_plugin_writing_conference_path, :class => 'btn btn-primary pull-right' %>
<div id="writing_conference_pagination" class="paginationFixed">
<%= paginate @writing_conferences, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>
</div>
</div>
@@ -10,13 +10,13 @@
<div class="widget-action clear tip" title="Setting">
<a class="action"><i class="icon-cog icon-white"></i></a>
</div>
<h3 class="widget-title"><i class="icons-tag"></i><%= f.label :paper_type ,t("personal_seminar.paper_type")%></h3>
<h3 class="widget-title"><i class="icons-tag"></i><%= f.label :paper_type ,t("personal_conference.paper_type")%></h3>
<div class="widget-content clear form-horizontal">
<% @paper_types.each do |paper_type| %>
<%= content_tag :label,:class => "checkbox inline" do -%>
<%= check_box_tag 'writing_seminar[seminar_paper_type_ids][]', paper_type.id, @writing_seminar.seminar_paper_type_ids.include?(paper_type.id)%>
<%= check_box_tag 'writing_conference[conference_paper_type_ids][]', paper_type.id, @writing_conference.conference_paper_type_ids.include?(paper_type.id)%>
<%= paper_type.title %>
<%= hidden_field_tag 'writing_seminar[seminar_paper_type_ids][]', '' %>
<%= hidden_field_tag 'writing_conference[conference_paper_type_ids][]', '' %>
<% end %>
<% end %>
</div>
@@ -26,13 +26,13 @@
<div class="widget-action clear tip" title="Setting">
<a class="action"><i class="icon-cog icon-white"></i></a>
</div>
<h3 class="widget-title"><i class="icons-tag"></i><%= f.label :author_type ,t("personal_seminar.author_type")%></h3>
<h3 class="widget-title"><i class="icons-tag"></i><%= f.label :author_type ,t("personal_conference.author_type")%></h3>
<div class="widget-content clear form-horizontal">
<% @author_types.each do |author_type| %>
<%= content_tag :label,:class => "checkbox inline" do -%>
<%= check_box_tag 'writing_seminar[seminar_author_type_ids][]', author_type.id, @writing_seminar.seminar_author_type_ids.include?(author_type.id)%>
<%= check_box_tag 'writing_conference[conference_author_type_ids][]', author_type.id, @writing_conference.conference_author_type_ids.include?(author_type.id)%>
<%= author_type.title %>
<%= hidden_field_tag 'writing_seminar[seminar_author_type_ids][]', '' %>
<%= hidden_field_tag 'writing_conference[conference_author_type_ids][]', '' %>
<% end %>
<% end %>
</div>
@@ -47,9 +47,9 @@
<div class="widget-content clear form-horizontal">
<% @tags.each do |tag| %>
<%= content_tag :label,:class => "checkbox inline" do -%>
<%= check_box_tag 'writing_seminar[tag_ids][]', tag.id, @writing_seminar.tag_ids.include?(tag.id)%>
<%= check_box_tag 'writing_conference[tag_ids][]', tag.id, @writing_conference.tag_ids.include?(tag.id)%>
<%= tag[I18n.locale] %>
<%= hidden_field_tag 'writing_seminar[tag_ids][]', '' %>
<%= hidden_field_tag 'writing_conference[tag_ids][]', '' %>
<% end %>
<% end %>
</div>
@@ -65,8 +65,8 @@
<div id="post-body-content" class="clear">
<div class="title">
<%= f.label :year ,t("personal_seminar.year")%>
<%= select_year((@writing_seminar.year ? @writing_seminar.year.to_i : DateTime.now.year), {:start_year => DateTime.now.year, :end_year => 1930}, {:name => 'writing_seminar[year]'} ) %>
<%= f.label :year ,t("personal_conference.year")%>
<%= select_year((@writing_conference.year ? @writing_conference.year.to_i : DateTime.now.year), {:start_year => DateTime.now.year, :end_year => 1930}, {:name => 'writing_conference[year]'} ) %>
</div>
<ul class="nav nav-tabs">
@@ -76,12 +76,12 @@
</ul>
<div class="title">
<%= f.label :period_start_date ,t("personal_seminar.period_start_date")%>
<%= f.label :period_start_date ,t("personal_conference.period_start_date")%>
<%= f.date_select :period_start_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year, :month, :day] }, {:class => 'span1'} %>
</div>
<div class="title">
<%= f.label :period_end_date ,t("personal_seminar.period_end_date")%>
<%= f.label :period_end_date ,t("personal_conference.period_end_date")%>
<%= f.date_select :period_end_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year, :month, :day] }, {:class => 'span1'} %>
</div>
@@ -91,34 +91,34 @@
<div class="<%= locale %> fade tab-pane <%= ( i == 0 ) ? "in active" : '' %>">
<div class="title">
<%= f.label :paper_title ,t("personal_seminar.paper_title")%>
<%= f.label :paper_title ,t("personal_conference.paper_title")%>
<%= f.fields_for :paper_title_translations do |f| %>
<%= I18nVariable.from_locale(locale) %>
<%= f.text_field locale, :class=>'post-title', :value => (@writing_seminar.paper_title_translations[locale] rescue nil) %>
<%= f.text_field locale, :class=>'post-title', :value => (@writing_conference.paper_title_translations[locale] rescue nil) %>
<% end %>
</div>
<div class="title">
<%= f.label :seminar_title ,t("personal_seminar.seminar_title")%>
<%= f.fields_for :seminar_title_translations do |f| %>
<%= f.label :conference_title ,t("personal_conference.conference_title")%>
<%= f.fields_for :conference_title_translations do |f| %>
<%= I18nVariable.from_locale(locale) %>
<%= f.text_field locale, :class=>'post-title', :value => (@writing_seminar.seminar_title_translations[locale] rescue nil) %>
<%= f.text_field locale, :class=>'post-title', :value => (@writing_conference.conference_title_translations[locale] rescue nil) %>
<% end %>
</div>
<div class="title">
<%= f.label :location ,t("personal_seminar.location")%>
<%= f.label :location ,t("personal_conference.location")%>
<%= f.fields_for :location_translations do |f| %>
<%= I18nVariable.from_locale(locale) %>
<%= f.text_field locale, :class=>'post-title', :value => (@writing_seminar.location_translations[locale] rescue nil) %>
<%= f.text_field locale, :class=>'post-title', :value => (@writing_conference.location_translations[locale] rescue nil) %>
<% end %>
</div>
<div class="title">
<%= f.label :sponsor ,t("personal_seminar.sponsor")%>
<%= f.label :sponsor ,t("personal_conference.sponsor")%>
<%= f.fields_for :sponsor_translations do |f| %>
<%= I18nVariable.from_locale(locale) %>
<%= f.text_field locale, :class=>'post-title', :value => (@writing_seminar.sponsor_translations[locale] rescue nil) %>
<%= f.text_field locale, :class=>'post-title', :value => (@writing_conference.sponsor_translations[locale] rescue nil) %>
<% end %>
</div>
@@ -126,7 +126,7 @@
<%= f.label :authors,t("web_resource.authors") %>
<%= f.fields_for :authors_translations do |f| %>
<%= I18nVariable.from_locale(locale) %>
<%= f.text_area locale, :size => "60x3", :value => (@writing_seminar.authors_translations[locale] rescue nil) %>
<%= f.text_area locale, :size => "60x3", :value => (@writing_conference.authors_translations[locale] rescue nil) %>
<% end %>
</div>
@@ -137,32 +137,32 @@
</div>
<div class="title">
<%= f.label :publication_date ,t("personal_seminar.publication_date")%>
<%= f.label :publication_date ,t("personal_conference.publication_date")%>
<%= f.date_select :publication_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1890, :order => [:year, :month, :day] }, {:class => 'span1'} %>
</div>
<div class="title">
<%= f.label :url, t("personal_seminar.url") %>
<%= f.label :url, t("personal_conference.url") %>
<%= f.text_field :url %>
</div>
<div class="title">
<%= f.label :keywords, t("personal_seminar.keywords") %>
<%= f.label :keywords, t("personal_conference.keywords") %>
<%= f.text_field :keywords %>
</div>
<div class="title">
<%= f.label :abstract, t("personal_seminar.abstract") %>
<%= f.label :abstract, t("personal_conference.abstract") %>
<%= f.text_field :abstract %>
</div>
<div class="title">
<%= f.label :language, t("personal_journal.language") %>
<%= f.select :language, WritingSeminar::LANGUAGE_TYPES, :prompt => 'Select' %>
<%= f.select :language, WritingConference::LANGUAGE_TYPES, :prompt => 'Select' %>
</div>
<div class="title">
<%= f.label :note, t("personal_seminar.note") %>
<%= f.label :note, t("personal_conference.note") %>
<%= f.text_area :note, :size => "60x3" %>
</div>
@@ -188,7 +188,7 @@
<tr>
<td style="text-align:center" colspan="3">
<div id='add_plugin_file' class="info_input plugin_files_block">
<%= hidden_field_tag 'plugin_file_field_count', @writing_seminar.writing_seminar_files.count %>
<%= hidden_field_tag 'plugin_file_field_count', @writing_conference.writing_conference_files.count %>
<a class="add"><span class="btn btn-primary btn-small"><i class="icon-plus icon-white"></i> ADD/新增</span></a>
</div>
</td>
@@ -197,9 +197,9 @@
</tfoot>
<tbody>
<% @writing_seminar.writing_seminar_files.each_with_index do |writing_seminar_file, i| %>
<%= f.fields_for :writing_seminar_files, writing_seminar_file do |f| %>
<%= render :partial => 'form_file', :object => writing_seminar_file, :locals => {:f => f, :i => i} %>
<% @writing_conference.writing_conference_files.each_with_index do |writing_conference_file, i| %>
<%= f.fields_for :writing_conference_files, writing_conference_file do |f| %>
<%= render :partial => 'form_file', :object => writing_conference_file, :locals => {:f => f, :i => i} %>
<% end %>
<% end %>
</tbody>
@@ -232,7 +232,7 @@
var new_id = $(this).prev().attr('value');
var old_id = new RegExp("new_add_plugin_files", "g");
$(this).prev().attr('value', parseInt(new_id) + 1);
$(this).parents('table').append(("<%= escape_javascript(add_attribute 'form_file', f, :writing_seminar_files) %>").replace(old_id, new_id));
$(this).parents('table').append(("<%= escape_javascript(add_attribute 'form_file', f, :writing_conference_files) %>").replace(old_id, new_id));
});
$('.add_plugin_files_block a.delete').live('click', function(){
@@ -245,4 +245,4 @@
});
</script>
<% end %>
<% end %>
@@ -0,0 +1,3 @@
<%= render_sort_bar(true, delete_panel_personal_conference_back_end_writing_conferences_path(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]),
['year', 'year', 'span1', 'writing_conference.year'],
['title', 'title','span3', 'writing_conference.title']).html_safe %>
@@ -0,0 +1,20 @@
<tr id="<%= dom_id writing_conference %>" class="with_action">
<td>
<% if (writing_conference.create_user_id == current_user.id) || is_manager? %>
<%= check_box_tag 'to_delete[]', writing_conference.id, false, :class => "checkbox_in_list" %>
<% end -%>
</td>
<td><%= writing_conference.year %></td>
<td>
<%= link_to writing_conference.create_link, panel_personal_conference_front_end_writing_conference_path(writing_conference) %>
<div class="quick-edit">
<ul class="nav nav-pills hide">
<%if at_least_module_manager || writing_conference.writing_conference_category.cur_user_is_sub_manager_of(:edit)%>
<li><%= link_to t('edit'), edit_panel_personal_conference_plugin_writing_conference_path(writing_conference) %></li>
<li><%= link_to t(:delete_), panel_personal_conference_plugin_writing_conference_path(writing_conference), :confirm => t('sure?'), :method => :delete, :remote => true %></li>
<% end -%>
</ul>
</div>
</td>
</tr>
@@ -0,0 +1 @@
$("#<%= dom_id @writing_conference %>").remove();
@@ -0,0 +1,5 @@
<h1><%= t('personal_conference.editing_personal_conference') %></h1>
<%= form_for @writing_conference, :url => panel_personal_conference_plugin_writing_conference_path(@writing_conference), :html => {:class => 'clear'} do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>
<% end %>
@@ -0,0 +1,22 @@
<%= render 'filter' %>
<table class="table main-list">
<thead>
<tr>
<th class="span1"></th>
<th class="span1"></th>
<th class="span2"></th>
<th class="span3"></th>
<th class="span2"></th>
</tr>
</thead>
<tbody id="tbody_writing_conferences" class="sort-holder">
<%= render :partial => 'writing_conference', :collection => @writing_conferences %>
</tbody>
</table>
<div class="form-actions form-fixed pagination-right">
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_personal_conference_plugin_writing_conference_path, :class => 'btn btn-primary pull-right' %>
<div id="writing_conference_pagination" class="paginationFixed">
<%= paginate @writing_conferences, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>
</div>
</div>
@@ -0,0 +1,3 @@
$("#sort_headers").html("<%= j render 'sort_headers' %>");
$("#tbody_writing_conferences").html("<%= j render :partial => 'writing_conference', :collection => @writing_conferences %>");
$("#writing_conference_pagination").html("<%= j paginate @writing_conferences, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>");
@@ -0,0 +1,10 @@
<%= flash_messages %>
<div id="poststuff">
<h1><%= t('writing_conference.new_personal_conference') %></h1>
<%= form_for @writing_conference, :url => panel_personal_conference_plugin_writing_conferences_path, :html => {:class => 'clear'} do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>
<% end %>
</div>
<%#= link_back %>
@@ -0,0 +1,40 @@
Rails.application.routes.draw do
namespace :panel do
namespace :personal_conference do
namespace :desktop do
match 'conference_p' => 'conference_p#conference_p'
resources :conference_pages, :only => [:index, :new]
end
namespace :back_end do
match 'writing_conference_setting' => "writing_conferences#writing_conference_setting" ,:as => :writing_conference_setting
resources :writing_conferences do
collection do
get 'delete'
end
match "author_type_quick_add" => "writing_conferences#author_type_quick_add" ,:as => :author_type_quick_add
match "author_type_quick_edit" => "writing_conferences#author_type_quick_edit" ,:as => :author_type_quick_edit
match "paper_type_quick_add" => "writing_conferences#paper_type_quick_add" ,:as => :paper_type_quick_add
match "paper_type_quick_edit" => "writing_conferences#paper_type_quick_edit" ,:as => :paper_type_quick_edit
end
resources :conference_paper_types
resources :conference_author_types
# resources :conference_level_types
resources :tags
end
namespace :front_end do
resources :writing_conferences
end
namespace :plugin do
resources :writing_conferences
end
namespace :widget do
match "writing_conferences" => "writing_conferences#index"
match "home_list" => "writing_conferences#home_list"
match "reload_writing_conferences" => "writing_conferences#reload_writing_conferences"
end
end
end
match "/appfront/*path" => redirect("/panel/*path")
end
Loaded 100 of 258 files, more files were not shown because too many files have changed in this diff. Show more