member plugin init edit

This commit is contained in:
chris committed 2013-02-21 17:53:08 +08:00
commit 680d7908b9
234 files changed
+2085 -3308

No files matched your search

@@ -286,7 +286,7 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
def delete
if params[:ids]
bulletins = Bulletin.any_in(:_id => params[:ids]).delete_all
bulletins = Bulletin.any_in(:_id => params[:ids]).destroy_all
end
redirect_to panel_announcement_back_end_bulletins_url(:filter => params[:filter], :direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options])
end
@@ -12,7 +12,7 @@ class BulletinLink
belongs_to :bulletin
before_validation :add_http
validates :url, :presence => true, :format => /^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$/ix
validates :url, :presence => true, :format => /^(http|https):\/\/(([a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5})|((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))(:[0-9]{1,5})?(\/.*)?/i
protected
+14 -1
View File
@@ -16,4 +16,17 @@ en:
update_bulletin_success: Announcement was successfully updated
update_bulletin_category_success: Announcement category was successfully updated
all_articles: All Articles
add_new: New
add_new: New
widget:
index: Index widget
bulletins_and_web_links: "Abreast of bulletins and web link"
#init don't merge
all_articles: "All article"
add_new: New
categories: Categories
approval_setting: "Approval setting"
tags: Tag
default_widget:
bulletin_category_with_title: Category
title: Title
postdate: "Post date"
@@ -13,6 +13,7 @@ class Panel::Archive::BackEnd::ArchiveFilesController < OrbitBackendController
respond_to do |format|
format.html # index.html.erb
format.js
format.xml { render :xml => @archive_files }
end
end
@@ -12,5 +12,9 @@ class ArchiveFileCategory
has_many :archive_files
validates :title, :at_least_one => true
def self.from_id(id)
ArchiveFileCategory.find(id) rescue nil
end
end
@@ -6,7 +6,7 @@
<div class="quick-edit">
<ul class="nav nav-pills hide">
<li><%= link_to t('archive_file_category.edit'), edit_panel_archive_back_end_archive_file_category_path(archive_file_category), :remote => true %></li>
<li><%= link_to t('archive_file_category.delete'), panel_archive_back_end_archive_file_category_path(archive_file_category), :confirm => t('sure?'), :method => :delete, :remote => true %></li>
<!-- <li><%#= link_to t('archive_file_category.delete'), panel_archive_back_end_archive_file_category_path(archive_file_category), :confirm => t('sure?'), :method => :delete, :remote => true %></li> -->
</ul>
</div>
</td>
@@ -1,30 +1,30 @@
<tr id="<%= dom_id post %>" class="with_action">
<tr id="<%= dom_id archive_file %>" class="with_action">
<td>
<% if post.is_top? %>
<% if archive_file.is_top? %>
<span class="label label-success"><%= t(:top) %></span>
<% end %>
<% if post.is_hot? %>
<% if archive_file.is_hot? %>
<span class="label label-important"><%= t(:hot) %></span>
<% end %>
<% if post.is_hidden? %>
<% if archive_file.is_hidden? %>
<span class="label"><%= t(:hidden) %></span>
<% end %>
<% if is_manager?%>
<div class="quick-edit">
<ul class="nav nav-pills hide">
<li><%= link_to t('archive_file.edit'), edit_panel_archive_back_end_archive_file_path(post) %></li>
<li><%= link_to t('archive_file.delete'), panel_archive_back_end_archive_file_path(post), :confirm => t('sure?'), :method => :delete, :remote => true %></li>
<li><%= link_to t('archive_file.edit'), edit_panel_archive_back_end_archive_file_path(archive_file) %></li>
<li><%= link_to t('archive_file.delete'), panel_archive_back_end_archive_file_path(archive_file), :confirm => t('sure?'), :method => :delete, :remote => true %></li>
</ul>
</div>
<%end%>
</td>
<td><%= post.archive_file_category.title %></td>
<td><%= archive_file.archive_file_category.title %></td>
<td>
<%= link_to post.title, panel_archive_front_end_archive_file_path(post) %>
<%= link_to archive_file.title, panel_archive_front_end_archive_file_path(archive_file) %>
</td>
<td>
<% post.tags.each do |tag| %>
<% archive_file.tags.each do |tag| %>
<span class="label label-tags"><%= tag[I18n.locale] %></span>
<% end %>
</td>
@@ -10,14 +10,11 @@
<th class="span1-2"><%= t('archive_file.tags') %></th>
</tr>
</thead>
<tbody>
<% @archive_files.each do |post| %>
<%= render :partial => 'archive_files', :locals => {:post => post} %>
<% end %>
<tbody id="tbody_archive">
<%= render :partial => 'archive_file', :collection => @archive_files %>
</tbody>
</table>
<%= paginate @archive_files %>
<div id="archive_pagination">
<%= paginate @archive_files %>
</div>
@@ -0,0 +1,2 @@
$("#tbody_archive").html("<%= j render :partial => 'archive_file', :collection => @archive_files %>");
$("#archive_pagination").html("<%= j paginate @archive_files %>");
@@ -4,17 +4,17 @@
<%#= paginate @archive_files, :params => {:inner => false}%>
<% if @title %>
<h1 class="h1"><%= @title %></h1>
<% end %>
<%# if @title %>
<!-- <h1 class="h1"><%#= @title %></h1> -->
<%# end %>
<ul class="subm">
<% @archive_file_categorys.each do |afcpost| %>
<li><%= link_to afcpost.title, panel_archive_front_end_archive_files_path(:category_id => afcpost.id) %></li>
<% end %>
</ul>
<!-- <ul class="subm"> -->
<%# @archive_file_categorys.each do |afcpost| %>
<!-- <li><%#= link_to afcpost.title, panel_archive_front_end_archive_files_path(:category_id => afcpost.id) %></li> -->
<%# end %>
<!-- </ul> -->
<h3><%= @archive_files.first.archive_file_category.title rescue nil %></h3>
<h3><%= @current_category.title rescue nil %></h3>
<% @archive_files.each do |post| %>
-1
View File
@@ -3,7 +3,6 @@ Rails.application.routes.draw do
namespace :panel do
namespace :archive do
namespace :back_end do
root :to => "archive_files#index"
resources :archive_files
resources :archive_file_categorys
resources :tags
+1 -1
View File
@@ -3,7 +3,7 @@ module Archive
module_label 'archive.archive'
base_url File.expand_path File.dirname(__FILE__)
# personal_plugin :enable => true,:path=>"panel/archive/plugin/profile",:i18n=>'archive.archive'
personal_plugin :enable => true,:path=>"panel/archive/plugin/profile",:i18n=>'archive.archive'
version "0.1"
organization "Rulingcom"
@@ -2,12 +2,9 @@ zh_tw:
miss_module_i18n:
# miss_plugin_i18n:
# personal_experience: 經歷
# personal_honor: 榮譽
# personal_project: 研究計畫
# personal_research: 研究
# personal_conference: 研討會論文
@@ -280,7 +280,7 @@ class Panel::PersonalBook::BackEnd::WritingBooksController < OrbitBackendControl
def delete
if params[:ids]
writing_books = WritingBook.any_in(:_id => params[:ids]).delete_all
writing_books = WritingBook.any_in(:_id => params[:ids]).destroy_all
end
redirect_to panel_personal_book_back_end_writing_books_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options])
end
@@ -146,7 +146,7 @@ class Panel::PersonalBook::Plugin::WritingBooksController < OrbitBackendControll
def delete
if params[:ids]
writing_books = WritingBook.any_in(:_id => params[:ids]).delete_all
writing_books = WritingBook.any_in(:_id => params[:ids]).destroy_all
end
redirect_to panel_personal_book_plugin_writing_books_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options])
end
@@ -51,7 +51,7 @@ class WritingBook
after_save :save_writing_book_files
validates :url, :format => /^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$/ix, :unless => Proc.new{self.url.blank?}
validates :url, :format => /^(http|https):\/\/(([a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5})|((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))(:[0-9]{1,5})?(\/.*)?/i, :unless => Proc.new{self.url.blank?}
def self.search( category_id = nil )
+2 -4
View File
@@ -1,11 +1,9 @@
module PersonalBook
OrbitApp.registration "PersonalBook",:type=> 'ModuleApp' do
OrbitApp.registration "Book",:type=> 'ModuleApp' do
module_label 'module_name.personal_book'
base_url File.expand_path File.dirname(__FILE__)
base_url File.expand_path File.dirname(__FILE__)
personal_plugin :enable => true,:path=>"panel/personal_book/plugin/profile",:admin_path=>"/panel/personal_book/back_end/writing_books",:i18n=>'module_name.personal_book'
end
end
@@ -279,7 +279,7 @@ class Panel::PersonalConference::BackEnd::WritingConferencesController < OrbitBa
def delete
if params[:ids]
writing_conferences = WritingConference.any_in(:_id => params[:ids]).delete_all
writing_conferences = WritingConference.any_in(:_id => params[:ids]).destroy_all
end
redirect_to panel_personal_conference_back_end_writing_conferences_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options])
end
@@ -0,0 +1,63 @@
class Panel::PersonalConference::Desktop::ConferenceCoAuthorRelationsController < ApplicationController
def index
@conference_co_author_relations = ConferenceCoAuthorRelation.all
new
respond_to do |format|
format.html {render layout: false }
end
end
def edit
@conference_co_author_relation = ConferenceCoAuthorRelation.find(params[:id])
respond_to do |format|
format.html { render :layout => false}
end
end
def new
@conference_co_author_relation = ConferenceCoAuthorRelation.new
end
def create
@conference_co_author_relation = ConferenceCoAuthorRelation.new(params[:conference_co_author_relation])
@conference_co_author_relations = ConferenceCoAuthorRelation.all
if @conference_co_author_relation.save
newv = render_to_string partial: "show_form", object: @conference_co_author_relations
render json: {success: true, msg: "New Relation successfully saved!", newvalue: newv}.to_json
else
error_msg = @conference_co_author_relation.errors.full_messages.join("<br />")
render json: {success: false, msg: error_msg}.to_json
end
end
def update
@conference_co_author_relation = ConferenceCoAuthorRelation.find(params[:id])
if @conference_co_author_relation.update_attributes(params[:conference_co_author_relation])
@conference_co_author_relations = ConferenceCoAuthorRelation.all
newv = render_to_string partial: "show_form", object: @conference_co_author_relations
render json: {success: true, msg: "New Relation successfully updated!", newvalue: newv}.to_json
else
error_msg = @conference_co_author.errors.full_messages.join("<br />")
render json: {success: false, msg: error_msg}.to_json
end
end
def destroy
@conference_co_author_relation = ConferenceCoAuthorRelation.find(params[:id])
@conference_co_author_relation.destroy
reset_co_author_relation
render :json => {success: true, msg: "deleted successfully!"}
end
private
def reset_co_author_relation
co_author = ConferenceCoAuthor.where(co_author_relations_id: @co_author_relation.id)
co_author.map do |c|
c.update_attributes(co_author_relations_id: nil)
end
end
end
@@ -0,0 +1,59 @@
class Panel::PersonalConference::Desktop::ConferenceCoAuthorsController < ApplicationController
def index
nils, not_nils = ConferenceCoAuthor.where(name_id: current_user.id)\
.asc(:co_author).partition{|p| p.email.nil?}
@conference_co_authors = not_nils + nils
@conference_co_author_relations = ConferenceCoAuthorRelation.all
respond_to do |format|
format.html { render :layout => false}
end
end
def new
@conference_co_author = ConferenceCoAuthor.new
@conference_co_author_relations = ConferenceCoAuthorRelation.all
respond_to do |format|
format.html { render :layout => false}
end
end
def edit
@conference_co_author = ConferenceCoAuthor.find(params[:id])
@conference_co_author_relations = ConferenceCoAuthorRelation.all
respond_to do |format|
format.html { render :layout => false}
end
end
def create
@conference_co_author = ConferenceCoAuthor.new(params[:conference_co_author])
@conference_co_author.name_id= current_user.id
if @conference_co_author.save
render json: {success:true, msg: t('create.sucess.co_author')}.to_json
else
error_msg = @conference_co_author.errors.full_messages.join("<br />")
render json: {success: false, msg: error_msg}.to_json
end
end
def update
@conference_co_author = ConferenceCoAuthor.find(params[:id])
if @conference_co_author.update_attributes(params[:co_author])
render json: {success:true, msg: t('update.sucess.co_author')}.to_json
else
error_msg = @conference_co_author.errors.full_messages.join("<br />")
render json: {success: false, msg: error_msg}.to_json
end
end
def destroy
@conference_co_author = ConferenceCoAuthor.find(params[:id])
@conference_co_author.destroy
render :json => {success: true, msg: "Co-author deleted successfully!"}
end
end
@@ -1,5 +0,0 @@
class Panel::PersonalConference::Desktop::ConferencePController < ApplicationController
def conference_p
render panel_personal_conference_desktop_conference_p_path, :layout => false
end
end
@@ -1,11 +1,82 @@
class Panel::PersonalConference::Desktop::ConferencePagesController < ApplicationController
def index
@writing_conferences = WritingConference.all
@level_types = ConferencePaperType.all
respond_to do |format|
format.html { render :layout => false}
end
end
def show
end
def new
@writing_conference = WritingConference.new
@paper_types = ConferencePaperType.all
@author_types = ConferenceAuthorType.all
#@co_author_candidate =
# CoAuthor.where(name_id: current_user.id).map{|c|c.co_author}
#@conference_candidate =
# WritingConference.where(create_user_id: current_user.id).map{|j|j.conference_title}.uniq
respond_to do |format|
format.html { render :layout => false}
end
end
def edit
@writing_conference = WritingConference.find(params[:id])
@paper_types = ConferencePaperType.all
@author_types = ConferenceAuthorType.all
respond_to do |format|
format.html { render :layout => false}
end
end
def create
params[:writing_conference][:create_user_id] = current_user.id
@writing_conference = WritingConference.new(params[:writing_conference])
if @writing_conference.save
render json: {success: true, msg: t('create.success.paper')}.to_json
else
error_msg = @writing_conference.errors.full_messages.join("<br />")
render json: {success: false, msg: error_msg}.to_json
end
end
def update
params[:writing_conference][:update_user_id] = current_user.id
@writing_conference= WritingConference.find(params[:id])
if @writing_conference.update_attributes(params[:writing_conference])
render json: {success: true, msg: t('update.success.paper')}.to_json
else
error_msg = @writing_conference.errors.full_messages.join("<br />")
render json: {success: false, msg: error_msg}.to_json
end
end
def destroy
@writing_conference = WritingConference.find(params[:id])
@writing_conference.destroy
render :json => {success: true, msg: t('delete.success.paper')}
end
def conference_type
conference_types = ConferencePaperType.all
all_conference_lists = WritingConference.where(create_user_id: current_user.id)
all_conference_lists = all_conference_lists.map do |j|
[ j.conference_title,
j.conference_paper_type_ids.map do |type|
conference_types.find(type).title
end
]
end
@conference_lists = all_conference_lists.uniq
respond_to do |format|
format.html { render :layout => false}
end
@@ -0,0 +1,5 @@
class Panel::PersonalConference::Desktop::ConferenceWindowsController < ApplicationController
def conference_window
render panel_personal_conference_desktop_conference_window_path, :layout => false
end
end
@@ -147,7 +147,7 @@ class Panel::PersonalConference::Plugin::WritingConferencesController < OrbitBac
def delete
if params[:ids]
writing_conferences = WritingConference.any_in(:_id => params[:ids]).delete_all
writing_conferences = WritingConference.any_in(:_id => params[:ids]).destroy_all
end
redirect_to panel_personal_conference_plugin_writing_conferences_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options])
end
@@ -0,0 +1,65 @@
module Panel::PersonalConference::Desktop::ConferencePagesHelper
def publication_record publication
content_tag :li,
:class => "list_t_item" do
marker + \
content(publication) + \
edit_or_delete(publication)
end
end
def marker
content_tag :div,
:class => "list_item_action"
content_tag(:a, "", :class => "icon-check-empty") + \
content_tag(:a, "", :class => "icon-star-empty")
end
def content publication
content_tag(:div, "conference : " + publication.conference_title,
:class => "list_t_title") + \
content_tag(:div, "title : " + publication.paper_title,
:class => "list_t_des") + \
content_tag(:div, "keyword :" + publication.keywords,
:class => "list_t_des") + \
content_tag(:div, "abstract : " + publication.abstract,
:class => "list_t_des") + \
content_tag(:div, link_publication_file(publication),
:class => "list_t_des")
end
def edit_or_delete publication
content_tag :div,
:class => "list_item_function" do
content_tag(:a, t("edit"),
:class => "journal_paper_edit admbg2 admtxt",
:href => edit_panel_personal_conference_desktop_conference_page_path(publication),
"ajax-remote" => "get") + \
content_tag(:a, t("delete"),
"ajax-remote" => "delete",
"confirm-message" => t("sure?"),
"callback-method" => "paperDelete",
:class => "journal_paper_delete admbg2 admtxt",
:href => panel_personal_conference_desktop_conference_page_path(publication))
end
end
def link_publication_file publication
publication.writing_conference_files.map{|file|
link_to(image_tag(check_file_type(file.file.url)) + \
content_tag(:span, file.title, :class => "filetitle"),
file.file.url,
:class => "file",
"target" => "_blank")
}.inject(:+)
end
def check_file_type file
if not file.nil?
file_type = MIME::Types.type_for(file).first.to_s.split("/")[1]
file_type = "/assets/ft-icons/#{file_type}/#{file_type}-48_32.png"
else
file_type = ""
end
end
end
@@ -0,0 +1,20 @@
class ConferenceCoAuthor
include Mongoid::Document
LANGUAGE_TYPES = [ "English", "Chinese" ]
field :name_id, type: BSON::ObjectId
field :co_author, localize: true
field :email
belongs_to :conference_co_author_relations
VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/
validates :email, format: { with: VALID_EMAIL_REGEX },
allow_blank: true,
uniqueness: { case_sensitive: false }
validates :co_author, presence: true
before_save { |coauthor| coauthor.email = email.downcase if not coauthor.email.nil?}
end
@@ -0,0 +1,11 @@
class ConferenceCoAuthorRelation
include Mongoid::Document
include Mongoid::Timestamps
field :relation, localize: true
has_and_belongs_to_many :conference_co_authors
validates :relation, presence: true,
uniqueness: { case_sensitive: false }
end
@@ -48,7 +48,7 @@ class WritingConference
after_save :save_writing_conference_files
validates :url, :format => /^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$/ix, :unless => Proc.new{self.url.blank?}
validates :url, :format => /^(http|https):\/\/(([a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5})|((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))(:[0-9]{1,5})?(\/.*)?/i, :unless => Proc.new{self.url.blank?}
def self.search( category_id = nil )
@@ -0,0 +1,11 @@
<%= f.text_field :relation %>
<!--
<#%= f.fields_for :relation_translations do |f| %>
<#%= f.text_field locale,
value: (@conference_co_author_relation.relation_translations[locale] rescue nil) %>
<#% end %>
-->
<%= f.submit "Save", class: "ini_input hp hh2 thmtxt thmc2", style: "margin-left: 10px;" %>
<% if not @conference_co_author_relation.new_record? %>
<%= submit_tag "Cancel", :type => "button", class: "bt-cancel-type ini_input hp hh2 thmtxt" %>
<% end %>
@@ -0,0 +1,3 @@
<%= form_for(@conference_co_author_relation, url: panel_personal_conference_desktop_conference_co_author_relations_path, html:{"form-type"=>"ajax_form", "callback-method"=>"coauthorRelationForm"} ) do |f| %>
<%= render partial: 'form' , locals: {:f => f}%>
<% end %>
@@ -0,0 +1,17 @@
<% @conference_co_author_relations.each_with_index do |conference_co_author_relation,i| %>
<% if ( i % 6 ) == 0 %>
<div class="s_grid_con s_form">
<ul>
<% end %>
<li class="s_grid_row">
<div class="form_space" id="form_space_<%= i.to_s %>"><%= conference_co_author_relation.relation %></div>
<div class="list_item_function">
<%= link_to 'Edit', edit_panel_personal_conference_desktop_conference_co_author_relation_path(conference_co_author_relation), :class => "bt-edit-type admbg2 admtxt", "content-holder"=>"#form_space_"+i.to_s, "ajax-remote"=>"get" %>
<%= link_to 'Destroy', panel_personal_conference_desktop_conference_co_author_relation_path(conference_co_author_relation), "confirm-message"=>'Are you sure?', "ajax-remote"=>"delete", :class=>"bt-delete admbg2 admtxt" %>
</div>
</li>
<% if ( i % 6 ) == 5 %>
</ul>
</div>
<% end %>
<% end %>
@@ -0,0 +1,3 @@
<%= form_for(@conference_co_author_relation, url: panel_personal_conference_desktop_conference_co_author_relation_path(@conference_co_author_relation), html:{"form-type"=>"ajax_form", "callback-method"=>"coauthorRelationEditForm"} ) do |f| %>
<%= render partial: 'form' , locals: {:f => f}%>
<% end %>
@@ -0,0 +1,35 @@
<div class="toolbar hh2">
<div class="fn_g hp">
<%= f.submit "Save", name: "commit", value: "Save", class: "fn_btn ini_input hp hh2 thmc2 thmtxt" %>
<%= submit_tag "Cancel", :type => "button", class: "bt-cancel fn_btn ini_input hp hh2 thmtxt" %>
</div>
</div>
<div id="new_co_author" class="s_grid_con s_form vp">
<ul>
<li class="s_grid_row">
<%= f.label :co_author, class: "s_grid s_grid_2" %>
<%= f.text_field :co_author, class: "s_grid_4 s_grid"%>
<!--
<%#= f.fields_for :co_author_translations do |f| %>
<%#= f.text_field locale,
class: "s_grid_4 s_grid",
value: (@conference_co_author.co_author_translations[locale] rescue nil) %>
<%# end %>
-->
</li>
<li class="s_grid_row">
<%= f.label :email, class: "s_grid s_grid_2"%>
<%= f.text_field :email, class: "s_grid s_grid_4" %>
</li>
<li class="s_grid_row">
<%= f.label :type, class: "s_grid s_grid_2"%>
<select name="conference_co_author[co_author_relations_id]" id="" class="s_grid s_grid_4">
<%= options_for_select(
@conference_co_author_relations.map do |relation|
[relation.relation, relation.id]
end
)%>
</select>
</li>
</ul>
</div>
@@ -0,0 +1,3 @@
<%= form_for @conference_co_author, html: { multipart: true ,"form-type"=>"ajax_form", "callback-method"=>"coAuthorformCallback"} , url: panel_personal_conference_desktop_conference_co_author_path(@conference_co_author) do |f| %>
<%= render partial: 'form', locals: {:f => f} %>
<% end %>
@@ -0,0 +1,34 @@
<div class="toolbar hh2">
<div class="fn_g hp">
<%= link_to "New Co-Author", new_panel_personal_conference_desktop_conference_co_author_path, :class=>"bt-co-author fn_btn hp hh2 thmc2 thmtxt", "ajax-remote"=>"get" %>
<%= link_to "New Type", panel_personal_conference_desktop_conference_co_author_relations_path, :class=>"bt-new-type fn_btn hp hh2 thmc2 thmtxt", "ajax-remote"=>"get" %>
</div>
</div>
<div id="co_author" 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">
<% @conference_co_authors.each_with_index do |co_author,i| %>
<% if ( i % 4 ) == 0 %>
<div class="g_col">
<ul>
<% end %>
<li class="list_t_item">
<ul class="info">
<li><div class="name"><%= co_author.co_author %></div></li>
<li><div class="email"><i class="icon-envelope"></i> <%= co_author.email %></div></li>
<li><div class="relations"><i class="icon-user"></i> <%= @conference_co_author_relations.find(co_author.conference_co_author_relations_id).relation unless co_author.conference_co_author_relations_id.nil?%></div></li>
</ul>
<div class="list_item_function">
<%= link_to 'Edit', edit_panel_personal_conference_desktop_conference_co_author_path(co_author), :class => "bt-edit admbg2 admtxt", "ajax-remote"=>"get" %>
<%= link_to 'Destroy', panel_personal_conference_desktop_conference_co_author_path(co_author), "ajax-remote"=>"delete", "confirm-message"=>'Are you sure?', "callback-method"=>"paperDelete", :class=>"bt-delete admbg2 admtxt" %>
</div>
</li>
<% if ( i % 4 ) == 3 %>
</ul>
</div>
<% end %>
<% end %>
</div>
</div>
</div>
@@ -0,0 +1,3 @@
<%= form_for @conference_co_author, html: { multipart: true ,"form-type"=>"ajax_form", "callback-method"=>"conferenceCoAuthorformCallback"} , url: panel_personal_conference_desktop_conference_co_authors_path do |f| %>
<%= render partial: 'form', locals: {:f => f} %>
<% end %>
@@ -0,0 +1,220 @@
<div class="toolbar hh2">
<div class="fn_g hp">
<%= f.submit t("save"), name: "commit", value: "Save", class: "fn_btn ini_input hp hh2 thmc2 thmtxt" %>
<!-- class: bt-cancle can't be remove -->
<% if not @writing_conference.new_record? %>
<%= submit_tag t("cancel"), :type => "button", class: "bt-cancel ini_input hp hh2 thmadm thmtxt" %>
<% end %>
</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_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">
<%= f.fields_for :paper_title_translations do |f| %>
<%= f.text_area locale,
class: "s_grid_6 s_grid",
size: "20x2",
placeholder: t("personal_conference.paper_title"),
value: (@writing_conference.paper_title_translations[locale.to_s] rescue nil) %>
<% end %>
</li>
<li class="s_grid_row">
<%= f.fields_for :conference_title_translations do |f| %>
<%= f.text_field locale,
size: "20",
placeholder: t("personal_conference.conference_title"),
class: "s_grid_6 s_grid",
# "autocomplete-list" => "conference_title_autocomplete_list",
value: (@writing_conference.conference_title_translations[locale.to_s] rescue nil) %>
<% end %>
<span class="icon-plus input_append"></span>
</li>
<li class="s_grid_row">
<div>
<%= label_tag("", t("personal_conference.paper_type")) %>
<ul>
<% @paper_types.each_with_index do |paper_type, i| %>
<li class="s_grid_row">
<%= radio_button_tag "writing_conference[conference_paper_type_ids][]",
paper_type.id,
@writing_conference.conference_paper_type_ids.include?(paper_type.id),
id: "field-#{i}"
%><%= label_tag("field-#{i}", paper_type.title) %>
</li>
<% end %>
</ul>
</div>
</li>
<li class="s_grid_row">
<%= f.text_field :keywords, size: "20", placeholder: t("personal_conference.keywords"), class: "s_grid_6 s_grid"%>
</li>
<li class="s_grid_row">
<div>
<%= label_tag("", t("personal_conference.conference_time")) %>
<ul>
<li class="s_grid_row">
<%= label_tag("", t("personal_conference.period_start_date"), class: "s_grid_1 s_grid") %>
<%= f.date_select :period_start_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year, :month, :day] }, {:class => 's_grid_1 s_grid'} %>
</li>
<li class="s_grid_row">
<%= label_tag("", t("personal_conference.period_end_date"), class: "s_grid_1 s_grid") %>
<%= f.date_select :period_end_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year, :month, :day] }, {:class => 's_grid_1 s_grid'} %>
</li>
</ul>
</div>
</li>
<li class="s_grid_row">
<%= label_tag("", t("personal_conference.sponsor"), class: "s_grid_2 s_grid") %><%= f.text_field :sponsor, size: "20", placeholder: "Sponsor", class: "s_grid_4 s_grid"%>
</li>
<li class="s_grid_row">
<%= label_tag("", t("personal_conference.location"), class: "s_grid_2 s_grid") %><%= f.text_field :location, size: "20", placeholder: "Location", class: "s_grid_4 s_grid"%>
</li>
<li class="s_grid_row">
<%= label_tag("", t("personal_conference.url"), class: "s_grid_2 s_grid") %><%= f.text_field :url, size: "20", placeholder: "www.sample.com", class: "s_grid_4 s_grid"%>
</li>
</div>
<div class="s_grid_con s_form">
<ul>
<li class="s_grid_row">
<%= f.fields_for :authors_translations do |f| %>
<%= f.text_area locale,
class: "s_grid_6 s_grid",
size: "20x2",
placeholder: t("personal_conference.authors"),
# "autocomplete-list" => "coauthor_autocomplete_list",
value: (@writing_conference.authors_translations[locale.to_s] rescue nil) %>
<% end %>
<span class="icon-plus input_append"></span>
</li>
<li class="s_grid_row">
<select name="writing_conference[conference_author_type_ids][]" id="" class="s_grid s_grid_6">
<%= options_for_select(
[t("personal_conference.author_type")] +
@author_types.map do |author_type|
[author_type.title, author_type.id]
end
)
%>
</select>
</li>
<li class="s_grid_row">
<select name="" id="" class="s_grid s_grid_6">
<option value="">Status</option>
<option value="">Published</option>
<option value="">Pending</option>
<option value="">Writing</option>
</select>
</li>
<li class="s_grid_row">
<%= label_tag("", t("personal_conference.publication_date"), class: "s_grid_3 s_grid") %>
<%= f.date_select :publication_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year, :month, :day] }, {:class => 's_grid_1 s_grid'} %>
</li>
<li class="s_grid_row">
<%= f.label :year, t("personal_conference.year"), :class => "s_grid_2 s_grid" %>
<%= 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]', :class => "s_grid_4 s_grid"} ) %>
</li>
<li class="s_grid_row"><input class="s_grid s_grid_6" type="text" placeholder=<%= t("tags") %>><span class="icon-plus input_append"></li>
<li class="s_grid_row">
<%= f.text_area :abstract, size: "20x22", placeholder: t("personal_conference.abstract"), class: "s_grid_6 s_grid full_height"%>
</li>
</ul>
</div>
<div class="s_grid_con s_form">
<ul>
<li class="s_grid_row">
<table class="s_table">
<thead>
<tr>
<th class="s_grid_2"><%= t("personal_conference.file")%></th>
<th class="s_grid_3"><%= t("personal_conference.file_name")%></th>
<th class="s_grid_1"><%= t("personal_conference.description") %></th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="3">
<div id='add_plugin_file' class="info_input plugin_files_block s_action">
<%= hidden_field_tag 'plugin_file_field_count', @writing_conference.writing_conference_files.count %>
<a class="add setting_btn thmc1 thmtxt w1 hh2 hp" href=""><i class="icon-plus icon-white"></i> add</a>
</div>
</td>
</tr>
</tfoot>
<tbody>
<% @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>
</table>
</li>
</div>
<div class="s_grid_con s_form">
<li class="s_grid_row">
<ul>
<%= f.text_area :note, size: "20x22", placeholder: t("personal_conference.note"), class: "s_grid_6 s_grid full_height"%>
</ul>
</li>
</div>
</div>
</div>
<script type="text/javascript">
orbitDesktop.prototype.initializeJournalPapers.conference_title_autocomplete_list = <%= @conference_candidate.to_json.html_safe %>;
orbitDesktop.prototype.initializeJournalPapers.coauthor_autocomplete_list = <%= @co_author_candidate.to_json.html_safe %>;
</script>
<script>
$('#add_plugin_file a.add').click(function(){
var new_id = $(this).prev().attr('value');
var old_id = new RegExp("new_writing_conference_files", "g");
$(this).prev().attr('value', parseInt(new_id) + 1);
var newfield = $(("<%= escape_javascript(add_attribute 'form_file', f, :writing_conference_files) %>").replace(old_id, new_id));
$(this).parents('table').append(newfield);
newfield.find('.action a.delete').click(function(){
newfield.remove();
});
return false;
});
$('.action a.remove_existing_record').click(function(){
$(this).next('.should_destroy').attr('value', 1);
$("tr#add_plugin_file_" + $(this).prev().attr('value')).hide();
});
</script>
@@ -0,0 +1,31 @@
<tr id="<%= "plugin_file_#{form_file.id}" if !form_file.new_record? %>" class="list_item">
<td>
<div>
<% if form_file.new_record? %>
<%= f.file_field :file, class: "s_grid_2 s_grid" %>
<% end %>
</div>
</td>
<td>
<%= f.text_field :title %>
<%= f.fields_for :file_title_translations do |f| %>
<%= f.text_field locale,
class: 's_grid_3 s_grid',
value: (form_file.file_title_translations[locale] rescue nil) %>
<% end %>
</td>
<td>
<span class="action">
<% if form_file.new_record? %>
<a class="delete"><i class="icon-remove"></i></a>
<% else %>
<%= f.hidden_field :id %>
<a class="remove_existing_record"><i class="icon-remove"></i></a>
<%= f.hidden_field :should_destroy, :value => nil, :class => 'should_destroy' %>
<% end %>
<%= form_file.file.file ? ( link_to '', form_file.file.url, {:class => 'icon-eye-open', :target => '_blank', :title => t(:view)} ) : '' %>
</span>
</td>
</tr>
@@ -0,0 +1,40 @@
<div class="toolbar hh2">
<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="">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="conference_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">
<% @conference_lists.each_with_index do |conference_list,i| %>
<% if ( i % 5 ) == 0 %>
<div class="g_col">
<ul>
<% end %>
<li class="list_t_item">
<div class="list_item_action">
<i class="icon-file"></i>
</div>
<% title, level = conference_list %>
<div class="list_t_title"><%= title %></div>
<div class="list_t_desc"><%= level.join(",") %></div>
</li>
<% if ( i % 5 ) == 4 %>
</ul>
</div>
<% end %>
<% end %>
</div>
</div>
</div>
@@ -0,0 +1,4 @@
<%= form_for @writing_conference, html: { multipart: true, "form-type"=>"ajax_form", "callback-method"=>"formCallback"}, url: panel_personal_conference_desktop_conference_page_path(@writing_conference) do |f| %>
<%= render partial: 'form', locals: {:f => f} %>
<%end%>
@@ -1,75 +1,77 @@
<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 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="conference">Conference</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>
<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">
<% @writing_conferences.each do |w| %>
<%= publication_record w%>
<% end %>
</div>
</div>
</div>
@@ -1,107 +1,4 @@
<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>
<%= form_for @writing_conference, html: { multipart: true, "form-type"=>"ajax_form", "callback-method"=>"formCallback"}, url: panel_personal_conference_desktop_conference_pages_path do |f| %>
<%= render partial: 'panel/personal_conference/desktop/conference_pages/form', locals: {:f => f} %>
<%end%>
<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>
@@ -13,10 +13,10 @@
<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="<%= panel_personal_conference_desktop_conference_pages_path %>" load="true" callback-method="list" class="hh2 w2 hp active thmc1 thmtxt" onclick='return false;'>List</a></li>
<li><a href="<%= new_panel_personal_conference_desktop_conference_page_path %>" callback-method="addconference" custom-load="add" class="admtxt hh2 w2 hp" onclick='return false;'>Add/Edit</a></li>
<li><a href="<%= panel_personal_conference_desktop_conference_type_path %>" callback-method="conference" class="admtxt hh2 w2 hp" onclick='return false;'>Conference</a></li>
<li><a href="<%= panel_personal_conference_desktop_conference_co_authors_path %>" 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>
@@ -1,135 +1,46 @@
# Sample localization file for English. Add more files in this directory for other locales.
# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
en:
_locale: English
add: Add
back: Back
create: Create
delete: Delete
disable: Disable
downloaded: Downloaded
download: Download
edit: Edit
enable: Enable
hide: Hide
homepage: Homepage
_locale: "English"
personal_conference:
year : "Year"
language : "Language"
paper_title : "Paper Title"
paper_type : "Paper Type"
conference_title : "Conference Name"
conference_time: "Conference Time"
period_start_date : "Start Date"
period_end_date : "End Date"
location : "Location"
sponsor : "Sponsor"
authors : "Authors"
tags : "Tags"
keywords : "Keywords"
# total_pages : "Total Pages"
# form_to_start : "From"
# form_to_end : "To"
# from : "From"
# to : "To"
abstract : "Abstract"
publication_date : "Date of Publication"
url : "Reference URL"
note : "Note"
author_type : "Author Type"
file : "File"
file_name : "File Name"
description : "File Description"
add: "Add"
back: "Back"
delete: "Delete"
edit: "Edit"
no_: "No"
nothing: Nothing
show: Show
sure?: Are you sure?
update: Update
nothing: "Nothing"
show: "Show"
sure?: "Are you sure?"
update: "Update"
yes_: "Yes"
announcement:
sure?: Sure?
no_: "No"
cancel : "Cancel"
save: "save"
web_resource:
list_lower: list
list_link: Links list
# admin:
# action: Action
# add_language: Add language
# admin: Admin
# action: Action
# announcement: Announcement
# asset: Asset
# attributes: Attributes
# cant_delete_self: You can not delete yourself.
# cant_revoke_self_admin: You can not revoke your admin role yourself.
# class: Class
# content: Content
# create_error_link: Error when creating link.
# create_error_page: Error when creating page.
# create_success_home: Homepage was successfully created.
# create_success_layout: Layout was successfully created.
# create_success_link: Link was successfully created.
# create_success_page: Page was successfully created.
# create_success_snippet: Snippet was successfully created.
# create_success_user: User was successfully created.
# data: Data
# delete_language: Delete language
# description: Description
# design: Design
# disable_language: Disable language
# editing_home: Editing homepage
# editing_layout: Editing layout
# editing_link: Editing link
# editing_page: Editing page
# editing_snippet: Editing snippet
# editing_user_info: Editing user information
# editing_user_role: Editing user role
# email: Email
# enable_language: Enable language
# file_name: Filename
# file_size: File size
# format: Format
# home: Home
# id: ID
# info: Information
# is_published: Is published
# item: Item
# key: Key
# language: Language
# layout: Layout
# layout_name: Layout name
# list_assets: Assets list
# list_designs: Designs list
# list_items: Items list
# list_puchases: Purchases list
# list_snippets: Snippets list
# list_users: Users list
# list_user_infos: User information list
# list_user_roles: User roles list
# member: Member
# move_down: Move down
# move_up: Move up
# multilingual: Multilingual
# my_avatar: My Avatar
# no_home_page: You don't have a homepage
# no_layout: You don't have a layout
# name: Name
# new_asset: New asset
# new_component: New component
# new_home: New homepage
# new_layout: New layout
# new_link: New link
# new_page: New page
# new_snippet: New snippet
# new_user: New user
# new_user_info: New user information
# new_user_role: New user role
# non_multilingual: Non multilingual
# options: Options
# orig_upload_file: Original filename
# position: Position
# published?: Published?
# purchase: Purchase
# registered: Registered
# role: Role
# roles: Roles
# title: Title
# translation: Translation
# type: Type
# up_to_date: Up-to-date
# update_error_link: Error when updating link.
# update_error_page: Error when updating page.
# update_success_content: Content was successfully updated.
# update_success_home: Homepage was successfully updated.
# update_success_layout: Layout was successfully updated.
# update_success_link: Link was successfully updated.
# update_success_page: Page was successfully updated.
# update_success_snippet: Snippet was successfully updated.
# update_success_user: User was successfully updated.
# url: URL
# user: User
# user_info: User information
# user_panel: User panel
# user_role: User role
panel:
error_msg:
time_series_illegal: "must be before end time"
@@ -1,244 +1,46 @@
zh_tw:
_locale: 中文
module_name:
personal_conference: 研討會論文
add: 新增
back: 回去
create: 創造
delete: 刪除
disable: 禁用
edit: 編輯
enable: 啟用
hide: 隱藏
homepage: 首頁
_locale: "中文"
personal_conference:
year : "年度"
language : "語言"
paper_title : "論文名稱"
paper_type : "論文型態"
conference_title : " 會議名稱"
conference_time: "會議時間"
period_start_date : "起"
period_end_date : "訖"
location : "地點"
sponsor : "贊助"
authors : "作者"
tags : "領域"
keywords : "關鍵字"
# total_pages : "總頁數"
# form_to_start : "From"
# form_to_end : "To"
# from : "起"
# to : "訖"
abstract : "摘要"
publication_date : "發表日期"
url : "參考連結"
note : "記事"
author_type : "作者類別"
file : "檔案"
file_name : "檔案名稱"
description : "描述"
add: "新增"
back: "返回"
delete: "刪除"
edit: "編輯"
no_: "No"
nothing: 無
show: 顯示
sure?: 您肯定嗎?
update: 更新
yes_: "Yes"
web_resource:
list_lower: 列表
list_link: 鏈接列表
category: 分類
name: 名稱
describe: 描述
url: 路徑
edit: 編輯
delete: 刪除
cate_auth: 分類授權
# 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 ]
nothing: "無"
show: "顯示"
sure?: "您肯定嗎?"
update: "更新"
yes_: "是"
no_: "否"
cancel : "取消"
save: "儲存"
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}"
error_msg:
time_series_illegal: "啟始時間必須早於結束時間"
@@ -3,8 +3,11 @@ 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]
match 'conference_window' => 'conference_windows#conference_window'
match 'conference_type' => 'conference_pages#conference_type'
resources :conference_pages, except: :show
resources :conference_co_authors, except: :show
resources :conference_co_author_relations, except: :show
end
namespace :back_end do
match 'writing_conference_setting' => "writing_conferences#writing_conference_setting" ,:as => :writing_conference_setting
+3 -5
View File
@@ -1,11 +1,9 @@
module PersonalConference
OrbitApp.registration "PersonalConference",:type=> 'ModuleApp' do
OrbitApp.registration "Conference",:type=> 'ModuleApp' do
module_label 'module_name.personal_conference'
base_url File.expand_path File.dirname(__FILE__)
personal_plugin :enable => true,:path=>"panel/personal_conference/plugin/profile",:admin_path=>"/panel/personal_conference/back_end/writing_conferences",:i18n=>'module_name.personal_conference'
base_url File.expand_path File.dirname(__FILE__)
personal_plugin :enable => true,:path=>"panel/personal_seminar/plugin/profile",:admin_path=>"/panel/personal_seminar/back_end/writing_seminars",:i18n=>'module_name.personal_seminar'
end
end
@@ -0,0 +1,11 @@
types = ["friend", "teacher", "student", "schoolmate", "parent", "best friend", "instructor", "labmate", "TA", "mate"]
FactoryGirl.define do
factory(:conference_co_author_relation, class: "ConferenceCoAuthorRelation") do |f|
f.sequence(:relation_translations) do |n|
{ zh_tw: "#{types[n%types.size]}",
en: "#{types[n%types.size]}" }
end
end
end
@@ -0,0 +1,21 @@
name_tw = Array.new 51,""
name_tw = name_tw.map do |p| Faker::Name::name end
name_en = Array.new 51,""
name_en = name_en.map do |p| Faker::Name::name end
email = Array.new 51,""
email= email.map do |p| Faker::Internet.email end
FactoryGirl.define do
factory(:conference_co_author, class: "ConferenceCoAuthor") do |f|
f.sequence(:co_author_translations) do |n|
{ zh_tw: "#{name_tw[n]}",
en: "#{name_en[n]}" }
end
f.sequence(:conference_co_author_relations_id) do |n| "#{ConferenceCoAuthorRelation.all[n%ConferenceCoAuthorRelation.count].id}" end
f.sequence(:email) do |n| "#{email[n]}" end
f.name_id BSON::ObjectId('4f45f3b9e9d02c5db9000067') #user_id, this is Chris' account
end
end
@@ -0,0 +1,10 @@
level = ["Oral","Poster"]
FactoryGirl.define do
factory(:conference_paper_type, class: "ConferencePaperType") do |f|
f.sequence(:title_translations) do |n|
{ zh_tw: "#{level[n-1]}",
en: "#{level[n-1]}" }
end
end
end
@@ -0,0 +1,18 @@
file_desc = Array.new 7, ""
file_desc = file_desc.map do |p| Faker::Lorem.word end
file = ["1.png", "5.pdf", "2.png", "6.pdf", "3.png", "7.pdf", "4.png"]
rand = Random.new
FactoryGirl.define do
factory(:writing_conference_file, class: "WritingConferenceFile") do |f|
f.sequence(:file) do |n|
File.new(File.join(Rails.root, "db" ,"files", file[rand.rand(0..6)]))
end
f.sequence(:title) do |n|
"#{file_desc[rand.rand(0..6)]}"
end
end
end
@@ -0,0 +1,71 @@
require 'json'
data = File.read("#{Rails.root}/db/data")
data_json = JSON.parse(data)
rand = Random.new
FactoryGirl.define do
factory :writing_conference, class: "WritingConference" do |f|
f.sequence(:paper_title_translations) do |n|
{ zh_tw: "#{data_json[n]["paper_title"]}_tw",
en: "#{data_json[n]["paper_title"]}_en" }
end
f.sequence(:conference_title_translations) do |n|
{zh_tw: "#{data_json[n]["booktitle"]}_tw",
en: "#{data_json[n]["booktitle"]}_en"}
end
f.sequence(:abstract) do |n|
"#{data_json[n]["abstract"]}"
end
f.sequence(:year) do |n|
"#{data_json[n]["year"]}"
end
f.sequence(:authors) do |n|
"#{data_json[n]["author"].map{|m| m.split(",").reverse.join(" ")}.join(",")}"
end
#f.sequence(:form_to_start) do |n|
#"#{data_json[n]["page_from"]}"
#end
#f.sequence(:form_to_end) do |n|
#"#{data_json[n]["page_to"]}"
#end
#f.sequence(:total_pages) do |n|
#"#{data_json[n]["total_page"]}"
#end
f.sequence(:language) do |n|
"#{data_json[n]["language"]}"
end
f.sequence(:keywords) do |n|
"#{data_json[n]["abstract"].split[-3..-1].join(",")}"
end
f.sequence(:conference_paper_types) do |n|
level = []
total_levels = rand.rand(0..ConferencePaperType.count-1)
total_levels.times do
level << ConferencePaperType.all[rand.rand(0..ConferencePaperType.count-1)]
end
level.uniq
end
f.sequence(:writing_conference_files) do |n|
files = []
total_files = rand.rand(1..7)
total_files.times do files << FactoryGirl.create(:writing_conference_file) end
files
end
f.create_user_id BSON::ObjectId('4f45f3b9e9d02c5db9000067') #user_id, this is Chris' account
f.update_user_id BSON::ObjectId('4f45f3b9e9d02c5db9000067') #user_id, this is Chris' account
end
end
@@ -1,7 +0,0 @@
#!/usr/bin/env rake
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require File.expand_path('../config/application', __FILE__)
Dummy::Application.load_tasks
@@ -1,9 +0,0 @@
// This is a manifest file that'll be compiled into including all the files listed below.
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
// be included in the compiled file accessible from http://example.com/assets/application.js
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
//= require jquery
//= require jquery_ujs
//= require_tree .
@@ -1,7 +0,0 @@
/*
* This is a manifest file that'll automatically include all the stylesheets available in this directory
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
* the top of the compiled file, but it's generally better to create a new file per style scope.
*= require_self
*= require_tree .
*/
@@ -1,3 +0,0 @@
class ApplicationController < ActionController::Base
protect_from_forgery
end
@@ -1,2 +0,0 @@
module ApplicationHelper
end
@@ -1,14 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>Dummy</title>
<%= stylesheet_link_tag "application" %>
<%= javascript_include_tag "application" %>
<%= csrf_meta_tags %>
</head>
<body>
<%= yield %>
</body>
</html>
@@ -1,4 +0,0 @@
# This file is used by Rack-based servers to start the application.
require ::File.expand_path('../config/environment', __FILE__)
run Dummy::Application
@@ -1,45 +0,0 @@
require File.expand_path('../boot', __FILE__)
require 'rails/all'
Bundler.require
require "personal_conference"
module Dummy
class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
# Custom directories with classes and modules you want to be autoloadable.
# config.autoload_paths += %W(#{config.root}/extras)
# Only load the plugins named here, in the order given (default is alphabetical).
# :all can be used as a placeholder for all plugins not explicitly named.
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
# Activate observers that should always be running.
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
# config.time_zone = 'Central Time (US & Canada)'
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de
# Configure the default encoding used in templates for Ruby 1.9.
config.encoding = "utf-8"
# Configure sensitive parameters which will be filtered from the log file.
config.filter_parameters += [:password]
# Enable the asset pipeline
config.assets.enabled = true
# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'
end
end
@@ -1,10 +0,0 @@
require 'rubygems'
gemfile = File.expand_path('../../../../Gemfile', __FILE__)
if File.exist?(gemfile)
ENV['BUNDLE_GEMFILE'] = gemfile
require 'bundler'
Bundler.setup
end
$:.unshift File.expand_path('../../../../lib', __FILE__)
@@ -1,25 +0,0 @@
# SQLite version 3.x
# gem install sqlite3
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: sqlite3
database: db/test.sqlite3
pool: 5
timeout: 5000
production:
adapter: sqlite3
database: db/production.sqlite3
pool: 5
timeout: 5000
@@ -1,5 +0,0 @@
# Load the rails application
require File.expand_path('../application', __FILE__)
# Initialize the rails application
Dummy::Application.initialize!
@@ -1,30 +0,0 @@
Dummy::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes.
config.cache_classes = false
# Log error messages when you accidentally call methods on nil.
config.whiny_nils = true
# Show full error reports and disable caching
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
# Don't care if the mailer can't send
config.action_mailer.raise_delivery_errors = false
# Print deprecation notices to the Rails logger
config.active_support.deprecation = :log
# Only use best-standards-support built into browsers
config.action_dispatch.best_standards_support = :builtin
# Do not compress assets
config.assets.compress = false
# Expands the lines which load the assets
config.assets.debug = true
end
@@ -1,60 +0,0 @@
Dummy::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
# Code is not reloaded between requests
config.cache_classes = true
# Full error reports are disabled and caching is turned on
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
# Disable Rails's static asset server (Apache or nginx will already do this)
config.serve_static_assets = false
# Compress JavaScripts and CSS
config.assets.compress = true
# Don't fallback to assets pipeline if a precompiled asset is missed
config.assets.compile = false
# Generate digests for assets URLs
config.assets.digest = true
# Defaults to Rails.root.join("public/assets")
# config.assets.manifest = YOUR_PATH
# Specifies the header that your server uses for sending files
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
# config.force_ssl = true
# See everything in the log (default is :info)
# config.log_level = :debug
# Use a different logger for distributed setups
# config.logger = SyslogLogger.new
# Use a different cache store in production
# config.cache_store = :mem_cache_store
# Enable serving of images, stylesheets, and JavaScripts from an asset server
# config.action_controller.asset_host = "http://assets.example.com"
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
# config.assets.precompile += %w( search.js )
# Disable delivery errors, bad email addresses will be ignored
# config.action_mailer.raise_delivery_errors = false
# Enable threaded mode
# config.threadsafe!
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation can not be found)
config.i18n.fallbacks = true
# Send deprecation notices to registered listeners
config.active_support.deprecation = :notify
end
@@ -1,39 +0,0 @@
Dummy::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
# The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the test suite and is wiped
# and recreated between test runs. Don't rely on the data there!
config.cache_classes = true
# Configure static asset server for tests with Cache-Control for performance
config.serve_static_assets = true
config.static_cache_control = "public, max-age=3600"
# Log error messages when you accidentally call methods on nil
config.whiny_nils = true
# Show full error reports and disable caching
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
# Raise exceptions instead of rendering exception templates
config.action_dispatch.show_exceptions = false
# Disable request forgery protection in test environment
config.action_controller.allow_forgery_protection = false
# Tell Action Mailer not to deliver emails to the real world.
# The :test delivery method accumulates sent emails in the
# ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test
# Use SQL instead of Active Record's schema dumper when creating the test database.
# This is necessary if your schema can't be completely dumped by the schema dumper,
# like if you have constraints or database-specific column types
# config.active_record.schema_format = :sql
# Print deprecation notices to the stderr
config.active_support.deprecation = :stderr
end
@@ -1,7 +0,0 @@
# Be sure to restart your server when you modify this file.
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
# Rails.backtrace_cleaner.remove_silencers!
@@ -1,10 +0,0 @@
# Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format
# (all these examples are active by default):
# ActiveSupport::Inflector.inflections do |inflect|
# inflect.plural /^(ox)$/i, '\1en'
# inflect.singular /^(ox)en/i, '\1'
# inflect.irregular 'person', 'people'
# inflect.uncountable %w( fish sheep )
# end
@@ -1,5 +0,0 @@
# Be sure to restart your server when you modify this file.
# Add new mime types for use in respond_to blocks:
# Mime::Type.register "text/richtext", :rtf
# Mime::Type.register_alias "text/html", :iphone
@@ -1,7 +0,0 @@
# Be sure to restart your server when you modify this file.
# Your secret key for verifying the integrity of signed cookies.
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
Dummy::Application.config.secret_token = '08ae1abb617d588b6d3b9c5453dd61ec5560d0cba784ab4a4ac34a99f233c36b5bf7857b8a1bab5b5f5423cf87c9ac7bcc45c62290916c0e870a23a1c69ed273'
@@ -1,8 +0,0 @@
# Be sure to restart your server when you modify this file.
Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
# Use the database for sessions instead of the cookie-based default,
# which shouldn't be used to store highly confidential information
# (create the session table with "rails generate session_migration")
# Dummy::Application.config.session_store :active_record_store
@@ -1,14 +0,0 @@
# Be sure to restart your server when you modify this file.
#
# This file contains settings for ActionController::ParamsWrapper which
# is enabled by default.
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
ActiveSupport.on_load(:action_controller) do
wrap_parameters format: [:json]
end
# Disable root element in JSON by default.
ActiveSupport.on_load(:active_record) do
self.include_root_in_json = false
end
@@ -1,5 +0,0 @@
# Sample localization file for English. Add more files in this directory for other locales.
# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
en:
hello: "Hello world"
@@ -1,58 +0,0 @@
Dummy::Application.routes.draw do
# The priority is based upon order of creation:
# first created -> highest priority.
# Sample of regular route:
# match 'products/:id' => 'catalog#view'
# Keep in mind you can assign values other than :controller and :action
# Sample of named route:
# match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
# This route can be invoked with purchase_url(:id => product.id)
# Sample resource route (maps HTTP verbs to controller actions automatically):
# resources :products
# Sample resource route with options:
# resources :products do
# member do
# get 'short'
# post 'toggle'
# end
#
# collection do
# get 'sold'
# end
# end
# Sample resource route with sub-resources:
# resources :products do
# resources :comments, :sales
# resource :seller
# end
# Sample resource route with more complex sub-resources
# resources :products do
# resources :comments
# resources :sales do
# get 'recent', :on => :collection
# end
# end
# Sample resource route within a namespace:
# namespace :admin do
# # Directs /admin/products/* to Admin::ProductsController
# # (app/controllers/admin/products_controller.rb)
# resources :products
# end
# You can have the root of your site routed with "root"
# just remember to delete public/index.html.
# root :to => 'welcome#index'
# See how all your routes lay out with "rake routes"
# This is a legacy wild controller route that's not recommended for RESTful applications.
# Note: This route will make all actions in every controller accessible via GET requests.
# match ':controller(/:action(/:id(.:format)))'
end
@@ -1,26 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>The page you were looking for doesn't exist (404)</title>
<style type="text/css">
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
div.dialog {
width: 25em;
padding: 0 4em;
margin: 4em auto 0 auto;
border: 1px solid #ccc;
border-right-color: #999;
border-bottom-color: #999;
}
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
</style>
</head>
<body>
<!-- This file lives in public/404.html -->
<div class="dialog">
<h1>The page you were looking for doesn't exist.</h1>
<p>You may have mistyped the address or the page may have moved.</p>
</div>
</body>
</html>
@@ -1,26 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>The change you wanted was rejected (422)</title>
<style type="text/css">
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
div.dialog {
width: 25em;
padding: 0 4em;
margin: 4em auto 0 auto;
border: 1px solid #ccc;
border-right-color: #999;
border-bottom-color: #999;
}
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
</style>
</head>
<body>
<!-- This file lives in public/422.html -->
<div class="dialog">
<h1>The change you wanted was rejected.</h1>
<p>Maybe you tried to change something you didn't have access to.</p>
</div>
</body>
</html>
@@ -1,26 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>We're sorry, but something went wrong (500)</title>
<style type="text/css">
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
div.dialog {
width: 25em;
padding: 0 4em;
margin: 4em auto 0 auto;
border: 1px solid #ccc;
border-right-color: #999;
border-bottom-color: #999;
}
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
</style>
</head>
<body>
<!-- This file lives in public/500.html -->
<div class="dialog">
<h1>We're sorry, but something went wrong.</h1>
<p>We've been notified about this issue and we'll take a look at it shortly.</p>
</div>
</body>
</html>
Whitespace-only changes.
@@ -1,6 +0,0 @@
#!/usr/bin/env ruby.exe
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
APP_PATH = File.expand_path('../../config/application', __FILE__)
require File.expand_path('../../config/boot', __FILE__)
require 'rails/commands'
@@ -1,10 +0,0 @@
require 'test_helper'
class NavigationTest < ActionDispatch::IntegrationTest
fixtures :all
# test "the truth" do
# assert true
# end
end
@@ -1,7 +0,0 @@
require 'test_helper'
class PersonalConferenceTest < ActiveSupport::TestCase
test "truth" do
assert_kind_of Module, PersonalConference
end
end
@@ -1,10 +0,0 @@
# Configure Rails Environment
ENV["RAILS_ENV"] = "test"
require File.expand_path("../dummy/config/environment.rb", __FILE__)
require "rails/test_help"
Rails.backtrace_cleaner.remove_silencers!
# Load support files
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
@@ -154,7 +154,7 @@ class Panel::PersonalDiploma::BackEnd::DiplomasController < OrbitBackendControll
def delete
if params[:ids]
diplomas = Diploma.any_in(:_id => params[:ids]).delete_all
diplomas = Diploma.any_in(:_id => params[:ids]).destroy_all
end
redirect_to panel_personal_diploma_back_end_diplomas_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options])
end
@@ -132,7 +132,7 @@ class Panel::PersonalDiploma::Plugin::DiplomasController < OrbitBackendControlle
def delete
if params[:ids]
diplomas = Diploma.any_in(:_id => params[:ids]).delete_all
diplomas = Diploma.any_in(:_id => params[:ids]).destroy_all
end
redirect_to panel_personal_diploma_plugin_diplomas_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options])
end
@@ -38,7 +38,7 @@ class Diploma
before_validation :add_http
validates :url, :format => /^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$/ix, :unless => Proc.new{self.url.blank?}
validates :url, :format => /^(http|https):\/\/(([a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5})|((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))(:[0-9]{1,5})?(\/.*)?/i, :unless => Proc.new{self.url.blank?}
def self.widget_datas
+1 -2
View File
@@ -1,11 +1,10 @@
module PersonalDiploma
OrbitApp.registration "PersonalDiploma",:type=> 'ModuleApp' do
OrbitApp.registration "Diploma",:type=> 'ModuleApp' do
module_label 'module_name.personal_diploma'
base_url File.expand_path File.dirname(__FILE__)
personal_plugin :enable => true,:path=>"panel/personal_diploma/plugin/profile",:admin_path=>"/panel/personal_diploma/back_end/diplomas",:i18n=>'module_name.personal_diploma'
end
end
@@ -222,7 +222,7 @@ class Panel::PersonalExperience::BackEnd::ExperiencesController < OrbitBackendCo
def delete
if params[:ids]
experiences = Experience.any_in(:_id => params[:ids]).delete_all
experiences = Experience.any_in(:_id => params[:ids]).destroy_all
end
redirect_to panel_personal_experience_back_end_experiences_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options])
end
@@ -201,7 +201,7 @@ class Panel::PersonalExperience::Plugin::ExperiencesController < OrbitBackendCon
def delete
if params[:ids]
experiences = Experience.any_in(:_id => params[:ids]).delete_all
experiences = Experience.any_in(:_id => params[:ids]).destroy_all
end
redirect_to panel_personal_experience_plugin_experiences_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options])
end
@@ -38,7 +38,7 @@ class Experience
before_validation :add_http
validates :url, :format => /^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$/ix, :unless => Proc.new{self.url.blank?}
validates :url, :format => /^(http|https):\/\/(([a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5})|((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))(:[0-9]{1,5})?(\/.*)?/i, :unless => Proc.new{self.url.blank?}
def self.search( category_id = nil )
+1 -2
View File
@@ -1,11 +1,10 @@
module PersonalExperience
OrbitApp.registration "PersonalExperience",:type=> 'ModuleApp' do
OrbitApp.registration "Experience",:type=> 'ModuleApp' do
module_label 'module_name.personal_experience'
base_url File.expand_path File.dirname(__FILE__)
personal_plugin :enable => true,:path=>"panel/personal_experience/plugin/profile",:admin_path=>"/panel/personal_experience/back_end/experiences",:i18n=>'module_name.personal_experience'
end
end
@@ -225,7 +225,7 @@ class Panel::PersonalHonor::BackEnd::HonorsController < OrbitBackendController
def delete
if params[:ids]
honors = Honor.any_in(:_id => params[:ids]).delete_all
honors = Honor.any_in(:_id => params[:ids]).destroy_all
end
redirect_to panel_personal_honor_back_end_honors_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options])
end
@@ -201,7 +201,7 @@ class Panel::PersonalHonor::Plugin::HonorsController < OrbitBackendController
def delete
if params[:ids]
honors = Honor.any_in(:_id => params[:ids]).delete_all
honors = Honor.any_in(:_id => params[:ids]).destroy_all
end
redirect_to panel_personal_honor_plugin_honors_url(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options])
end
+1 -1
View File
@@ -35,7 +35,7 @@ class Honor
before_validation :add_http
validates :url, :format => /^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$/ix, :unless => Proc.new{self.url.blank?}
validates :url, :format => /^(http|https):\/\/(([a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5})|((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))(:[0-9]{1,5})?(\/.*)?/i, :unless => Proc.new{self.url.blank?}
def self.search( category_id = nil )
+1 -2
View File
@@ -1,11 +1,10 @@
module PersonalHonor
OrbitApp.registration "PersonalHonor",:type=> 'ModuleApp' do
OrbitApp.registration "Honor",:type=> 'ModuleApp' do
module_label 'module_name.personal_honor'
base_url File.expand_path File.dirname(__FILE__)
personal_plugin :enable => true,:path=>"panel/personal_honor/plugin/profile",:admin_path=>"/panel/personal_honor/back_end/honors",:i18n=>'module_name.personal_honor'
end
end
+99
View File
@@ -0,0 +1,99 @@
PATH
remote: .
specs:
personal_journal (0.0.1)
rails (~> 3.1.4)
GEM
remote: http://rubygems.org/
specs:
actionmailer (3.1.9)
actionpack (= 3.1.9)
mail (~> 2.3.3)
actionpack (3.1.9)
activemodel (= 3.1.9)
activesupport (= 3.1.9)
builder (~> 3.0.0)
erubis (~> 2.7.0)
i18n (~> 0.6)
rack (~> 1.3.6)
rack-cache (~> 1.2)
rack-mount (~> 0.8.2)
rack-test (~> 0.6.1)
sprockets (~> 2.0.4)
activemodel (3.1.9)
activesupport (= 3.1.9)
builder (~> 3.0.0)
i18n (~> 0.6)
activerecord (3.1.9)
activemodel (= 3.1.9)
activesupport (= 3.1.9)
arel (~> 2.2.3)
tzinfo (~> 0.3.29)
activeresource (3.1.9)
activemodel (= 3.1.9)
activesupport (= 3.1.9)
activesupport (3.1.9)
multi_json (>= 1.0, < 1.3)
arel (2.2.3)
builder (3.0.4)
erubis (2.7.0)
hike (1.2.1)
i18n (0.6.1)
jquery-rails (2.1.4)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.7.6)
mail (2.3.3)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.19)
multi_json (1.2.0)
polyglot (0.3.3)
rack (1.3.6)
rack-cache (1.2)
rack (>= 0.4)
rack-mount (0.8.3)
rack (>= 1.0.0)
rack-ssl (1.3.2)
rack
rack-test (0.6.2)
rack (>= 1.0)
rails (3.1.9)
actionmailer (= 3.1.9)
actionpack (= 3.1.9)
activerecord (= 3.1.9)
activeresource (= 3.1.9)
activesupport (= 3.1.9)
bundler (~> 1.0)
railties (= 3.1.9)
railties (3.1.9)
actionpack (= 3.1.9)
activesupport (= 3.1.9)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.6)
rake (10.0.3)
rdoc (3.12)
json (~> 1.4)
sprockets (2.0.4)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.6)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.12)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.35)
PLATFORMS
ruby
DEPENDENCIES
jquery-rails
personal_journal!
sqlite3
Loaded 100 of 234 files, more files were not shown because too many files have changed in this diff. Show more