Compare commits
38
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
638ed73d21 | ||
|
|
096aec3406 | ||
|
|
09e0d5bd92 | ||
|
|
1159375de7 | ||
|
|
843775a2c0 | ||
|
|
1021ac2e9b | ||
|
|
ab04070a8e | ||
|
|
5ec011a5ff | ||
|
|
cd8448d447 | ||
|
|
7990d4388c | ||
|
|
367cf67928 | ||
|
|
e7c04c6e6e | ||
|
|
6ac600fb5c | ||
|
|
42dcf0a2d2 | ||
|
|
c35d42d671 | ||
|
|
6fc47d7afd | ||
|
|
79c4cd2075 | ||
|
|
2a41e3440e | ||
|
|
e29b08d0dc | ||
|
|
d5bb2a1889 | ||
|
|
b535f2cf9c | ||
|
|
f2a27c6b40 | ||
|
|
9613a52305 | ||
|
|
dc8815d619 | ||
|
|
b5b416d531 | ||
|
|
f27f96b994 | ||
|
|
cd1d4356fb | ||
|
|
d5357ea63c | ||
|
|
50bb2a870c | ||
|
|
a93945cd45 | ||
|
|
249644e72c | ||
|
|
f16d1908be | ||
|
|
c8be884291 | ||
|
|
6280fdfba0 | ||
|
|
2a9948868f | ||
|
|
e4514a353a | ||
|
|
d2a07d9ffb | ||
|
|
93909eeca0 |
No files matched your search
Binary file not shown.
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 2.0 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.0 KiB |
@@ -226,7 +226,7 @@ var orbitDesktop = function(dom){
|
|||||||
|
|
||||||
this.bindDesktopEvents = function(){ //this function will bind the global handlers to thd desktop, for example doc
|
this.bindDesktopEvents = function(){ //this function will bind the global handlers to thd desktop, for example doc
|
||||||
$(".docklist a").click(function(){
|
$(".docklist a").click(function(){
|
||||||
if( !$( this ).parent().hasClass( 'disable' ) )
|
if( !$( this ).hasClass( 'disable' ) )
|
||||||
o.menu_item($(this));
|
o.menu_item($(this));
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ legend {
|
|||||||
}
|
}
|
||||||
#sidebar .sidebar-nav > li i {
|
#sidebar .sidebar-nav > li i {
|
||||||
font-size: 1.6em;
|
font-size: 1.6em;
|
||||||
line-height: 45px;
|
line-height: 60px;
|
||||||
}
|
}
|
||||||
#sidebar .sidebar-nav > li.active i {
|
#sidebar .sidebar-nav > li.active i {
|
||||||
font-size: 2.2em;
|
font-size: 2.2em;
|
||||||
@@ -621,8 +621,8 @@ legend {
|
|||||||
margin-bottom: 25px;
|
margin-bottom: 25px;
|
||||||
}
|
}
|
||||||
.sign-in .btn {
|
.sign-in .btn {
|
||||||
padding: 4px 0;
|
|
||||||
display: block;
|
display: block;
|
||||||
|
padding: 4px 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
@@ -650,7 +650,7 @@ legend {
|
|||||||
.sign-in .checkbox {
|
.sign-in .checkbox {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
bottom: 37px;
|
bottom: 47px;
|
||||||
}
|
}
|
||||||
.sign-in .switchboard {
|
.sign-in .switchboard {
|
||||||
color: #08C;
|
color: #08C;
|
||||||
|
|||||||
@@ -2,16 +2,17 @@
|
|||||||
top: 0px;
|
top: 0px;
|
||||||
left: -10px;
|
left: -10px;
|
||||||
right: -10px;
|
right: -10px;
|
||||||
height: 40px;
|
|
||||||
z-index: 1041;
|
z-index: 1041;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
|
height: 40px;
|
||||||
}
|
}
|
||||||
#orbit-bar .orbitlogo {
|
#orbit-bar .orbitlogo {
|
||||||
width: 20px;
|
width: 50px;
|
||||||
height: 20px;
|
height: 40px;
|
||||||
|
padding: 0!important;
|
||||||
background-size: 70%;
|
background-size: 70%;
|
||||||
display: inline-block;
|
display: block;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-image: url(<%= asset_path 'orbit-logo.svg' %>);
|
background-image: url(<%= asset_path 'orbit-logo.svg' %>);
|
||||||
@@ -19,8 +20,23 @@
|
|||||||
/* For Suck IE */
|
/* For Suck IE */
|
||||||
background-image: url(<%= asset_path 'orbit-logo.png' %>)\9;
|
background-image: url(<%= asset_path 'orbit-logo.png' %>)\9;
|
||||||
}
|
}
|
||||||
|
#orbit-bar .dropdown-menu li > a {
|
||||||
|
padding: 0 20px;
|
||||||
|
display: block;
|
||||||
|
height: 30px;
|
||||||
|
line-height: 30px;
|
||||||
|
}
|
||||||
|
#orbit-bar .dropdown-menu li i {
|
||||||
|
float: left;
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 5px;
|
||||||
|
line-height: 30px;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
#orbit-bar.navbar .nav > li > a {
|
#orbit-bar.navbar .nav > li > a {
|
||||||
color: #EEE;
|
color: #EEE;
|
||||||
|
padding: 0 15px;
|
||||||
|
display: block;
|
||||||
text-shadow: 0 -1px 0 #000;
|
text-shadow: 0 -1px 0 #000;
|
||||||
border-right: 1px solid #363636;
|
border-right: 1px solid #363636;
|
||||||
box-shadow: 1px 0px 0px rgba(0, 0, 0, 0.3);
|
box-shadow: 1px 0px 0px rgba(0, 0, 0, 0.3);
|
||||||
@@ -34,6 +50,11 @@
|
|||||||
background-color: #0095CF;
|
background-color: #0095CF;
|
||||||
text-shadow: 0 -1px 0 #014380;
|
text-shadow: 0 -1px 0 #014380;
|
||||||
}
|
}
|
||||||
|
#orbit-bar.navbar .nav > li > a > [class^="icon"],
|
||||||
|
#orbit-bar.navbar .nav > li > a > [class*=" icon"] {
|
||||||
|
line-height: 40px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
#orbit-bar.navbar .nav li.dropdown.open > .dropdown-toggle,
|
#orbit-bar.navbar .nav li.dropdown.open > .dropdown-toggle,
|
||||||
#orbit-bar.navbar .nav li.dropdown.active > .dropdown-toggle,
|
#orbit-bar.navbar .nav li.dropdown.active > .dropdown-toggle,
|
||||||
#orbit-bar.navbar .nav li.dropdown.open.active > .dropdown-toggle {
|
#orbit-bar.navbar .nav li.dropdown.open.active > .dropdown-toggle {
|
||||||
@@ -41,9 +62,7 @@
|
|||||||
text-shadow: 0 -1px 0 #014380;
|
text-shadow: 0 -1px 0 #014380;
|
||||||
}
|
}
|
||||||
#orbit-bar .navbar-inner {
|
#orbit-bar .navbar-inner {
|
||||||
height: 40px;
|
|
||||||
border-width: 0;
|
border-width: 0;
|
||||||
min-height: 40px;
|
|
||||||
background-color: #333333;
|
background-color: #333333;
|
||||||
-webkit-border-radius: 0px;
|
-webkit-border-radius: 0px;
|
||||||
-moz-border-radius: 0px;
|
-moz-border-radius: 0px;
|
||||||
@@ -66,6 +85,10 @@
|
|||||||
right: auto;
|
right: auto;
|
||||||
bottom: auto;
|
bottom: auto;
|
||||||
}
|
}
|
||||||
|
#orbit-bar .nav > li {
|
||||||
|
display: block;
|
||||||
|
line-height: 40px;
|
||||||
|
}
|
||||||
#orbit-bar .nav [class^="icon"],
|
#orbit-bar .nav [class^="icon"],
|
||||||
#orbit-bar .nav [class*=" icon"] {
|
#orbit-bar .nav [class*=" icon"] {
|
||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
@@ -92,17 +115,45 @@
|
|||||||
#orbit-bar .modal .input-prepend {
|
#orbit-bar .modal .input-prepend {
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
}
|
}
|
||||||
|
#orbit-bar .modal .other-sign-in {
|
||||||
|
position: relative;
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 20px;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
border-bottom: 1px solid #EDEDED;
|
||||||
|
}
|
||||||
|
#orbit-bar .modal .other-sign-in .btn {
|
||||||
|
padding: 4px 0;
|
||||||
|
display: block;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
#orbit-bar .modal .other-sign-in p {
|
||||||
|
position: absolute;
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
background-color: #FFF;
|
||||||
|
padding: 0 10px;
|
||||||
|
margin-bottom: 0;
|
||||||
|
margin-left: -25px;
|
||||||
|
line-height: 30px;
|
||||||
|
left: 50%;
|
||||||
|
bottom: -15px;
|
||||||
|
font-size: 1.3em;
|
||||||
|
color: #B1B1B1;
|
||||||
|
}
|
||||||
|
|
||||||
/*Search*/
|
/*Search*/
|
||||||
#orbit-bar #search {
|
#orbit-bar #search {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 8px 10px 0;
|
padding: 0 10px;
|
||||||
border-right: 1px solid #363636;
|
border-right: 1px solid #363636;
|
||||||
box-shadow: 1px 0px 0px rgba(0, 0, 0, 0.3);
|
box-shadow: 1px 0px 0px rgba(0, 0, 0, 0.3);
|
||||||
}
|
}
|
||||||
#orbit-bar #search form {
|
#orbit-bar #search form {
|
||||||
margin-bottom: 8px;
|
margin: 8px 0;
|
||||||
}
|
}
|
||||||
#orbit-bar #search input[type="text"] {
|
#orbit-bar #search input[type="text"] {
|
||||||
height: 14px;
|
height: 14px;
|
||||||
@@ -110,6 +161,7 @@
|
|||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
padding-left: 25px;
|
padding-left: 25px;
|
||||||
padding-right: 25px;
|
padding-right: 25px;
|
||||||
|
display: block;
|
||||||
-webkit-border-radius: 12px;
|
-webkit-border-radius: 12px;
|
||||||
-moz-border-radius: 12px;
|
-moz-border-radius: 12px;
|
||||||
-o-border-radius: 12px;
|
-o-border-radius: 12px;
|
||||||
@@ -122,15 +174,16 @@
|
|||||||
#orbit-bar #search .search-clear {
|
#orbit-bar #search .search-clear {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
color: #A3A3A3;
|
color: #A3A3A3;
|
||||||
top: 14px;
|
top: 16px;
|
||||||
}
|
}
|
||||||
#orbit-bar #search .icon-search {
|
#orbit-bar #search .icon-search {
|
||||||
left: 13px;
|
left: 15px;
|
||||||
top: 15px;
|
|
||||||
font-size: 1.2em;
|
font-size: 1.2em;
|
||||||
|
width: 1.25em;
|
||||||
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
#orbit-bar #search .search-clear {
|
#orbit-bar #search .search-clear {
|
||||||
right: 14px;
|
right: 13px;
|
||||||
font-size: 1.3em;
|
font-size: 1.3em;
|
||||||
}
|
}
|
||||||
#orbit-bar #search .search-clear:hover {
|
#orbit-bar #search .search-clear:hover {
|
||||||
|
|||||||
@@ -21,14 +21,10 @@
|
|||||||
}
|
}
|
||||||
.form_fix {
|
.form_fix {
|
||||||
textarea {
|
textarea {
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
}
|
}
|
||||||
input[type="text"] {
|
input {
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
input[type="text"] + input {
|
|
||||||
margin-top: 12px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// fixed width column with 12px gutter
|
// fixed width column with 12px gutter
|
||||||
|
|||||||
@@ -0,0 +1,579 @@
|
|||||||
|
# encoding: utf-8
|
||||||
|
|
||||||
|
require 'net/http'
|
||||||
|
require 'open-uri'
|
||||||
|
|
||||||
|
class Admin::ImportDataController < OrbitBackendController
|
||||||
|
helper Admin::PagePartsHelper
|
||||||
|
include Admin::FrontendWidgetInterface
|
||||||
|
|
||||||
|
def get_teacher_data
|
||||||
|
uri = URI("https://localhost:8000/teachers.xml")
|
||||||
|
|
||||||
|
#params = {"UnitName" => "管理學院".encode('big5-uao'), "account" => "manage"}
|
||||||
|
#uri.query = URI.encode_www_form(params)
|
||||||
|
res = Net::HTTP.get_response(uri)
|
||||||
|
|
||||||
|
@teacher_data = Hash.from_xml(res.body)
|
||||||
|
@teachers = @teacher_data["objects"]
|
||||||
|
@i = 5000
|
||||||
|
@teachers.each do |hash|
|
||||||
|
# @roles = Role.skip(1).first
|
||||||
|
@roles = Role.all
|
||||||
|
@teacher = User.new
|
||||||
|
I18n.locale = :zh_tw
|
||||||
|
if !hash['teacher_zh_tw'].blank?
|
||||||
|
@teacher.first_name = hash['teacher_zh_tw']
|
||||||
|
elsif hash['teacher_zh_tw'].blank? && !hash['teacher_en'].blank?
|
||||||
|
@teacher.first_name = hash['teacher_en']
|
||||||
|
elsif hash['teacher_zh_tw'].blank? && hash['teacher_en'].blank?
|
||||||
|
@teacher.first_name = "Please Fill the Name"
|
||||||
|
end
|
||||||
|
|
||||||
|
I18n.locale = :en
|
||||||
|
if !hash['teacher_en'].blank?
|
||||||
|
@teacher.first_name = hash['teacher_en']
|
||||||
|
elsif hash['teacher_en'].blank? && !hash['teacher_zh_tw'].blank?
|
||||||
|
@teacher.first_name = hash['teacher_zh_tw']
|
||||||
|
elsif hash['teacher_en'].blank? && hash['teacher_zh_tw'].blank?
|
||||||
|
@teacher.first_name = "Please Fill the Name"
|
||||||
|
end
|
||||||
|
|
||||||
|
#@teacher.first_name = hash['teacher_en']
|
||||||
|
@teacher.ntu_seq = hash['ntu_seq']
|
||||||
|
@teacher.sid = hash['ntu_seq']
|
||||||
|
@teacher.role_ids = ["#{@roles.skip(1).first.id}"]
|
||||||
|
@teacher.password = "testpass"
|
||||||
|
@i += 10
|
||||||
|
if !hash['email'].blank?
|
||||||
|
@user = User.where(email: "#{hash['email']}")
|
||||||
|
if @user.length == 0
|
||||||
|
@teacher.email = hash['email']
|
||||||
|
elsif @user.length > 0
|
||||||
|
@teacher.email = "#{@i}duplicate@ntu.edu.tw"
|
||||||
|
end
|
||||||
|
else
|
||||||
|
@teacher.email = "#{@i}@ntu.edu.tw"
|
||||||
|
end
|
||||||
|
|
||||||
|
if hash['teacher_zh_tw'].blank? && hash['teacher_en'].blank?
|
||||||
|
@teacher.user_id = "defaultuser"
|
||||||
|
elsif hash['teacher_en'].blank?
|
||||||
|
@teacher.user_id = hash['teacher_zh_tw']
|
||||||
|
elsif hash['teacher_zh_tw']
|
||||||
|
@teacher.user_id = hash['teacher_en']
|
||||||
|
end
|
||||||
|
@teacher.save!
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def get_book_data
|
||||||
|
uri = URI("http://ann.cc.ntu.edu.tw/Achv/xmlTeacherData.asp")
|
||||||
|
params = {"UnitName" => "管理學院".encode('big5-uao'), "account" => "manage"}
|
||||||
|
uri.query = URI.encode_www_form(params)
|
||||||
|
res = Net::HTTP.get_response(uri)
|
||||||
|
|
||||||
|
teachers = User.all
|
||||||
|
|
||||||
|
teachers.each do |hash|
|
||||||
|
if hash.ntu_seq.present?
|
||||||
|
ntu_seq = hash.ntu_seq
|
||||||
|
books_xml = Nokogiri::XML( \
|
||||||
|
open("http://ann.cc.ntu.edu.tw/Achv/xmlBook.asp?Seq=#{ntu_seq}"))
|
||||||
|
@books = books_xml.xpath("//Book").map do |book_node|
|
||||||
|
{
|
||||||
|
author: (book_node>"Authors").text,
|
||||||
|
year: (book_node>"PublishYear").text,
|
||||||
|
title: (book_node>"DocTitle").text,
|
||||||
|
remarks: (book_node>"Remarks").text,
|
||||||
|
publisher: (book_node>"Publisher").text,
|
||||||
|
book_title: (book_node>"BookTitle").text
|
||||||
|
}
|
||||||
|
end
|
||||||
|
if @books.present?
|
||||||
|
@books.each do |b|
|
||||||
|
@book = WritingBook.new
|
||||||
|
I18n.locale = :zh_tw
|
||||||
|
@book.authors = b[:author]
|
||||||
|
@book.paper_title = b[:title]
|
||||||
|
@book.book_title = b[:book_title]
|
||||||
|
@book.note = b[:remarks]
|
||||||
|
@book.publisher = b[:publisher]
|
||||||
|
I18n.locale = :en
|
||||||
|
@book.authors = b[:author]
|
||||||
|
@book.paper_title = b[:title]
|
||||||
|
@book.book_title = b[:book_title]
|
||||||
|
@book.note = b[:remarks]
|
||||||
|
@book.publisher = b[:publisher]
|
||||||
|
@book.year = b[:year]
|
||||||
|
@book.create_user_id = hash.id
|
||||||
|
@book.save
|
||||||
|
end
|
||||||
|
else
|
||||||
|
puts "No books by Teacher"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def get_conference_data
|
||||||
|
uri = URI("http://ann.cc.ntu.edu.tw/Achv/xmlTeacherData.asp")
|
||||||
|
params = {"UnitName" => "管理學院".encode('big5-uao'), "account" => "manage"}
|
||||||
|
uri.query = URI.encode_www_form(params)
|
||||||
|
res = Net::HTTP.get_response(uri)
|
||||||
|
|
||||||
|
teachers = User.all
|
||||||
|
|
||||||
|
teachers.each do |hash|
|
||||||
|
if hash.ntu_seq.present?
|
||||||
|
ntu_seq = hash.ntu_seq
|
||||||
|
conference_xml = Nokogiri::XML( \
|
||||||
|
open("http://ann.cc.ntu.edu.tw/Achv/xmlPaper.asp?Seq=#{ntu_seq}&type=C"))
|
||||||
|
#open("http://versatile.management.ntu.edu.tw/publication1/conference/#{ntuseq}.xml"))
|
||||||
|
@conference_papers = conference_xml.xpath("//Paper").map do |cp_node|
|
||||||
|
{
|
||||||
|
author: (cp_node>"Authors").text,
|
||||||
|
year: (cp_node>"PublishYear").text,
|
||||||
|
title: (cp_node>"PaperTitle").text,
|
||||||
|
conference: (cp_node>"PublishOn").text,
|
||||||
|
date: Date::MONTHNAMES[(cp_node>"PublishMonth").text.to_i],
|
||||||
|
location: "#{(cp_node>"Country").text} #{(cp_node>"location").text}",
|
||||||
|
conference_title: (cp_node>"PublishOn").text,
|
||||||
|
remarks: (cp_node>"Remarks").text
|
||||||
|
}
|
||||||
|
end
|
||||||
|
if @conference_papers.present?
|
||||||
|
@conference_papers.each do |b|
|
||||||
|
@conference_paper = WritingConference.new
|
||||||
|
I18n.locale = :zh_tw
|
||||||
|
@conference_paper.authors = b[:author]
|
||||||
|
if b[:title].blank?
|
||||||
|
@conference_paper.paper_title = "No Title Present"
|
||||||
|
else
|
||||||
|
@conference_paper.paper_title = b[:title]
|
||||||
|
end
|
||||||
|
if b[:conference_title].blank?
|
||||||
|
@conference_paper.conference_title = "No Title Present"
|
||||||
|
else
|
||||||
|
@conference_paper.conference_title = b[:conference_title]
|
||||||
|
end
|
||||||
|
|
||||||
|
@conference_paper.note = b[:remarks]
|
||||||
|
I18n.locale = :en
|
||||||
|
@conference_paper.authors = b[:author]
|
||||||
|
if b[:title].blank?
|
||||||
|
@conference_paper.paper_title = "No Title Present"
|
||||||
|
else
|
||||||
|
@conference_paper.paper_title = b[:title]
|
||||||
|
end
|
||||||
|
if b[:conference_title].blank?
|
||||||
|
@conference_paper.conference_title = "No Title Present"
|
||||||
|
else
|
||||||
|
@conference_paper.conference_title = b[:conference_title]
|
||||||
|
end
|
||||||
|
@conference_paper.note = b[:remarks]
|
||||||
|
|
||||||
|
@conference_paper.location = b[:location]
|
||||||
|
@conference_paper.year = b[:year]
|
||||||
|
@conference_paper.create_user_id = hash.id
|
||||||
|
|
||||||
|
@conference_paper.save!
|
||||||
|
end
|
||||||
|
else
|
||||||
|
puts "No conference by Teacher"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
def get_journal_paper_data
|
||||||
|
uri = URI("http://ann.cc.ntu.edu.tw/Achv/xmlTeacherData.asp")
|
||||||
|
params = {"UnitName" => "管理學院".encode('big5-uao'), "account" => "manage"}
|
||||||
|
uri.query = URI.encode_www_form(params)
|
||||||
|
res = Net::HTTP.get_response(uri)
|
||||||
|
|
||||||
|
teachers = User.all
|
||||||
|
|
||||||
|
teachers.each do |hash|
|
||||||
|
if hash.ntu_seq.present?
|
||||||
|
ntu_seq = hash.ntu_seq
|
||||||
|
paper_xml = Nokogiri::XML( \
|
||||||
|
#open("http://versatile.management.ntu.edu.tw/publication1/journal/#{ntuseq}.xml"))
|
||||||
|
open("http://ann.cc.ntu.edu.tw/Achv/xmlPaper.asp?Seq=#{ntu_seq}&type=J"))
|
||||||
|
@journal_papers = paper_xml.xpath("//Paper").map do |paper_node|
|
||||||
|
{
|
||||||
|
author: (paper_node>"Authors").text,
|
||||||
|
year: (paper_node>"PublishYear").text,
|
||||||
|
title: (paper_node>"PaperTitle").text,
|
||||||
|
journal: (paper_node>"PublishOn").text,
|
||||||
|
volume:(paper_node>"Volume").text,
|
||||||
|
volumeno:(paper_node>"VolumeNo").text,
|
||||||
|
beginpage:(paper_node>"BeginPage").text,
|
||||||
|
endpage:(paper_node>"EndPage").text,
|
||||||
|
subgroup:(paper_node>"subgroup").text,
|
||||||
|
remarks: (paper_node>"Remarks").text,
|
||||||
|
cate: ((paper_node>"subgroup")>"Group").text
|
||||||
|
}
|
||||||
|
end
|
||||||
|
if @journal_papers.present?
|
||||||
|
@journal_papers.each do |b|
|
||||||
|
@journal_paper = WritingJournal.new
|
||||||
|
I18n.locale = :zh_tw
|
||||||
|
@journal_paper.authors = b[:author]
|
||||||
|
if b[:title].blank?
|
||||||
|
@journal_paper.paper_title = "No Title Present"
|
||||||
|
else
|
||||||
|
@journal_paper.paper_title = b[:title]
|
||||||
|
end
|
||||||
|
@journal_paper.journal_title = b[:journal]
|
||||||
|
@journal_paper.note = b[:remarks]
|
||||||
|
I18n.locale = :en
|
||||||
|
@journal_paper.authors = b[:author]
|
||||||
|
if b[:title].blank?
|
||||||
|
@journal_paper.paper_title = "No Title Present"
|
||||||
|
else
|
||||||
|
@journal_paper.paper_title = b[:title]
|
||||||
|
end
|
||||||
|
@journal_paper.journal_title = b[:journal]
|
||||||
|
@journal_paper.note = b[:remarks]
|
||||||
|
@journal_paper.year = b[:year]
|
||||||
|
@journal_paper.vol_no = b[:volumeno]
|
||||||
|
@journal_paper.form_to_start = b[:beginpage]
|
||||||
|
@journal_paper.form_to_end = b[:endpage]
|
||||||
|
if !b[:cate].blank?
|
||||||
|
@level_type = JournalLevelType.where(:key => b[:cate])
|
||||||
|
if @level_type.present?
|
||||||
|
@journal_paper.journal_level_type_ids = ["#{@level_type.first.id}"]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
@journal_paper.create_user_id = hash.id
|
||||||
|
@journal_paper.save!
|
||||||
|
end
|
||||||
|
else
|
||||||
|
puts "No journal paper by Teacher"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def sync_conference_data
|
||||||
|
@conference_data = WritingConference.where(create_user_id: "#{params[:user_id]}")
|
||||||
|
@conference_data.delete_all
|
||||||
|
@user = User.find("#{params[:user_id]}")
|
||||||
|
|
||||||
|
# teachers.each do |hash|
|
||||||
|
if @user.sid.present?
|
||||||
|
ntu_seq = @user.sid
|
||||||
|
conference_xml = Nokogiri::XML( \
|
||||||
|
open("http://ann.cc.ntu.edu.tw/Achv/xmlPaper.asp?Seq=#{ntu_seq}&type=C"))
|
||||||
|
#open("http://versatile.management.ntu.edu.tw/publication1/conference/#{ntuseq}.xml"))
|
||||||
|
@conference_papers = conference_xml.xpath("//Paper").map do |cp_node|
|
||||||
|
{
|
||||||
|
author: (cp_node>"Authors").text,
|
||||||
|
year: (cp_node>"PublishYear").text,
|
||||||
|
title: (cp_node>"PaperTitle").text,
|
||||||
|
conference: (cp_node>"PublishOn").text,
|
||||||
|
date: Date::MONTHNAMES[(cp_node>"PublishMonth").text.to_i],
|
||||||
|
location: "#{(cp_node>"Country").text} #{(cp_node>"location").text}",
|
||||||
|
conference_title: (cp_node>"PublishOn").text,
|
||||||
|
remarks: (cp_node>"Remarks").text
|
||||||
|
}
|
||||||
|
end
|
||||||
|
if @conference_papers.present?
|
||||||
|
@conference_papers.each do |b|
|
||||||
|
@conference_paper = WritingConference.new
|
||||||
|
I18n.locale = :zh_tw
|
||||||
|
@conference_paper.authors = b[:author]
|
||||||
|
if b[:title].blank?
|
||||||
|
@conference_paper.paper_title = "No Title Present"
|
||||||
|
else
|
||||||
|
@conference_paper.paper_title = b[:title]
|
||||||
|
end
|
||||||
|
if b[:conference_title].blank?
|
||||||
|
@conference_paper.conference_title = "No Title Present"
|
||||||
|
else
|
||||||
|
@conference_paper.conference_title = b[:conference_title]
|
||||||
|
end
|
||||||
|
|
||||||
|
@conference_paper.note = b[:remarks]
|
||||||
|
I18n.locale = :en
|
||||||
|
@conference_paper.authors = b[:author]
|
||||||
|
if b[:title].blank?
|
||||||
|
@conference_paper.paper_title = "No Title Present"
|
||||||
|
else
|
||||||
|
@conference_paper.paper_title = b[:title]
|
||||||
|
end
|
||||||
|
if b[:conference_title].blank?
|
||||||
|
@conference_paper.conference_title = "No Title Present"
|
||||||
|
else
|
||||||
|
@conference_paper.conference_title = b[:conference_title]
|
||||||
|
end
|
||||||
|
@conference_paper.note = b[:remarks]
|
||||||
|
|
||||||
|
@conference_paper.location = b[:location]
|
||||||
|
@conference_paper.year = b[:year]
|
||||||
|
@conference_paper.create_user_id = @user.id
|
||||||
|
|
||||||
|
@conference_paper.save!
|
||||||
|
end
|
||||||
|
else
|
||||||
|
puts "No conference by Teacher"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
respond_to do |format|
|
||||||
|
|
||||||
|
format.html
|
||||||
|
format.json { render json: {"success"=>true}.to_json}
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
def sync_journal_paper_data
|
||||||
|
@journal_data = WritingJournal.where(create_user_id: "#{params[:user_id]}")
|
||||||
|
@journal_data.delete_all
|
||||||
|
@user = User.find("#{params[:user_id]}")
|
||||||
|
|
||||||
|
# teachers.each do |hash|
|
||||||
|
if @user.sid.present?
|
||||||
|
ntu_seq = @user.sid
|
||||||
|
paper_xml = Nokogiri::XML( \
|
||||||
|
#open("http://versatile.management.ntu.edu.tw/publication1/journal/#{ntuseq}.xml"))
|
||||||
|
open("http://ann.cc.ntu.edu.tw/Achv/xmlPaper.asp?Seq=#{ntu_seq}&type=J"))
|
||||||
|
@journal_papers = paper_xml.xpath("//Paper").map do |paper_node|
|
||||||
|
{
|
||||||
|
author: (paper_node>"Authors").text,
|
||||||
|
year: (paper_node>"PublishYear").text,
|
||||||
|
title: (paper_node>"PaperTitle").text,
|
||||||
|
journal: (paper_node>"PublishOn").text,
|
||||||
|
volume:(paper_node>"Volume").text,
|
||||||
|
volumeno:(paper_node>"VolumeNo").text,
|
||||||
|
beginpage:(paper_node>"BeginPage").text,
|
||||||
|
endpage:(paper_node>"EndPage").text,
|
||||||
|
subgroup:(paper_node>"subgroup").text,
|
||||||
|
remarks: (paper_node>"Remarks").text,
|
||||||
|
cate: ((paper_node>"subgroup")>"Group").text
|
||||||
|
}
|
||||||
|
end
|
||||||
|
if @journal_papers.present?
|
||||||
|
@journal_papers.each do |b|
|
||||||
|
@journal_paper = WritingJournal.new
|
||||||
|
I18n.locale = :zh_tw
|
||||||
|
@journal_paper.authors = b[:author]
|
||||||
|
|
||||||
|
if b[:title].blank?
|
||||||
|
@journal_paper.paper_title = "No Title Present"
|
||||||
|
else
|
||||||
|
@journal_paper.paper_title = b[:title]
|
||||||
|
end
|
||||||
|
|
||||||
|
@journal_paper.journal_title = b[:journal]
|
||||||
|
@journal_paper.note = b[:remarks]
|
||||||
|
I18n.locale = :en
|
||||||
|
@journal_paper.authors = b[:author]
|
||||||
|
|
||||||
|
if b[:title].blank?
|
||||||
|
@journal_paper.paper_title = "No Title Present"
|
||||||
|
else
|
||||||
|
@journal_paper.paper_title = b[:title]
|
||||||
|
end
|
||||||
|
|
||||||
|
@journal_paper.journal_title = b[:journal]
|
||||||
|
@journal_paper.note = b[:remarks]
|
||||||
|
@journal_paper.year = b[:year]
|
||||||
|
@journal_paper.vol_no = b[:volumeno]
|
||||||
|
@journal_paper.form_to_start = b[:beginpage]
|
||||||
|
@journal_paper.form_to_end = b[:endpage]
|
||||||
|
|
||||||
|
if !b[:cate].blank?
|
||||||
|
@level_type = JournalLevelType.where(:key => b[:cate])
|
||||||
|
if @level_type.present?
|
||||||
|
@journal_paper.journal_level_type_ids = ["#{@level_type.first.id}"]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
@journal_paper.create_user_id = @user.id
|
||||||
|
@journal_paper.save!
|
||||||
|
respond_to do |format|
|
||||||
|
|
||||||
|
format.html
|
||||||
|
format.json { render json: {"success"=>true}.to_json}
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
respond_to do |format|
|
||||||
|
|
||||||
|
format.html
|
||||||
|
format.json { render json: {"success"=>true}.to_json}
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def sync_book_data
|
||||||
|
@books_data = WritingBook.where(create_user_id: "#{params[:user_id]}")
|
||||||
|
@books_data.delete_all
|
||||||
|
@user = User.find("#{params[:user_id]}")
|
||||||
|
|
||||||
|
# teachers.each do |hash|
|
||||||
|
if @user.sid.present?
|
||||||
|
ntu_seq = @user.sid
|
||||||
|
books_xml = Nokogiri::XML( \
|
||||||
|
open("http://ann.cc.ntu.edu.tw/Achv/xmlBook.asp?Seq=#{ntu_seq}"))
|
||||||
|
@books = books_xml.xpath("//Book").map do |book_node|
|
||||||
|
{
|
||||||
|
author: (book_node>"Authors").text,
|
||||||
|
year: (book_node>"PublishYear").text,
|
||||||
|
title: (book_node>"DocTitle").text,
|
||||||
|
remarks: (book_node>"Remarks").text,
|
||||||
|
publisher: (book_node>"Publisher").text,
|
||||||
|
book_title: (book_node>"BookTitle").text
|
||||||
|
}
|
||||||
|
end
|
||||||
|
if @books.present?
|
||||||
|
@books.each do |b|
|
||||||
|
@book = WritingBook.new
|
||||||
|
I18n.locale = :zh_tw
|
||||||
|
@book.authors = b[:author]
|
||||||
|
@book.paper_title = b[:title]
|
||||||
|
@book.book_title = b[:book_title]
|
||||||
|
@book.note = b[:remarks]
|
||||||
|
@book.publisher = b[:publisher]
|
||||||
|
I18n.locale = :en
|
||||||
|
@book.authors = b[:author]
|
||||||
|
@book.paper_title = b[:title]
|
||||||
|
@book.book_title = b[:book_title]
|
||||||
|
@book.note = b[:remarks]
|
||||||
|
@book.publisher = b[:publisher]
|
||||||
|
@book.year = b[:year]
|
||||||
|
@book.create_user_id = @user.id
|
||||||
|
@book.save
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
respond_to do |format|
|
||||||
|
|
||||||
|
format.html
|
||||||
|
format.json { render json: {"success"=>true}.to_json}
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
def get_announcement_data
|
||||||
|
uri = URI("https://localhost:8000/announcements.xml")
|
||||||
|
|
||||||
|
#params = {"UnitName" => "管理學院".encode('big5-uao'), "account" => "manage"}
|
||||||
|
#uri.query = URI.encode_www_form(params)
|
||||||
|
res = Net::HTTP.get_response(uri)
|
||||||
|
|
||||||
|
@announcement_data = Hash.from_xml(res.body)
|
||||||
|
@announcements = @announcement_data["objects"]
|
||||||
|
@announcements.each do |hash|
|
||||||
|
@bulletin = Bulletin.new
|
||||||
|
|
||||||
|
I18n.locale = :zh_tw
|
||||||
|
if hash['announcement_title_zh_tw'].blank?
|
||||||
|
@bulletin.title = hash['announcement_title_en']
|
||||||
|
@bulletin.text = hash['announcement_content_zh_tw']
|
||||||
|
elsif hash['announcement_title_zh_tw'].blank? && hash['announcement_title_en'].blank?
|
||||||
|
@bulletin.title = "Please Fill the Name"
|
||||||
|
@bulletin.text = hash['announcement_content_zh_tw']
|
||||||
|
else
|
||||||
|
@bulletin.title = hash['announcement_title_zh_tw']
|
||||||
|
@bulletin.text = hash['announcement_content_zh_tw']
|
||||||
|
end
|
||||||
|
|
||||||
|
I18n.locale = :en
|
||||||
|
if hash['announcement_title_zh_tw'].blank? && hash['announcement_title_en'].blank?
|
||||||
|
@bulletin.title = "Please Fill the Name"
|
||||||
|
@bulletin.text = hash['announcement_content_en']
|
||||||
|
|
||||||
|
elsif hash['announcement_title_en'].blank?
|
||||||
|
@bulletin.title = hash['announcement_zh_tw']
|
||||||
|
@bulletin.text = hash['announcement_content_en']
|
||||||
|
|
||||||
|
elsif hash['announcement_title_zh_tw'].blank?
|
||||||
|
@bulletin.title = hash['announcement_title_en']
|
||||||
|
@bulletin.text = hash['announcement_content_en']
|
||||||
|
end
|
||||||
|
@bulletin.category_id = "51d2a16438178423c2000001"
|
||||||
|
@bulletin.is_pending = true
|
||||||
|
|
||||||
|
@bulletin.save!
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def get_page_data
|
||||||
|
f = File.open("/home/rwub/orbit-db/ntu_mb/pages/management_pages.xml")
|
||||||
|
page_xml = Nokogiri::XML(f)
|
||||||
|
#open("http://versatile.management.ntu.edu.tw/publication1/conference/#{ntuseq}.xml"))
|
||||||
|
@pages = page_xml.xpath("//management-page").map do |cp_node|
|
||||||
|
{
|
||||||
|
menu_title: (cp_node>"menu-title").text,
|
||||||
|
content: (cp_node>"content").text
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
if @pages.present?
|
||||||
|
@i=0
|
||||||
|
@pages.each do |b|
|
||||||
|
|
||||||
|
get_variables_for_new
|
||||||
|
@page = Page.new
|
||||||
|
|
||||||
|
@page.parent = "4f45f3b9e9d02c5db900005d"
|
||||||
|
@page.design = "50ac424983e75219d2000021"
|
||||||
|
@page.theme_id = "50ac424a83e75219d2000025"
|
||||||
|
@page.menu_enabled_for= ["en", "zh_tw", ""]
|
||||||
|
@page.enabled_for= ["en", "zh_tw", ""]
|
||||||
|
@page.is_published = false
|
||||||
|
if b[:menu_title].blank?
|
||||||
|
@page.title = 'No Title Present'
|
||||||
|
@i += 1
|
||||||
|
@page.name = "#{@i}Page"
|
||||||
|
else
|
||||||
|
@i += 1
|
||||||
|
@page.title = b[:menu_title]
|
||||||
|
@page.name = "#{@i}Page"
|
||||||
|
end
|
||||||
|
if b[:content].blank?
|
||||||
|
@page.content = "No Content Present"
|
||||||
|
else
|
||||||
|
@page.content = b[:content]
|
||||||
|
end
|
||||||
|
@page.save!
|
||||||
|
end
|
||||||
|
else
|
||||||
|
puts "No Page Data"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
def get_variables_for_new
|
||||||
|
@designs = Design.all.entries
|
||||||
|
@themes = Design.first.themes
|
||||||
|
@module_apps = ModuleApp.for_frontend_select
|
||||||
|
@app_frontend_urls = nil
|
||||||
|
@categories = nil
|
||||||
|
@tags = nil
|
||||||
|
@page_frontend_data_counts = nil
|
||||||
|
@frontend_styles = nil
|
||||||
|
@selected={
|
||||||
|
:design => @designs.first,
|
||||||
|
:theme=> @themes.first,
|
||||||
|
:module_app=>nil,#@module_apps.first
|
||||||
|
:app_frontend_url=> nil, #@module_apps.first
|
||||||
|
:category=>nil,
|
||||||
|
:tag=>nil,
|
||||||
|
:page_frontend_data_count=>nil,
|
||||||
|
:frontend_style => nil
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
@@ -95,7 +95,7 @@ class Admin::PagesController < Admin::ItemsController
|
|||||||
if @item.module_app && @item.module_app.key == 'page_content'
|
if @item.module_app && @item.module_app.key == 'page_content'
|
||||||
@item.page_contexts.build(:create_user_id => current_user.id, :update_user_id => current_user.id )
|
@item.page_contexts.build(:create_user_id => current_user.id, :update_user_id => current_user.id )
|
||||||
end
|
end
|
||||||
|
|
||||||
if @item.save
|
if @item.save
|
||||||
flash.now[:notice] = t('create.success.page')
|
flash.now[:notice] = t('create.success.page')
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
|
|||||||
@@ -4,19 +4,19 @@ class Admin::PluginsController < ApplicationController
|
|||||||
|
|
||||||
def index
|
def index
|
||||||
|
|
||||||
@plugins = OrbitApp::Plugin::Registration.all
|
@plugins = OrbitApp::Plugin::Registration.all
|
||||||
|
|
||||||
if(!params[:show_plugin_profile].nil?)
|
if(!params[:show_plugin_profile].nil?)
|
||||||
|
|
||||||
@right_partial = OrbitApp::Plugin::Registration.find_by_app_name(params[:show_plugin_profile]).admin_partial_path
|
@right_partial = OrbitApp::Plugin::Registration.find_by_key(params[:show_plugin_profile]).admin_partial_path
|
||||||
|
|
||||||
if !@right_partial.blank?
|
if !@right_partial.blank?
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html { redirect_to( @right_partial ) }
|
format.html { redirect_to( @right_partial ) }
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@right_partial = ""
|
@right_partial = ""
|
||||||
end
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
@right_partial = ""
|
@right_partial = ""
|
||||||
|
|||||||
@@ -83,18 +83,9 @@ class Admin::UsersNewInterfaceController < OrbitMemberController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
|
||||||
@user = User.find(params[:id])
|
@user = User.find(params[:id])
|
||||||
|
|
||||||
@plugins = OrbitApp::Plugin::Registration.all
|
@plugins = OrbitApp::Plugin::Registration.all
|
||||||
|
|
||||||
@ppname = Array.new
|
|
||||||
@plugins.each do |aa|
|
|
||||||
@ppname << [aa.sort_number.to_i, [aa.name, aa.app_name, aa.intro_app_name, aa.front_partial_path]]
|
|
||||||
end
|
|
||||||
@plugin_shows = @ppname.sort.collect {|v| {"name"=>v[1][0],"app_name"=>v[1][1],"intro_app_name"=>v[1][2],"front_partial_path"=>v[1][3]} }
|
|
||||||
|
|
||||||
|
|
||||||
@profile_data = []
|
@profile_data = []
|
||||||
@teacher_data = []
|
@teacher_data = []
|
||||||
@student_data = []
|
@student_data = []
|
||||||
@@ -261,7 +252,7 @@ class Admin::UsersNewInterfaceController < OrbitMemberController
|
|||||||
if to_go > 0
|
if to_go > 0
|
||||||
user_at_position = User.where(position: to_go - 1).first
|
user_at_position = User.where(position: to_go - 1).first
|
||||||
user = User.find(pair[1])
|
user = User.find(pair[1])
|
||||||
if user_at_position && !(user_at_position == user)
|
if user_at_position && !user_at_position == user
|
||||||
if user.position > user_at_position.position
|
if user.position > user_at_position.position
|
||||||
user.move_above(user_at_position)
|
user.move_above(user_at_position)
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
# encoding: utf-8
|
||||||
|
|
||||||
|
class SessionsController < Devise::SessionsController
|
||||||
|
prepend_before_filter :require_no_authentication, :only => [ :new, :create ]
|
||||||
|
|
||||||
|
|
||||||
|
def create
|
||||||
|
@site = Site.first
|
||||||
|
|
||||||
|
private_key = OpenSSL::PKey::RSA.new(@site.private_key)
|
||||||
|
wresult = private_key.private_decrypt(request.params['wresult'])
|
||||||
|
|
||||||
|
@ids = wresult.split("@")
|
||||||
|
|
||||||
|
login_uid = @ids[0]
|
||||||
|
|
||||||
|
resource = User.first(conditions:{user_id: login_uid})
|
||||||
|
|
||||||
|
if !resource.blank?
|
||||||
|
resource_name = resource.class.to_s.downcase
|
||||||
|
sign_in(resource_name, resource)
|
||||||
|
session[:user_id_type] = "myntumb"
|
||||||
|
redirect_to after_sign_in_path_for(resource)
|
||||||
|
else
|
||||||
|
flash[:error] = "很抱歉,您無此權限或帳號登入本站,請洽本站管理員<br />Sorry, you don't have the account or authority to login. Please contact the website administrator."
|
||||||
|
redirect_to :root
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def destroy
|
||||||
|
@user_id_type = session[:user_id_type]
|
||||||
|
sign_out
|
||||||
|
if @user_id_type == "myntumb"
|
||||||
|
redirect_to "https://adfs.ntu.edu.tw/adfs/ls/?wa=wsignout1.0&wreply=https://management.ntu.edu.tw"
|
||||||
|
else
|
||||||
|
redirect_to root_path
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
@@ -271,7 +271,11 @@ module ApplicationHelper
|
|||||||
end
|
end
|
||||||
|
|
||||||
def show_avatar(user)
|
def show_avatar(user)
|
||||||
image_tag(user.avatar.thumb.url)
|
if (user.avatar? rescue false)
|
||||||
|
image_tag(user.avatar.thumb.url)
|
||||||
|
else
|
||||||
|
image_tag "person.png"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# NTU link
|
# NTU link
|
||||||
|
|||||||
@@ -185,18 +185,18 @@ class ModuleApp
|
|||||||
user_ids = self.auth_approvals.inject([]) do |users, auth|
|
user_ids = self.auth_approvals.inject([]) do |users, auth|
|
||||||
users += auth.authorized_users.map{|user| user.id}
|
users += auth.authorized_users.map{|user| user.id}
|
||||||
end
|
end
|
||||||
self.update_attribute(:auth_approval_users, user_ids.uniq)
|
update_attribute(:auth_approval_users, user_ids.uniq)
|
||||||
end
|
end
|
||||||
|
|
||||||
def update_auth_manager_users
|
def update_auth_manager_users
|
||||||
self.update_attribute(:auth_manager_users, self.auth_manager_authorized_users.map{|user| user.id})
|
update_attribute(:auth_manager_users, self.auth_manager_authorized_users.map{|user| user.id})
|
||||||
end
|
end
|
||||||
|
|
||||||
def update_auth_sub_manager_users
|
def update_auth_sub_manager_users
|
||||||
user_ids = self.auth_sub_managers.inject([]) do |users, auth|
|
user_ids = self.auth_sub_managers.inject([]) do |users, auth|
|
||||||
users += auth.authorized_users.map{|user| user.id}
|
users += auth.authorized_users.map{|user| user.id}
|
||||||
end
|
end
|
||||||
self.update_attribute(:auth_sub_manager_users, user_ids.uniq)
|
update_attribute(:auth_sub_manager_users, user_ids.uniq)
|
||||||
end
|
end
|
||||||
|
|
||||||
def managers
|
def managers
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ class User
|
|||||||
field :office_tel
|
field :office_tel
|
||||||
field :cache_dept,type: Hash
|
field :cache_dept,type: Hash
|
||||||
field :status_record,type: Hash
|
field :status_record,type: Hash
|
||||||
|
field :ntu_seq
|
||||||
|
#validates :ntu_seq, :uniqueness => true
|
||||||
|
|
||||||
has_and_belongs_to_many :approving_apps, class_name: 'AuthApproval', inverse_of: 'authorized_users'
|
has_and_belongs_to_many :approving_apps, class_name: 'AuthApproval', inverse_of: 'authorized_users'
|
||||||
has_and_belongs_to_many :managing_apps, class_name: 'AuthManager', inverse_of: 'authorized_users'
|
has_and_belongs_to_many :managing_apps, class_name: 'AuthManager', inverse_of: 'authorized_users'
|
||||||
|
|||||||
@@ -21,9 +21,6 @@ class AvatarUploader < CarrierWave::Uploader::Base
|
|||||||
# def default_url
|
# def default_url
|
||||||
# "/images/fallback/" + [version_name, "default.png"].compact.join('_')
|
# "/images/fallback/" + [version_name, "default.png"].compact.join('_')
|
||||||
# end
|
# end
|
||||||
def default_url
|
|
||||||
[version_name, (Site.first.default_image.file.url rescue "person.png")].compact.join('_')
|
|
||||||
end
|
|
||||||
|
|
||||||
# Process files as they are uploaded:
|
# Process files as they are uploaded:
|
||||||
# process :scale => [200, 300]
|
# process :scale => [200, 300]
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<li><%= link_to show_toggle_archive_btn(category) , toggle_admin_module_app_category_path(@module_app_id, category), method: :post, remote: true, class: "archive_toggle" %></li>
|
<li><%= link_to show_toggle_archive_btn(category) , toggle_admin_module_app_category_path(@module_app_id, category), method: :post, remote: true, class: "archive_toggle" %></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if is_manager? || is_admin? %>
|
<% if is_manager? || is_admin? %>
|
||||||
<li><%= link_to t(:category_auth), admin_authorizations_path(@module_app.key, 'category_authorization', category.id) %></li>
|
<li><%= link_to t(:category_auth), admin_authorizations_path(@module_app.key, 'category', category.id) %></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
<p>Successfully Imported Announcement Data!</p>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<p>Successfully Journal Paper Data!</p>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<p>Successfully Imported Page Data!</p>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<p>Successfully Imported Teacher Data!</p>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<p>Book Data Synced Successfully!</p>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<p>Conference Paper Data Synced Successfully!</p>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<p>Journal Paper Data Synced Successfully!</p>
|
||||||
@@ -7,8 +7,8 @@
|
|||||||
<%= link_to t(:all_plugin_summary)%>
|
<%= link_to t(:all_plugin_summary)%>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% @plugins.each do |plugin| %>
|
<% @plugins.each do |plugin| %>
|
||||||
<%= content_tag :li, :class=>(params[:show_plugin_profile] == plugin.app_name ? "active" : nil) do %>
|
<%= content_tag :li, :class=>(params[:show_plugin_profile] == plugin.name ? "active" : nil) do %>
|
||||||
<%= link_to plugin.name, admin_plugins_path(:show_plugin_profile => plugin.app_name) %>
|
<%= link_to plugin.name, admin_plugins_path(:show_plugin_profile => plugin.name) %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
|
|||||||
@@ -43,48 +43,49 @@
|
|||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<!-- Description -->
|
<% @site_valid_locales.each do |locale|%>
|
||||||
<div class="control-group">
|
<%= content_tag :div, :class => "tab-pane fade #{active_when_current_locale_eq locale} #{locale}" do %>
|
||||||
<label class="control-label muted">Keywords</label>
|
<div class="control-group">
|
||||||
<div class="controls">
|
<label class="control-label muted">Site Keywords</label>
|
||||||
<div class="tab-content textarea-lang">
|
<div class="controls">
|
||||||
<div class="btn-group" data-toggle="buttons-radio">
|
<div class="tab-content textarea-lang">
|
||||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
<div class="btn-group" data-toggle="buttons-radio">
|
||||||
<a class="btn <%= ( i == 0 ) ? "active" : '' %>" href="#textarea_<%= locale %>_0" data-toggle="tab"><%= I18nVariable.from_locale(locale) %></a>
|
<% @site_valid_locales.each do |locale|%>
|
||||||
<% end %>
|
<%= content_tag :li, link_to(I18nVariable.from_locale(locale), ".#{locale}", :data => {:toggle => "tab"}), :class => "btn #{(active_when_current_locale_eq locale)}" %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<div class="tab-pane fade active in" id="keywords_en_0">
|
||||||
|
<%= f.fields_for :keywords do |f| %>
|
||||||
|
<%= f.text_area locale, :class => "resizable",:rows=>3, :value => (@site.keywords(locale) rescue nil) %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<%end%>
|
||||||
|
<%end%>
|
||||||
|
|
||||||
|
<% @site_valid_locales.each do |locale|%>
|
||||||
|
<%= content_tag :div, :class => "tab-pane fade #{active_when_current_locale_eq locale} #{locale}" do %>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label muted">Site Description</label>
|
||||||
|
<div class="controls">
|
||||||
|
<div class="tab-content textarea-lang">
|
||||||
|
<div class="btn-group" data-toggle="buttons-radio">
|
||||||
|
<% @site_valid_locales.each do |locale|%>
|
||||||
|
<%= content_tag :li, link_to(I18nVariable.from_locale(locale), ".#{locale}", :data => {:toggle => "tab"}), :class => "btn #{(active_when_current_locale_eq locale)}" %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<div class="tab-pane fade active in" id="description_en_0">
|
||||||
|
<%= f.fields_for :description do |f| %>
|
||||||
|
<%= f.text_area locale, :class => "resizable",:rows=>3, :value => (@site.description(locale) rescue nil) %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
<%end%>
|
||||||
<div class="tab-pane fade in <%= ( i == 0 ) ? "active" : '' %>" id="textarea_<%= locale %>_0">
|
<%end%>
|
||||||
<%= f.fields_for :keywords do |f| %>
|
|
||||||
<%= f.text_area locale, :class=>'resizable', :value => (@site.keywords(locale) rescue nil), :placeholder => I18nVariable.from_locale(locale), :rows=>"3" %>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="control-group">
|
|
||||||
<label class="control-label muted">Description</label>
|
|
||||||
<div class="controls">
|
|
||||||
<div class="tab-content textarea-lang">
|
|
||||||
<div class="btn-group" data-toggle="buttons-radio">
|
|
||||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
|
||||||
<a class="btn <%= ( i == 0 ) ? "active" : '' %>" href="#textarea_<%= locale %>_0" data-toggle="tab"><%= I18nVariable.from_locale(locale) %></a>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
|
||||||
<div class="tab-pane fade in <%= ( i == 0 ) ? "active" : '' %>" id="textarea_<%= locale %>_0">
|
|
||||||
<%= f.fields_for :description do |f| %>
|
|
||||||
<%= f.text_area locale, :class=>'resizable', :value => (@site.description(locale) rescue nil), :placeholder => I18nVariable.from_locale(locale), :rows=>"3" %>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- Form Actions -->
|
<!-- Form Actions -->
|
||||||
<div class="form-actions">
|
<div class="form-actions">
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<%= link_to(content_tag(:i, nil, :class => 'icon-key'),'#',:class=>"key" ) if is_admin?%>
|
<%= link_to(content_tag(:i, nil, :class => 'icon-key'),'#',:class=>"key" ) if is_admin?%>
|
||||||
<%= link_to(content_tag(:i, nil, :class => 'icon-trash'), admin_users_new_interface_path(user_for_summary, :at=>params[:at]), :confirm => t(:sure?), :method => :delete, :class=>"trash", :remote => true) if is_admin? %>
|
<%= link_to(content_tag(:i, nil, :class => 'icon-trash'), admin_users_new_interface_path(user_for_summary, :at=>params[:at]), :confirm => t(:sure?), :method => :delete, :class=>"trash", :remote => true) if is_admin? %>
|
||||||
</div>
|
</div>
|
||||||
<%= image_tag(user_for_summary.avatar) %>
|
<%= show_avatar(user_for_summary) %>
|
||||||
</div>
|
</div>
|
||||||
<div class="member-info">
|
<div class="member-info">
|
||||||
<h4 class="member-name"><%= link_to user_for_summary.name,admin_users_new_interface_path(user_for_summary)%></h4>
|
<h4 class="member-name"><%= link_to user_for_summary.name,admin_users_new_interface_path(user_for_summary)%></h4>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<%= link_to(content_tag(:i, nil, :class => 'icon-trash'), admin_users_new_interface_path(user_for_thumbnail, :at=>params[:at]), :confirm => t(:sure?), :method => :delete, :class=>"trash", :remote => true) if is_admin? %>
|
<%= link_to(content_tag(:i, nil, :class => 'icon-trash'), admin_users_new_interface_path(user_for_thumbnail, :at=>params[:at]), :confirm => t(:sure?), :method => :delete, :class=>"trash", :remote => true) if is_admin? %>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<%= image_tag(user_for_thumbnail.avatar) %>
|
<%= show_avatar(user_for_thumbnail) %>
|
||||||
</div>
|
</div>
|
||||||
<h4 class="member-name text-center"><%= link_to user_for_thumbnail.name,admin_users_new_interface_path(user_for_thumbnail)%></h4>
|
<h4 class="member-name text-center"><%= link_to user_for_thumbnail.name,admin_users_new_interface_path(user_for_thumbnail)%></h4>
|
||||||
</li>
|
</li>
|
||||||
@@ -21,6 +21,7 @@
|
|||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ul class="nav nav-pills filter-nav pull-right">
|
<ul class="nav nav-pills filter-nav pull-right">
|
||||||
<li class="accordion-group">
|
<li class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
|
|||||||
@@ -50,9 +50,9 @@
|
|||||||
<a data-toggle="dropdown" class="dropdown-toggle" href="#">Module List <b class="caret"></b></a>
|
<a data-toggle="dropdown" class="dropdown-toggle" href="#">Module List <b class="caret"></b></a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
|
|
||||||
<% @plugin_shows.each do |plugin| %>
|
<% @plugins.each do |plugin| %>
|
||||||
<%= content_tag :li, :class=>(params[:show_plugin_profile] == plugin["app_name"] ? "active" : nil) do %>
|
<%= content_tag :li, :class=>(params[:show_plugin_profile] == plugin.app_name ? "active" : nil) do %>
|
||||||
<%= link_to plugin["name"], :show_plugin_profile => plugin["app_name"] %>
|
<%= link_to plugin.name, :show_plugin_profile => plugin.app_name %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
|
|||||||
@@ -1,44 +1,42 @@
|
|||||||
<!-- Orbit Bar -->
|
|
||||||
<!--#include virtual="include/orbit_bar.html"-->
|
|
||||||
<section id="main-wrap">
|
|
||||||
<div class="sign-in have-other-sign-in">
|
<div class="sign-in have-other-sign-in">
|
||||||
<!-- <p class="alert alert-error in fade">You need to sign in.</p>
|
|
||||||
-->
|
<% flash.each do |key, msg| %>
|
||||||
<% flash.each do |key, msg| %>
|
<%= content_tag :p, msg, :class => [key, "alert alert-error"] %>
|
||||||
<%= content_tag :p, msg, :class => [key, "alert alert-error in fade"] %>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div class="form">
|
|
||||||
<h3 class="login-logo">Log In to Orbit</h3>
|
<div class="form">
|
||||||
<div>
|
<h3 class="login-logo"><%= t(:login) %></h3>
|
||||||
<input name="utf8" type="hidden" value="" />
|
<div class="other-sign-in">
|
||||||
<input name="authenticity_token" type="hidden" value="" />
|
<% @request_hosts = request.host_with_port.split(".") %>
|
||||||
</div>
|
<a class="btn btn-primary" type="submit" href="https://adfs.ntu.edu.tw/adfs/ls/?wa=wsignin1.0&wtrealm=https://management.ntu.edu.tw/saml_login&wctx=<%= @request_hosts[0] %>">使用計中帳號登入</a>
|
||||||
<!-- <div class="other-sign-in">
|
|
||||||
<a class="btn btn-primary" type="submit">Other Sign In</a>
|
|
||||||
<p>or</p>
|
<p>or</p>
|
||||||
</div> -->
|
</div>
|
||||||
<div class="form-block">
|
<div class="form-block">
|
||||||
<div class="form-list clearfix">
|
<div class="form-list clearfix">
|
||||||
<form class="content" accept-charset="UTF-8" action="/users/sign_in" method="post">
|
<%= form_for resource, :as => resource_name, :url => session_path(resource_name), :html => {:class => 'content'} do |f| %>
|
||||||
<%= form_for resource, :as => resource_name, :url => session_path(resource_name), :html => {:class => 'content'} do |f| %>
|
|
||||||
|
|
||||||
<div class="control-group clear">
|
<div class="control-group clear">
|
||||||
<label for="user_email">
|
<label for="user_email">
|
||||||
<i class="icon-user"></i>
|
<i class="icon-user"></i>
|
||||||
</label>
|
</label>
|
||||||
<%= f.text_field :user_id, :placeholder => t("users.user_id"), :id=>"user_email" %>
|
<%= f.text_field :user_id, :placeholder => t("users.user_id") %>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group clear">
|
<div class="control-group clear">
|
||||||
<label for="user_password">
|
<label for="user_password">
|
||||||
<i class="icon-lock"></i>
|
<i class="icon-lock"></i>
|
||||||
</label>
|
</label>
|
||||||
<%= f.password_field :password, :placeholder => t(:dots), :id=>"user_password" %>
|
<%= f.password_field :password, :placeholder => t(:dots) %>
|
||||||
</div>
|
</div>
|
||||||
<%= content_tag :button, t(:login), :type => :submit, :class => 'btn btn-primary' %>
|
<!-- <label class="checkbox">
|
||||||
</form>
|
<input type="checkbox" value="">
|
||||||
|
<small>Remember me</small>
|
||||||
|
</label> -->
|
||||||
|
<%= content_tag :button, t(:login), :type => :submit, :class => 'btn btn-primary' %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<form class="content" accept-charset="UTF-8" action="/users/sign_in" method="post">
|
<!-- <form class="content" accept-charset="UTF-8" action="/users/sign_in" method="post">
|
||||||
<div class="control-group clear">
|
<div class="control-group clear">
|
||||||
<label for="user_email">
|
<label for="user_email">
|
||||||
<i class="icon-user"></i>
|
<i class="icon-user"></i>
|
||||||
@@ -51,14 +49,14 @@
|
|||||||
</label>
|
</label>
|
||||||
<input type="text" id="user_email" name="user[email]" placeholder="電子郵件" />
|
<input type="text" id="user_email" name="user[email]" placeholder="電子郵件" />
|
||||||
</div>
|
</div>
|
||||||
</form>
|
<button class="btn btn-primary" type="submit">Submit</button>
|
||||||
|
</form> -->
|
||||||
</div>
|
</div>
|
||||||
|
<!-- <div class="switchboard"><span>Forgot Password ?</span> <i class="icons-arrow-left-2"></i></div> -->
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="register">
|
<!-- <div class="register">
|
||||||
<button class="btn btn-inverse" type="submit">Register</button>
|
<button class="btn btn-inverse" type="submit">Register</button>
|
||||||
</div> -->
|
</div> -->
|
||||||
<% end %>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
|
||||||
@@ -53,6 +53,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<%= form_for :user, url: user_session_path, html: {class: 'container'} do |f| %>
|
<%= form_for :user, url: user_session_path, html: {class: 'container'} do |f| %>
|
||||||
|
<div class="other-sign-in">
|
||||||
|
<% @request_hosts = request.host_with_port.split(".") %>
|
||||||
|
<a class="btn btn-primary" type="submit" href="https://adfs.ntu.edu.tw/adfs/ls/?wa=wsignin1.0&wtrealm=https://management.ntu.edu.tw/saml_login&wctx=<%= @request_hosts[0] %>">使用計中帳號登入</a>
|
||||||
|
<p>or</p>
|
||||||
|
</div>
|
||||||
<div class="input-prepend">
|
<div class="input-prepend">
|
||||||
<span class="add-on">
|
<span class="add-on">
|
||||||
<i class="icon-user"></i>
|
<i class="icon-user"></i>
|
||||||
|
|||||||
@@ -3,4 +3,5 @@
|
|||||||
<%= link_to content_tag(:i, nil, :class => (local_assigns.has_key? :icon) ? icon : 'icons-gauge'), (local_assigns.has_key? :link_url) ? link_url : admin_dashboards_path %>
|
<%= link_to content_tag(:i, nil, :class => (local_assigns.has_key? :icon) ? icon : 'icons-gauge'), (local_assigns.has_key? :link_url) ? link_url : admin_dashboards_path %>
|
||||||
</h2>
|
</h2>
|
||||||
<%= render ((local_assigns.has_key? :side_bar_content) ? side_bar_content : 'layouts/side_bar_content') %>
|
<%= render ((local_assigns.has_key? :side_bar_content) ? side_bar_content : 'layouts/side_bar_content') %>
|
||||||
|
<div class="sub-nav-arrow"></div>
|
||||||
</nav>
|
</nav>
|
||||||
@@ -6,7 +6,6 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="sub-nav-arrow"></div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="sub-nav-block-list">
|
<div class="sub-nav-block-list">
|
||||||
|
|||||||
@@ -6,23 +6,16 @@
|
|||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
<%= javascript_include_tag "html5" %>
|
<%= javascript_include_tag "html5" %>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
<%= render 'layouts/meta' %>
|
<%= stylesheet_link_tag "devise" %>
|
||||||
<%= render 'layouts/google_font' %>
|
<%= javascript_include_tag "devise" %>
|
||||||
<%= stylesheet_link_tag "basic/global" %>
|
<%= csrf_meta_tag %>
|
||||||
<%= stylesheet_link_tag "basic" %>
|
|
||||||
|
|
||||||
<%= render 'layouts/ie_html5_fix' %>
|
|
||||||
<%= javascript_include_tag "basic" %>
|
|
||||||
<%= yield :page_specific_css %>
|
|
||||||
<%= yield :page_specific_javascript %>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
|
|
||||||
</style>
|
|
||||||
<%= csrf_meta_tag %>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<%= render 'layouts/orbit_bar' %>
|
<%= render 'layouts/orbit_bar' %>
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
|
<!--<div id="sign-footer">
|
||||||
|
<p>Rulingcom</p>
|
||||||
|
</div>
|
||||||
|
-->
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
+1
-1
@@ -8,7 +8,7 @@ defaults: &defaults
|
|||||||
|
|
||||||
development:
|
development:
|
||||||
<<: *defaults
|
<<: *defaults
|
||||||
database: test_site
|
database: ntu_mb_orbit_test
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,14 @@ Orbit::Application.routes.draw do
|
|||||||
match "/users_passwd" => "desktop/registrations#update", :as => :users_passwd, :via => :put
|
match "/users_passwd" => "desktop/registrations#update", :as => :users_passwd, :via => :put
|
||||||
end
|
end
|
||||||
|
|
||||||
|
devise_scope :user do
|
||||||
|
get 'user_login' => 'sessions#create'
|
||||||
|
match 'user_logout' => 'sessions#destroy'
|
||||||
|
end
|
||||||
|
|
||||||
|
match "saml_login" => 'saml_logins#index'
|
||||||
|
|
||||||
|
|
||||||
mount Resque::Server, :at => "/admin/resque"
|
mount Resque::Server, :at => "/admin/resque"
|
||||||
mount Rack::GridFS::Endpoint.new(:db => Mongoid.database,:lookup=>:path), :at => "gridfs"
|
mount Rack::GridFS::Endpoint.new(:db => Mongoid.database,:lookup=>:path), :at => "gridfs"
|
||||||
|
|
||||||
@@ -200,6 +208,17 @@ Orbit::Application.routes.draw do
|
|||||||
get 'change_design'
|
get 'change_design'
|
||||||
get 'preference'
|
get 'preference'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
get "import_data/get_teacher_data"
|
||||||
|
get "import_data/get_book_data"
|
||||||
|
get "import_data/get_conference_data"
|
||||||
|
get "import_data/get_journal_paper_data"
|
||||||
|
get "import_data/get_announcement_data"
|
||||||
|
get "import_data/get_page_data"
|
||||||
|
get "import_data/sync_book_data"
|
||||||
|
get "import_data/sync_journal_paper_data"
|
||||||
|
get "import_data/sync_conference_data"
|
||||||
|
|
||||||
|
|
||||||
resources :tags do
|
resources :tags do
|
||||||
collection do
|
collection do
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ module OrbitApp
|
|||||||
current_priority = @context_links.count
|
current_priority = @context_links.count
|
||||||
if @approvable_with_link
|
if @approvable_with_link
|
||||||
context_link 'approval_setting',
|
context_link 'approval_setting',
|
||||||
:link_path => "admin_authorizations_path(get_module_app.key, 'category_approval')",
|
:link_path => "admin_authorizations_path(get_module_app.key, 'approval')",
|
||||||
:priority => current_priority + 1,
|
:priority => current_priority + 1,
|
||||||
:available_for => [:manager]
|
:available_for => [:manager]
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -53,7 +53,6 @@ module OrbitApp
|
|||||||
def initialize(name,partial=nil,*args ,&block)
|
def initialize(name,partial=nil,*args ,&block)
|
||||||
@base_path = args[0][:base_path]
|
@base_path = args[0][:base_path]
|
||||||
@name = partial[0][:i18n].nil? ? name : lambda{ I18n.t(partial[0][:i18n]) }
|
@name = partial[0][:i18n].nil? ? name : lambda{ I18n.t(partial[0][:i18n]) }
|
||||||
@sort_number = partial[0][:sort_number]
|
|
||||||
@app_name = partial[0][:app_name]
|
@app_name = partial[0][:app_name]
|
||||||
@intro_app_name = partial[0][:intro_app_name]
|
@intro_app_name = partial[0][:intro_app_name]
|
||||||
@partial_path = ''
|
@partial_path = ''
|
||||||
@@ -69,10 +68,6 @@ module OrbitApp
|
|||||||
block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given?
|
block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given?
|
||||||
end
|
end
|
||||||
|
|
||||||
def sort_number
|
|
||||||
return @sort_number
|
|
||||||
end
|
|
||||||
|
|
||||||
def app_name
|
def app_name
|
||||||
return @app_name
|
return @app_name
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ module OrbitTag
|
|||||||
|
|
||||||
def tags=(tag_ids)
|
def tags=(tag_ids)
|
||||||
tag_ids = [tag_ids].flatten
|
tag_ids = [tag_ids].flatten
|
||||||
tag_ids.delete_if{|e| e.match(/^[0-1]$|^$/)}
|
tag_ids.delete('')
|
||||||
ids = self.taggings.blank? ? [] : self.taggings.map{|t| t.tag.id}
|
ids = self.taggings.blank? ? [] : self.taggings.map{|t| t.tag.id}
|
||||||
tag_ids.each do |tag_id|
|
tag_ids.each do |tag_id|
|
||||||
unless ids.include? tag_id
|
unless ids.include? tag_id
|
||||||
|
|||||||
Vendored
-7
@@ -50,13 +50,6 @@ class Panel::Member::FrontEnd::MemberListsController < OrbitWidgetController
|
|||||||
|
|
||||||
@plugins = OrbitApp::Plugin::Registration.all
|
@plugins = OrbitApp::Plugin::Registration.all
|
||||||
|
|
||||||
@ppname = Array.new
|
|
||||||
@plugins.each do |aa|
|
|
||||||
@ppname << [aa.sort_number.to_i, [aa.name, aa.app_name, aa.intro_app_name, aa.front_partial_path]]
|
|
||||||
end
|
|
||||||
@plugin_shows = @ppname.sort.collect {|v| {"name"=>v[1][0],"app_name"=>v[1][1],"intro_app_name"=>v[1][2],"front_partial_path"=>v[1][3]} }
|
|
||||||
|
|
||||||
|
|
||||||
@profile_data = []
|
@profile_data = []
|
||||||
|
|
||||||
attribute_values = @member.attribute_values.asc("_id")
|
attribute_values = @member.attribute_values.asc("_id")
|
||||||
|
|||||||
+30
@@ -0,0 +1,30 @@
|
|||||||
|
<% show_research_field.attribute_fields.where(:disabled=>false).asc(:_id).each do |rf| %>
|
||||||
|
|
||||||
|
<%
|
||||||
|
if !@member.get_attribute_value(rf).blank?
|
||||||
|
if !@member.get_attribute_value(rf)['val'].blank?
|
||||||
|
@rodata = @member.get_attribute_value(rf)['val']
|
||||||
|
elsif !@member.get_attribute_value(rf)[I18n.locale].blank?
|
||||||
|
@rodata = @member.get_attribute_value(rf)[I18n.locale]
|
||||||
|
else
|
||||||
|
@rodata = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
if !@rodata.blank? and !@member.get_attribute_value(rf).get_value_by_locale(I18n.locale).blank?
|
||||||
|
%>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<% if rf.title == "Research Field"%>
|
||||||
|
<td><%= rf.title %></td>
|
||||||
|
<td><%= nl2br(show_attribute_value(@member.get_attribute_value(rf).get_value_by_locale(I18n.locale))) rescue '' %></td>
|
||||||
|
</tr>
|
||||||
|
<%end%>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<% end -%>
|
||||||
|
|
||||||
|
<% end -%>
|
||||||
|
|
||||||
|
<% end -%>
|
||||||
|
|
||||||
Vendored
+6
-2
@@ -1,4 +1,4 @@
|
|||||||
<%
|
<!-- <%
|
||||||
@status = @member.role_statuses.where(:role_id=>show_roles.id)
|
@status = @member.role_statuses.where(:role_id=>show_roles.id)
|
||||||
|
|
||||||
if !@status.blank?
|
if !@status.blank?
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
<td><%= show_attribute_value(@member.role_statuses.where(:role_id=>show_roles.id).map{|t|t.title.to_s}.join(',')) rescue '' %></td>
|
<td><%= show_attribute_value(@member.role_statuses.where(:role_id=>show_roles.id).map{|t|t.title.to_s}.join(',')) rescue '' %></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<% end -%>
|
<% end -%> -->
|
||||||
|
|
||||||
<%
|
<%
|
||||||
@category = @member.role_categorys.where(:role_id=>show_roles.id)
|
@category = @member.role_categorys.where(:role_id=>show_roles.id)
|
||||||
@@ -38,8 +38,12 @@
|
|||||||
%>
|
%>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
|
<% if rf.title != "Research Field"%>
|
||||||
<td><%= rf.title %></td>
|
<td><%= rf.title %></td>
|
||||||
<td><%= nl2br(show_attribute_value(@member.get_attribute_value(rf).get_value_by_locale(I18n.locale))) rescue '' %></td>
|
<td><%= nl2br(show_attribute_value(@member.get_attribute_value(rf).get_value_by_locale(I18n.locale))) rescue '' %></td>
|
||||||
|
</tr>
|
||||||
|
<%end%>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|||||||
Vendored
+2
-21
@@ -18,8 +18,6 @@
|
|||||||
<div class="o-members">
|
<div class="o-members">
|
||||||
|
|
||||||
<% @member_status.each do |ms| %>
|
<% @member_status.each do |ms| %>
|
||||||
|
|
||||||
<% if @member_lists.where(:role_status_ids=>ms.id).count > 0 %>
|
|
||||||
|
|
||||||
<h3 class="o-members-category h3"><%= ms.title %></h3>
|
<h3 class="o-members-category h3"><%= ms.title %></h3>
|
||||||
<ul class="o-members-list">
|
<ul class="o-members-list">
|
||||||
@@ -30,14 +28,7 @@
|
|||||||
<div class="o-members-pic"><%= show_avatar(member) %></div>
|
<div class="o-members-pic"><%= show_avatar(member) %></div>
|
||||||
<ul class="o-members-info">
|
<ul class="o-members-info">
|
||||||
<li><b class="o-members-label"><%= t("users.name")%></b><%= link_to member.name, panel_member_front_end_member_list_path(member.id), {:class => "o-members-link"} %></li>
|
<li><b class="o-members-label"><%= t("users.name")%></b><%= link_to member.name, panel_member_front_end_member_list_path(member.id), {:class => "o-members-link"} %></li>
|
||||||
<% @job_title = show_attribute_value(@member_lists.get_member_list_attribute_value(member.id,"teacher","job_title").get_value_by_locale(I18n.locale))
|
<li><b class="o-members-label"><%= @member_lists.get_member_list_attribute_field_name("teacher","job_title") %></b><%= show_attribute_value(@member_lists.get_member_list_attribute_value(member.id,"teacher","job_title").get_value_by_locale(I18n.locale)) %></li>
|
||||||
if @job_title != 'NoData' and !@job_title.blank?
|
|
||||||
%>
|
|
||||||
<li><b class="o-members-label">
|
|
||||||
<%= @member_lists.get_member_list_attribute_field_name("teacher","job_title") %></b>
|
|
||||||
<%= @job_title %>
|
|
||||||
</li>
|
|
||||||
<% end %>
|
|
||||||
<li><b class="o-members-label"><%= t("users.email")%></b><%= member.email %></li>
|
<li><b class="o-members-label"><%= t("users.email")%></b><%= member.email %></li>
|
||||||
<li><b class="o-members-label"><%= t("users.office_tel")%></b><%= member.office_tel %></li>
|
<li><b class="o-members-label"><%= t("users.office_tel")%></b><%= member.office_tel %></li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -49,8 +40,6 @@
|
|||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% elsif @item.frontend_style == 'Two' or @item.frontend_style.blank? %>
|
<% elsif @item.frontend_style == 'Two' or @item.frontend_style.blank? %>
|
||||||
@@ -63,8 +52,6 @@
|
|||||||
|
|
||||||
<% @member_status.each do |ms| %>
|
<% @member_status.each do |ms| %>
|
||||||
|
|
||||||
<% if @member_lists.where(:role_status_ids=>ms.id).count > 0 %>
|
|
||||||
|
|
||||||
<h3 class="o-members-category h3"><%= ms.title %></h3>
|
<h3 class="o-members-category h3"><%= ms.title %></h3>
|
||||||
<ul class="o-members-list">
|
<ul class="o-members-list">
|
||||||
|
|
||||||
@@ -74,11 +61,7 @@
|
|||||||
<div class="o-members-pic"><%= show_avatar(member) %></div>
|
<div class="o-members-pic"><%= show_avatar(member) %></div>
|
||||||
<ul class="o-members-info">
|
<ul class="o-members-info">
|
||||||
<li><b class="o-members-label"><%= t("users.name")%></b><%= link_to member.name, panel_member_front_end_member_list_path(member.id), {:class => "o-members-link"} %></li>
|
<li><b class="o-members-label"><%= t("users.name")%></b><%= link_to member.name, panel_member_front_end_member_list_path(member.id), {:class => "o-members-link"} %></li>
|
||||||
<% @job_title = show_attribute_value(@member_lists.get_member_list_attribute_value(member.id,"teacher","job_title").get_value_by_locale(I18n.locale))
|
<li><b class="o-members-label"><%= @member_lists.get_member_list_attribute_field_name("teacher","job_title") %></b><%= show_attribute_value(@member_lists.get_member_list_attribute_value(member.id,"teacher","job_title").get_value_by_locale(I18n.locale)) %></li>
|
||||||
if @job_title != 'NoData' and !@job_title.blank?
|
|
||||||
%>
|
|
||||||
<li><b class="o-members-label"><%= @member_lists.get_member_list_attribute_field_name("teacher","job_title") %></b><%= @job_title %></li>
|
|
||||||
<% end %>
|
|
||||||
<li><b class="o-members-label"><%= t("users.email")%></b> <%= member.email %></li>
|
<li><b class="o-members-label"><%= t("users.email")%></b> <%= member.email %></li>
|
||||||
<li><b class="o-members-label"><%= t("users.office_tel")%></b><%= member.office_tel %></li>
|
<li><b class="o-members-label"><%= t("users.office_tel")%></b><%= member.office_tel %></li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -90,8 +73,6 @@
|
|||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
+18
-20
@@ -2,6 +2,9 @@
|
|||||||
<div class="member-data">
|
<div class="member-data">
|
||||||
<table>
|
<table>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
||||||
|
<%= render :partial=> "show_roles",:collection=>@member.roles.asc(:created_at) %>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><%= t('users.name')%></td>
|
<td><%= t('users.name')%></td>
|
||||||
<td><%= @member.name%></td>
|
<td><%= @member.name%></td>
|
||||||
@@ -10,12 +13,7 @@
|
|||||||
<td><%= t('users.email')%></td>
|
<td><%= t('users.email')%></td>
|
||||||
<td><a href="mailto:<%= @member.email %>"><%= @member.email %></a></td>
|
<td><a href="mailto:<%= @member.email %>"><%= @member.email %></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<% if !@member.sid.blank? %>
|
|
||||||
<tr>
|
|
||||||
<td><%= t('users.sid')%></td>
|
|
||||||
<td><%= @member.sid%></td>
|
|
||||||
</tr>
|
|
||||||
<% end %>
|
|
||||||
<% if !@member.office_tel.blank? %>
|
<% if !@member.office_tel.blank? %>
|
||||||
<tr>
|
<tr>
|
||||||
<td><%= t('users.office_tel')%></td>
|
<td><%= t('users.office_tel')%></td>
|
||||||
@@ -35,37 +33,37 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
<%= render :partial=> "show_roles",:collection=>@member.roles.asc(:created_at) %>
|
<%= render :partial=> "show_research_field",:collection=>@member.roles.asc(:created_at) %>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="member-pic">
|
<div class="member-pic">
|
||||||
<%= image_tag(@member.avatar) %>
|
<%= show_avatar(@member) %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="member-module">
|
<div class="member-module">
|
||||||
<div class="module-nav">
|
<div class="module-nav">
|
||||||
<ul>
|
<ul>
|
||||||
<%
|
<%
|
||||||
@plugin_shows.each do |plugin|
|
@plugins.each do |plugin|
|
||||||
|
|
||||||
@data = plugin["app_name"].classify.constantize.where(is_hidden: false, :create_user_id=>@member.id)
|
@data = plugin.app_name.classify.constantize.where(is_hidden: false, :create_user_id=>@member.id)
|
||||||
@intro_data = plugin["intro_app_name"].classify.constantize.where(:user_id=>@member.id).first
|
@intro_data = plugin.intro_app_name.classify.constantize.where(:user_id=>@member.id).first
|
||||||
%>
|
%>
|
||||||
|
|
||||||
<% if !@intro_data.blank? %>
|
<% if !@intro_data.blank? %>
|
||||||
|
|
||||||
<% if !@intro_data.brief_intro.blank? or !@intro_data.complete_list.blank? %>
|
<% if !@intro_data.brief_intro.blank? or !@intro_data.complete_list.blank? %>
|
||||||
<li><a href="#<%= plugin["name"].gsub(' ', '') %>"><%= plugin["name"] %></a></li>
|
<li><a href="#<%= plugin.name.gsub(' ', '') %>"><%= plugin.name %></a></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% else %>
|
<% else %>
|
||||||
|
|
||||||
<% if !@data.blank? %>
|
<% if !@data.blank? %>
|
||||||
<li><a href="#<%= plugin["name"].gsub(' ', '') %>"><%= plugin["name"] %></a></li>
|
<li><a href="#<%= plugin.name.gsub(' ', '') %>"><%= plugin.name %></a></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -75,18 +73,18 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="module-content">
|
<div class="module-content">
|
||||||
<%
|
<%
|
||||||
@plugin_shows.each do |plugin|
|
@plugins.each do |plugin|
|
||||||
|
|
||||||
@plugin_partial = !plugin["front_partial_path"].blank? ? OrbitApp::Plugin::Registration.find_by_key(plugin["name"]).front_partial_path : nil
|
@plugin_partial = !plugin.front_partial_path.blank? ? OrbitApp::Plugin::Registration.find_by_key(plugin.name).front_partial_path : nil
|
||||||
|
|
||||||
@data = plugin["app_name"].classify.constantize.where(:create_user_id=>@member.id)
|
@data = plugin.app_name.classify.constantize.where(:create_user_id=>@member.id)
|
||||||
@intro_data = plugin["intro_app_name"].classify.constantize.where(:user_id=>@member.id).first
|
@intro_data = plugin.intro_app_name.classify.constantize.where(:user_id=>@member.id).first
|
||||||
%>
|
%>
|
||||||
|
|
||||||
<% if !@intro_data.blank? %>
|
<% if !@intro_data.blank? %>
|
||||||
|
|
||||||
<% if !@intro_data.brief_intro.blank? or !@intro_data.complete_list.blank? %>
|
<% if !@intro_data.brief_intro.blank? or !@intro_data.complete_list.blank? %>
|
||||||
<div class="module-pane" id="<%= plugin["name"].gsub(' ', '') %>">
|
<div class="module-pane" id="<%= plugin.name.gsub(' ', '') %>">
|
||||||
<%= render :partial => @plugin_partial if !@plugin_partial.blank? %>
|
<%= render :partial => @plugin_partial if !@plugin_partial.blank? %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -94,7 +92,7 @@
|
|||||||
<% else %>
|
<% else %>
|
||||||
|
|
||||||
<% if !@data.blank? %>
|
<% if !@data.blank? %>
|
||||||
<div class="module-pane" id="<%= plugin["name"].gsub(' ', '') %>">
|
<div class="module-pane" id="<%= plugin.name.gsub(' ', '') %>">
|
||||||
<%= render :partial => @plugin_partial if !@plugin_partial.blank? %>
|
<%= render :partial => @plugin_partial if !@plugin_partial.blank? %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
vendor/built_in_modules/personal_book/app/assets/javascripts/personal_book/desktop/personal_books.js
Vendored
+5
@@ -93,6 +93,11 @@ orbitDesktop.prototype.initializePersonalBook = function(target,url,cache){ // t
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.initializePersonalBook.syncComplete = function(){
|
||||||
|
o.notify("Sync Complete","success");
|
||||||
|
o.sub_menu_item($("div[content-type=menu] a").eq(0));
|
||||||
|
}
|
||||||
|
|
||||||
this.initializePersonalBook.coAuthorformCallback = function(data){
|
this.initializePersonalBook.coAuthorformCallback = function(data){
|
||||||
if(data.success){
|
if(data.success){
|
||||||
o.notify(data.msg,"success");
|
o.notify(data.msg,"success");
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@ class Panel::PersonalBook::Desktop::PersonalBooksController < ApplicationControl
|
|||||||
page ||= 1
|
page ||= 1
|
||||||
|
|
||||||
@per_column = 5
|
@per_column = 5
|
||||||
|
@userid = current_user.id
|
||||||
case @view_by
|
case @view_by
|
||||||
when "abstract"
|
when "abstract"
|
||||||
@per_column = 1
|
@per_column = 1
|
||||||
|
|||||||
+3
-6
@@ -4,13 +4,10 @@ module Panel::PersonalBook::Desktop::PersonalBooksHelper
|
|||||||
"item" => "true",
|
"item" => "true",
|
||||||
"data-id" => publication.id.to_s,
|
"data-id" => publication.id.to_s,
|
||||||
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
|
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
|
||||||
content_tag :div,
|
marker(publication.id) + \
|
||||||
:class => "inner" do
|
content(publication, view) + \
|
||||||
marker(publication.id) + \
|
edit_or_delete(publication)
|
||||||
content(publication, view) + \
|
|
||||||
edit_or_delete(publication)
|
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def marker id
|
def marker id
|
||||||
|
|||||||
@@ -83,11 +83,12 @@ class WritingBook
|
|||||||
end
|
end
|
||||||
|
|
||||||
def create_link
|
def create_link
|
||||||
|
title = []
|
||||||
title = ["\"#{self.extracted_chapters}\""]
|
# title = ["#{self.extracted_chapters}"] if self.extracted_chapters.present?
|
||||||
title << self.book_title
|
title << self.paper_title if self.paper_title.present?
|
||||||
title << self.publisher
|
title << self.book_title if self.book_title.present?
|
||||||
title << self.pages
|
title << self.publisher if self.publisher.present?
|
||||||
|
title << self.pages if self.pages.present?
|
||||||
# title << "(#{self.journal_level_types.collect{|x| x.title}.join(', ')})"
|
# title << "(#{self.journal_level_types.collect{|x| x.title}.join(', ')})"
|
||||||
title.join(', ')
|
title.join(', ')
|
||||||
end
|
end
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
<td class="span2">
|
<td class="span2">
|
||||||
|
|
||||||
<a href="<%= panel_personal_book_back_end_writing_book_author_type_quick_edit_path(list_author_type) %>#myModal2" data-toggle="modal" data-remote="true" class="action"><%= t('edit')%></a>
|
<a href="<%= panel_personal_book_back_end_writing_book_author_type_quick_edit_path(list_author_type) %>#myModal2" data-toggle="modal" data-remote="true" class="action"><%= t('edit')%></a>
|
||||||
<%= link_to 'Delete',
|
<%= link_to show_toggle_archive_btn(list_author_type),
|
||||||
polymorphic_path([:panel, :personal_book, :back_end, list_author_type]), :confirm => t('sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %>
|
polymorphic_path([:panel, :personal_book, :back_end, list_author_type]), :confirm => t('sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
+27
-14
@@ -21,14 +21,14 @@
|
|||||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="overview" content-layout="simple" base-width="420">
|
<div class="overview" content-layout="column" base-width="420">
|
||||||
<ul class="s_form" isotope="true">
|
<div column="true">
|
||||||
<li class="s_grid_row" >
|
<div class="s_form">
|
||||||
|
<ul>
|
||||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||||
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
|
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
|
||||||
<% data = "data-language=" + locale %>
|
<% data = "data-language=" + locale %>
|
||||||
|
<li class="s_grid_row" <%= style %> <%= data %> >
|
||||||
<div class="form_fix" <%= style %> <%= data %>>
|
|
||||||
<%= f.fields_for :paper_title_translations do |f| %>
|
<%= f.fields_for :paper_title_translations do |f| %>
|
||||||
<%= f.text_area locale,
|
<%= f.text_area locale,
|
||||||
class: "s_grid_12 s_grid s_grid_h_3",
|
class: "s_grid_12 s_grid s_grid_h_3",
|
||||||
@@ -36,7 +36,8 @@
|
|||||||
placeholder: t("personal_book.paper_title")+ "("+I18nVariable.from_locale(locale)+")",
|
placeholder: t("personal_book.paper_title")+ "("+I18nVariable.from_locale(locale)+")",
|
||||||
value: (@personal_book.paper_title_translations[locale.to_s] rescue nil) %>
|
value: (@personal_book.paper_title_translations[locale.to_s] rescue nil) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</li>
|
||||||
|
<li class="s_grid_row" <%= style %> <%= data %> >
|
||||||
<%= f.fields_for :book_title_translations do |f| %>
|
<%= f.fields_for :book_title_translations do |f| %>
|
||||||
<%= f.text_field locale,
|
<%= f.text_field locale,
|
||||||
size: "20",
|
size: "20",
|
||||||
@@ -44,7 +45,8 @@
|
|||||||
class: "s_grid_12 s_grid",
|
class: "s_grid_12 s_grid",
|
||||||
value: (@personal_book.book_title_translations[locale.to_s] rescue nil) %>
|
value: (@personal_book.book_title_translations[locale.to_s] rescue nil) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</li>
|
||||||
|
<li class="s_grid_row" <%= style %> <%= data %> >
|
||||||
<%= f.fields_for :extracted_chapters_translations do |f| %>
|
<%= f.fields_for :extracted_chapters_translations do |f| %>
|
||||||
<%= f.text_field locale,
|
<%= f.text_field locale,
|
||||||
size: "20",
|
size: "20",
|
||||||
@@ -52,7 +54,8 @@
|
|||||||
class: "s_grid_12 s_grid",
|
class: "s_grid_12 s_grid",
|
||||||
value: (@personal_book.extracted_chapters_translations[locale.to_s] rescue nil) %>
|
value: (@personal_book.extracted_chapters_translations[locale.to_s] rescue nil) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</li>
|
||||||
|
<li class="s_grid_row" <%= style %> <%= data %> >
|
||||||
<%= f.fields_for :publishers_translations do |f| %>
|
<%= f.fields_for :publishers_translations do |f| %>
|
||||||
<%= f.text_field locale,
|
<%= f.text_field locale,
|
||||||
size: "20",
|
size: "20",
|
||||||
@@ -60,9 +63,8 @@
|
|||||||
class: "s_grid_12 s_grid",
|
class: "s_grid_12 s_grid",
|
||||||
value: (@personal_book.publishers_translations[locale.to_s] rescue nil) %>
|
value: (@personal_book.publishers_translations[locale.to_s] rescue nil) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<%= label_tag("", t("personal_book.book_paper_type"), class: "s_grid_4 s_grid") %>
|
<%= label_tag("", t("personal_book.book_paper_type"), class: "s_grid_4 s_grid") %>
|
||||||
<%= f.select :book_paper_type_id, BookPaperType.all.collect {|t| [ t.title, t.id ]}, {:class => "s_grid s_grid_8"} %>
|
<%= f.select :book_paper_type_id, BookPaperType.all.collect {|t| [ t.title, t.id ]}, {:class => "s_grid s_grid_8"} %>
|
||||||
@@ -105,7 +107,12 @@
|
|||||||
<%= label_tag("", t("personal_book.url"), class: "s_grid_4 s_grid") %><%= f.text_field :url, size: "20", class: "s_grid_8 s_grid"%>
|
<%= label_tag("", t("personal_book.url"), class: "s_grid_4 s_grid") %><%= f.text_field :url, size: "20", class: "s_grid_8 s_grid"%>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div column="true">
|
||||||
|
<div class="s_form">
|
||||||
|
<ul>
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<%= f.text_area :keywords, size: "20x3", placeholder: t("personal_book.keywords"), class: "s_grid_12 s_grid_h_2 s_grid"%>
|
<%= f.text_area :keywords, size: "20x3", placeholder: t("personal_book.keywords"), class: "s_grid_12 s_grid_h_2 s_grid"%>
|
||||||
</li>
|
</li>
|
||||||
@@ -120,9 +127,14 @@
|
|||||||
<%= label_tag("", t("personal_book.isbn"), class: "s_grid_4 s_grid") %><%= f.text_field :isbn, size: "20", class: "s_grid_8 s_grid"%>
|
<%= label_tag("", t("personal_book.isbn"), class: "s_grid_4 s_grid") %><%= f.text_field :isbn, size: "20", class: "s_grid_8 s_grid"%>
|
||||||
</li>
|
</li>
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<%= f.text_area :note, size: "20x3", placeholder: t("personal_book.note"), class: "s_grid_12 s_grid s_grid_h_5 s_grid_h_full"%>
|
<%= f.text_area :note, size: "20x3", placeholder: t("personal_book.note"), class: "s_grid_12 s_grid s_grid_h_5"%>
|
||||||
</li>
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div column="true">
|
||||||
|
<div class="s_form">
|
||||||
|
<ul>
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<table class="s_table">
|
<table class="s_table">
|
||||||
<thead>
|
<thead>
|
||||||
@@ -153,7 +165,8 @@
|
|||||||
</table>
|
</table>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var get_html = function(old_id,new_id){
|
var get_html = function(old_id,new_id){
|
||||||
|
|||||||
+7
-6
@@ -57,14 +57,15 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="hh1 hp sdm">
|
||||||
|
<div class="sdm_t hh1"><a href="<%= admin_import_data_sync_book_data_path(:user_id=>@userid) %>" class="icons-cycle" ajax-remote="get" response-type="json" callback-method="syncComplete" > Sync Books</a></div>
|
||||||
|
</div>
|
||||||
<div class="hh1 hp sdm">
|
<div class="hh1 hp sdm">
|
||||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="overview" page-name="books_list" content-layout="simple" base-width="300" per-column="<%= @per_column.to_s %>" pagination-var="view=<%= @view_by %>&page" >
|
<div class="overview" page-name="books_list" content-layout="datalist" base-width="300" per-column="<%= @per_column.to_s %>" pagination-var="view=<%= @view_by %>&page" >
|
||||||
<ul isotope="true">
|
<% @writing_books.each do |w| %>
|
||||||
<% @writing_books.each do |w| %>
|
<%= publication_record w, @view_by%>
|
||||||
<%= publication_record w, @view_by%>
|
<% end %>
|
||||||
<% end %>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
Vendored
+2
@@ -75,6 +75,8 @@
|
|||||||
<% if is_admin? %>
|
<% if is_admin? %>
|
||||||
<div class="bottomnav clearfix">
|
<div class="bottomnav clearfix">
|
||||||
<div class="action pull-right">
|
<div class="action pull-right">
|
||||||
|
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.sync_data'), admin_import_data_sync_book_data_path(:user_id => @user.id), :class => 'btn btn-primary' %>
|
||||||
|
|
||||||
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.edit_brief_intro'), panel_personal_book_back_end_personal_book_intros_path(:user_id => @user.id), :class => 'btn btn-primary' %>
|
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.edit_brief_intro'), panel_personal_book_back_end_personal_book_intros_path(:user_id => @user.id), :class => 'btn btn-primary' %>
|
||||||
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('announcement.add_new'), new_panel_personal_book_back_end_writing_book_path(:user_id => @user.id), :class => 'btn btn-primary' %>
|
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('announcement.add_new'), new_panel_personal_book_back_end_writing_book_path(:user_id => @user.id), :class => 'btn btn-primary' %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@ module PersonalBook
|
|||||||
OrbitApp.registration "PersonalBook",:type=> 'ModuleApp' do
|
OrbitApp.registration "PersonalBook",:type=> 'ModuleApp' do
|
||||||
module_label 'module_name.personal_book'
|
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, :sort_number => '25', :app_name=>"WritingBook", :intro_app_name=>"PersonalBookIntro",:path=>"panel/personal_book/plugin/profile",:front_path=>"panel/personal_book/front_end/profile",:admin_path=>"/panel/personal_book/back_end/writing_books",:i18n=>'module_name.personal_book'
|
personal_plugin :enable => true, :app_name=>"WritingBook", :intro_app_name=>"PersonalBookIntro",:path=>"panel/personal_book/plugin/profile",:front_path=>"panel/personal_book/front_end/profile",:admin_path=>"/panel/personal_book/back_end/writing_books",:i18n=>'module_name.personal_book'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+4
-1
@@ -42,7 +42,10 @@ orbitDesktop.prototype.initializeConferencePapers = function(target,url,cache){
|
|||||||
this.initializeConferencePapers.cancelpaper = function(){
|
this.initializeConferencePapers.cancelpaper = function(){
|
||||||
o.highlight_sub_menu_item(0);
|
o.highlight_sub_menu_item(0);
|
||||||
}
|
}
|
||||||
|
this.initializeConferencePapers.syncComplete = function(){
|
||||||
|
o.notify("Sync Complete","success");
|
||||||
|
o.sub_menu_item($("div[content-type=menu] a").eq(0));
|
||||||
|
}
|
||||||
var uploadFiles = function(){
|
var uploadFiles = function(){
|
||||||
$('#add_plugin_file a.add').click(function(){
|
$('#add_plugin_file a.add').click(function(){
|
||||||
var new_id = $(this).prev().attr('value');
|
var new_id = $(this).prev().attr('value');
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ class Panel::PersonalConference::Desktop::ConferencePagesController < Applicatio
|
|||||||
@writing_conferences = WritingConference.where(create_user_id: current_user.id)
|
@writing_conferences = WritingConference.where(create_user_id: current_user.id)
|
||||||
page = params[:page]
|
page = params[:page]
|
||||||
page ||= 1
|
page ||= 1
|
||||||
|
@userid = current_user.id
|
||||||
if @view_by.nil?
|
if @view_by.nil?
|
||||||
@writing_conferences = @writing_conferences.asc(:paper_title)
|
@writing_conferences = @writing_conferences.asc(:paper_title)
|
||||||
else
|
else
|
||||||
|
|||||||
+5
-6
@@ -84,12 +84,11 @@ class WritingConference
|
|||||||
end
|
end
|
||||||
|
|
||||||
def create_link
|
def create_link
|
||||||
|
title = ["#{self.paper_title}"]
|
||||||
title = ["\"#{self.paper_title}\""]
|
title << self.conference_title if self.conference_title.present?
|
||||||
title << self.conference_title
|
title << self.sponsor if self.sponsor.present?
|
||||||
title << self.sponsor
|
title << self.location if self.location.present?
|
||||||
title << self.location
|
title << "#{period_start_date}-#{period_end_date}" if (self.period_start_date.present? && self.period_end_date.present?)
|
||||||
title << "#{period_start_date}-#{period_end_date}"
|
|
||||||
# title << "(#{self.conference_paper_types.collect{|x| x.title}.join(', ')})"
|
# title << "(#{self.conference_paper_types.collect{|x| x.title}.join(', ')})"
|
||||||
title.join(', ')
|
title.join(', ')
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
<td class="span2">
|
<td class="span2">
|
||||||
|
|
||||||
<a href="<%= panel_personal_conference_back_end_writing_conference_author_type_quick_edit_path(list_author_type) %>#myModal2" data-toggle="modal" data-remote="true" class="action">編輯</a>
|
<a href="<%= panel_personal_conference_back_end_writing_conference_author_type_quick_edit_path(list_author_type) %>#myModal2" data-toggle="modal" data-remote="true" class="action">編輯</a>
|
||||||
<%= link_to 'Delete',
|
<%= link_to show_toggle_archive_btn(list_author_type),
|
||||||
polymorphic_path([:panel, :personal_conference, :back_end, list_author_type]), :confirm => t('sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %>
|
polymorphic_path([:panel, :personal_conference, :back_end, list_author_type]), :confirm => t('sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
<td class="span2">
|
<td class="span2">
|
||||||
|
|
||||||
<a href="<%= panel_personal_conference_back_end_writing_conference_paper_type_quick_edit_path(list_paper_type) %>#myModal1" data-toggle="modal" data-remote="true" class="action">編輯</a>
|
<a href="<%= panel_personal_conference_back_end_writing_conference_paper_type_quick_edit_path(list_paper_type) %>#myModal1" data-toggle="modal" data-remote="true" class="action">編輯</a>
|
||||||
<%= link_to 'Delete',
|
<%= link_to show_toggle_archive_btn(list_paper_type),
|
||||||
polymorphic_path([:panel, :personal_conference, :back_end, list_paper_type]), :confirm => t('sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %>
|
polymorphic_path([:panel, :personal_conference, :back_end, list_paper_type]), :confirm => t('sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
+33
-16
@@ -29,13 +29,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="viewport"> -->
|
<div class="viewport"> -->
|
||||||
<div class="overview" content-layout="simple" base-width="420">
|
<div class="overview" content-layout="column" base-width="420">
|
||||||
<ul class="s_form" isotope="true">
|
<div column="true">
|
||||||
<li class="s_grid_row" >
|
<div class="s_form">
|
||||||
|
<ul>
|
||||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||||
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
|
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
|
||||||
<% data = "data-language=" + locale %>
|
<% data = "data-language=" + locale %>
|
||||||
<div class="form_fix" <%= style %> <%= data %>>
|
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||||
<%= f.fields_for :paper_title_translations do |f| %>
|
<%= f.fields_for :paper_title_translations do |f| %>
|
||||||
<%= f.text_area locale,
|
<%= f.text_area locale,
|
||||||
class: "s_grid_12 s_grid_h_2 s_grid",
|
class: "s_grid_12 s_grid_h_2 s_grid",
|
||||||
@@ -43,6 +44,8 @@
|
|||||||
placeholder: t("personal_conference.paper_title")+ "("+I18nVariable.from_locale(locale)+")",
|
placeholder: t("personal_conference.paper_title")+ "("+I18nVariable.from_locale(locale)+")",
|
||||||
value: (@writing_conference.paper_title_translations[locale.to_s] rescue nil) %>
|
value: (@writing_conference.paper_title_translations[locale.to_s] rescue nil) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</li>
|
||||||
|
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||||
<%= f.fields_for :conference_title_translations do |f| %>
|
<%= f.fields_for :conference_title_translations do |f| %>
|
||||||
<%= f.text_field locale,
|
<%= f.text_field locale,
|
||||||
size: "20",
|
size: "20",
|
||||||
@@ -50,9 +53,8 @@
|
|||||||
class: "s_grid_12 s_grid",
|
class: "s_grid_12 s_grid",
|
||||||
value: (@writing_conference.conference_title_translations[locale.to_s] rescue nil) %>
|
value: (@writing_conference.conference_title_translations[locale.to_s] rescue nil) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<div>
|
<div>
|
||||||
<%= label_tag("", t("personal_conference.paper_type"), class: 's_grid s_grid_4') %>
|
<%= label_tag("", t("personal_conference.paper_type"), class: 's_grid s_grid_4') %>
|
||||||
@@ -97,7 +99,11 @@
|
|||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<%= label_tag("", t("personal_conference.url"), class: "s_grid_4 s_grid") %><%= f.text_field :url, size: "20", placeholder: "www.sample.com", class: "s_grid_8 s_grid"%>
|
<%= label_tag("", t("personal_conference.url"), class: "s_grid_4 s_grid") %><%= f.text_field :url, size: "20", placeholder: "www.sample.com", class: "s_grid_8 s_grid"%>
|
||||||
</li>
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div column="true">
|
||||||
|
<div class="s_form">
|
||||||
|
<ul>
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<%= f.text_area :author_tokens,
|
<%= f.text_area :author_tokens,
|
||||||
class: "s_grid_12 s_grid",
|
class: "s_grid_12 s_grid",
|
||||||
@@ -149,7 +155,12 @@
|
|||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="s_grid_row"><input class="s_grid s_grid_12" type="text" placeholder=<%= t("personal_conference.tags") %>></li>
|
<li class="s_grid_row"><input class="s_grid s_grid_12" type="text" placeholder=<%= t("personal_conference.tags") %>></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div column="true">
|
||||||
|
<div class="s_form">
|
||||||
|
<ul>
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<table class="s_table">
|
<table class="s_table">
|
||||||
<thead>
|
<thead>
|
||||||
@@ -179,16 +190,22 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</li>
|
</li>
|
||||||
|
</ul>
|
||||||
<li class="s_grid_row">
|
</div>
|
||||||
<%= f.text_area :abstract, size: "20x22", placeholder: t("personal_conference.abstract"), class: "s_grid_12 s_grid_h_10 s_grid s_grid_h_full"%>
|
<div column="true">
|
||||||
</li>
|
<ul class="s_form">
|
||||||
|
<li class="s_grid_row">
|
||||||
<li class="s_grid_row">
|
<%= f.text_area :abstract, size: "20x22", placeholder: t("personal_conference.abstract"), class: "s_grid_12 s_grid_h_10 s_grid"%>
|
||||||
<%= f.text_area :note, size: "20x22", placeholder: t("personal_conference.note"), class: "s_grid_12 s_grid_h_10 s_grid s_grid_h_full"%>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div column="true">
|
||||||
|
<ul class="s_form">
|
||||||
|
<li class="s_grid_row">
|
||||||
|
<%= f.text_area :note, size: "20x22", placeholder: t("personal_conference.note"), class: "s_grid_12 s_grid_h_10 s_grid"%>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- </div>
|
<!-- </div>
|
||||||
</div> -->
|
</div> -->
|
||||||
|
|||||||
+3
@@ -58,6 +58,9 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="hh1 hp sdm">
|
||||||
|
<div class="sdm_t hh1"><a href="<%= admin_import_data_sync_conference_data_path(:user_id => @userid) %>" class="icons-cycle" ajax-remote="get" response-type="json" callback-method="syncComplete" > Sync Conference Papers</a></div>
|
||||||
|
</div>
|
||||||
<div class="hh1 hp sdm">
|
<div class="hh1 hp sdm">
|
||||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+2
@@ -75,6 +75,8 @@
|
|||||||
<% if is_admin? %>
|
<% if is_admin? %>
|
||||||
<div class="bottomnav clearfix">
|
<div class="bottomnav clearfix">
|
||||||
<div class="action pull-right">
|
<div class="action pull-right">
|
||||||
|
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.sync_data'), admin_import_data_sync_conference_data_path(:user_id => @user.id), :class => 'btn btn-primary' %>
|
||||||
|
|
||||||
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.edit_brief_intro'), panel_personal_conference_back_end_personal_conference_intros_path(:user_id => @user.id), :class => 'btn btn-primary' %>
|
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.edit_brief_intro'), panel_personal_conference_back_end_personal_conference_intros_path(:user_id => @user.id), :class => 'btn btn-primary' %>
|
||||||
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('announcement.add_new'), new_panel_personal_conference_back_end_writing_conference_path(:user_id => @user.id), :class => 'btn btn-primary' %>
|
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('announcement.add_new'), new_panel_personal_conference_back_end_writing_conference_path(:user_id => @user.id), :class => 'btn btn-primary' %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@ module PersonalConference
|
|||||||
OrbitApp.registration "PersonalConference",:type=> 'ModuleApp' do
|
OrbitApp.registration "PersonalConference",:type=> 'ModuleApp' do
|
||||||
module_label 'module_name.personal_conference'
|
module_label 'module_name.personal_conference'
|
||||||
base_url File.expand_path File.dirname(__FILE__)
|
base_url File.expand_path File.dirname(__FILE__)
|
||||||
personal_plugin :enable => true, :sort_number => '10', :app_name=>"WritingConference", :intro_app_name=>"PersonalConferenceIntro",:path=>"panel/personal_conference/plugin/profile",:front_path=>"panel/personal_conference/front_end/profile",:admin_path=>"/panel/personal_conference/back_end/writing_conferences",:i18n=>'module_name.personal_conference'
|
personal_plugin :enable => true, :app_name=>"WritingConference", :intro_app_name=>"PersonalConferenceIntro",:path=>"panel/personal_conference/plugin/profile",:front_path=>"panel/personal_conference/front_end/profile",:admin_path=>"/panel/personal_conference/back_end/writing_conferences",:i18n=>'module_name.personal_conference'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
-3
@@ -4,13 +4,10 @@ module Panel::PersonalDiploma::Desktop::PersonalDiplomasHelper
|
|||||||
"item" => "true",
|
"item" => "true",
|
||||||
"data-id" => publication.id.to_s,
|
"data-id" => publication.id.to_s,
|
||||||
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
|
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
|
||||||
content_tag :div,
|
|
||||||
:class => "inner" do
|
|
||||||
marker(publication.id) + \
|
marker(publication.id) + \
|
||||||
content(publication, view) + \
|
content(publication, view) + \
|
||||||
edit_or_delete(publication)
|
edit_or_delete(publication)
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def marker id
|
def marker id
|
||||||
|
|||||||
+21
-12
@@ -21,8 +21,10 @@
|
|||||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="overview" content-layout="simple" base-width="420">
|
<div class="overview" content-layout="column" base-width="420">
|
||||||
<ul class="s_form" isotope="true">
|
<div column="true">
|
||||||
|
<div class="s_form">
|
||||||
|
<ul>
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<%= label_tag("", t("personal_diploma.start_date"), class: "s_grid_4 s_grid") %>
|
<%= label_tag("", t("personal_diploma.start_date"), class: "s_grid_4 s_grid") %>
|
||||||
<%= f.date_select :start_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year] }, {:class => 's_grid_4 s_grid'} %>
|
<%= f.date_select :start_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year] }, {:class => 's_grid_4 s_grid'} %>
|
||||||
@@ -33,11 +35,10 @@
|
|||||||
<%= f.date_select :end_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year] }, {:class => 's_grid_4 s_grid'} %>
|
<%= f.date_select :end_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year] }, {:class => 's_grid_4 s_grid'} %>
|
||||||
<%= f.date_select :end_date, {:use_month_numbers => true, :order => [:month, :day] }, {:class => 's_grid_2 s_grid'} %>
|
<%= f.date_select :end_date, {:use_month_numbers => true, :order => [:month, :day] }, {:class => 's_grid_2 s_grid'} %>
|
||||||
</li>
|
</li>
|
||||||
<li class="s_grid_row">
|
|
||||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||||
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
|
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
|
||||||
<% data = "data-language=" + locale %>
|
<% data = "data-language=" + locale %>
|
||||||
<div class="form_fix" <%= style %> <%= data %>>
|
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||||
<%= f.fields_for :school_name_translations do |f| %>
|
<%= f.fields_for :school_name_translations do |f| %>
|
||||||
<%= f.text_field locale,
|
<%= f.text_field locale,
|
||||||
size: "20",
|
size: "20",
|
||||||
@@ -45,7 +46,8 @@
|
|||||||
class: "s_grid_12 s_grid",
|
class: "s_grid_12 s_grid",
|
||||||
value: (@diploma.school_name_translations[locale.to_s] rescue nil) %>
|
value: (@diploma.school_name_translations[locale.to_s] rescue nil) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</li>
|
||||||
|
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||||
<%= f.fields_for :country_translations do |f| %>
|
<%= f.fields_for :country_translations do |f| %>
|
||||||
<%= f.text_field locale,
|
<%= f.text_field locale,
|
||||||
size: "20",
|
size: "20",
|
||||||
@@ -53,7 +55,8 @@
|
|||||||
class: "s_grid_12 s_grid",
|
class: "s_grid_12 s_grid",
|
||||||
value: (@diploma.country_translations[locale.to_s] rescue nil) %>
|
value: (@diploma.country_translations[locale.to_s] rescue nil) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</li>
|
||||||
|
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||||
<%= f.fields_for :department_translations do |f| %>
|
<%= f.fields_for :department_translations do |f| %>
|
||||||
<%= f.text_field locale,
|
<%= f.text_field locale,
|
||||||
size: "20",
|
size: "20",
|
||||||
@@ -61,7 +64,8 @@
|
|||||||
class: "s_grid_12 s_grid",
|
class: "s_grid_12 s_grid",
|
||||||
value: (@diploma.department_translations[locale.to_s] rescue nil) %>
|
value: (@diploma.department_translations[locale.to_s] rescue nil) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</li>
|
||||||
|
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||||
<%= f.fields_for :degree_translations do |f| %>
|
<%= f.fields_for :degree_translations do |f| %>
|
||||||
<%= f.text_field locale,
|
<%= f.text_field locale,
|
||||||
size: "20",
|
size: "20",
|
||||||
@@ -69,9 +73,8 @@
|
|||||||
class: "s_grid_12 s_grid",
|
class: "s_grid_12 s_grid",
|
||||||
value: (@diploma.degree_translations[locale.to_s] rescue nil) %>
|
value: (@diploma.degree_translations[locale.to_s] rescue nil) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<%= label_tag("", t("personal_diploma.url"), class: "s_grid_4 s_grid") %><%= f.text_field :url, size: "20", class: "s_grid_8 s_grid"%>
|
<%= label_tag("", t("personal_diploma.url"), class: "s_grid_4 s_grid") %><%= f.text_field :url, size: "20", class: "s_grid_8 s_grid"%>
|
||||||
</li>
|
</li>
|
||||||
@@ -82,10 +85,16 @@
|
|||||||
<%= f.label :language, t("personal_diploma.language"), :class => "s_grid s_grid_4" %>
|
<%= f.label :language, t("personal_diploma.language"), :class => "s_grid s_grid_4" %>
|
||||||
<%= f.select :language, Diploma::LANGUAGE_TYPES,{} ,{:class => "s_grid s_grid_8"} %>
|
<%= f.select :language, Diploma::LANGUAGE_TYPES,{} ,{:class => "s_grid s_grid_8"} %>
|
||||||
</li>
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div column="true">
|
||||||
|
<div class="s_form">
|
||||||
|
<ul>
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<%= f.text_area :note, size: "20x3", placeholder: t("personal_diploma.note"), class: "s_grid_12 s_grid s_grid_h_10 s_grid_h_full"%>
|
<%= f.text_area :note, size: "20x3", placeholder: t("personal_diploma.note"), class: "s_grid_12 s_grid s_grid_h_5"%>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
+4
-6
@@ -60,10 +60,8 @@
|
|||||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="overview" page-name="diploma_list" content-layout="simple" base-width="300" per-column="<%= @per_column.to_s %>" pagination-var="view=<%= @view_by %>&page" >
|
<div class="overview" page-name="diploma_list" content-layout="datalist" base-width="300" per-column="<%= @per_column.to_s %>" pagination-var="view=<%= @view_by %>&page" >
|
||||||
<ul isotope="true">
|
<% @diplomas.each do |w| %>
|
||||||
<% @diplomas.each do |w| %>
|
<%= publication_record w, @view_by%>
|
||||||
<%= publication_record w, @view_by%>
|
<% end %>
|
||||||
<% end %>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
+1
-1
@@ -2,7 +2,7 @@ module PersonalDiploma
|
|||||||
OrbitApp.registration "PersonalDiploma",:type=> 'ModuleApp' do
|
OrbitApp.registration "PersonalDiploma",:type=> 'ModuleApp' do
|
||||||
module_label 'module_name.personal_diploma'
|
module_label 'module_name.personal_diploma'
|
||||||
base_url File.expand_path File.dirname(__FILE__)
|
base_url File.expand_path File.dirname(__FILE__)
|
||||||
personal_plugin :enable => true, :sort_number => '40', :app_name=>"Diploma", :intro_app_name=>"PersonalDiplomaIntro",:path=>"panel/personal_diploma/plugin/profile",:front_path=>"panel/personal_diploma/front_end/profile",:admin_path=>"/panel/personal_diploma/back_end/diplomas",:i18n=>'module_name.personal_diploma'
|
personal_plugin :enable => true, :app_name=>"Diploma", :intro_app_name=>"PersonalDiplomaIntro",:path=>"panel/personal_diploma/plugin/profile",:front_path=>"panel/personal_diploma/front_end/profile",:admin_path=>"/panel/personal_diploma/back_end/diplomas",:i18n=>'module_name.personal_diploma'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
-3
@@ -4,13 +4,10 @@ module Panel::PersonalExperience::Desktop::PersonalExperiencesHelper
|
|||||||
"item" => "true",
|
"item" => "true",
|
||||||
"data-id" => publication.id.to_s,
|
"data-id" => publication.id.to_s,
|
||||||
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
|
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
|
||||||
content_tag :div,
|
|
||||||
:class => "inner" do
|
|
||||||
marker(publication.id) + \
|
marker(publication.id) + \
|
||||||
content(publication, view) + \
|
content(publication, view) + \
|
||||||
edit_or_delete(publication)
|
edit_or_delete(publication)
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def marker id
|
def marker id
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
<td class="span2">
|
<td class="span2">
|
||||||
|
|
||||||
<a href="<%= panel_personal_experience_back_end_experience_experience_category_quick_edit_path(list_experience_type) %>#myModal1" data-toggle="modal" data-remote="true" class="action"><%= t('edit')%></a>
|
<a href="<%= panel_personal_experience_back_end_experience_experience_category_quick_edit_path(list_experience_type) %>#myModal1" data-toggle="modal" data-remote="true" class="action"><%= t('edit')%></a>
|
||||||
<%= link_to 'Delete',
|
<%= link_to show_toggle_archive_btn(list_experience_type),
|
||||||
polymorphic_path([:panel, :personal_experience, :back_end, list_experience_type]), :confirm => t('sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %>
|
polymorphic_path([:panel, :personal_experience, :back_end, list_experience_type]), :confirm => t('sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
+19
-10
@@ -21,13 +21,14 @@
|
|||||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="overview" content-layout="simple" base-width="420">
|
<div class="overview" content-layout="column" base-width="420">
|
||||||
<ul class="s_form" isotope="true">
|
<div column="true">
|
||||||
<li class="s_grid_row">
|
<div class="s_form">
|
||||||
|
<ul>
|
||||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||||
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
|
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
|
||||||
<% data = "data-language=" + locale %>
|
<% data = "data-language=" + locale %>
|
||||||
<div class="form_fix" <%= style %> <%= data %>>
|
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||||
<%= f.fields_for :organizationt_title_translations do |f| %>
|
<%= f.fields_for :organizationt_title_translations do |f| %>
|
||||||
<%= f.text_field locale,
|
<%= f.text_field locale,
|
||||||
size: "20",
|
size: "20",
|
||||||
@@ -35,7 +36,8 @@
|
|||||||
class: "s_grid_12 s_grid",
|
class: "s_grid_12 s_grid",
|
||||||
value: (@experience.organizationt_title_translations[locale.to_s] rescue nil) %>
|
value: (@experience.organizationt_title_translations[locale.to_s] rescue nil) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</li>
|
||||||
|
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||||
<%= f.fields_for :department_translations do |f| %>
|
<%= f.fields_for :department_translations do |f| %>
|
||||||
<%= f.text_field locale,
|
<%= f.text_field locale,
|
||||||
size: "20",
|
size: "20",
|
||||||
@@ -43,7 +45,8 @@
|
|||||||
class: "s_grid_12 s_grid",
|
class: "s_grid_12 s_grid",
|
||||||
value: (@experience.department_translations[locale.to_s] rescue nil) %>
|
value: (@experience.department_translations[locale.to_s] rescue nil) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</li>
|
||||||
|
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||||
<%= f.fields_for :job_title_translations do |f| %>
|
<%= f.fields_for :job_title_translations do |f| %>
|
||||||
<%= f.text_field locale,
|
<%= f.text_field locale,
|
||||||
size: "20",
|
size: "20",
|
||||||
@@ -51,9 +54,8 @@
|
|||||||
class: "s_grid_12 s_grid",
|
class: "s_grid_12 s_grid",
|
||||||
value: (@experience.job_title_translations[locale.to_s] rescue nil) %>
|
value: (@experience.job_title_translations[locale.to_s] rescue nil) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<%= label_tag("", t("personal_experience.experience_category"), class: "s_grid_4 s_grid") %>
|
<%= label_tag("", t("personal_experience.experience_category"), class: "s_grid_4 s_grid") %>
|
||||||
<%= f.select :experience_category_id, ExperienceCategory.all.collect {|t| [ t.title, t.id ]}, {:class => "s_grid s_grid_8"} %>
|
<%= f.select :experience_category_id, ExperienceCategory.all.collect {|t| [ t.title, t.id ]}, {:class => "s_grid s_grid_8"} %>
|
||||||
@@ -78,9 +80,16 @@
|
|||||||
<%= f.label :language, t("personal_experience.language"), :class => "s_grid s_grid_4" %>
|
<%= f.label :language, t("personal_experience.language"), :class => "s_grid s_grid_4" %>
|
||||||
<%= f.select :language, Experience::LANGUAGE_TYPES,{} ,{:class => "s_grid s_grid_8"} %>
|
<%= f.select :language, Experience::LANGUAGE_TYPES,{} ,{:class => "s_grid s_grid_8"} %>
|
||||||
</li>
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div column="true">
|
||||||
|
<div class="s_form">
|
||||||
|
<ul>
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<%= f.text_area :note, size: "20x3", placeholder: t("personal_experience.note"), value: @experience.note , class: "s_grid_12 s_grid s_grid_h_3 s_grid_h_full"%>
|
<%= f.text_area :note, size: "20x3", placeholder: t("personal_experience.note"), value: @experience.note , class: "s_grid_12 s_grid s_grid_h_3"%>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
+4
-6
@@ -61,10 +61,8 @@
|
|||||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="overview" page-name="experience_list" content-layout="simple" base-width="300" per-column="<%= @per_column.to_s %>" pagination-var="view=<%= @view_by %>&page" >
|
<div class="overview" page-name="experience_list" content-layout="datalist" base-width="300" per-column="<%= @per_column.to_s %>" pagination-var="view=<%= @view_by %>&page" >
|
||||||
<ul isotope="true">
|
<% @experiences.each do |w| %>
|
||||||
<% @experiences.each do |w| %>
|
<%= publication_record w, @view_by%>
|
||||||
<%= publication_record w, @view_by%>
|
<% end %>
|
||||||
<% end %>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
+1
-1
@@ -2,7 +2,7 @@ module PersonalExperience
|
|||||||
OrbitApp.registration "PersonalExperience",:type=> 'ModuleApp' do
|
OrbitApp.registration "PersonalExperience",:type=> 'ModuleApp' do
|
||||||
module_label 'module_name.personal_experience'
|
module_label 'module_name.personal_experience'
|
||||||
base_url File.expand_path File.dirname(__FILE__)
|
base_url File.expand_path File.dirname(__FILE__)
|
||||||
personal_plugin :enable => true, :sort_number => '45', :app_name=>"Experience", :intro_app_name=>"PersonalExperienceIntro",:path=>"panel/personal_experience/plugin/profile",:front_path=>"panel/personal_experience/front_end/profile",:admin_path=>"/panel/personal_experience/back_end/experiences",:i18n=>'module_name.personal_experience'
|
personal_plugin :enable => true, :app_name=>"Experience", :intro_app_name=>"PersonalExperienceIntro",:path=>"panel/personal_experience/plugin/profile",:front_path=>"panel/personal_experience/front_end/profile",:admin_path=>"/panel/personal_experience/back_end/experiences",:i18n=>'module_name.personal_experience'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
-3
@@ -4,13 +4,10 @@ module Panel::PersonalHonor::Desktop::PersonalHonorsHelper
|
|||||||
"item" => "true",
|
"item" => "true",
|
||||||
"data-id" => publication.id.to_s,
|
"data-id" => publication.id.to_s,
|
||||||
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
|
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
|
||||||
content_tag :div,
|
|
||||||
:class => "inner" do
|
|
||||||
marker(publication.id) + \
|
marker(publication.id) + \
|
||||||
content(publication, view) + \
|
content(publication, view) + \
|
||||||
edit_or_delete(publication)
|
edit_or_delete(publication)
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def marker id
|
def marker id
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
<td class="span2">
|
<td class="span2">
|
||||||
|
|
||||||
<a href="<%= panel_personal_honor_back_end_honor_honor_category_quick_edit_path(list_honor_type) %>#myModal1" data-toggle="modal" data-remote="true" class="action"><%= t('edit')%></a>
|
<a href="<%= panel_personal_honor_back_end_honor_honor_category_quick_edit_path(list_honor_type) %>#myModal1" data-toggle="modal" data-remote="true" class="action"><%= t('edit')%></a>
|
||||||
<%= link_to 'Delete',
|
<%= link_to show_toggle_archive_btn(list_honor_type),
|
||||||
polymorphic_path([:panel, :personal_honor, :back_end, list_honor_type]), :confirm => t('sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %>
|
polymorphic_path([:panel, :personal_honor, :back_end, list_honor_type]), :confirm => t('sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
+14
-6
@@ -21,9 +21,11 @@
|
|||||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="overview" content-layout="simple" base-width="420">
|
<div class="overview" content-layout="column" base-width="420">
|
||||||
<ul class="s_form" isotope="true">
|
<div column="true">
|
||||||
<li class="s_grid_row" >
|
<div class="s_form">
|
||||||
|
<ul>
|
||||||
|
<li class="s_grid_row">
|
||||||
<%= label_tag("", t("personal_honor.award_name"), class: "s_grid_4 s_grid") %><%= f.text_field :award_name, size: "20", class: "s_grid_8 s_grid"%>
|
<%= label_tag("", t("personal_honor.award_name"), class: "s_grid_4 s_grid") %><%= f.text_field :award_name, size: "20", class: "s_grid_8 s_grid"%>
|
||||||
</li>
|
</li>
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
@@ -47,10 +49,16 @@
|
|||||||
<%= f.label :language, t("personal_honor.language"), :class => "s_grid s_grid_4" %>
|
<%= f.label :language, t("personal_honor.language"), :class => "s_grid s_grid_4" %>
|
||||||
<%= f.select :language, Honor::LANGUAGE_TYPES,{} ,{:class => "s_grid s_grid_8"} %>
|
<%= f.select :language, Honor::LANGUAGE_TYPES,{} ,{:class => "s_grid s_grid_8"} %>
|
||||||
</li>
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div column="true">
|
||||||
|
<div class="s_form">
|
||||||
|
<ul>
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<%= f.text_area :note, size: "20x3", placeholder: t("personal_honor.note"), class: "s_grid_12 s_grid s_grid_h_5 s_grid_h_full"%>
|
<%= f.text_area :note, size: "20x3", placeholder: t("personal_honor.note"), class: "s_grid_12 s_grid s_grid_h_5"%>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
+4
-6
@@ -59,10 +59,8 @@
|
|||||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="overview" page-name="honor_list" content-layout="simple" base-width="300" per-column="<%= @per_column.to_s %>" pagination-var="view=<%= @view_by %>&page" >
|
<div class="overview" page-name="honor_list" content-layout="datalist" base-width="300" per-column="<%= @per_column.to_s %>" pagination-var="view=<%= @view_by %>&page" >
|
||||||
<ul isotope="true">
|
<% @honors.each do |w| %>
|
||||||
<% @honors.each do |w| %>
|
<%= publication_record w, @view_by%>
|
||||||
<%= publication_record w, @view_by%>
|
<% end %>
|
||||||
<% end %>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
+1
-1
@@ -2,7 +2,7 @@ module PersonalHonor
|
|||||||
OrbitApp.registration "PersonalHonor",:type=> 'ModuleApp' do
|
OrbitApp.registration "PersonalHonor",:type=> 'ModuleApp' do
|
||||||
module_label 'module_name.personal_honor'
|
module_label 'module_name.personal_honor'
|
||||||
base_url File.expand_path File.dirname(__FILE__)
|
base_url File.expand_path File.dirname(__FILE__)
|
||||||
personal_plugin :enable => true, :sort_number => '50', :app_name=>"Honor", :intro_app_name=>"PersonalHonorIntro",:path=>"panel/personal_honor/plugin/profile",:front_path=>"panel/personal_honor/front_end/profile",:admin_path=>"/panel/personal_honor/back_end/honors",:i18n=>'module_name.personal_honor'
|
personal_plugin :enable => true, :app_name=>"Honor", :intro_app_name=>"PersonalHonorIntro",:path=>"panel/personal_honor/plugin/profile",:front_path=>"panel/personal_honor/front_end/profile",:admin_path=>"/panel/personal_honor/back_end/honors",:i18n=>'module_name.personal_honor'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+4
@@ -42,6 +42,10 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
|
|||||||
this.initializeJournalPapers.cancelpaper = function(){
|
this.initializeJournalPapers.cancelpaper = function(){
|
||||||
o.highlight_sub_menu_item(0);
|
o.highlight_sub_menu_item(0);
|
||||||
}
|
}
|
||||||
|
this.initializeJournalPapers.syncComplete = function(){
|
||||||
|
o.notify("Sync Complete","success");
|
||||||
|
o.sub_menu_item($("div[content-type=menu] a").eq(0));
|
||||||
|
}
|
||||||
|
|
||||||
var uploadFiles = function(){
|
var uploadFiles = function(){
|
||||||
$('#add_plugin_file a.add').click(function(){
|
$('#add_plugin_file a.add').click(function(){
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@ class Panel::PersonalJournal::Desktop::JournalPagesController < ApplicationContr
|
|||||||
page ||= 1
|
page ||= 1
|
||||||
|
|
||||||
@per_column = 5
|
@per_column = 5
|
||||||
|
@userid = current_user.id
|
||||||
case @view_by
|
case @view_by
|
||||||
when "abstract"
|
when "abstract"
|
||||||
@per_column = 1
|
@per_column = 1
|
||||||
|
|||||||
@@ -90,10 +90,12 @@ class WritingJournal
|
|||||||
end
|
end
|
||||||
|
|
||||||
def create_link
|
def create_link
|
||||||
title = ["\"#{self.paper_title}\""]
|
title = ["#{self.paper_title}"]
|
||||||
title << self.journal_title
|
title << self.journal_title if self.journal_title.present?
|
||||||
title.join(', ')
|
|
||||||
title << ( !self.journal_level_types.blank? ? "(#{self.journal_level_types.collect{|x| x.title}.join(', ')})" : nil)
|
title << ( !self.journal_level_types.blank? ? "(#{self.journal_level_types.collect{|x| x.title}.join(', ')})" : nil)
|
||||||
|
title << "Volume No: "+self.vol_no if (self.vol_no.present? && self.vol_no != "0")
|
||||||
|
title << "From Page: "+self.form_to_start if (self.form_to_start.present? && self.form_to_start != "0")
|
||||||
|
title << "To Page: "+self.form_to_end if (self.form_to_end.present? && self.form_to_end != "0")
|
||||||
title.join(', ')
|
title.join(', ')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
<td class="span2">
|
<td class="span2">
|
||||||
|
|
||||||
<a href="<%= panel_personal_journal_back_end_writing_journal_author_type_quick_edit_path(list_author_type) %>#myModal2" data-toggle="modal" data-remote="true" class="action"><%= t('edit')%></a>
|
<a href="<%= panel_personal_journal_back_end_writing_journal_author_type_quick_edit_path(list_author_type) %>#myModal2" data-toggle="modal" data-remote="true" class="action"><%= t('edit')%></a>
|
||||||
<%= link_to 'Delete',
|
<%= link_to show_toggle_archive_btn(list_author_type),
|
||||||
polymorphic_path([:panel, :personal_journal, :back_end, list_author_type]), :confirm => t('sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %>
|
polymorphic_path([:panel, :personal_journal, :back_end, list_author_type]), :confirm => t('sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
<td class="span2">
|
<td class="span2">
|
||||||
|
|
||||||
<a href="<%= panel_personal_journal_back_end_writing_journal_level_type_quick_edit_path(list_level_type) %>#myModal1" data-toggle="modal" data-remote="true" class="action"><%= t('edit')%></a>
|
<a href="<%= panel_personal_journal_back_end_writing_journal_level_type_quick_edit_path(list_level_type) %>#myModal1" data-toggle="modal" data-remote="true" class="action"><%= t('edit')%></a>
|
||||||
<%= link_to 'Delete',
|
<%= link_to "Delete",
|
||||||
polymorphic_path([:panel, :personal_journal, :back_end, list_level_type]), :confirm => t('sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %>
|
polymorphic_path([:panel, :personal_journal, :back_end, list_level_type]), :confirm => t('sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
<td>
|
<td>
|
||||||
|
|
||||||
<a href="<%= panel_personal_journal_back_end_writing_journal_level_type_quick_edit_path(list_level_type) %>#myModal1" data-toggle="modal" data-remote="true" class="action">編輯</a>
|
<a href="<%= panel_personal_journal_back_end_writing_journal_level_type_quick_edit_path(list_level_type) %>#myModal1" data-toggle="modal" data-remote="true" class="action">編輯</a>
|
||||||
<%= link_to 'Delete',
|
<%= link_to show_toggle_archive_btn(list_level_type),
|
||||||
polymorphic_path([:panel, :personal_journal, :back_end, list_level_type]), :confirm => t('sure?'), :method => :delete, :remote => true,:class=>"archive_toggle" %>
|
polymorphic_path([:panel, :personal_journal, :back_end, list_level_type]), :confirm => t('sure?'), :method => :delete, :remote => true,:class=>"archive_toggle" %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
+1
-1
@@ -44,7 +44,7 @@
|
|||||||
placeholder: t("personal_journal.paper_title")+ "("+I18nVariable.from_locale(locale)+")",
|
placeholder: t("personal_journal.paper_title")+ "("+I18nVariable.from_locale(locale)+")",
|
||||||
value: (@writing_journal.paper_title_translations[locale.to_s] rescue nil) %>
|
value: (@writing_journal.paper_title_translations[locale.to_s] rescue nil) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<p></p>
|
||||||
<%= f.fields_for :journal_title_translations do |f| %>
|
<%= f.fields_for :journal_title_translations do |f| %>
|
||||||
<%= f.text_field locale,
|
<%= f.text_field locale,
|
||||||
size: "20",
|
size: "20",
|
||||||
|
|||||||
+3
@@ -58,6 +58,9 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="hh1 hp sdm">
|
||||||
|
<div class="sdm_t hh1"><a href="<%= admin_import_data_sync_journal_paper_data_path(:user_id => @userid) %>" class="icons-cycle" ajax-remote="get" response-type="json" callback-method="syncComplete" > Sync Books</a></div>
|
||||||
|
</div>
|
||||||
<div class="hh1 hp sdm">
|
<div class="hh1 hp sdm">
|
||||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Vendored
+2
@@ -80,6 +80,8 @@
|
|||||||
<% if is_admin? %>
|
<% if is_admin? %>
|
||||||
<div class="bottomnav clearfix">
|
<div class="bottomnav clearfix">
|
||||||
<div class="action pull-right">
|
<div class="action pull-right">
|
||||||
|
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.sync_data'), admin_import_data_sync_journal_paper_data_path(:user_id => @user.id), :class => 'btn btn-primary' %>
|
||||||
|
|
||||||
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.edit_brief_intro'), panel_personal_journal_back_end_personal_journal_intros_path(:user_id => @user.id), :class => 'btn btn-primary' %>
|
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.edit_brief_intro'), panel_personal_journal_back_end_personal_journal_intros_path(:user_id => @user.id), :class => 'btn btn-primary' %>
|
||||||
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('announcement.add_new'), new_panel_personal_journal_back_end_writing_journal_path(:user_id => @user.id), :class => 'btn btn-primary' %>
|
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('announcement.add_new'), new_panel_personal_journal_back_end_writing_journal_path(:user_id => @user.id), :class => 'btn btn-primary' %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
zh_tw:
|
zh_tw:
|
||||||
module_name:
|
module_name:
|
||||||
personal_journal: 期刊論文
|
personal_journal: 期刊著作
|
||||||
personal_journal:
|
personal_journal:
|
||||||
paper_title : "論文名稱"
|
paper_title : "論文名稱"
|
||||||
journal_title : "期刊名稱"
|
journal_title : "期刊名稱"
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@ module PersonalJournal
|
|||||||
OrbitApp.registration "PersonalJournal",:type=> 'ModuleApp' do
|
OrbitApp.registration "PersonalJournal",:type=> 'ModuleApp' do
|
||||||
module_label 'module_name.personal_journal'
|
module_label 'module_name.personal_journal'
|
||||||
base_url File.expand_path File.dirname(__FILE__)
|
base_url File.expand_path File.dirname(__FILE__)
|
||||||
personal_plugin :enable => true, :sort_number => '5', :app_name=>"WritingJournal", :intro_app_name=>"PersonalJournalIntro",:path=>"panel/personal_journal/plugin/profile",:front_path=>"panel/personal_journal/front_end/profile",:admin_path=>"/panel/personal_journal/back_end/writing_journals",:i18n=>'module_name.personal_journal'
|
personal_plugin :enable => true, :app_name=>"WritingJournal", :intro_app_name=>"PersonalJournalIntro",:path=>"panel/personal_journal/plugin/profile",:front_path=>"panel/personal_journal/front_end/profile",:admin_path=>"/panel/personal_journal/back_end/writing_journals",:i18n=>'module_name.personal_journal'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Vendored
-3
@@ -4,13 +4,10 @@ module Panel::PersonalLab::Desktop::PersonalLabsHelper
|
|||||||
"item" => "true",
|
"item" => "true",
|
||||||
"data-id" => publication.id.to_s,
|
"data-id" => publication.id.to_s,
|
||||||
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
|
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
|
||||||
content_tag :div,
|
|
||||||
:class => "inner" do
|
|
||||||
marker(publication.id) + \
|
marker(publication.id) + \
|
||||||
content(publication, view) + \
|
content(publication, view) + \
|
||||||
edit_or_delete(publication)
|
edit_or_delete(publication)
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def marker id
|
def marker id
|
||||||
|
|||||||
+28
-13
@@ -21,13 +21,14 @@
|
|||||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="overview" content-layout="simple" base-width="420">
|
<div class="overview" content-layout="column" base-width="420">
|
||||||
<ul class="s_form" isotope="true">
|
<div column="true">
|
||||||
<li class="s_grid_row">
|
<div class="s_form">
|
||||||
|
<ul>
|
||||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||||
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
|
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
|
||||||
<% data = "data-language=" + locale %>
|
<% data = "data-language=" + locale %>
|
||||||
<div class="form_fix" <%= style %> <%= data %>>
|
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||||
<%= f.fields_for :lab_title_translations do |f| %>
|
<%= f.fields_for :lab_title_translations do |f| %>
|
||||||
<%= f.text_field locale,
|
<%= f.text_field locale,
|
||||||
size: "20",
|
size: "20",
|
||||||
@@ -35,7 +36,8 @@
|
|||||||
class: "s_grid_12 s_grid",
|
class: "s_grid_12 s_grid",
|
||||||
value: (@lab.lab_title_translations[locale.to_s] rescue nil) %>
|
value: (@lab.lab_title_translations[locale.to_s] rescue nil) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</li>
|
||||||
|
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||||
<%= f.fields_for :location_translations do |f| %>
|
<%= f.fields_for :location_translations do |f| %>
|
||||||
<%= f.text_field locale,
|
<%= f.text_field locale,
|
||||||
size: "20",
|
size: "20",
|
||||||
@@ -43,7 +45,8 @@
|
|||||||
class: "s_grid_12 s_grid",
|
class: "s_grid_12 s_grid",
|
||||||
value: (@lab.location_translations[locale.to_s] rescue nil) %>
|
value: (@lab.location_translations[locale.to_s] rescue nil) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</li>
|
||||||
|
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||||
<%= f.fields_for :participating_professor_translations do |f| %>
|
<%= f.fields_for :participating_professor_translations do |f| %>
|
||||||
<%= f.text_field locale,
|
<%= f.text_field locale,
|
||||||
size: "20",
|
size: "20",
|
||||||
@@ -51,7 +54,8 @@
|
|||||||
class: "s_grid_12 s_grid",
|
class: "s_grid_12 s_grid",
|
||||||
value: (@lab.participating_professor_translations[locale.to_s] rescue nil) %>
|
value: (@lab.participating_professor_translations[locale.to_s] rescue nil) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</li>
|
||||||
|
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||||
<%= f.fields_for :participating_student_translations do |f| %>
|
<%= f.fields_for :participating_student_translations do |f| %>
|
||||||
<%= f.text_field locale,
|
<%= f.text_field locale,
|
||||||
size: "20",
|
size: "20",
|
||||||
@@ -59,9 +63,8 @@
|
|||||||
class: "s_grid_12 s_grid",
|
class: "s_grid_12 s_grid",
|
||||||
value: (@lab.participating_student_translations[locale.to_s] rescue nil) %>
|
value: (@lab.participating_student_translations[locale.to_s] rescue nil) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<%= label_tag("", t("personal_lab.extension_no"), class: "s_grid_4 s_grid") %><%= f.text_field :extension_no, size: "20", class: "s_grid_8 s_grid"%>
|
<%= label_tag("", t("personal_lab.extension_no"), class: "s_grid_4 s_grid") %><%= f.text_field :extension_no, size: "20", class: "s_grid_8 s_grid"%>
|
||||||
</li>
|
</li>
|
||||||
@@ -78,7 +81,12 @@
|
|||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<%= f.text_area :keywords, size: "20x3", placeholder: t("personal_lab.keywords"), class: "s_grid_12 s_grid_h_2 s_grid"%>
|
<%= f.text_area :keywords, size: "20x3", placeholder: t("personal_lab.keywords"), class: "s_grid_12 s_grid_h_2 s_grid"%>
|
||||||
</li>
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div column="true">
|
||||||
|
<div class="s_form">
|
||||||
|
<ul>
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<%= label_tag("", t("personal_lab.url"), class: "s_grid_4 s_grid") %><%= f.text_field :url, size: "20", class: "s_grid_8 s_grid"%>
|
<%= label_tag("", t("personal_lab.url"), class: "s_grid_4 s_grid") %><%= f.text_field :url, size: "20", class: "s_grid_8 s_grid"%>
|
||||||
</li>
|
</li>
|
||||||
@@ -87,8 +95,14 @@
|
|||||||
<%= f.select :language, Lab::LANGUAGE_TYPES,{} ,{:class => "s_grid s_grid_8"} %>
|
<%= f.select :language, Lab::LANGUAGE_TYPES,{} ,{:class => "s_grid s_grid_8"} %>
|
||||||
</li>
|
</li>
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<%= f.text_area :note, size: "20x3", placeholder: t("personal_lab.note"), class: "s_grid_12 s_grid s_grid_h_5 s_grid_h_full"%>
|
<%= f.text_area :note, size: "20x3", placeholder: t("personal_lab.note"), class: "s_grid_12 s_grid s_grid_h_5"%>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div column="true">
|
||||||
|
<div class="s_form">
|
||||||
|
<ul>
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<table class="s_table">
|
<table class="s_table">
|
||||||
<thead>
|
<thead>
|
||||||
@@ -119,7 +133,8 @@
|
|||||||
</table>
|
</table>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var get_html = function(old_id,new_id){
|
var get_html = function(old_id,new_id){
|
||||||
|
|||||||
+4
-6
@@ -61,10 +61,8 @@
|
|||||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="overview" page-name="lab_list" content-layout="simple" base-width="300" per-column="<%= @per_column.to_s %>" pagination-var="view=<%= @view_by %>&page" >
|
<div class="overview" page-name="lab_list" content-layout="datalist" base-width="300" per-column="<%= @per_column.to_s %>" pagination-var="view=<%= @view_by %>&page" >
|
||||||
<ul isotope="true">
|
<% @labs.each do |w| %>
|
||||||
<% @labs.each do |w| %>
|
<%= publication_record w, @view_by%>
|
||||||
<%= publication_record w, @view_by%>
|
<% end %>
|
||||||
<% end %>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
+1
-1
@@ -2,7 +2,7 @@ module PersonalLab
|
|||||||
OrbitApp.registration "PersonalLab",:type=> 'ModuleApp' do
|
OrbitApp.registration "PersonalLab",:type=> 'ModuleApp' do
|
||||||
module_label 'module_name.personal_lab'
|
module_label 'module_name.personal_lab'
|
||||||
base_url File.expand_path File.dirname(__FILE__)
|
base_url File.expand_path File.dirname(__FILE__)
|
||||||
personal_plugin :enable => true, :sort_number => '30', :app_name=>"Lab", :intro_app_name=>"PersonalLabIntro",:path=>"panel/personal_lab/plugin/profile",:front_path=>"panel/personal_lab/front_end/profile",:admin_path=>"/panel/personal_lab/back_end/labs",:i18n=>'module_name.personal_lab'
|
personal_plugin :enable => true, :app_name=>"Lab", :intro_app_name=>"PersonalLabIntro",:path=>"panel/personal_lab/plugin/profile",:front_path=>"panel/personal_lab/front_end/profile",:admin_path=>"/panel/personal_lab/back_end/labs",:i18n=>'module_name.personal_lab'
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
-3
@@ -4,13 +4,10 @@ module Panel::PersonalPatent::Desktop::PersonalPatentsHelper
|
|||||||
"item" => "true",
|
"item" => "true",
|
||||||
"data-id" => publication.id.to_s,
|
"data-id" => publication.id.to_s,
|
||||||
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
|
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
|
||||||
content_tag :div,
|
|
||||||
:class => "inner" do
|
|
||||||
marker(publication.id) + \
|
marker(publication.id) + \
|
||||||
content(publication, view) + \
|
content(publication, view) + \
|
||||||
edit_or_delete(publication)
|
edit_or_delete(publication)
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def marker id
|
def marker id
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
<td class="span2">
|
<td class="span2">
|
||||||
|
|
||||||
<a href="<%= panel_personal_patent_back_end_writing_patent_writing_patent_category_quick_edit_path(list_patent_type) %>#myModal1" data-toggle="modal" data-remote="true" class="action"><%= t('edit')%></a>
|
<a href="<%= panel_personal_patent_back_end_writing_patent_writing_patent_category_quick_edit_path(list_patent_type) %>#myModal1" data-toggle="modal" data-remote="true" class="action"><%= t('edit')%></a>
|
||||||
<%= link_to 'Delete',
|
<%= link_to show_toggle_archive_btn(list_patent_type),
|
||||||
polymorphic_path([:panel, :personal_patent, :back_end, list_patent_type]), :confirm => t('sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %>
|
polymorphic_path([:panel, :personal_patent, :back_end, list_patent_type]), :confirm => t('sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
+22
-10
@@ -21,13 +21,14 @@
|
|||||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="overview" content-layout="simple" base-width="420">
|
<div class="overview" content-layout="column" base-width="420">
|
||||||
<ul class="s_form" isotope="true">
|
<div column="true">
|
||||||
<li class="s_grid_row">
|
<div class="s_form">
|
||||||
|
<ul>
|
||||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||||
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
|
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
|
||||||
<% data = "data-language=" + locale %>
|
<% data = "data-language=" + locale %>
|
||||||
<div class="form_fix" <%= style %> <%= data %>>
|
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||||
<%= f.fields_for :patent_title_translations do |f| %>
|
<%= f.fields_for :patent_title_translations do |f| %>
|
||||||
<%= f.text_field locale,
|
<%= f.text_field locale,
|
||||||
size: "20",
|
size: "20",
|
||||||
@@ -35,9 +36,8 @@
|
|||||||
class: "s_grid_12 s_grid",
|
class: "s_grid_12 s_grid",
|
||||||
value: (@patent.patent_title_translations[locale.to_s] rescue nil) %>
|
value: (@patent.patent_title_translations[locale.to_s] rescue nil) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<%= label_tag("", t("personal_patent.patent_no"), class: "s_grid_4 s_grid") %><%= f.text_field :patent_no, size: "20", class: "s_grid_8 s_grid"%>
|
<%= label_tag("", t("personal_patent.patent_no"), class: "s_grid_4 s_grid") %><%= f.text_field :patent_no, size: "20", class: "s_grid_8 s_grid"%>
|
||||||
</li>
|
</li>
|
||||||
@@ -67,10 +67,21 @@
|
|||||||
<%= f.label :language, t("personal_patent.language"), :class => "s_grid s_grid_4" %>
|
<%= f.label :language, t("personal_patent.language"), :class => "s_grid s_grid_4" %>
|
||||||
<%= f.select :language, WritingPatent::LANGUAGE_TYPES,{} ,{:class => "s_grid s_grid_8"} %>
|
<%= f.select :language, WritingPatent::LANGUAGE_TYPES,{} ,{:class => "s_grid s_grid_8"} %>
|
||||||
</li>
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div column="true">
|
||||||
|
<div class="s_form">
|
||||||
|
<ul>
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<%= f.text_area :note, size: "20x3", placeholder: t("personal_patent.note"), class: "s_grid_12 s_grid s_grid_h_5 s_grid_h_full"%>
|
<%= f.text_area :note, size: "20x3", placeholder: t("personal_patent.note"), class: "s_grid_12 s_grid s_grid_h_5"%>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div column="true">
|
||||||
|
<div class="s_form">
|
||||||
|
<ul>
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<table class="s_table">
|
<table class="s_table">
|
||||||
<thead>
|
<thead>
|
||||||
@@ -101,7 +112,8 @@
|
|||||||
</table>
|
</table>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var get_html = function(old_id,new_id){
|
var get_html = function(old_id,new_id){
|
||||||
|
|||||||
+4
-6
@@ -60,10 +60,8 @@
|
|||||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="overview" page-name="patent_list" content-layout="simple" base-width="300" per-column="<%= @per_column.to_s %>" pagination-var="view=<%= @view_by %>&page" >
|
<div class="overview" page-name="patent_list" content-layout="datalist" base-width="300" per-column="<%= @per_column.to_s %>" pagination-var="view=<%= @view_by %>&page" >
|
||||||
<ul isotope="true">
|
<% @patents.each do |w| %>
|
||||||
<% @patents.each do |w| %>
|
<%= publication_record w, @view_by%>
|
||||||
<%= publication_record w, @view_by%>
|
<% end %>
|
||||||
<% end %>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
+1
-1
@@ -2,7 +2,7 @@ module PersonalPatent
|
|||||||
OrbitApp.registration "PersonalPatent",:type=> 'ModuleApp' do
|
OrbitApp.registration "PersonalPatent",:type=> 'ModuleApp' do
|
||||||
module_label 'module_name.personal_patent'
|
module_label 'module_name.personal_patent'
|
||||||
base_url File.expand_path File.dirname(__FILE__)
|
base_url File.expand_path File.dirname(__FILE__)
|
||||||
personal_plugin :enable => true, :sort_number => '35', :app_name=>"WritingPatent", :intro_app_name=>"PersonalPatentIntro",:path=>"panel/personal_patent/plugin/profile",:front_path=>"panel/personal_patent/front_end/profile",:admin_path=>"/panel/personal_patent/back_end/writing_patents",:i18n=>'module_name.personal_patent'
|
personal_plugin :enable => true, :app_name=>"WritingPatent", :intro_app_name=>"PersonalPatentIntro",:path=>"panel/personal_patent/plugin/profile",:front_path=>"panel/personal_patent/front_end/profile",:admin_path=>"/panel/personal_patent/back_end/writing_patents",:i18n=>'module_name.personal_patent'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
-3
@@ -5,13 +5,10 @@ module Panel::PersonalProject::Desktop::PersonalProjectsHelper
|
|||||||
"item" => "true",
|
"item" => "true",
|
||||||
"data-id" => publication.id.to_s,
|
"data-id" => publication.id.to_s,
|
||||||
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
|
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
|
||||||
content_tag :div,
|
|
||||||
:class => "inner" do
|
|
||||||
marker(publication.id) + \
|
marker(publication.id) + \
|
||||||
content(publication, view) + \
|
content(publication, view) + \
|
||||||
edit_or_delete(publication)
|
edit_or_delete(publication)
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def marker id
|
def marker id
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
<td class="span2">
|
<td class="span2">
|
||||||
|
|
||||||
<a href="<%= panel_personal_project_back_end_project_project_category_quick_edit_path(list_project_type) %>#myModal1" data-toggle="modal" data-remote="true" class="action"><%= t('edit')%></a>
|
<a href="<%= panel_personal_project_back_end_project_project_category_quick_edit_path(list_project_type) %>#myModal1" data-toggle="modal" data-remote="true" class="action"><%= t('edit')%></a>
|
||||||
<%= link_to 'Delete',
|
<%= link_to show_toggle_archive_btn(list_project_type),
|
||||||
polymorphic_path([:panel, :personal_project, :back_end, list_project_type]), :confirm => t('sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %>
|
polymorphic_path([:panel, :personal_project, :back_end, list_project_type]), :confirm => t('sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
+34
-14
@@ -21,13 +21,14 @@
|
|||||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="overview" content-layout="simple" base-width="420">
|
<div class="overview" content-layout="column" base-width="420">
|
||||||
<ul class="s_form" isotope="true">
|
<div column="true">
|
||||||
<li class="s_grid_row">
|
<div class="s_form">
|
||||||
|
<ul>
|
||||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||||
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
|
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
|
||||||
<% data = "data-language=" + locale %>
|
<% data = "data-language=" + locale %>
|
||||||
<div class="form_fix" <%= style %> <%= data %>>
|
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||||
<%= f.fields_for :project_title_translations do |f| %>
|
<%= f.fields_for :project_title_translations do |f| %>
|
||||||
<%= f.text_field locale,
|
<%= f.text_field locale,
|
||||||
size: "20",
|
size: "20",
|
||||||
@@ -35,7 +36,8 @@
|
|||||||
class: "s_grid_12 s_grid",
|
class: "s_grid_12 s_grid",
|
||||||
value: (@project.project_title_translations[locale.to_s] rescue nil) %>
|
value: (@project.project_title_translations[locale.to_s] rescue nil) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</li>
|
||||||
|
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||||
<%= f.fields_for :job_title_translations do |f| %>
|
<%= f.fields_for :job_title_translations do |f| %>
|
||||||
<%= f.text_field locale,
|
<%= f.text_field locale,
|
||||||
size: "20",
|
size: "20",
|
||||||
@@ -43,7 +45,8 @@
|
|||||||
class: "s_grid_12 s_grid",
|
class: "s_grid_12 s_grid",
|
||||||
value: (@project.job_title_translations[locale.to_s] rescue nil) %>
|
value: (@project.job_title_translations[locale.to_s] rescue nil) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</li>
|
||||||
|
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||||
<%= f.fields_for :participator_translations do |f| %>
|
<%= f.fields_for :participator_translations do |f| %>
|
||||||
<%= f.text_field locale,
|
<%= f.text_field locale,
|
||||||
size: "20",
|
size: "20",
|
||||||
@@ -51,7 +54,8 @@
|
|||||||
class: "s_grid_12 s_grid",
|
class: "s_grid_12 s_grid",
|
||||||
value: (@project.participator_translations[locale.to_s] rescue nil) %>
|
value: (@project.participator_translations[locale.to_s] rescue nil) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</li>
|
||||||
|
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||||
<%= f.fields_for :unit_translations do |f| %>
|
<%= f.fields_for :unit_translations do |f| %>
|
||||||
<%= f.text_field locale,
|
<%= f.text_field locale,
|
||||||
size: "20",
|
size: "20",
|
||||||
@@ -59,9 +63,8 @@
|
|||||||
class: "s_grid_12 s_grid",
|
class: "s_grid_12 s_grid",
|
||||||
value: (@project.unit_translations[locale.to_s] rescue nil) %>
|
value: (@project.unit_translations[locale.to_s] rescue nil) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<%= label_tag("", t("personal_project.start_date"), class: "s_grid_4 s_grid") %>
|
<%= label_tag("", t("personal_project.start_date"), class: "s_grid_4 s_grid") %>
|
||||||
<%= f.date_select :period_start_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year] }, {:class => 's_grid_4 s_grid'} %>
|
<%= f.date_select :period_start_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year] }, {:class => 's_grid_4 s_grid'} %>
|
||||||
@@ -83,7 +86,12 @@
|
|||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<%= label_tag("", t("personal_project.url"), class: "s_grid_4 s_grid") %><%= f.text_field :url, size: "20", class: "s_grid_8 s_grid"%>
|
<%= label_tag("", t("personal_project.url"), class: "s_grid_4 s_grid") %><%= f.text_field :url, size: "20", class: "s_grid_8 s_grid"%>
|
||||||
</li>
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div column="true">
|
||||||
|
<div class="s_form">
|
||||||
|
<ul>
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<%= f.text_area :keywords, size: "20x3", placeholder: t("personal_project.keywords"), class: "s_grid_12 s_grid_h_2 s_grid"%>
|
<%= f.text_area :keywords, size: "20x3", placeholder: t("personal_project.keywords"), class: "s_grid_12 s_grid_h_2 s_grid"%>
|
||||||
</li>
|
</li>
|
||||||
@@ -92,13 +100,23 @@
|
|||||||
<%= f.select :language, Project::LANGUAGE_TYPES,{} ,{:class => "s_grid s_grid_8"} %>
|
<%= f.select :language, Project::LANGUAGE_TYPES,{} ,{:class => "s_grid s_grid_8"} %>
|
||||||
</li>
|
</li>
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<%= f.text_area :note, size: "20x3", placeholder: t("personal_project.note"), class: "s_grid_12 s_grid s_grid_h_7 s_grid_h_full"%>
|
<%= f.text_area :note, size: "20x3", placeholder: t("personal_project.note"), class: "s_grid_12 s_grid s_grid_h_7"%>
|
||||||
</li>
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div column="true">
|
||||||
|
<div class="s_form">
|
||||||
|
<ul>
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<%= f.text_area :abstract, size: "20x22", placeholder: t("personal_project.abstract"), class: "s_grid_12 s_grid s_grid_h_10 s_grid_h_full"%>
|
<%= f.text_area :abstract, size: "20x22", placeholder: t("personal_project.abstract"), class: "s_grid_12 s_grid s_grid_h_10"%>
|
||||||
</li>
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div column="true">
|
||||||
|
<div class="s_form">
|
||||||
|
<ul>
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<table class="s_table">
|
<table class="s_table">
|
||||||
<thead>
|
<thead>
|
||||||
@@ -129,6 +147,8 @@
|
|||||||
</table>
|
</table>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
var get_html = function(old_id,new_id){
|
var get_html = function(old_id,new_id){
|
||||||
|
|||||||
+4
-6
@@ -61,10 +61,8 @@
|
|||||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="overview" page-name="project_list" content-layout="simple" base-width="300" per-column="<%= @per_column.to_s %>" pagination-var="view=<%= @view_by %>&page" >
|
<div class="overview" page-name="project_list" content-layout="datalist" base-width="300" per-column="<%= @per_column.to_s %>" pagination-var="view=<%= @view_by %>&page" >
|
||||||
<ul isotope="true">
|
<% @projects.each do |w| %>
|
||||||
<% @projects.each do |w| %>
|
<%= publication_record w, @view_by%>
|
||||||
<%= publication_record w, @view_by%>
|
<% end %>
|
||||||
<% end %>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
Loaded 100 of 107 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user