+<%= stylesheet_link_tag "/assets/personal_book/desktop/personal_book" %>
+<%= javascript_include_tag "personal_book/desktop/personal_books" %>
+
\ No newline at end of file
diff --git a/vendor/built_in_modules/personal_experience/app/views/panel/personal_experience/desktop/personal_experiences/index.html.erb b/vendor/built_in_modules/personal_experience/app/views/panel/personal_experience/desktop/personal_experiences/index.html.erb
new file mode 100644
index 00000000..b7c351f5
--- /dev/null
+++ b/vendor/built_in_modules/personal_experience/app/views/panel/personal_experience/desktop/personal_experiences/index.html.erb
@@ -0,0 +1,84 @@
+
+
+ <% @experiences.each do |w| %>
+ <%= publication_record w, @view_by%>
+ <% end %>
+
\ No newline at end of file
diff --git a/vendor/built_in_modules/personal_experience/app/views/panel/personal_experience/desktop/personal_experiences/new.html.erb b/vendor/built_in_modules/personal_experience/app/views/panel/personal_experience/desktop/personal_experiences/new.html.erb
new file mode 100644
index 00000000..7a835058
--- /dev/null
+++ b/vendor/built_in_modules/personal_experience/app/views/panel/personal_experience/desktop/personal_experiences/new.html.erb
@@ -0,0 +1,3 @@
+<%= form_for @experience, html: { multipart: true, "form-type"=>"ajax_form", "callback-method"=>"formCallback"}, url: panel_personal_experience_desktop_personal_experiences_path do |f| %>
+ <%= render partial: 'form', locals: {:f => f} %>
+<%end%>
diff --git a/vendor/built_in_modules/personal_experience/config/locales/en.yml b/vendor/built_in_modules/personal_experience/config/locales/en.yml
index a96b3993..7b99824f 100644
--- a/vendor/built_in_modules/personal_experience/config/locales/en.yml
+++ b/vendor/built_in_modules/personal_experience/config/locales/en.yml
@@ -1,4 +1,55 @@
en:
-
module_name:
- personal_experience: Experience
\ No newline at end of file
+ personal_experience: Book
+ personal_experience:
+ department : "Department"
+ experience_category : "Experience Category"
+ organizationt_title : "Organization Title"
+ paper_title : "Paper Title"
+ book_title : "Book Title"
+ job_title : "Job Title"
+ extracted_chapters : "Extracted Chapters"
+ publishers : "Publishers"
+ authors : "Authors"
+ tags : "Tags"
+ year : "Year"
+ language : "Language"
+ isbn : "ISSN(ISBN)"
+ vol_no : "Vol.No"
+ issue_no : "Issue.No"
+ form_to_start : "From"
+ form_to_end : "To"
+ total_pages : "Total Pages"
+ keywords : "Keywords"
+ abstract : "Abstract"
+ publication_date : "Date of Publication"
+ url : "Reference URL"
+ note : "Note"
+ level_type : "Level Type"
+ author_type : "Author Type"
+ from : "From"
+ to : "To"
+ file : "File"
+ file_name : "File name"
+ description : "File Description"
+ pages : "Pages"
+ book_paper_type : "Book Paper Type"
+
+ create_success : "Successfully Create"
+ update_success : "Successfully Update"
+ delete_success : "Successfully Delete"
+ add: "Add"
+ back: "Back"
+ delete: "Delete"
+ edit: "Edit"
+ nothing: "Nothing"
+ show: "Show"
+ sure?: "Are you sure?"
+ update: "Update"
+ yes_: "Yes"
+ no_: "No"
+ cancel : "Cancel"
+ save: "save"
+ hintText: "Type in a search term"
+ noResultsText: "No results"
+ searchingText: "Searching…"
diff --git a/vendor/built_in_modules/personal_experience/config/locales/zh_tw.yml b/vendor/built_in_modules/personal_experience/config/locales/zh_tw.yml
index cfe8fd2c..da0a37f6 100644
--- a/vendor/built_in_modules/personal_experience/config/locales/zh_tw.yml
+++ b/vendor/built_in_modules/personal_experience/config/locales/zh_tw.yml
@@ -1,5 +1,54 @@
zh_tw:
-
module_name:
- personal_experience: 經歷
-
\ No newline at end of file
+ personal_experience: 期刊著作
+ personal_experience:
+ department : "Department"
+ organizationt_title : "Organization Title"
+ paper_title : "論文名稱"
+ book_title : "期刊名稱"
+ job_title : "Job Title"
+ extracted_chapters : "Extracted Chapters"
+ publishers : "Publishers"
+ authors : "作者"
+ tags : "領域"
+ year : "年度"
+ language : "語言"
+ isbn : "ISSN(ISBN)"
+ vol_no : "卷數"
+ issue_no : "期數"
+ form_to_start : "起"
+ form_to_end : "訖"
+ total_pages : "總頁數"
+ keywords : "關鍵字"
+ abstract : "摘要"
+ publication_date : "發表日期"
+ url : "參考連結"
+ note : "記事"
+ level_type : "期刊類別"
+ author_type : "作者類別"
+ from : "起"
+ to : "訖"
+ file : "檔案"
+ file_name : "檔案名稱"
+ description : "描述"
+ pages : "Pages"
+ book_paper_type : "Book Paper Type"
+
+ create_success : "新增完成!!"
+ update_success : "更新完成!!"
+ delete_success : "刪除成功!!"
+ add: "新增"
+ back: "返回"
+ delete: "刪除"
+ edit: "編輯"
+ nothing: "無"
+ show: "顯示"
+ sure?: "您肯定嗎?"
+ update: "更新"
+ yes_: "是"
+ no_: "否"
+ cancel : "取消"
+ save: "儲存"
+ hintText: "請輸入搜尋關鍵字"
+ noResultsText: "沒有相關的比對結果"
+ searchingText: "搜尋中…"
diff --git a/vendor/built_in_modules/personal_experience/config/routes.rb b/vendor/built_in_modules/personal_experience/config/routes.rb
index 21c37de6..3cf82617 100644
--- a/vendor/built_in_modules/personal_experience/config/routes.rb
+++ b/vendor/built_in_modules/personal_experience/config/routes.rb
@@ -2,6 +2,10 @@ Rails.application.routes.draw do
namespace :panel do
namespace :personal_experience do
+ namespace :desktop do
+ match "experience_window" => "personal_experiences#experience_window"
+ resources :personal_experiences
+ end
namespace :back_end do
match 'experience_setting' => "experiences#experience_setting" ,:as => :experience_setting
diff --git a/vendor/built_in_modules/personal_honor/app/assets/javascripts/personal_honor/desktop/personal_honors.js b/vendor/built_in_modules/personal_honor/app/assets/javascripts/personal_honor/desktop/personal_honors.js
new file mode 100644
index 00000000..e4d64469
--- /dev/null
+++ b/vendor/built_in_modules/personal_honor/app/assets/javascripts/personal_honor/desktop/personal_honors.js
@@ -0,0 +1,158 @@
+orbitDesktop.prototype.initializePersonalHonor = function(target,url,cache){ // this init journal papers
+ this.initializePersonalHonor.formCallback = function(data){
+ if(data.success){
+ o.notify(data.msg,"success");
+ o.sub_menu_item($("div[content-type=menu] a").eq(0));
+ }else{
+ o.notify(data.msg,"alert");
+ }
+ }
+
+ this.initializePersonalHonor.list = function(){ // to open list part in journal papers page
+ var journalData;
+ var bindHandlers = function(){ // to bind handlers for list page
+
+ }
+ bindHandlers();
+
+ var bindSecondaryHandlers = function(){
+ $("#journal_p div#paper_list a.icon-check-empty").click(function(){
+ if($(this).hasClass("icon-check-empty")){
+ $(this).switchClass("icon-check-empty","icon-check",0);
+ } else if($(this) .hasClass("icon-check")) {
+ $(this).switchClass("icon-check","icon-check-empty",0);
+ } else if($(this).hasClass("icon-star")){
+ $(this).removeClass("icon-star").addClass("icon-star-empty");
+ } else if($(this).hasClass("icon-star-empty")){
+ $(this).removeClass("icon-star-empty").addClass("icon-star");
+ }
+ return false;
+ })
+ }
+ }
+ this.initializePersonalHonor.honorDelete = function(data,dom){
+ var parent = dom.parent().parent();
+ if(data.success){
+ parent.hide("slide",function(){parent.remove();});
+ o.notify(data.msg,"success");
+ }
+ }
+
+ this.initializePersonalHonor.cancelhonor = function(){
+ o.highlight_sub_menu_item(0);
+ }
+
+ this.initializePersonalHonor.edithonor = function(){
+ o.highlight_sub_menu_item(1);
+ var uploadFiles = function(){
+ $('#add_plugin_file a.add').click(function(){
+ var new_id = $(this).prev().attr('value');
+ var old_id = new RegExp("new_writing_journal_files", "g");
+ $(this).prev().attr('value', parseInt(new_id) + 1);
+ var x = get_html(old_id,new_id);
+ var newfield = $(x);
+ $(this).parents('table').append(newfield);
+ newfield.find('.action a.delete').click(function(){
+ newfield.remove();
+ });
+ return false;
+ });
+ $('.action a.remove_existing_record').click(function(){
+ $(this).next('.should_destroy').attr('value', 1);
+ $("tr#add_plugin_file_" + $(this).prev().attr('value')).hide();
+ });
+ }
+
+
+ var preData = function(){
+ $("#writing_journal_author_tokens").select2('data', JSON.parse($("#writing_journal_author_tokens").attr('data-pre')));
+ }
+ uploadFiles();
+ // preData();
+ }
+
+ this.initializePersonalHonor.addhonor = function(){ // to open add pages in journal papers page
+ var uploadFiles = function(){
+ $('#add_plugin_file a.add').click(function(){
+ var new_id = $(this).prev().attr('value');
+ var old_id = new RegExp("new_writing_journal_files", "g");
+ $(this).prev().attr('value', parseInt(new_id) + 1);
+ var x = get_html(old_id,new_id);
+ var newfield = $(x);
+ $(this).parents('table').append(newfield);
+ newfield.find('.action a.delete').click(function(){
+ newfield.remove();
+ });
+ return false;
+ });
+ $('.action a.remove_existing_record').click(function(){
+ $(this).next('.should_destroy').attr('value', 1);
+ $("tr#add_plugin_file_" + $(this).prev().attr('value')).hide();
+ });
+ }
+
+ // console.log("hi");
+ var bindHandlers = function(){
+
+
+ }
+ bindHandlers();
+ uploadFiles();
+
+ }
+
+
+ this.initializePersonalHonor.coAuthorformCallback = function(data){
+ if(data.success){
+ o.notify(data.msg,"success");
+ o.sub_menu_item($("div[content-type=menu] a").eq(3));
+ }else{
+ o.notify(data.msg,"alert");
+ }
+ }
+ this.initializePersonalHonor.coauthor = function(){ // to open add pages in coauthor page
+ var bindHandlers = function(){ // to bind handlers for add page
+
+ }
+ bindHandlers();
+ }
+ this.initializePersonalHonor.coauthorRelationForm = function(data){
+ if(data.success){
+ o.notify(data.msg,"success");
+ $("#co_author_relation_table").html(data.newvalue);
+ }else{
+ o.notify(data.msg,"alert");
+ }
+ }
+ this.initializePersonalHonor.coauthorRelationEditForm = function(data){
+ if(data.success){
+ o.notify(data.msg,"success");
+ var x = o.layout_data.generate_layout_html(data.newvalue);
+ $("div[container=true] div.overview").html(x.markup);
+ }else{
+ o.notify(data.msg,"alert");
+ }
+ }
+ this.initializePersonalHonor.allnone = function(d,o){
+ switch(o.attr("href")){
+ case "all":
+ $("div.overview a.icon-check-empty").removeClass("icon-check-empty").addClass("icon-check");
+ break;
+ case "none":
+ $("div.overview a.icon-check").removeClass("icon-check").addClass("icon-check-empty");
+ break;
+ }
+ }
+ this.initializePersonalHonor.allnone = function(d,o){
+ switch(o.attr("href")){
+ case "all":
+ $("div.overview a.icon-check-empty").removeClass("icon-check-empty").addClass("icon-check");
+ break;
+ case "none":
+ $("div.overview a.icon-check").removeClass("icon-check").addClass("icon-check-empty");
+ break;
+ }
+ }
+};
+
+
diff --git a/vendor/built_in_modules/personal_honor/app/assets/stylesheets/personal_honor/desktop/personal_honor.css b/vendor/built_in_modules/personal_honor/app/assets/stylesheets/personal_honor/desktop/personal_honor.css
new file mode 100644
index 00000000..f0c6ce6e
--- /dev/null
+++ b/vendor/built_in_modules/personal_honor/app/assets/stylesheets/personal_honor/desktop/personal_honor.css
@@ -0,0 +1,115 @@
+/* Books */
+[page-name="books_list"] .list_t_item .inner {
+ padding-left: 30px; }
+[page-name="books_list"] .list_item_action {
+ font-size: 12px;
+ float: left;
+ margin-left: -30px; }
+ [page-name="books_list"] .list_item_action a {
+ display: block;
+ width: 20px;
+ height: 20px;
+ line-height: 20px;
+ margin: 1px 1px 6px 1px; }
+ [page-name="books_list"] .list_item_action .icon-star-empty {
+ color: #999;
+ font-size: 20px; }
+ [page-name="books_list"] .list_item_action .icon-star {
+ color: #faa732;
+ font-size: 20px; }
+ [page-name="books_list"] .list_item_action .icon-check-empty {
+ color: #999;
+ font-size: 20px; }
+ [page-name="books_list"] .list_item_action .icon-check {
+ color: #333;
+ font-size: 20px; }
+[page-name="books_list"] .file_view .list_t_des {
+ overflow: hidden; }
+[page-name="books_list"] .file_view .file {
+ float: left;
+ width: 120px;
+ height: 50px;
+ padding: 6px;
+ margin: 1px;
+ position: relative;
+ -webkit-box-sizing: border-box;
+ /* webkit */
+ -khtml-box-sizing: border-box;
+ /* konqueror */
+ -moz-box-sizing: border-box;
+ /* firefox */
+ -ms-box-sizing: border-box;
+ /* ie */
+ box-sizing: border-box;
+ /* css3 */ }
+ [page-name="books_list"] .file_view .file:hover {
+ background-color: #f7f7f7; }
+ [page-name="books_list"] .file_view .file img {
+ width: 38px;
+ height: 38px;
+ position: absolute;
+ left: 6px;
+ top: 6px; }
+ [page-name="books_list"] .file_view .file .filetitle {
+ display: block;
+ width: 100%;
+ height: 38px;
+ padding-left: 40px;
+ overflow: hidden;
+ -webkit-box-sizing: border-box;
+ /* webkit */
+ -khtml-box-sizing: border-box;
+ /* konqueror */
+ -moz-box-sizing: border-box;
+ /* firefox */
+ -ms-box-sizing: border-box;
+ /* ie */
+ box-sizing: border-box;
+ /* css3 */ }
+
+/* Books Books list */
+[page-name="books_books"] .datalist_item .inner {
+ padding-left: 30px; }
+[page-name="books_books"] .list_item_action {
+ font-size: 12px;
+ float: left;
+ margin-left: -30px; }
+[page-name="books_books"] .list_item_action i {
+ color: #999;
+ font-size: 20px;
+ display: block;
+ width: 20px;
+ height: 20px;
+ line-height: 20px;
+ margin: 1px 1px 6px 1px; }
+[page-name="books_books"] .list_t_desc {
+ font-family: Arial, sans-serif;
+ font-size: 12px;
+ color: #999; }
+
+/* Books Co-Author */
+[page-name="books_coauthor"] .list_t_item {
+ height: 110px; }
+[page-name="books_coauthor"] .list_item_function a {
+ display: inline-block;
+ padding: 4px;
+ font-family: Arial, sans-serif;
+ font-size: 11px;
+ -webkit-text-size-adjust: none; }
+[page-name="books_coauthor"] .info {
+ font-family: Arial, sans-serif; }
+[page-name="books_coauthor"] .info li {
+ margin-bottom: 8px;
+ color: #999; }
+[page-name="books_coauthor"] .info .name {
+ font-size: 18px;
+ line-height: 24px;
+ color: #333; }
+
+/* Books Co-Author Relationship*/
+[page-name="books_coauthor_relation"] .edit_co_author_relation {
+ /*margin-left: -10px;*/ }
+[page-name="books_coauthor_relation"] .form_space {
+ margin-bottom: 10px;
+ font-size: 18px;
+ font-family: Arial, sans-serif; }
diff --git a/vendor/built_in_modules/personal_honor/app/assets/stylesheets/personal_honor/desktop/personal_honor.scss b/vendor/built_in_modules/personal_honor/app/assets/stylesheets/personal_honor/desktop/personal_honor.scss
new file mode 100644
index 00000000..ddafade9
--- /dev/null
+++ b/vendor/built_in_modules/personal_honor/app/assets/stylesheets/personal_honor/desktop/personal_honor.scss
@@ -0,0 +1,123 @@
+@import "desktop-helper";
+
+/* Books */
+[page-name="books_list"] {
+ .list_t_item .inner { padding-left: 30px; }
+ .list_item_action {
+ font-size: 12px;
+ float: left;
+ margin-left: -30px;
+
+ a {
+ display: block;
+ width: 20px;
+ height: 20px;
+ line-height: 20px;
+ margin: 1px 1px 6px 1px;
+ }
+ .icon-star-empty { color: #999; font-size: 20px; }
+ .icon-star { color: #faa732; font-size: 20px; }
+ .icon-check-empty { color: #999; font-size: 20px; }
+ .icon-check { color: #333; font-size: 20px; }
+ }
+
+ .file_view {
+ .list_t_des {
+ overflow: hidden;
+ }
+ .file {
+ float: left;
+ width: 120px;
+ height: 50px;
+ padding: 6px;
+ margin: 1px;
+ position: relative;
+ @include box-sizing;
+
+ &:hover {
+ background-color: lighten($gray, 10%);
+ }
+ img {
+ width: 38px;
+ height: 38px;
+ position: absolute;
+ left: 6px;
+ top: 6px;
+ }
+ .filetitle {
+ display: block;
+ width: 100%;
+ height: 38px;
+ padding-left: 40px;
+ overflow: hidden;
+ @include box-sizing;
+ }
+ }
+ }
+}
+
+/* Books Books list */
+[page-name="books_books"] {
+
+ .datalist_item .inner {
+ padding-left: 30px;
+ }
+ .list_item_action {
+ font-size: 12px;
+ float: left;
+ margin-left: -30px;
+ }
+ .list_item_action i {
+ color: #999;
+ font-size: 20px;
+ display: block;
+ width: 20px;
+ height: 20px;
+ line-height: 20px;
+ margin: 1px 1px 6px 1px;
+ }
+ .list_t_desc {
+ font-family: Arial, sans-serif;
+ font-size: 12px;
+ color: #999;
+ }
+}
+
+/* Books Co-Author */
+[page-name="books_coauthor"] {
+ .list_t_item {
+ height: 110px;
+ }
+ .list_item_function {}
+ .list_item_function a {
+ display: inline-block;
+ padding: 4px;
+ font-family: Arial, sans-serif;
+ font-size: 11px;
+ -webkit-text-size-adjust: none;
+ }
+ .info {
+ font-family: Arial, sans-serif;
+ }
+ .info li {
+ margin-bottom: 8px;
+ color: #999;
+ }
+ .info .name {
+ font-size: 18px;
+ line-height: 24px;
+ color: #333;
+ }
+}
+
+/* Books Co-Author Relationship*/
+[page-name="books_coauthor_relation"]{
+ .edit_co_author_relation {
+ /*margin-left: -10px;*/
+ }
+ .form_space {
+ margin-bottom: 10px;
+ font-size: 18px;
+ font-family: Arial, sans-serif;
+ }
+}
\ No newline at end of file
diff --git a/vendor/built_in_modules/personal_honor/app/controllers/panel/personal_honor/desktop/personal_honors_controller.rb b/vendor/built_in_modules/personal_honor/app/controllers/panel/personal_honor/desktop/personal_honors_controller.rb
new file mode 100644
index 00000000..f7b7e1b5
--- /dev/null
+++ b/vendor/built_in_modules/personal_honor/app/controllers/panel/personal_honor/desktop/personal_honors_controller.rb
@@ -0,0 +1,71 @@
+class Panel::PersonalHonor::Desktop::PersonalHonorsController < ApplicationController
+
+ def index
+ @honors = Honor.where(create_user_id: current_user.id)
+ @view_by = params[:view]
+ page = params[:page]
+ page ||= 1
+
+ @per_column = 5
+
+ case @view_by
+ when "abstract"
+ @per_column = 1
+ when "file"
+ @per_column = 2
+ end
+
+ if @view_by.nil?
+ @view_by = " "
+ @honors = @honors.asc(:paper_title)
+ else
+ @honors = @honors.asc(@view_by).asc(:paper_title)
+ end
+ @honors = @honors.page(page).per(50)
+ respond_to do |format|
+ format.html { render :layout => false}
+ end
+ end
+
+ def new
+ @honor = Honor.new
+ render :layout => false
+ end
+
+ def create
+ params[:honor][:create_user_id] = current_user.id
+ @honor = Honor.new(params[:honor])
+ if @honor.save
+ render json: {success: true, msg: t('create_success')}.to_json
+ else
+ error_msg = @honor.errors.full_messages.join("
")
+ render json: {success: false, msg: error_msg}.to_json
+ end
+ end
+
+ def edit
+ @honor = Honor.find(params[:id])
+ render :layout => false
+ end
+
+ def update
+ params[:honor][:create_user_id] = current_user.id
+ @honor = Honor.new(params[:honor])
+ if @honor.update_attributes(params[:honor])
+ render json: {success: true, msg: t('create_success')}.to_json
+ else
+ error_msg = @honor.errors.full_messages.join("
")
+ render json: {success: false, msg: error_msg}.to_json
+ end
+ end
+
+ def destroy
+ @honor = Honor.find(params[:id])
+ @honor.destroy
+ render :json => {success: true, msg: t('delete_success')}
+ end
+
+ def honors_window
+ render :layout => false
+ end
+end
\ No newline at end of file
diff --git a/vendor/built_in_modules/personal_honor/app/helpers/panel/personal_honor/desktop/personal_honors_helper.rb b/vendor/built_in_modules/personal_honor/app/helpers/panel/personal_honor/desktop/personal_honors_helper.rb
new file mode 100644
index 00000000..380ba171
--- /dev/null
+++ b/vendor/built_in_modules/personal_honor/app/helpers/panel/personal_honor/desktop/personal_honors_helper.rb
@@ -0,0 +1,87 @@
+module Panel::PersonalHonor::Desktop::PersonalHonorsHelper
+ def publication_record publication, view
+ content_tag :li,
+ "item" => "true",
+ :class => "list_t_item" do
+ marker + \
+ content(publication, view) + \
+ edit_or_delete(publication)
+ end
+ end
+
+ def marker
+ content_tag :div,
+ :class => "list_item_action" do
+ content_tag(:a, "",:href=>"",
+ :class => "icon-check-empty",
+ "toggle-onclick"=>"icon-check-empty icon-check",
+ "ajax-remote"=>"false") + \
+ content_tag(:a, "",:href=>"",
+ :class => "icon-star-empty",
+ "toggle-onclick"=>"icon-star-empty icon-star",
+ "ajax-remote"=>"false")
+ end
+ end
+
+ def content publication, view
+ case view
+ when "award_name"
+ des = content_tag(:div, publication.award_name,
+ :class => "list_t_des")
+
+ end
+
+ content_tag(:div, publication.award_name,
+ :class => "list_t_title") + 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_honor_desktop_personal_honor_path(publication),
+ "callback-method" => "edithonor",
+ "ajax-remote" => "get") + \
+ content_tag(:a, t(:delete_),
+ "ajax-remote" => "delete",
+ "confirm-message" => t("sure?"),
+ "callback-method" => "honorDelete",
+ :class => "journal_paper_delete admbg2 admtxt",
+ :href => panel_personal_honor_desktop_personal_honor_path(publication))
+ end
+ end
+
+ def link_publication_file publication
+ publication.writing_book_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
+
+ def generate_authors_name ids
+ author_name = ids.map{|m|
+ if m == "0"
+ #{:id => 0, :text => current_user.name, :email => current_user.email }
+ {:id => 0, :text => current_user.name }
+ else
+ #{:id => m, :text => ConferenceCoAuthor.find(m).co_author, :email => ConferenceCoAuthor.find(m).email}
+ {:id => m, :text => ConferenceCoAuthor.find(m).co_author}
+ end
+ }
+ author_name.to_json
+ end
+end
diff --git a/vendor/built_in_modules/personal_honor/app/views/panel/personal_honor/desktop/personal_honors/_form.html.erb b/vendor/built_in_modules/personal_honor/app/views/panel/personal_honor/desktop/personal_honors/_form.html.erb
new file mode 100644
index 00000000..6b391994
--- /dev/null
+++ b/vendor/built_in_modules/personal_honor/app/views/panel/personal_honor/desktop/personal_honors/_form.html.erb
@@ -0,0 +1,66 @@
+
+
\ No newline at end of file
diff --git a/vendor/built_in_modules/personal_honor/app/views/panel/personal_honor/desktop/personal_honors/edit.html.erb b/vendor/built_in_modules/personal_honor/app/views/panel/personal_honor/desktop/personal_honors/edit.html.erb
new file mode 100644
index 00000000..1ce89943
--- /dev/null
+++ b/vendor/built_in_modules/personal_honor/app/views/panel/personal_honor/desktop/personal_honors/edit.html.erb
@@ -0,0 +1,3 @@
+<%= form_for @honor, html: { multipart: true, "form-type"=>"ajax_form", "callback-method"=>"formCallback"}, url: panel_personal_honor_desktop_personal_honors_path(@personal_book) do |f| %>
+ <%= render partial: 'form', locals: {:f => f} %>
+<%end%>
diff --git a/vendor/built_in_modules/personal_honor/app/views/panel/personal_honor/desktop/personal_honors/honors_window.html.erb b/vendor/built_in_modules/personal_honor/app/views/panel/personal_honor/desktop/personal_honors/honors_window.html.erb
new file mode 100644
index 00000000..df8538f0
--- /dev/null
+++ b/vendor/built_in_modules/personal_honor/app/views/panel/personal_honor/desktop/personal_honors/honors_window.html.erb
@@ -0,0 +1,35 @@
+<%= stylesheet_link_tag "/assets/personal_honor/desktop/personal_honor" %>
+<%= javascript_include_tag "personal_honor/desktop/personal_honors" %>
+
+
\ No newline at end of file
diff --git a/vendor/built_in_modules/personal_honor/app/views/panel/personal_honor/desktop/personal_honors/index.html.erb b/vendor/built_in_modules/personal_honor/app/views/panel/personal_honor/desktop/personal_honors/index.html.erb
new file mode 100644
index 00000000..990302ab
--- /dev/null
+++ b/vendor/built_in_modules/personal_honor/app/views/panel/personal_honor/desktop/personal_honors/index.html.erb
@@ -0,0 +1,84 @@
+
+
+ <% @honors.each do |w| %>
+ <%= publication_record w, @view_by%>
+ <% end %>
+
\ No newline at end of file
diff --git a/vendor/built_in_modules/personal_honor/app/views/panel/personal_honor/desktop/personal_honors/new.html.erb b/vendor/built_in_modules/personal_honor/app/views/panel/personal_honor/desktop/personal_honors/new.html.erb
new file mode 100644
index 00000000..4549628d
--- /dev/null
+++ b/vendor/built_in_modules/personal_honor/app/views/panel/personal_honor/desktop/personal_honors/new.html.erb
@@ -0,0 +1,3 @@
+<%= form_for @honor, html: { multipart: true, "form-type"=>"ajax_form", "callback-method"=>"formCallback"}, url: panel_personal_honor_desktop_personal_honors_path do |f| %>
+ <%= render partial: 'form', locals: {:f => f} %>
+<%end%>
diff --git a/vendor/built_in_modules/personal_honor/config/locales/en.yml b/vendor/built_in_modules/personal_honor/config/locales/en.yml
index bafc7443..9a708a4d 100644
--- a/vendor/built_in_modules/personal_honor/config/locales/en.yml
+++ b/vendor/built_in_modules/personal_honor/config/locales/en.yml
@@ -1,4 +1,54 @@
en:
-
module_name:
- personal_honor: Honor
\ No newline at end of file
+ personal_honor: Book
+ personal_honor:
+ paper_title : "Paper Title"
+ book_title : "Book Title"
+ award_name : "Award Name"
+ awarding_unit : "Awarding Unit"
+ honor_category : "Honor Category"
+ extracted_chapters : "Extracted Chapters"
+ publishers : "Publishers"
+ authors : "Authors"
+ tags : "Tags"
+ year : "Year"
+ language : "Language"
+ isbn : "ISSN(ISBN)"
+ vol_no : "Vol.No"
+ issue_no : "Issue.No"
+ form_to_start : "From"
+ form_to_end : "To"
+ total_pages : "Total Pages"
+ keywords : "Keywords"
+ abstract : "Abstract"
+ publication_date : "Date of Publication"
+ url : "Reference URL"
+ note : "Note"
+ level_type : "Level Type"
+ author_type : "Author Type"
+ from : "From"
+ to : "To"
+ file : "File"
+ file_name : "File name"
+ description : "File Description"
+ pages : "Pages"
+ book_paper_type : "Book Paper Type"
+
+ create_success : "Successfully Create"
+ update_success : "Successfully Update"
+ delete_success : "Successfully Delete"
+ add: "Add"
+ back: "Back"
+ delete: "Delete"
+ edit: "Edit"
+ nothing: "Nothing"
+ show: "Show"
+ sure?: "Are you sure?"
+ update: "Update"
+ yes_: "Yes"
+ no_: "No"
+ cancel : "Cancel"
+ save: "save"
+ hintText: "Type in a search term"
+ noResultsText: "No results"
+ searchingText: "Searching…"
diff --git a/vendor/built_in_modules/personal_honor/config/locales/zh_tw.yml b/vendor/built_in_modules/personal_honor/config/locales/zh_tw.yml
index cee9079d..ce0a1e13 100644
--- a/vendor/built_in_modules/personal_honor/config/locales/zh_tw.yml
+++ b/vendor/built_in_modules/personal_honor/config/locales/zh_tw.yml
@@ -1,4 +1,54 @@
zh_tw:
-
module_name:
- personal_honor: 榮譽
\ No newline at end of file
+ personal_honor: 期刊著作
+ personal_honor:
+ paper_title : "論文名稱"
+ book_title : "期刊名稱"
+ award_name : "Award Name"
+ awarding_unit : "Awarding Unit"
+ honor_category : "Honor Category"
+ extracted_chapters : "Extracted Chapters"
+ publishers : "Publishers"
+ authors : "作者"
+ tags : "領域"
+ year : "年度"
+ language : "語言"
+ isbn : "ISSN(ISBN)"
+ vol_no : "卷數"
+ issue_no : "期數"
+ form_to_start : "起"
+ form_to_end : "訖"
+ total_pages : "總頁數"
+ keywords : "關鍵字"
+ abstract : "摘要"
+ publication_date : "發表日期"
+ url : "參考連結"
+ note : "記事"
+ level_type : "期刊類別"
+ author_type : "作者類別"
+ from : "起"
+ to : "訖"
+ file : "檔案"
+ file_name : "檔案名稱"
+ description : "描述"
+ pages : "Pages"
+ book_paper_type : "Book Paper Type"
+
+ create_success : "新增完成!!"
+ update_success : "更新完成!!"
+ delete_success : "刪除成功!!"
+ add: "新增"
+ back: "返回"
+ delete: "刪除"
+ edit: "編輯"
+ nothing: "無"
+ show: "顯示"
+ sure?: "您肯定嗎?"
+ update: "更新"
+ yes_: "是"
+ no_: "否"
+ cancel : "取消"
+ save: "儲存"
+ hintText: "請輸入搜尋關鍵字"
+ noResultsText: "沒有相關的比對結果"
+ searchingText: "搜尋中…"
diff --git a/vendor/built_in_modules/personal_honor/config/routes.rb b/vendor/built_in_modules/personal_honor/config/routes.rb
index c043ff78..ec5e9097 100644
--- a/vendor/built_in_modules/personal_honor/config/routes.rb
+++ b/vendor/built_in_modules/personal_honor/config/routes.rb
@@ -2,6 +2,11 @@ Rails.application.routes.draw do
namespace :panel do
namespace :personal_honor do
+ namespace :desktop do
+ match "honor_window" => "personal_honors#honors_window"
+ resources :personal_honors
+ end
+
namespace :back_end do
match 'honor_setting' => "honors#honor_setting" ,:as => :honor_setting
diff --git a/vendor/built_in_modules/personal_lab/app/assets/javascripts/personal_lab/desktop/personal_lab.js b/vendor/built_in_modules/personal_lab/app/assets/javascripts/personal_lab/desktop/personal_lab.js
new file mode 100644
index 00000000..a91b1ddc
--- /dev/null
+++ b/vendor/built_in_modules/personal_lab/app/assets/javascripts/personal_lab/desktop/personal_lab.js
@@ -0,0 +1,158 @@
+orbitDesktop.prototype.initializePersonalLab = function(target,url,cache){ // this init journal papers
+ this.initializePersonalLab.formCallback = function(data){
+ if(data.success){
+ o.notify(data.msg,"success");
+ o.sub_menu_item($("div[content-type=menu] a").eq(0));
+ }else{
+ o.notify(data.msg,"alert");
+ }
+ }
+
+ this.initializePersonalLab.list = function(){ // to open list part in journal papers page
+ var journalData;
+ var bindHandlers = function(){ // to bind handlers for list page
+
+ }
+ bindHandlers();
+
+ var bindSecondaryHandlers = function(){
+ $("#journal_p div#paper_list a.icon-check-empty").click(function(){
+ if($(this).hasClass("icon-check-empty")){
+ $(this).switchClass("icon-check-empty","icon-check",0);
+ } else if($(this) .hasClass("icon-check")) {
+ $(this).switchClass("icon-check","icon-check-empty",0);
+ } else if($(this).hasClass("icon-star")){
+ $(this).removeClass("icon-star").addClass("icon-star-empty");
+ } else if($(this).hasClass("icon-star-empty")){
+ $(this).removeClass("icon-star-empty").addClass("icon-star");
+ }
+ return false;
+ })
+ }
+ }
+ this.initializePersonalLab.labDelete = function(data,dom){
+ var parent = dom.parent().parent();
+ if(data.success){
+ parent.hide("slide",function(){parent.remove();});
+ o.notify(data.msg,"success");
+ }
+ }
+
+ this.initializePersonalLab.cancellab = function(){
+ o.highlight_sub_menu_item(0);
+ }
+
+ this.initializePersonalLab.editlab = function(){
+ o.highlight_sub_menu_item(1);
+ var uploadFiles = function(){
+ $('#add_plugin_file a.add').click(function(){
+ var new_id = $(this).prev().attr('value');
+ var old_id = new RegExp("new_writing_journal_files", "g");
+ $(this).prev().attr('value', parseInt(new_id) + 1);
+ var x = get_html(old_id,new_id);
+ var newfield = $(x);
+ $(this).parents('table').append(newfield);
+ newfield.find('.action a.delete').click(function(){
+ newfield.remove();
+ });
+ return false;
+ });
+ $('.action a.remove_existing_record').click(function(){
+ $(this).next('.should_destroy').attr('value', 1);
+ $("tr#add_plugin_file_" + $(this).prev().attr('value')).hide();
+ });
+ }
+
+
+ var preData = function(){
+ $("#writing_journal_author_tokens").select2('data', JSON.parse($("#writing_journal_author_tokens").attr('data-pre')));
+ }
+ uploadFiles();
+ // preData();
+ }
+
+ this.initializePersonalLab.addlab = function(){ // to open add pages in journal papers page
+ var uploadFiles = function(){
+ $('#add_plugin_file a.add').click(function(){
+ var new_id = $(this).prev().attr('value');
+ var old_id = new RegExp("new_writing_journal_files", "g");
+ $(this).prev().attr('value', parseInt(new_id) + 1);
+ var x = get_html(old_id,new_id);
+ var newfield = $(x);
+ $(this).parents('table').append(newfield);
+ newfield.find('.action a.delete').click(function(){
+ newfield.remove();
+ });
+ return false;
+ });
+ $('.action a.remove_existing_record').click(function(){
+ $(this).next('.should_destroy').attr('value', 1);
+ $("tr#add_plugin_file_" + $(this).prev().attr('value')).hide();
+ });
+ }
+
+ // console.log("hi");
+ var bindHandlers = function(){
+
+
+ }
+ bindHandlers();
+ uploadFiles();
+
+ }
+
+
+ this.initializePersonalLab.coAuthorformCallback = function(data){
+ if(data.success){
+ o.notify(data.msg,"success");
+ o.sub_menu_item($("div[content-type=menu] a").eq(3));
+ }else{
+ o.notify(data.msg,"alert");
+ }
+ }
+ this.initializePersonalLab.coauthor = function(){ // to open add pages in coauthor page
+ var bindHandlers = function(){ // to bind handlers for add page
+
+ }
+ bindHandlers();
+ }
+ this.initializePersonalLab.coauthorRelationForm = function(data){
+ if(data.success){
+ o.notify(data.msg,"success");
+ $("#co_author_relation_table").html(data.newvalue);
+ }else{
+ o.notify(data.msg,"alert");
+ }
+ }
+ this.initializePersonalLab.coauthorRelationEditForm = function(data){
+ if(data.success){
+ o.notify(data.msg,"success");
+ var x = o.layout_data.generate_layout_html(data.newvalue);
+ $("div[container=true] div.overview").html(x.markup);
+ }else{
+ o.notify(data.msg,"alert");
+ }
+ }
+ this.initializePersonalLab.allnone = function(d,o){
+ switch(o.attr("href")){
+ case "all":
+ $("div.overview a.icon-check-empty").removeClass("icon-check-empty").addClass("icon-check");
+ break;
+ case "none":
+ $("div.overview a.icon-check").removeClass("icon-check").addClass("icon-check-empty");
+ break;
+ }
+ }
+ this.initializePersonalLab.allnone = function(d,o){
+ switch(o.attr("href")){
+ case "all":
+ $("div.overview a.icon-check-empty").removeClass("icon-check-empty").addClass("icon-check");
+ break;
+ case "none":
+ $("div.overview a.icon-check").removeClass("icon-check").addClass("icon-check-empty");
+ break;
+ }
+ }
+};
+
+
diff --git a/vendor/built_in_modules/personal_lab/app/assets/stylesheets/personal_lab/desktop/personal_lab.css b/vendor/built_in_modules/personal_lab/app/assets/stylesheets/personal_lab/desktop/personal_lab.css
new file mode 100644
index 00000000..f0c6ce6e
--- /dev/null
+++ b/vendor/built_in_modules/personal_lab/app/assets/stylesheets/personal_lab/desktop/personal_lab.css
@@ -0,0 +1,115 @@
+/* Books */
+[page-name="books_list"] .list_t_item .inner {
+ padding-left: 30px; }
+[page-name="books_list"] .list_item_action {
+ font-size: 12px;
+ float: left;
+ margin-left: -30px; }
+ [page-name="books_list"] .list_item_action a {
+ display: block;
+ width: 20px;
+ height: 20px;
+ line-height: 20px;
+ margin: 1px 1px 6px 1px; }
+ [page-name="books_list"] .list_item_action .icon-star-empty {
+ color: #999;
+ font-size: 20px; }
+ [page-name="books_list"] .list_item_action .icon-star {
+ color: #faa732;
+ font-size: 20px; }
+ [page-name="books_list"] .list_item_action .icon-check-empty {
+ color: #999;
+ font-size: 20px; }
+ [page-name="books_list"] .list_item_action .icon-check {
+ color: #333;
+ font-size: 20px; }
+[page-name="books_list"] .file_view .list_t_des {
+ overflow: hidden; }
+[page-name="books_list"] .file_view .file {
+ float: left;
+ width: 120px;
+ height: 50px;
+ padding: 6px;
+ margin: 1px;
+ position: relative;
+ -webkit-box-sizing: border-box;
+ /* webkit */
+ -khtml-box-sizing: border-box;
+ /* konqueror */
+ -moz-box-sizing: border-box;
+ /* firefox */
+ -ms-box-sizing: border-box;
+ /* ie */
+ box-sizing: border-box;
+ /* css3 */ }
+ [page-name="books_list"] .file_view .file:hover {
+ background-color: #f7f7f7; }
+ [page-name="books_list"] .file_view .file img {
+ width: 38px;
+ height: 38px;
+ position: absolute;
+ left: 6px;
+ top: 6px; }
+ [page-name="books_list"] .file_view .file .filetitle {
+ display: block;
+ width: 100%;
+ height: 38px;
+ padding-left: 40px;
+ overflow: hidden;
+ -webkit-box-sizing: border-box;
+ /* webkit */
+ -khtml-box-sizing: border-box;
+ /* konqueror */
+ -moz-box-sizing: border-box;
+ /* firefox */
+ -ms-box-sizing: border-box;
+ /* ie */
+ box-sizing: border-box;
+ /* css3 */ }
+
+/* Books Books list */
+[page-name="books_books"] .datalist_item .inner {
+ padding-left: 30px; }
+[page-name="books_books"] .list_item_action {
+ font-size: 12px;
+ float: left;
+ margin-left: -30px; }
+[page-name="books_books"] .list_item_action i {
+ color: #999;
+ font-size: 20px;
+ display: block;
+ width: 20px;
+ height: 20px;
+ line-height: 20px;
+ margin: 1px 1px 6px 1px; }
+[page-name="books_books"] .list_t_desc {
+ font-family: Arial, sans-serif;
+ font-size: 12px;
+ color: #999; }
+
+/* Books Co-Author */
+[page-name="books_coauthor"] .list_t_item {
+ height: 110px; }
+[page-name="books_coauthor"] .list_item_function a {
+ display: inline-block;
+ padding: 4px;
+ font-family: Arial, sans-serif;
+ font-size: 11px;
+ -webkit-text-size-adjust: none; }
+[page-name="books_coauthor"] .info {
+ font-family: Arial, sans-serif; }
+[page-name="books_coauthor"] .info li {
+ margin-bottom: 8px;
+ color: #999; }
+[page-name="books_coauthor"] .info .name {
+ font-size: 18px;
+ line-height: 24px;
+ color: #333; }
+
+/* Books Co-Author Relationship*/
+[page-name="books_coauthor_relation"] .edit_co_author_relation {
+ /*margin-left: -10px;*/ }
+[page-name="books_coauthor_relation"] .form_space {
+ margin-bottom: 10px;
+ font-size: 18px;
+ font-family: Arial, sans-serif; }
diff --git a/vendor/built_in_modules/personal_lab/app/assets/stylesheets/personal_lab/desktop/personal_lab.scss b/vendor/built_in_modules/personal_lab/app/assets/stylesheets/personal_lab/desktop/personal_lab.scss
new file mode 100644
index 00000000..ddafade9
--- /dev/null
+++ b/vendor/built_in_modules/personal_lab/app/assets/stylesheets/personal_lab/desktop/personal_lab.scss
@@ -0,0 +1,123 @@
+@import "desktop-helper";
+
+/* Books */
+[page-name="books_list"] {
+ .list_t_item .inner { padding-left: 30px; }
+ .list_item_action {
+ font-size: 12px;
+ float: left;
+ margin-left: -30px;
+
+ a {
+ display: block;
+ width: 20px;
+ height: 20px;
+ line-height: 20px;
+ margin: 1px 1px 6px 1px;
+ }
+ .icon-star-empty { color: #999; font-size: 20px; }
+ .icon-star { color: #faa732; font-size: 20px; }
+ .icon-check-empty { color: #999; font-size: 20px; }
+ .icon-check { color: #333; font-size: 20px; }
+ }
+
+ .file_view {
+ .list_t_des {
+ overflow: hidden;
+ }
+ .file {
+ float: left;
+ width: 120px;
+ height: 50px;
+ padding: 6px;
+ margin: 1px;
+ position: relative;
+ @include box-sizing;
+
+ &:hover {
+ background-color: lighten($gray, 10%);
+ }
+ img {
+ width: 38px;
+ height: 38px;
+ position: absolute;
+ left: 6px;
+ top: 6px;
+ }
+ .filetitle {
+ display: block;
+ width: 100%;
+ height: 38px;
+ padding-left: 40px;
+ overflow: hidden;
+ @include box-sizing;
+ }
+ }
+ }
+}
+
+/* Books Books list */
+[page-name="books_books"] {
+
+ .datalist_item .inner {
+ padding-left: 30px;
+ }
+ .list_item_action {
+ font-size: 12px;
+ float: left;
+ margin-left: -30px;
+ }
+ .list_item_action i {
+ color: #999;
+ font-size: 20px;
+ display: block;
+ width: 20px;
+ height: 20px;
+ line-height: 20px;
+ margin: 1px 1px 6px 1px;
+ }
+ .list_t_desc {
+ font-family: Arial, sans-serif;
+ font-size: 12px;
+ color: #999;
+ }
+}
+
+/* Books Co-Author */
+[page-name="books_coauthor"] {
+ .list_t_item {
+ height: 110px;
+ }
+ .list_item_function {}
+ .list_item_function a {
+ display: inline-block;
+ padding: 4px;
+ font-family: Arial, sans-serif;
+ font-size: 11px;
+ -webkit-text-size-adjust: none;
+ }
+ .info {
+ font-family: Arial, sans-serif;
+ }
+ .info li {
+ margin-bottom: 8px;
+ color: #999;
+ }
+ .info .name {
+ font-size: 18px;
+ line-height: 24px;
+ color: #333;
+ }
+}
+
+/* Books Co-Author Relationship*/
+[page-name="books_coauthor_relation"]{
+ .edit_co_author_relation {
+ /*margin-left: -10px;*/
+ }
+ .form_space {
+ margin-bottom: 10px;
+ font-size: 18px;
+ font-family: Arial, sans-serif;
+ }
+}
\ No newline at end of file
diff --git a/vendor/built_in_modules/personal_lab/app/controllers/panel/personal_lab/desktop/personal_labs_controller.rb b/vendor/built_in_modules/personal_lab/app/controllers/panel/personal_lab/desktop/personal_labs_controller.rb
new file mode 100644
index 00000000..102a51df
--- /dev/null
+++ b/vendor/built_in_modules/personal_lab/app/controllers/panel/personal_lab/desktop/personal_labs_controller.rb
@@ -0,0 +1,71 @@
+class Panel::PersonalLab::Desktop::PersonalLabsController < ApplicationController
+
+ def index
+ @labs = Lab.where(create_user_id: current_user.id)
+ @view_by = params[:view]
+ page = params[:page]
+ page ||= 1
+
+ @per_column = 5
+
+ case @view_by
+ when "abstract"
+ @per_column = 1
+ when "file"
+ @per_column = 2
+ end
+
+ if @view_by.nil?
+ @view_by = " "
+ @labs = @labs.asc(:paper_title)
+ else
+ @labs = @labs.asc(@view_by).asc(:paper_title)
+ end
+ @labs = @labs.page(page).per(50)
+ respond_to do |format|
+ format.html { render :layout => false}
+ end
+ end
+
+ def new
+ @lab = Lab.new
+ render :layout => false
+ end
+
+ def create
+ params[:lab][:create_user_id] = current_user.id
+ @lab = Lab.new(params[:lab])
+ if @lab.save
+ render json: {success: true, msg: t('create_success')}.to_json
+ else
+ error_msg = @lab.errors.full_messages.join("
")
+ render json: {success: false, msg: error_msg}.to_json
+ end
+ end
+
+ def edit
+ @lab = Lab.find(params[:id])
+ render :layout => false
+ end
+
+ def update
+ params[:lab][:create_user_id] = current_user.id
+ @lab = Lab.new(params[:lab])
+ if @lab.update_attributes(params[:lab])
+ render json: {success: true, msg: t('create_success')}.to_json
+ else
+ error_msg = @lab.errors.full_messages.join("
")
+ render json: {success: false, msg: error_msg}.to_json
+ end
+ end
+
+ def destroy
+ @lab = Lab.find(params[:id])
+ @lab.destroy
+ render :json => {success: true, msg: t('delete_success')}
+ end
+
+ def lab_window
+ render :layout => false
+ end
+end
\ No newline at end of file
diff --git a/vendor/built_in_modules/personal_lab/app/helpers/panel/personal_lab/desktop/personal_labs_helper.rb b/vendor/built_in_modules/personal_lab/app/helpers/panel/personal_lab/desktop/personal_labs_helper.rb
new file mode 100644
index 00000000..2343bfd7
--- /dev/null
+++ b/vendor/built_in_modules/personal_lab/app/helpers/panel/personal_lab/desktop/personal_labs_helper.rb
@@ -0,0 +1,96 @@
+module Panel::PersonalLab::Desktop::PersonalLabsHelper
+ def publication_record publication, view
+ content_tag :li,
+ "item" => "true",
+ :class => "list_t_item" do
+ marker + \
+ content(publication, view) + \
+ edit_or_delete(publication)
+ end
+ end
+
+ def marker
+ content_tag :div,
+ :class => "list_item_action" do
+ content_tag(:a, "",:href=>"",
+ :class => "icon-check-empty",
+ "toggle-onclick"=>"icon-check-empty icon-check",
+ "ajax-remote"=>"false") + \
+ content_tag(:a, "",:href=>"",
+ :class => "icon-star-empty",
+ "toggle-onclick"=>"icon-star-empty icon-star",
+ "ajax-remote"=>"false")
+ end
+ end
+
+ def content publication, view
+ case view
+ when "lab_title"
+ des = content_tag(:div, publication.lab_title,
+ :class => "list_t_des")
+ when "keywords"
+ des = content_tag(:div, publication.keywords,
+ :class => "list_t_des")
+ when "location"
+ des = content_tag(:div, publication.location,
+ :class => "list_t_des")
+ when "file"
+ des = content_tag(:div, link_publication_file(publication),
+ :class => "list_t_des")
+ else
+ end
+
+ content_tag(:div, publication.lab_title,
+ :class => "list_t_title") + 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_lab_desktop_personal_lab_path(publication),
+ "callback-method" => "editlab",
+ "ajax-remote" => "get") + \
+ content_tag(:a, t(:delete_),
+ "ajax-remote" => "delete",
+ "confirm-message" => t("sure?"),
+ "callback-method" => "labDelete",
+ :class => "journal_paper_delete admbg2 admtxt",
+ :href => panel_personal_lab_desktop_personal_lab_path(publication))
+ end
+ end
+
+ def link_publication_file publication
+ publication.lab_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
+
+ def generate_authors_name ids
+ author_name = ids.map{|m|
+ if m == "0"
+ #{:id => 0, :text => current_user.name, :email => current_user.email }
+ {:id => 0, :text => current_user.name }
+ else
+ #{:id => m, :text => ConferenceCoAuthor.find(m).co_author, :email => ConferenceCoAuthor.find(m).email}
+ {:id => m, :text => ConferenceCoAuthor.find(m).co_author}
+ end
+ }
+ author_name.to_json
+ end
+end
diff --git a/vendor/built_in_modules/personal_lab/app/views/panel/personal_lab/desktop/personal_labs/_form.html.erb b/vendor/built_in_modules/personal_lab/app/views/panel/personal_lab/desktop/personal_labs/_form.html.erb
new file mode 100644
index 00000000..2b39c9a6
--- /dev/null
+++ b/vendor/built_in_modules/personal_lab/app/views/panel/personal_lab/desktop/personal_labs/_form.html.erb
@@ -0,0 +1,141 @@
+
+
+
\ No newline at end of file
diff --git a/vendor/built_in_modules/personal_lab/app/views/panel/personal_lab/desktop/personal_labs/_form_file.html.erb b/vendor/built_in_modules/personal_lab/app/views/panel/personal_lab/desktop/personal_labs/_form_file.html.erb
new file mode 100644
index 00000000..646677d4
--- /dev/null
+++ b/vendor/built_in_modules/personal_lab/app/views/panel/personal_lab/desktop/personal_labs/_form_file.html.erb
@@ -0,0 +1,33 @@
+
" class="list_item">
+
+
+ <% if form_file.new_record? %>
+ <%= f.file_field :file, class: "s_grid_2" %>
+ <% end %>
+
+ |
+
+ <%= f.text_field :title, :class => 's_grid_4' %>
+ |
+
+ <%= f.fields_for :file_title_translations do |f| %>
+ <%= f.text_field locale,
+ class: 's_grid_4',
+ value: (form_file.file_title_translations[locale] rescue nil) %>
+ <% end %>
+ |
+
+
+
+ <% if form_file.new_record? %>
+
+ <% else %>
+ <%= f.hidden_field :id %>
+
+ <%= 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)} ) : '' %>
+
+ |
+
+
diff --git a/vendor/built_in_modules/personal_lab/app/views/panel/personal_lab/desktop/personal_labs/edit.html.erb b/vendor/built_in_modules/personal_lab/app/views/panel/personal_lab/desktop/personal_labs/edit.html.erb
new file mode 100644
index 00000000..d150519e
--- /dev/null
+++ b/vendor/built_in_modules/personal_lab/app/views/panel/personal_lab/desktop/personal_labs/edit.html.erb
@@ -0,0 +1,3 @@
+<%= form_for @lab, html: { multipart: true, "form-type"=>"ajax_form", "callback-method"=>"formCallback"}, url: panel_personal_lab_desktop_personal_labs_path(@lab) do |f| %>
+ <%= render partial: 'form', locals: {:f => f} %>
+<%end%>
diff --git a/vendor/built_in_modules/personal_lab/app/views/panel/personal_lab/desktop/personal_labs/index.html.erb b/vendor/built_in_modules/personal_lab/app/views/panel/personal_lab/desktop/personal_labs/index.html.erb
new file mode 100644
index 00000000..bbe76633
--- /dev/null
+++ b/vendor/built_in_modules/personal_lab/app/views/panel/personal_lab/desktop/personal_labs/index.html.erb
@@ -0,0 +1,83 @@
+
+
+ <% @labs.each do |w| %>
+ <%= publication_record w, @view_by%>
+ <% end %>
+
\ No newline at end of file
diff --git a/app/views/desktop/research_p.html.erb b/vendor/built_in_modules/personal_lab/app/views/panel/personal_lab/desktop/personal_labs/lab_window.html.erb
similarity index 55%
rename from app/views/desktop/research_p.html.erb
rename to vendor/built_in_modules/personal_lab/app/views/panel/personal_lab/desktop/personal_labs/lab_window.html.erb
index 68fbf4cc..6d1e6ba7 100644
--- a/app/views/desktop/research_p.html.erb
+++ b/vendor/built_in_modules/personal_lab/app/views/panel/personal_lab/desktop/personal_labs/lab_window.html.erb
@@ -1,8 +1,10 @@
-
+<%= stylesheet_link_tag "/assets/personal_lab/desktop/personal_lab" %>
+<%= javascript_include_tag "personal_lab/desktop/personal_lab" %>
+
\ No newline at end of file
diff --git a/vendor/built_in_modules/personal_project/config/locales/en.yml b/vendor/built_in_modules/personal_project/config/locales/en.yml
index 63c14b99..251281d7 100644
--- a/vendor/built_in_modules/personal_project/config/locales/en.yml
+++ b/vendor/built_in_modules/personal_project/config/locales/en.yml
@@ -1,4 +1,56 @@
en:
-
module_name:
- personal_project: Project
\ No newline at end of file
+ personal_project: "Project"
+ personal_project:
+ project_title : "Project Title"
+ job_title : "Job Title"
+ participator : "Participartor"
+ project_category : "Project Category"
+ end_date : "End Date"
+ start_date : "Start Date"
+ extracted_chapters : "Extracted Chapters"
+ unit : "Unit"
+ publishers : "Publishers"
+ authors : "Authors"
+ tags : "Tags"
+ year : "Year"
+ language : "Language"
+ isbn : "ISSN(ISBN)"
+ vol_no : "Vol.No"
+ issue_no : "Issue.No"
+ form_to_start : "From"
+ form_to_end : "To"
+ total_pages : "Total Pages"
+ keywords : "Keywords"
+ abstract : "Abstract"
+ publication_date : "Date of Publication"
+ url : "Reference URL"
+ note : "Note"
+ level_type : "Level Type"
+ author_type : "Author Type"
+ from : "From"
+ to : "To"
+ file : "File"
+ file_name : "File name"
+ description : "File Description"
+ pages : "Pages"
+ book_paper_type : "Book Paper Type"
+
+ create_success : "Successfully Create"
+ update_success : "Successfully Update"
+ delete_success : "Successfully Delete"
+ add: "Add"
+ back: "Back"
+ delete: "Delete"
+ edit: "Edit"
+ nothing: "Nothing"
+ show: "Show"
+ sure?: "Are you sure?"
+ update: "Update"
+ yes_: "Yes"
+ no_: "No"
+ cancel : "Cancel"
+ save: "save"
+ hintText: "Type in a search term"
+ noResultsText: "No results"
+ searchingText: "Searching…"
diff --git a/vendor/built_in_modules/personal_project/config/locales/zh_tw.yml b/vendor/built_in_modules/personal_project/config/locales/zh_tw.yml
index 8c70b557..25b48eda 100644
--- a/vendor/built_in_modules/personal_project/config/locales/zh_tw.yml
+++ b/vendor/built_in_modules/personal_project/config/locales/zh_tw.yml
@@ -1,4 +1,56 @@
zh_tw:
-
module_name:
- personal_project: 研究計畫
+ personal_project: 期刊著作
+ personal_project:
+ project_title : "Project Title"
+ job_title : "Job Title"
+ participator : "Participartor"
+ extracted_chapters : "Extracted Chapters"
+ project_category : "Project Category"
+ end_date : "End Date"
+ start_date : "Start Date"
+ unit : "Unit"
+ publishers : "Publishers"
+ authors : "作者"
+ tags : "領域"
+ year : "年度"
+ language : "語言"
+ isbn : "ISSN(ISBN)"
+ vol_no : "卷數"
+ issue_no : "期數"
+ form_to_start : "起"
+ form_to_end : "訖"
+ total_pages : "總頁數"
+ keywords : "關鍵字"
+ abstract : "摘要"
+ publication_date : "發表日期"
+ url : "參考連結"
+ note : "記事"
+ level_type : "期刊類別"
+ author_type : "作者類別"
+ from : "起"
+ to : "訖"
+ file : "檔案"
+ file_name : "檔案名稱"
+ description : "描述"
+ pages : "Pages"
+ book_paper_type : "Book Paper Type"
+
+ create_success : "新增完成!!"
+ update_success : "更新完成!!"
+ delete_success : "刪除成功!!"
+ add: "新增"
+ back: "返回"
+ delete: "刪除"
+ edit: "編輯"
+ nothing: "無"
+ show: "顯示"
+ sure?: "您肯定嗎?"
+ update: "更新"
+ yes_: "是"
+ no_: "否"
+ cancel : "取消"
+ save: "儲存"
+ hintText: "請輸入搜尋關鍵字"
+ noResultsText: "沒有相關的比對結果"
+ searchingText: "搜尋中…"
diff --git a/vendor/built_in_modules/personal_project/config/routes.rb b/vendor/built_in_modules/personal_project/config/routes.rb
index 7ab5843c..907cf3de 100644
--- a/vendor/built_in_modules/personal_project/config/routes.rb
+++ b/vendor/built_in_modules/personal_project/config/routes.rb
@@ -2,6 +2,10 @@ Rails.application.routes.draw do
namespace :panel do
namespace :personal_project do
+ namespace :desktop do
+ match "project_window" => "personal_projects#project_window"
+ resources :personal_projects
+ end
namespace :back_end do
match 'project_setting' => "projects#project_setting" ,:as => :project_setting
diff --git a/vendor/built_in_modules/personal_research/app/assets/javascripts/personal_research/desktop/personal_research.js b/vendor/built_in_modules/personal_research/app/assets/javascripts/personal_research/desktop/personal_research.js
new file mode 100644
index 00000000..35a64eee
--- /dev/null
+++ b/vendor/built_in_modules/personal_research/app/assets/javascripts/personal_research/desktop/personal_research.js
@@ -0,0 +1,158 @@
+orbitDesktop.prototype.initializePersonalResearch = function(target,url,cache){ // this init journal papers
+ this.initializePersonalResearch.formCallback = function(data){
+ if(data.success){
+ o.notify(data.msg,"success");
+ o.sub_menu_item($("div[content-type=menu] a").eq(0));
+ }else{
+ o.notify(data.msg,"alert");
+ }
+ }
+
+ this.initializePersonalResearch.list = function(){ // to open list part in journal papers page
+ var journalData;
+ var bindHandlers = function(){ // to bind handlers for list page
+
+ }
+ bindHandlers();
+
+ var bindSecondaryHandlers = function(){
+ $("#journal_p div#paper_list a.icon-check-empty").click(function(){
+ if($(this).hasClass("icon-check-empty")){
+ $(this).switchClass("icon-check-empty","icon-check",0);
+ } else if($(this) .hasClass("icon-check")) {
+ $(this).switchClass("icon-check","icon-check-empty",0);
+ } else if($(this).hasClass("icon-star")){
+ $(this).removeClass("icon-star").addClass("icon-star-empty");
+ } else if($(this).hasClass("icon-star-empty")){
+ $(this).removeClass("icon-star-empty").addClass("icon-star");
+ }
+ return false;
+ })
+ }
+ }
+ this.initializePersonalResearch.researchDelete = function(data,dom){
+ var parent = dom.parent().parent();
+ if(data.success){
+ parent.hide("slide",function(){parent.remove();});
+ o.notify(data.msg,"success");
+ }
+ }
+
+ this.initializePersonalResearch.cancelresearch = function(){
+ o.highlight_sub_menu_item(0);
+ }
+
+ this.initializePersonalResearch.editresearch = function(){
+ o.highlight_sub_menu_item(1);
+ var uploadFiles = function(){
+ $('#add_plugin_file a.add').click(function(){
+ var new_id = $(this).prev().attr('value');
+ var old_id = new RegExp("new_writing_journal_files", "g");
+ $(this).prev().attr('value', parseInt(new_id) + 1);
+ var x = get_html(old_id,new_id);
+ var newfield = $(x);
+ $(this).parents('table').append(newfield);
+ newfield.find('.action a.delete').click(function(){
+ newfield.remove();
+ });
+ return false;
+ });
+ $('.action a.remove_existing_record').click(function(){
+ $(this).next('.should_destroy').attr('value', 1);
+ $("tr#add_plugin_file_" + $(this).prev().attr('value')).hide();
+ });
+ }
+
+
+ var preData = function(){
+ $("#writing_journal_author_tokens").select2('data', JSON.parse($("#writing_journal_author_tokens").attr('data-pre')));
+ }
+ uploadFiles();
+ // preData();
+ }
+
+ this.initializePersonalResearch.addresearch = function(){ // to open add pages in journal papers page
+ var uploadFiles = function(){
+ $('#add_plugin_file a.add').click(function(){
+ var new_id = $(this).prev().attr('value');
+ var old_id = new RegExp("new_writing_journal_files", "g");
+ $(this).prev().attr('value', parseInt(new_id) + 1);
+ var x = get_html(old_id,new_id);
+ var newfield = $(x);
+ $(this).parents('table').append(newfield);
+ newfield.find('.action a.delete').click(function(){
+ newfield.remove();
+ });
+ return false;
+ });
+ $('.action a.remove_existing_record').click(function(){
+ $(this).next('.should_destroy').attr('value', 1);
+ $("tr#add_plugin_file_" + $(this).prev().attr('value')).hide();
+ });
+ }
+
+ // console.log("hi");
+ var bindHandlers = function(){
+
+
+ }
+ bindHandlers();
+ uploadFiles();
+
+ }
+
+
+ this.initializePersonalResearch.coAuthorformCallback = function(data){
+ if(data.success){
+ o.notify(data.msg,"success");
+ o.sub_menu_item($("div[content-type=menu] a").eq(3));
+ }else{
+ o.notify(data.msg,"alert");
+ }
+ }
+ this.initializePersonalResearch.coauthor = function(){ // to open add pages in coauthor page
+ var bindHandlers = function(){ // to bind handlers for add page
+
+ }
+ bindHandlers();
+ }
+ this.initializePersonalResearch.coauthorRelationForm = function(data){
+ if(data.success){
+ o.notify(data.msg,"success");
+ $("#co_author_relation_table").html(data.newvalue);
+ }else{
+ o.notify(data.msg,"alert");
+ }
+ }
+ this.initializePersonalResearch.coauthorRelationEditForm = function(data){
+ if(data.success){
+ o.notify(data.msg,"success");
+ var x = o.layout_data.generate_layout_html(data.newvalue);
+ $("div[container=true] div.overview").html(x.markup);
+ }else{
+ o.notify(data.msg,"alert");
+ }
+ }
+ this.initializePersonalResearch.allnone = function(d,o){
+ switch(o.attr("href")){
+ case "all":
+ $("div.overview a.icon-check-empty").removeClass("icon-check-empty").addClass("icon-check");
+ break;
+ case "none":
+ $("div.overview a.icon-check").removeClass("icon-check").addClass("icon-check-empty");
+ break;
+ }
+ }
+ this.initializePersonalResearch.allnone = function(d,o){
+ switch(o.attr("href")){
+ case "all":
+ $("div.overview a.icon-check-empty").removeClass("icon-check-empty").addClass("icon-check");
+ break;
+ case "none":
+ $("div.overview a.icon-check").removeClass("icon-check").addClass("icon-check-empty");
+ break;
+ }
+ }
+};
+
+
diff --git a/vendor/built_in_modules/personal_research/app/assets/stylesheets/personal_research/desktop/personal_research.css b/vendor/built_in_modules/personal_research/app/assets/stylesheets/personal_research/desktop/personal_research.css
new file mode 100644
index 00000000..f0c6ce6e
--- /dev/null
+++ b/vendor/built_in_modules/personal_research/app/assets/stylesheets/personal_research/desktop/personal_research.css
@@ -0,0 +1,115 @@
+/* Books */
+[page-name="books_list"] .list_t_item .inner {
+ padding-left: 30px; }
+[page-name="books_list"] .list_item_action {
+ font-size: 12px;
+ float: left;
+ margin-left: -30px; }
+ [page-name="books_list"] .list_item_action a {
+ display: block;
+ width: 20px;
+ height: 20px;
+ line-height: 20px;
+ margin: 1px 1px 6px 1px; }
+ [page-name="books_list"] .list_item_action .icon-star-empty {
+ color: #999;
+ font-size: 20px; }
+ [page-name="books_list"] .list_item_action .icon-star {
+ color: #faa732;
+ font-size: 20px; }
+ [page-name="books_list"] .list_item_action .icon-check-empty {
+ color: #999;
+ font-size: 20px; }
+ [page-name="books_list"] .list_item_action .icon-check {
+ color: #333;
+ font-size: 20px; }
+[page-name="books_list"] .file_view .list_t_des {
+ overflow: hidden; }
+[page-name="books_list"] .file_view .file {
+ float: left;
+ width: 120px;
+ height: 50px;
+ padding: 6px;
+ margin: 1px;
+ position: relative;
+ -webkit-box-sizing: border-box;
+ /* webkit */
+ -khtml-box-sizing: border-box;
+ /* konqueror */
+ -moz-box-sizing: border-box;
+ /* firefox */
+ -ms-box-sizing: border-box;
+ /* ie */
+ box-sizing: border-box;
+ /* css3 */ }
+ [page-name="books_list"] .file_view .file:hover {
+ background-color: #f7f7f7; }
+ [page-name="books_list"] .file_view .file img {
+ width: 38px;
+ height: 38px;
+ position: absolute;
+ left: 6px;
+ top: 6px; }
+ [page-name="books_list"] .file_view .file .filetitle {
+ display: block;
+ width: 100%;
+ height: 38px;
+ padding-left: 40px;
+ overflow: hidden;
+ -webkit-box-sizing: border-box;
+ /* webkit */
+ -khtml-box-sizing: border-box;
+ /* konqueror */
+ -moz-box-sizing: border-box;
+ /* firefox */
+ -ms-box-sizing: border-box;
+ /* ie */
+ box-sizing: border-box;
+ /* css3 */ }
+
+/* Books Books list */
+[page-name="books_books"] .datalist_item .inner {
+ padding-left: 30px; }
+[page-name="books_books"] .list_item_action {
+ font-size: 12px;
+ float: left;
+ margin-left: -30px; }
+[page-name="books_books"] .list_item_action i {
+ color: #999;
+ font-size: 20px;
+ display: block;
+ width: 20px;
+ height: 20px;
+ line-height: 20px;
+ margin: 1px 1px 6px 1px; }
+[page-name="books_books"] .list_t_desc {
+ font-family: Arial, sans-serif;
+ font-size: 12px;
+ color: #999; }
+
+/* Books Co-Author */
+[page-name="books_coauthor"] .list_t_item {
+ height: 110px; }
+[page-name="books_coauthor"] .list_item_function a {
+ display: inline-block;
+ padding: 4px;
+ font-family: Arial, sans-serif;
+ font-size: 11px;
+ -webkit-text-size-adjust: none; }
+[page-name="books_coauthor"] .info {
+ font-family: Arial, sans-serif; }
+[page-name="books_coauthor"] .info li {
+ margin-bottom: 8px;
+ color: #999; }
+[page-name="books_coauthor"] .info .name {
+ font-size: 18px;
+ line-height: 24px;
+ color: #333; }
+
+/* Books Co-Author Relationship*/
+[page-name="books_coauthor_relation"] .edit_co_author_relation {
+ /*margin-left: -10px;*/ }
+[page-name="books_coauthor_relation"] .form_space {
+ margin-bottom: 10px;
+ font-size: 18px;
+ font-family: Arial, sans-serif; }
diff --git a/vendor/built_in_modules/personal_research/app/assets/stylesheets/personal_research/desktop/personal_research.scss b/vendor/built_in_modules/personal_research/app/assets/stylesheets/personal_research/desktop/personal_research.scss
new file mode 100644
index 00000000..ddafade9
--- /dev/null
+++ b/vendor/built_in_modules/personal_research/app/assets/stylesheets/personal_research/desktop/personal_research.scss
@@ -0,0 +1,123 @@
+@import "desktop-helper";
+
+/* Books */
+[page-name="books_list"] {
+ .list_t_item .inner { padding-left: 30px; }
+ .list_item_action {
+ font-size: 12px;
+ float: left;
+ margin-left: -30px;
+
+ a {
+ display: block;
+ width: 20px;
+ height: 20px;
+ line-height: 20px;
+ margin: 1px 1px 6px 1px;
+ }
+ .icon-star-empty { color: #999; font-size: 20px; }
+ .icon-star { color: #faa732; font-size: 20px; }
+ .icon-check-empty { color: #999; font-size: 20px; }
+ .icon-check { color: #333; font-size: 20px; }
+ }
+
+ .file_view {
+ .list_t_des {
+ overflow: hidden;
+ }
+ .file {
+ float: left;
+ width: 120px;
+ height: 50px;
+ padding: 6px;
+ margin: 1px;
+ position: relative;
+ @include box-sizing;
+
+ &:hover {
+ background-color: lighten($gray, 10%);
+ }
+ img {
+ width: 38px;
+ height: 38px;
+ position: absolute;
+ left: 6px;
+ top: 6px;
+ }
+ .filetitle {
+ display: block;
+ width: 100%;
+ height: 38px;
+ padding-left: 40px;
+ overflow: hidden;
+ @include box-sizing;
+ }
+ }
+ }
+}
+
+/* Books Books list */
+[page-name="books_books"] {
+
+ .datalist_item .inner {
+ padding-left: 30px;
+ }
+ .list_item_action {
+ font-size: 12px;
+ float: left;
+ margin-left: -30px;
+ }
+ .list_item_action i {
+ color: #999;
+ font-size: 20px;
+ display: block;
+ width: 20px;
+ height: 20px;
+ line-height: 20px;
+ margin: 1px 1px 6px 1px;
+ }
+ .list_t_desc {
+ font-family: Arial, sans-serif;
+ font-size: 12px;
+ color: #999;
+ }
+}
+
+/* Books Co-Author */
+[page-name="books_coauthor"] {
+ .list_t_item {
+ height: 110px;
+ }
+ .list_item_function {}
+ .list_item_function a {
+ display: inline-block;
+ padding: 4px;
+ font-family: Arial, sans-serif;
+ font-size: 11px;
+ -webkit-text-size-adjust: none;
+ }
+ .info {
+ font-family: Arial, sans-serif;
+ }
+ .info li {
+ margin-bottom: 8px;
+ color: #999;
+ }
+ .info .name {
+ font-size: 18px;
+ line-height: 24px;
+ color: #333;
+ }
+}
+
+/* Books Co-Author Relationship*/
+[page-name="books_coauthor_relation"]{
+ .edit_co_author_relation {
+ /*margin-left: -10px;*/
+ }
+ .form_space {
+ margin-bottom: 10px;
+ font-size: 18px;
+ font-family: Arial, sans-serif;
+ }
+}
\ No newline at end of file
diff --git a/vendor/built_in_modules/personal_research/app/controllers/panel/personal_research/desktop/personal_researchs_controller.rb b/vendor/built_in_modules/personal_research/app/controllers/panel/personal_research/desktop/personal_researchs_controller.rb
new file mode 100644
index 00000000..f902fa50
--- /dev/null
+++ b/vendor/built_in_modules/personal_research/app/controllers/panel/personal_research/desktop/personal_researchs_controller.rb
@@ -0,0 +1,71 @@
+class Panel::PersonalResearch::Desktop::PersonalResearchsController < ApplicationController
+
+ def index
+ @researches = Research.where(create_user_id: current_user.id)
+ @view_by = params[:view]
+ page = params[:page]
+ page ||= 1
+
+ @per_column = 5
+
+ case @view_by
+ when "abstract"
+ @per_column = 1
+ when "file"
+ @per_column = 2
+ end
+
+ if @view_by.nil?
+ @view_by = " "
+ @researches = @researches.asc(:paper_title)
+ else
+ @researches = @researches.asc(@view_by).asc(:paper_title)
+ end
+ @researches = @researches.page(page).per(50)
+ respond_to do |format|
+ format.html { render :layout => false}
+ end
+ end
+
+ def new
+ @research = Research.new
+ render :layout => false
+ end
+
+ def create
+ params[:research][:create_user_id] = current_user.id
+ @research = Research.new(params[:research])
+ if @research.save
+ render json: {success: true, msg: t('create_success')}.to_json
+ else
+ error_msg = @research.errors.full_messages.join("
")
+ render json: {success: false, msg: error_msg}.to_json
+ end
+ end
+
+ def edit
+ @research = Research.find(params[:id])
+ render :layout => false
+ end
+
+ def update
+ params[:research][:create_user_id] = current_user.id
+ @research = Research.new(params[:research])
+ if @research.update_attributes(params[:research])
+ render json: {success: true, msg: t('create_success')}.to_json
+ else
+ error_msg = @research.errors.full_messages.join("
")
+ render json: {success: false, msg: error_msg}.to_json
+ end
+ end
+
+ def destroy
+ @research = Research.find(params[:id])
+ @research.destroy
+ render :json => {success: true, msg: t('delete_success')}
+ end
+
+ def research_window
+ render :layout => false
+ end
+end
\ No newline at end of file
diff --git a/vendor/built_in_modules/personal_research/app/helpers/panel/personal_research/desktop/personal_researchs_helper.rb b/vendor/built_in_modules/personal_research/app/helpers/panel/personal_research/desktop/personal_researchs_helper.rb
new file mode 100644
index 00000000..204d7c3b
--- /dev/null
+++ b/vendor/built_in_modules/personal_research/app/helpers/panel/personal_research/desktop/personal_researchs_helper.rb
@@ -0,0 +1,96 @@
+module Panel::PersonalResearch::Desktop::PersonalResearchsHelper
+ def publication_record publication, view
+ content_tag :li,
+ "item" => "true",
+ :class => "list_t_item" do
+ marker + \
+ content(publication, view) + \
+ edit_or_delete(publication)
+ end
+ end
+
+ def marker
+ content_tag :div,
+ :class => "list_item_action" do
+ content_tag(:a, "",:href=>"",
+ :class => "icon-check-empty",
+ "toggle-onclick"=>"icon-check-empty icon-check",
+ "ajax-remote"=>"false") + \
+ content_tag(:a, "",:href=>"",
+ :class => "icon-star-empty",
+ "toggle-onclick"=>"icon-star-empty icon-star",
+ "ajax-remote"=>"false")
+ end
+ end
+
+ def content publication, view
+ case view
+ when "research_title"
+ des = content_tag(:div, publication.research_title,
+ :class => "list_t_des")
+ when "keywords"
+ des = content_tag(:div, publication.keywords,
+ :class => "list_t_des")
+ when "extracted_chapters"
+ des = content_tag(:div, publication.extracted_chapters,
+ :class => "list_t_des")
+ when "file"
+ des = content_tag(:div, link_publication_file(publication),
+ :class => "list_t_des")
+ else
+ end
+
+ content_tag(:div, publication.research_title,
+ :class => "list_t_title") + 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_research_desktop_personal_research_path(publication),
+ "callback-method" => "editresearch",
+ "ajax-remote" => "get") + \
+ content_tag(:a, t(:delete_),
+ "ajax-remote" => "delete",
+ "confirm-message" => t("sure?"),
+ "callback-method" => "researchDelete",
+ :class => "journal_paper_delete admbg2 admtxt",
+ :href => panel_personal_research_desktop_personal_research_path(publication))
+ end
+ end
+
+ def link_publication_file publication
+ publication.research_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
+
+ def generate_authors_name ids
+ author_name = ids.map{|m|
+ if m == "0"
+ #{:id => 0, :text => current_user.name, :email => current_user.email }
+ {:id => 0, :text => current_user.name }
+ else
+ #{:id => m, :text => ConferenceCoAuthor.find(m).co_author, :email => ConferenceCoAuthor.find(m).email}
+ {:id => m, :text => ConferenceCoAuthor.find(m).co_author}
+ end
+ }
+ author_name.to_json
+ end
+end
diff --git a/vendor/built_in_modules/personal_research/app/views/panel/personal_research/desktop/personal_researchs/_form.html.erb b/vendor/built_in_modules/personal_research/app/views/panel/personal_research/desktop/personal_researchs/_form.html.erb
new file mode 100644
index 00000000..1c5e969b
--- /dev/null
+++ b/vendor/built_in_modules/personal_research/app/views/panel/personal_research/desktop/personal_researchs/_form.html.erb
@@ -0,0 +1,109 @@
+
+
+
\ No newline at end of file
diff --git a/vendor/built_in_modules/personal_research/app/views/panel/personal_research/desktop/personal_researchs/_form_file.html.erb b/vendor/built_in_modules/personal_research/app/views/panel/personal_research/desktop/personal_researchs/_form_file.html.erb
new file mode 100644
index 00000000..646677d4
--- /dev/null
+++ b/vendor/built_in_modules/personal_research/app/views/panel/personal_research/desktop/personal_researchs/_form_file.html.erb
@@ -0,0 +1,33 @@
+
" class="list_item">
+
+
+ <% if form_file.new_record? %>
+ <%= f.file_field :file, class: "s_grid_2" %>
+ <% end %>
+
+ |
+
+ <%= f.text_field :title, :class => 's_grid_4' %>
+ |
+
+ <%= f.fields_for :file_title_translations do |f| %>
+ <%= f.text_field locale,
+ class: 's_grid_4',
+ value: (form_file.file_title_translations[locale] rescue nil) %>
+ <% end %>
+ |
+
+
+
+ <% if form_file.new_record? %>
+
+ <% else %>
+ <%= f.hidden_field :id %>
+
+ <%= 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)} ) : '' %>
+
+ |
+
+
diff --git a/vendor/built_in_modules/personal_research/app/views/panel/personal_research/desktop/personal_researchs/edit.html.erb b/vendor/built_in_modules/personal_research/app/views/panel/personal_research/desktop/personal_researchs/edit.html.erb
new file mode 100644
index 00000000..082a2aa5
--- /dev/null
+++ b/vendor/built_in_modules/personal_research/app/views/panel/personal_research/desktop/personal_researchs/edit.html.erb
@@ -0,0 +1,3 @@
+<%= form_for @research, html: { multipart: true, "form-type"=>"ajax_form", "callback-method"=>"formCallback"}, url: panel_personal_research_desktop_personal_researchs_path(@personal_book) do |f| %>
+ <%= render partial: 'form', locals: {:f => f} %>
+<%end%>
diff --git a/vendor/built_in_modules/personal_research/app/views/panel/personal_research/desktop/personal_researchs/index.html.erb b/vendor/built_in_modules/personal_research/app/views/panel/personal_research/desktop/personal_researchs/index.html.erb
new file mode 100644
index 00000000..57b48b85
--- /dev/null
+++ b/vendor/built_in_modules/personal_research/app/views/panel/personal_research/desktop/personal_researchs/index.html.erb
@@ -0,0 +1,83 @@
+
+
+ <% @researches.each do |w| %>
+ <%= publication_record w, @view_by%>
+ <% end %>
+
\ No newline at end of file
diff --git a/vendor/built_in_modules/personal_research/app/views/panel/personal_research/desktop/personal_researchs/new.html.erb b/vendor/built_in_modules/personal_research/app/views/panel/personal_research/desktop/personal_researchs/new.html.erb
new file mode 100644
index 00000000..4c680946
--- /dev/null
+++ b/vendor/built_in_modules/personal_research/app/views/panel/personal_research/desktop/personal_researchs/new.html.erb
@@ -0,0 +1,3 @@
+<%= form_for @research, html: { multipart: true, "form-type"=>"ajax_form", "callback-method"=>"formCallback"}, url: panel_personal_research_desktop_personal_researchs_path do |f| %>
+ <%= render partial: 'form', locals: {:f => f} %>
+<%end%>
diff --git a/vendor/built_in_modules/personal_research/app/views/panel/personal_research/desktop/personal_researchs/research_window.html.erb b/vendor/built_in_modules/personal_research/app/views/panel/personal_research/desktop/personal_researchs/research_window.html.erb
new file mode 100644
index 00000000..efbdfb76
--- /dev/null
+++ b/vendor/built_in_modules/personal_research/app/views/panel/personal_research/desktop/personal_researchs/research_window.html.erb
@@ -0,0 +1,35 @@
+<%= stylesheet_link_tag "/assets/personal_research/desktop/personal_research" %>
+<%= javascript_include_tag "personal_research/desktop/personal_research" %>
+
+
\ No newline at end of file
diff --git a/vendor/built_in_modules/personal_research/config/locales/en.yml b/vendor/built_in_modules/personal_research/config/locales/en.yml
index 23b06009..32f0dc88 100644
--- a/vendor/built_in_modules/personal_research/config/locales/en.yml
+++ b/vendor/built_in_modules/personal_research/config/locales/en.yml
@@ -1,4 +1,51 @@
en:
-
module_name:
- personal_research: Research
\ No newline at end of file
+ personal_research: Book
+ personal_research:
+ paper_title : "Paper Title"
+ research_title : "Research Title"
+ extracted_chapters : "Extracted Chapters"
+ publishers : "Publishers"
+ authors : "Authors"
+ tags : "Tags"
+ year : "Year"
+ language : "Language"
+ isbn : "ISSN(ISBN)"
+ vol_no : "Vol.No"
+ issue_no : "Issue.No"
+ form_to_start : "From"
+ form_to_end : "To"
+ total_pages : "Total Pages"
+ keywords : "Keywords"
+ abstract : "Abstract"
+ publication_date : "Date of Publication"
+ url : "Reference URL"
+ note : "Note"
+ level_type : "Level Type"
+ author_type : "Author Type"
+ from : "From"
+ to : "To"
+ file : "File"
+ file_name : "File name"
+ description : "File Description"
+ pages : "Pages"
+ book_paper_type : "Book Paper Type"
+
+ create_success : "Successfully Create"
+ update_success : "Successfully Update"
+ delete_success : "Successfully Delete"
+ add: "Add"
+ back: "Back"
+ delete: "Delete"
+ edit: "Edit"
+ nothing: "Nothing"
+ show: "Show"
+ sure?: "Are you sure?"
+ update: "Update"
+ yes_: "Yes"
+ no_: "No"
+ cancel : "Cancel"
+ save: "save"
+ hintText: "Type in a search term"
+ noResultsText: "No results"
+ searchingText: "Searching…"
diff --git a/vendor/built_in_modules/personal_research/config/locales/zh_tw.yml b/vendor/built_in_modules/personal_research/config/locales/zh_tw.yml
index 1b7a20eb..3a6e8d92 100644
--- a/vendor/built_in_modules/personal_research/config/locales/zh_tw.yml
+++ b/vendor/built_in_modules/personal_research/config/locales/zh_tw.yml
@@ -1,4 +1,51 @@
zh_tw:
-
module_name:
- personal_research: 研究
+ personal_research: 期刊著作
+ personal_research:
+ paper_title : "論文名稱"
+ research_title : "Research Title"
+ extracted_chapters : "Extracted Chapters"
+ publishers : "Publishers"
+ authors : "作者"
+ tags : "領域"
+ year : "年度"
+ language : "語言"
+ isbn : "ISSN(ISBN)"
+ vol_no : "卷數"
+ issue_no : "期數"
+ form_to_start : "起"
+ form_to_end : "訖"
+ total_pages : "總頁數"
+ keywords : "關鍵字"
+ abstract : "摘要"
+ publication_date : "發表日期"
+ url : "參考連結"
+ note : "記事"
+ level_type : "期刊類別"
+ author_type : "作者類別"
+ from : "起"
+ to : "訖"
+ file : "檔案"
+ file_name : "檔案名稱"
+ description : "描述"
+ pages : "Pages"
+ book_paper_type : "Book Paper Type"
+
+ create_success : "新增完成!!"
+ update_success : "更新完成!!"
+ delete_success : "刪除成功!!"
+ add: "新增"
+ back: "返回"
+ delete: "刪除"
+ edit: "編輯"
+ nothing: "無"
+ show: "顯示"
+ sure?: "您肯定嗎?"
+ update: "更新"
+ yes_: "是"
+ no_: "否"
+ cancel : "取消"
+ save: "儲存"
+ hintText: "請輸入搜尋關鍵字"
+ noResultsText: "沒有相關的比對結果"
+ searchingText: "搜尋中…"
diff --git a/vendor/built_in_modules/personal_research/config/routes.rb b/vendor/built_in_modules/personal_research/config/routes.rb
index f9cb8d1c..c753af28 100644
--- a/vendor/built_in_modules/personal_research/config/routes.rb
+++ b/vendor/built_in_modules/personal_research/config/routes.rb
@@ -2,6 +2,10 @@ Rails.application.routes.draw do
namespace :panel do
namespace :personal_research do
+ namespace :desktop do
+ match "research_window" => "personal_researchs#research_window"
+ resources :personal_researchs
+ end
namespace :back_end do
match 'research_setting' => "researchs#research_setting" ,:as => :research_setting