Compare commits
34
Commits
fu
..
ntu_mb_sso
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4053ccbcdd | ||
|
|
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 |
@@ -29,9 +29,6 @@
|
||||
//column="true" this option is only for column layout... the columns will be formed on this column=true attribute and it should be a div
|
||||
//item=true this attribute should be present in the li tag. li with this attribute are considered as a separate item.
|
||||
|
||||
//enableLanguageSelect( dom ) children <a> will be binded with language, data-lang = string ex "en"|"zh_tw" will toggle all data-langunage throughout the page
|
||||
//enableSharing( dom ) children <a> will be binded with share, data-mode = string ex "public"|"private" will change the mode for all the selected items. the dom with class should have data-link = url data-var = vaiable_name, default will be mode
|
||||
|
||||
|
||||
$.extend($.expr[':'], {
|
||||
'containsi': function (elem, i, match, array) {
|
||||
@@ -226,8 +223,7 @@ var orbitDesktop = function(dom){
|
||||
|
||||
this.bindDesktopEvents = function(){ //this function will bind the global handlers to thd desktop, for example doc
|
||||
$(".docklist a").click(function(){
|
||||
if( !$( this ).parent().hasClass( 'disable' ) )
|
||||
o.menu_item($(this));
|
||||
o.menu_item($(this));
|
||||
return false;
|
||||
});
|
||||
|
||||
@@ -275,11 +271,10 @@ var orbitDesktop = function(dom){
|
||||
});
|
||||
|
||||
$("body").on("click","*[ajax-remote]",function(){
|
||||
var $e = $(this),
|
||||
t = $e.attr("ajax-remote"),
|
||||
classes_to_toggle = $e.attr("toggle-onclick"),
|
||||
responsetype = $e.attr('response-type') ? $e.attr('response-type') : "html",
|
||||
exe = $e.attr("callback-method"); // (typeof $e.attr("callback-method") == "function"? $e.attr("callback-method") : "");
|
||||
var $e = $(this);
|
||||
var t = $e.attr("ajax-remote");
|
||||
var classes_to_toggle = $e.attr("toggle-onclick");
|
||||
var exe = $e.attr("callback-method"); // (typeof $e.attr("callback-method") == "function"? $e.attr("callback-method") : "");
|
||||
if(classes_to_toggle){
|
||||
$e.toggleClass(classes_to_toggle);
|
||||
}
|
||||
@@ -291,9 +286,9 @@ var orbitDesktop = function(dom){
|
||||
}
|
||||
var ca = $e.attr("content-holder");
|
||||
var a = function(){
|
||||
|
||||
$.ajax({
|
||||
type : t,
|
||||
dataType : responsetype,
|
||||
url : $e.attr("href"),
|
||||
success : function(data){
|
||||
if(typeof data == "string"){
|
||||
@@ -304,7 +299,6 @@ var orbitDesktop = function(dom){
|
||||
// $("div[container=true]").html(data);
|
||||
}
|
||||
}
|
||||
|
||||
if(exe)
|
||||
window.o[o.data_method][exe](data,$e);
|
||||
if(t == "delete"){
|
||||
@@ -1887,35 +1881,6 @@ var orbitDesktop = function(dom){
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
this.enableSharing = function( dom ){
|
||||
var el = $( dom ),
|
||||
variable = ( el.data( 'var' ) ? el.data( "var" ) : "mode"),
|
||||
_url = el.data( 'link' ) + "?" + variable + "=",
|
||||
classes = [];
|
||||
|
||||
el.find( "a" ).each( function(){
|
||||
classes.push( $( this ).attr( "item-class" ) ? $( this ).attr( "item-class" ) : $( this ).data( 'mode' ) );
|
||||
})
|
||||
|
||||
el.find( "a" ).click( function(){
|
||||
var ids = [],
|
||||
mode = $( this ).data( 'mode' ),
|
||||
inject_class = $( this ).attr( 'item-class' ) ? $( this ).attr( 'item-class' ) : mode;
|
||||
|
||||
$( ".overview li[item=true] a.icon-check" ).each( function(){
|
||||
ids.push( $( this ).data( 'id' ) );
|
||||
$( "li[data-id="+ $( this ).data( 'id' ) +"]").removeClass( classes.join( " " ) ).addClass( inject_class );
|
||||
})
|
||||
$.ajax({
|
||||
url : _url + mode,
|
||||
data : {"ids" : ids},
|
||||
datatype : "json",
|
||||
})
|
||||
return false;
|
||||
})
|
||||
}
|
||||
|
||||
this.minimizeBarManager = function(){
|
||||
var minimizedApps = [],
|
||||
minimizeBar = $("#minimizebar");
|
||||
|
||||
@@ -81,26 +81,25 @@ $(function() {
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$("#dialog").on(clickEvent, '.delete-item', function() {
|
||||
var _v = [],
|
||||
_t = $t.attr("rel");
|
||||
|
||||
$("tbody .list-check:checked").each(function() {
|
||||
_v.push(this.value);
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url : _t,
|
||||
type:"get",
|
||||
data : {"ids":_v},
|
||||
dataType : "json",
|
||||
success : function(){
|
||||
actionSuccess(_data.checkAction);
|
||||
$("#dialog").on('show', function (e) {
|
||||
$(this).find('.delete-item').on(clickEvent, function() {
|
||||
var _v = [];
|
||||
$("tbody .list-check").each(function() {
|
||||
this.checked && _v.push("ids[]="+this.value)
|
||||
});
|
||||
var _t = $t.attr("rel");
|
||||
if(_t.indexOf("?") > -1) {
|
||||
$.ajax(_t + "&" + _v.join("&")).done(function() {
|
||||
actionSuccess(_data.checkAction)
|
||||
});
|
||||
} else {
|
||||
$.ajax(_t + "?" + _v.join("&")).done(function() {
|
||||
actionSuccess(_data.checkAction)
|
||||
});
|
||||
}
|
||||
$('#dialog').modal('hide');
|
||||
$('.list-active-btn').addClass('disabled').data('actionable', false);
|
||||
e.preventDefault();
|
||||
})
|
||||
|
||||
$('#dialog').modal('hide');
|
||||
$('.list-active-btn').addClass('disabled').data('actionable', false);
|
||||
})
|
||||
|
||||
});
|
||||
});
|
||||
@@ -191,7 +191,7 @@ legend {
|
||||
}
|
||||
#sidebar .sidebar-nav > li i {
|
||||
font-size: 1.6em;
|
||||
line-height: 45px;
|
||||
line-height: 60px;
|
||||
}
|
||||
#sidebar .sidebar-nav > li.active i {
|
||||
font-size: 2.2em;
|
||||
@@ -621,8 +621,8 @@ legend {
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
.sign-in .btn {
|
||||
padding: 4px 0;
|
||||
display: block;
|
||||
padding: 4px 0;
|
||||
width: 100%;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
@@ -650,7 +650,7 @@ legend {
|
||||
.sign-in .checkbox {
|
||||
position: absolute;
|
||||
text-align: left;
|
||||
bottom: 37px;
|
||||
bottom: 47px;
|
||||
}
|
||||
.sign-in .switchboard {
|
||||
color: #08C;
|
||||
|
||||
@@ -2,16 +2,17 @@
|
||||
top: 0px;
|
||||
left: -10px;
|
||||
right: -10px;
|
||||
height: 40px;
|
||||
z-index: 1041;
|
||||
position: fixed;
|
||||
margin-bottom: 0;
|
||||
height: 40px;
|
||||
}
|
||||
#orbit-bar .orbitlogo {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
width: 50px;
|
||||
height: 40px;
|
||||
padding: 0!important;
|
||||
background-size: 70%;
|
||||
display: inline-block;
|
||||
display: block;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
background-image: url(<%= asset_path 'orbit-logo.svg' %>);
|
||||
@@ -19,8 +20,23 @@
|
||||
/* For Suck IE */
|
||||
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 {
|
||||
color: #EEE;
|
||||
padding: 0 15px;
|
||||
display: block;
|
||||
text-shadow: 0 -1px 0 #000;
|
||||
border-right: 1px solid #363636;
|
||||
box-shadow: 1px 0px 0px rgba(0, 0, 0, 0.3);
|
||||
@@ -34,6 +50,11 @@
|
||||
background-color: #0095CF;
|
||||
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.active > .dropdown-toggle,
|
||||
#orbit-bar.navbar .nav li.dropdown.open.active > .dropdown-toggle {
|
||||
@@ -41,9 +62,7 @@
|
||||
text-shadow: 0 -1px 0 #014380;
|
||||
}
|
||||
#orbit-bar .navbar-inner {
|
||||
height: 40px;
|
||||
border-width: 0;
|
||||
min-height: 40px;
|
||||
background-color: #333333;
|
||||
-webkit-border-radius: 0px;
|
||||
-moz-border-radius: 0px;
|
||||
@@ -66,6 +85,10 @@
|
||||
right: auto;
|
||||
bottom: auto;
|
||||
}
|
||||
#orbit-bar .nav > li {
|
||||
display: block;
|
||||
line-height: 40px;
|
||||
}
|
||||
#orbit-bar .nav [class^="icon"],
|
||||
#orbit-bar .nav [class*=" icon"] {
|
||||
font-size: 1.5em;
|
||||
@@ -92,17 +115,45 @@
|
||||
#orbit-bar .modal .input-prepend {
|
||||
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*/
|
||||
#orbit-bar #search {
|
||||
margin-bottom: 0;
|
||||
position: relative;
|
||||
padding: 8px 10px 0;
|
||||
padding: 0 10px;
|
||||
border-right: 1px solid #363636;
|
||||
box-shadow: 1px 0px 0px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
#orbit-bar #search form {
|
||||
margin-bottom: 8px;
|
||||
margin: 8px 0;
|
||||
}
|
||||
#orbit-bar #search input[type="text"] {
|
||||
height: 14px;
|
||||
@@ -110,6 +161,7 @@
|
||||
font-size: 13px;
|
||||
padding-left: 25px;
|
||||
padding-right: 25px;
|
||||
display: block;
|
||||
-webkit-border-radius: 12px;
|
||||
-moz-border-radius: 12px;
|
||||
-o-border-radius: 12px;
|
||||
@@ -122,15 +174,16 @@
|
||||
#orbit-bar #search .search-clear {
|
||||
position: absolute;
|
||||
color: #A3A3A3;
|
||||
top: 14px;
|
||||
top: 16px;
|
||||
}
|
||||
#orbit-bar #search .icon-search {
|
||||
left: 13px;
|
||||
top: 15px;
|
||||
left: 15px;
|
||||
font-size: 1.2em;
|
||||
width: 1.25em;
|
||||
margin-top: 0;
|
||||
}
|
||||
#orbit-bar #search .search-clear {
|
||||
right: 14px;
|
||||
right: 13px;
|
||||
font-size: 1.3em;
|
||||
}
|
||||
#orbit-bar #search .search-clear:hover {
|
||||
|
||||
@@ -19,18 +19,6 @@
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
.form_fix {
|
||||
textarea {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
input[type="text"] {
|
||||
margin-left: 0;
|
||||
margin-top: 0;
|
||||
}
|
||||
input[type="text"] + input {
|
||||
margin-top: 12px;
|
||||
}
|
||||
}
|
||||
// fixed width column with 12px gutter
|
||||
// 276px width for 8 columns
|
||||
// 420px width for 12 columns
|
||||
|
||||
@@ -323,29 +323,6 @@ a.admtxt.admbg2:hover {
|
||||
float: left; }
|
||||
.docklist .d_cate:hover .dock_child {
|
||||
display: block; }
|
||||
.disable {
|
||||
opacity: .3;
|
||||
}
|
||||
.disable a {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.private {
|
||||
position: relative;
|
||||
padding-right: 10px;
|
||||
width: 300px;
|
||||
opacity: .3 !important;
|
||||
}
|
||||
.private:after {
|
||||
content: "\e073";
|
||||
display: inline-block;
|
||||
font-family: 'entypo';
|
||||
font-size: 1.5em;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
text-align: center;
|
||||
text-decoration: inherit;
|
||||
top: 5px;
|
||||
}
|
||||
|
||||
.fn_des.admtxt {
|
||||
line-height: 60px;
|
||||
@@ -737,8 +714,7 @@ a.admtxt.admbg2:hover {
|
||||
|
||||
/* list item */
|
||||
.list_t_item {
|
||||
overflow: hidden;
|
||||
height: 100px; }
|
||||
overflow: hidden; }
|
||||
|
||||
.list_t_title {
|
||||
padding-bottom: 6px;
|
||||
@@ -772,8 +748,7 @@ a.admtxt.admbg2:hover {
|
||||
-webkit-text-size-adjust: none; }
|
||||
.list_item_function a :first-child {
|
||||
margin-left: 0; }
|
||||
.datalist_item:hover .list_item_function,
|
||||
.list_t_item:hover .list_item_function {
|
||||
.datalist_item:hover .list_item_function {
|
||||
bottom: 0; }
|
||||
|
||||
/* App */
|
||||
|
||||
@@ -39,13 +39,6 @@
|
||||
.main-list td {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
.main-list td input[type="text"] {
|
||||
margin-bottom: 0;
|
||||
margin-left: -.4em;
|
||||
margin-right: 3px;
|
||||
padding: 0 .3em;
|
||||
width: 4em;
|
||||
}
|
||||
.main-list td.action {
|
||||
vertical-align: middle;
|
||||
text-align: right;
|
||||
|
||||
@@ -0,0 +1,373 @@
|
||||
# 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 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'
|
||||
@item.page_contexts.build(:create_user_id => current_user.id, :update_user_id => current_user.id )
|
||||
end
|
||||
|
||||
|
||||
if @item.save
|
||||
flash.now[:notice] = t('create.success.page')
|
||||
respond_to do |format|
|
||||
|
||||
@@ -4,19 +4,19 @@ class Admin::PluginsController < ApplicationController
|
||||
|
||||
def index
|
||||
|
||||
@plugins = OrbitApp::Plugin::Registration.all
|
||||
@plugins = OrbitApp::Plugin::Registration.all
|
||||
|
||||
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?
|
||||
respond_to do |format|
|
||||
format.html { redirect_to( @right_partial ) }
|
||||
end
|
||||
else
|
||||
@right_partial = ""
|
||||
end
|
||||
if !@right_partial.blank?
|
||||
respond_to do |format|
|
||||
format.html { redirect_to( @right_partial ) }
|
||||
end
|
||||
else
|
||||
@right_partial = ""
|
||||
end
|
||||
|
||||
else
|
||||
@right_partial = ""
|
||||
|
||||
@@ -83,18 +83,9 @@ class Admin::UsersNewInterfaceController < OrbitMemberController
|
||||
end
|
||||
|
||||
def show
|
||||
|
||||
@user = User.find(params[:id])
|
||||
|
||||
@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 = []
|
||||
@teacher_data = []
|
||||
@student_data = []
|
||||
@@ -249,32 +240,6 @@ class Admin::UsersNewInterfaceController < OrbitMemberController
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def edit_order
|
||||
@users = User.not_guest_user
|
||||
end
|
||||
|
||||
def update_order
|
||||
if params[:users].present?
|
||||
params[:users].values.sort.each do |pair|
|
||||
to_go = pair[0].to_i
|
||||
if to_go > 0
|
||||
user_at_position = User.where(position: to_go - 1).first
|
||||
user = User.find(pair[1])
|
||||
if user_at_position && !(user_at_position == user)
|
||||
if user.position > user_at_position.position
|
||||
user.move_above(user_at_position)
|
||||
else
|
||||
user.move_below(user_at_position)
|
||||
end
|
||||
elsif to_go > User.count
|
||||
user.move_to_bottom
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@users = User.not_guest_user
|
||||
end
|
||||
|
||||
protected
|
||||
def get_tags
|
||||
|
||||
@@ -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
|
||||
|
||||
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
|
||||
|
||||
# NTU link
|
||||
|
||||
@@ -185,18 +185,18 @@ class ModuleApp
|
||||
user_ids = self.auth_approvals.inject([]) do |users, auth|
|
||||
users += auth.authorized_users.map{|user| user.id}
|
||||
end
|
||||
self.update_attribute(:auth_approval_users, user_ids.uniq)
|
||||
update_attribute(:auth_approval_users, user_ids.uniq)
|
||||
end
|
||||
|
||||
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
|
||||
|
||||
def update_auth_sub_manager_users
|
||||
user_ids = self.auth_sub_managers.inject([]) do |users, auth|
|
||||
users += auth.authorized_users.map{|user| user.id}
|
||||
end
|
||||
self.update_attribute(:auth_sub_manager_users, user_ids.uniq)
|
||||
update_attribute(:auth_sub_manager_users, user_ids.uniq)
|
||||
end
|
||||
|
||||
def managers
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
class User
|
||||
|
||||
include Mongoid::Document
|
||||
include Mongoid::Tree
|
||||
include Mongoid::Tree::Ordering # use mongoid-tree because mongoid-ordering needs mongoid(~>3.0)
|
||||
include Mongoid::Timestamps
|
||||
|
||||
devise :database_authenticatable, :recoverable, :rememberable, :trackable, :registerable, :validatable #, :timeoutable
|
||||
@@ -20,6 +18,8 @@ class User
|
||||
field :office_tel
|
||||
field :cache_dept,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 :managing_apps, class_name: 'AuthManager', inverse_of: 'authorized_users'
|
||||
|
||||
@@ -21,9 +21,6 @@ class AvatarUploader < CarrierWave::Uploader::Base
|
||||
# def default_url
|
||||
# "/images/fallback/" + [version_name, "default.png"].compact.join('_')
|
||||
# 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 :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>
|
||||
<% end %>
|
||||
<% 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 %>
|
||||
</ul>
|
||||
</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>
|
||||
@@ -7,8 +7,8 @@
|
||||
<%= link_to t(:all_plugin_summary)%>
|
||||
<% end -%>
|
||||
<% @plugins.each do |plugin| %>
|
||||
<%= content_tag :li, :class=>(params[:show_plugin_profile] == plugin.app_name ? "active" : nil) do %>
|
||||
<%= link_to plugin.name, admin_plugins_path(:show_plugin_profile => plugin.app_name) %>
|
||||
<%= content_tag :li, :class=>(params[:show_plugin_profile] == plugin.name ? "active" : nil) do %>
|
||||
<%= link_to plugin.name, admin_plugins_path(:show_plugin_profile => plugin.name) %>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
|
||||
|
||||
@@ -43,48 +43,49 @@
|
||||
|
||||
<hr>
|
||||
|
||||
<!-- Description -->
|
||||
<div class="control-group">
|
||||
<label class="control-label muted">Keywords</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 %>
|
||||
<% @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 Keywords</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="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>
|
||||
<% @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 :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>
|
||||
|
||||
|
||||
<%end%>
|
||||
<%end%>
|
||||
</div>
|
||||
<!-- Form Actions -->
|
||||
<div class="form-actions">
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
<div class="bottomnav clearfix">
|
||||
<div class="action pull-right">
|
||||
<% if is_admin? %>
|
||||
<%= link_to t(:edit_order), edit_order_admin_users_new_interface_index_path, :class => "btn btn-primary" %>
|
||||
<%= link_to(new_admin_users_new_interface_path,:class=> "btn btn-primary") do %>
|
||||
<i class="icon-plus"></i><%= t(:add) %>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
</div>
|
||||
<div class="pagination pagination-centered">
|
||||
<%= paginate @users, :params => {:inner => false} %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottomnav clearfix">
|
||||
<div class="action pull-right">
|
||||
<% if is_admin? %>
|
||||
<%= link_to(new_admin_users_new_interface_path,:class=> "btn btn-primary pull-right") do%>
|
||||
<i class="icon-plus"></i><%= t(:add)%>
|
||||
<% end -%>
|
||||
<%end -%>
|
||||
</div>
|
||||
<div class="pagination pagination-centered">
|
||||
<%= paginate @users, :params => {:inner => false}%>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,15 +0,0 @@
|
||||
<%
|
||||
if user_edit_order.sex == 'male'
|
||||
@user_sex = 'gender-man'
|
||||
elsif user_edit_order.sex == 'female'
|
||||
@user_sex = 'gender-woman'
|
||||
else
|
||||
@user_sex = 'gender-none'
|
||||
end
|
||||
%>
|
||||
<tr id="<%= dom_id user_edit_order %>">
|
||||
<td class="<%= @user_sex %>"></td>
|
||||
<td><%= link_to user_edit_order.position + 1, '#', class: 'edit_position', 'data-user-id' => user_edit_order.id %></td>
|
||||
<td><%= link_to user_edit_order.name, admin_users_new_interface_path(user_edit_order) %></td>
|
||||
<td><%= user_edit_order.email %></td>
|
||||
</tr>
|
||||
@@ -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-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>
|
||||
<%= image_tag(user_for_summary.avatar) %>
|
||||
<%= show_avatar(user_for_summary) %>
|
||||
</div>
|
||||
<div class="member-info">
|
||||
<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? %>
|
||||
|
||||
</div>
|
||||
<%= image_tag(user_for_thumbnail.avatar) %>
|
||||
<%= show_avatar(user_for_thumbnail) %>
|
||||
</div>
|
||||
<h4 class="member-name text-center"><%= link_to user_for_thumbnail.name,admin_users_new_interface_path(user_for_thumbnail)%></h4>
|
||||
</li>
|
||||
@@ -1,65 +0,0 @@
|
||||
<% content_for :side_bar do %>
|
||||
<%= render :partial => 'admin/users_new_interface/side_bar' %>
|
||||
<% end %>
|
||||
<% content_for :page_specific_css do -%>
|
||||
<%= stylesheet_link_tag "lib/member" %>
|
||||
<% end -%>
|
||||
|
||||
<div id="list-view">
|
||||
<table id="member-list" class="table main-list">
|
||||
<thead>
|
||||
<tr class="sort-header">
|
||||
<th class="gender"></th>
|
||||
<th class="span2"><a href="#"><%= t(:position) %></a></th>
|
||||
<th class="span4"><a href="#"><%= t(:name) %></a></th>
|
||||
<th><a href="#"><%= t(:email) %></a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<%= render partial: "user_edit_order", collection: @users %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="bottomnav clearfix">
|
||||
<div class="action pull-right">
|
||||
<%= link_to t(:update_), '#', class: "btn btn-primary pull-right" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% content_for :page_specific_javascript do %>
|
||||
<script>
|
||||
$(function(){
|
||||
var _userPosition = [];
|
||||
$('#member-list').on(clickEvent, '.edit_position', function(e){
|
||||
var $input = $('<input type="text">');
|
||||
var $cross = $('<a class="btn btn-mini"><i class="icons-cross"/></a>');
|
||||
$(this).after($cross);
|
||||
$(this).after($input);
|
||||
$(this).hide();
|
||||
$input.val($(this).text()).attr('id', $(this).data('user-id'));
|
||||
e.preventDefault();
|
||||
$cross.click(function(event) {
|
||||
$input.remove();
|
||||
$(this).siblings('a').show().end().remove();
|
||||
});
|
||||
});
|
||||
|
||||
$('.bottomnav').on(clickEvent, '.btn', function(e) {
|
||||
$('#member-list tbody input').each(function() {
|
||||
_userPosition.push([$(this).val(), $(this).attr('id')])
|
||||
});
|
||||
e.preventDefault();
|
||||
$.ajax({
|
||||
url: '<%= update_order_admin_users_new_interface_index_path %>',
|
||||
type: 'POST',
|
||||
dataType: 'script',
|
||||
data: {users: _userPosition}
|
||||
}).done(function() {
|
||||
_userPosition = [];
|
||||
console.log(_userPosition)
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<% end %>
|
||||
@@ -21,6 +21,7 @@
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<ul class="nav nav-pills filter-nav pull-right">
|
||||
<li class="accordion-group">
|
||||
<div class="accordion-heading">
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
<%= render :partial => "js_and_css"%>
|
||||
|
||||
<% content_for :page_specific_javascript do -%>
|
||||
<%= javascript_include_tag "lib/jquery.lite.image.resize.js" %>
|
||||
<%= javascript_include_tag "lib/member/member.js" %>
|
||||
<%= javascript_include_tag "lib/footable-0.1.js" %>
|
||||
<% end -%>
|
||||
@@ -50,9 +51,9 @@
|
||||
<a data-toggle="dropdown" class="dropdown-toggle" href="#">Module List <b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
|
||||
<% @plugin_shows.each do |plugin| %>
|
||||
<%= content_tag :li, :class=>(params[:show_plugin_profile] == plugin["app_name"] ? "active" : nil) do %>
|
||||
<%= link_to plugin["name"], :show_plugin_profile => plugin["app_name"] %>
|
||||
<% @plugins.each do |plugin| %>
|
||||
<%= content_tag :li, :class=>(params[:show_plugin_profile] == plugin.app_name ? "active" : nil) do %>
|
||||
<%= link_to plugin.name, :show_plugin_profile => plugin.app_name %>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
$('#list-view table tbody').html("<%= j render partial: 'user_edit_order', collection: @users %>")
|
||||
@@ -32,32 +32,32 @@
|
||||
<li class="dock_item"><a callback-method='initializePersonalExperience' href="<%= panel_personal_experience_desktop_experience_window_path %>" class="widget_fn wh2 hh2" id='d_working' onclick="return false;"><span class="widget_icon"><img src="" alt="Working" id="working_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a callback-method='initializePersonalDiploma' href="<%= panel_personal_diploma_desktop_diploma_window_path %>" class="widget_fn wh2 hh2" id='d_education' onclick="return false;"><span class="widget_icon"><img src="" alt="Education" id="education_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a callback-method='initializePersonalHonor' href="<%= panel_personal_honor_desktop_honor_window_path %>" class="widget_fn wh2 hh2" id='d_honors' onclick="return false;"><span class="widget_icon"><img src="" alt="Honors" id="honors_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item disable"><a callback-method='' href="activities" class="widget_fn wh2 hh2" id='d_activities' onclick="return false;"><span class="widget_icon disable"><img src="" alt="Activities" id="activities_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item disable"><a callback-method='' href="clubs" class="widget_fn wh2 hh2" id='d_clubs' onclick="return false;"><span class="widget_icon"><img src="" alt="Clubs" id="clubs_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a callback-method='' href="activities" class="widget_fn wh2 hh2" id='d_activities' onclick="return false;"><span class="widget_icon"><img src="" alt="Activities" id="activities_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a callback-method='' href="clubs" class="widget_fn wh2 hh2" id='d_clubs' onclick="return false;"><span class="widget_icon"><img src="" alt="Clubs" id="clubs_icon" width="30" height="30"/></span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="d_cate"><a callback-method='' href="" class="widget_fn wh2 hh2" id='d_landt' onclick="return false;"><span class="widget_icon"><img src="" alt="Learning & Teaching" id="landt_icon" width="30" height="30"/></span></a>
|
||||
<ul class="dock_child hh2 thmc4" style="width: 180px;">
|
||||
<li class="dock_item disable"><a callback-method='' href="courses" class="widget_fn wh2 hh2" id='d_courses' onclick="return false;"><span class="widget_icon"><img src="" alt="Courses" id="courses_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item disable"><a callback-method='' href="homework" class="widget_fn wh2 hh2" id='d_homework' onclick="return false;"><span class="widget_icon"><img src="" alt="Homework" id="homework_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item disable"><a callback-method='' href="certification" class="widget_fn wh2 hh2" id='d_certification' onclick="return false;"><span class="widget_icon"><img src="" alt="Certification" id="certification_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a callback-method='' href="courses" class="widget_fn wh2 hh2" id='d_courses' onclick="return false;"><span class="widget_icon"><img src="" alt="Courses" id="courses_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a callback-method='' href="homework" class="widget_fn wh2 hh2" id='d_homework' onclick="return false;"><span class="widget_icon"><img src="" alt="Homework" id="homework_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a callback-method='' href="certification" class="widget_fn wh2 hh2" id='d_certification' onclick="return false;"><span class="widget_icon"><img src="" alt="Certification" id="certification_icon" width="30" height="30"/></span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="d_cate"><a callback-method='' href="" class="widget_fn wh2 hh2" id='d_personal' onclick="return false;"><span class="widget_icon"><img src="" alt="Personal" id="personal_icon" width="30" height="30"/></span></a>
|
||||
<ul class="dock_child hh2 thmc4" style="width: 300px;">
|
||||
<li class="dock_item disable"><a callback-method='' href="mypage" class="widget_fn wh2 hh2" id='d_mypage' onclick="return false;"><span class="widget_icon"><img src="" alt="myPage" id="mypage_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item disable"><a callback-method='' href="blog" class="widget_fn wh2 hh2" id='d_blog' onclick="return false;"><span class="widget_icon"><img src="" alt="Blog" id="blog_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item disable"><a callback-method='' href="album" class="widget_fn wh2 hh2" id='d_album' onclick="return false;"><span class="widget_icon"><img src="" alt="Album" id="album_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item disable"><a callback-method='' href="calendar" class="widget_fn wh2 hh2" id='d_calendar' onclick="return false;"><span class="widget_icon"><img src="" alt="Calendar" id="calendar_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item disable"><a callback-method='' href="files" class="widget_fn wh2 hh2" id='d_files' onclick="return false;"><span class="widget_icon"><img src="" alt="Files" id="files_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a callback-method='' href="mypage" class="widget_fn wh2 hh2" id='d_mypage' onclick="return false;"><span class="widget_icon"><img src="" alt="myPage" id="mypage_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a callback-method='' href="blog" class="widget_fn wh2 hh2" id='d_blog' onclick="return false;"><span class="widget_icon"><img src="" alt="Blog" id="blog_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a callback-method='' href="album" class="widget_fn wh2 hh2" id='d_album' onclick="return false;"><span class="widget_icon"><img src="" alt="Album" id="album_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a callback-method='' href="calendar" class="widget_fn wh2 hh2" id='d_calendar' onclick="return false;"><span class="widget_icon"><img src="" alt="Calendar" id="calendar_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a callback-method='' href="files" class="widget_fn wh2 hh2" id='d_files' onclick="return false;"><span class="widget_icon"><img src="" alt="Files" id="files_icon" width="30" height="30"/></span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="d_cate"><a callback-method='initializeOrbitTimeline' href="<%= desktop_orbit_orbit_path %>" class="widget_fn wh2 hh2" id='d_orbit' onclick="return false;"><span class="widget_icon"><img src="" alt="Orbit" id="orbit_icon" width="30" height="30"/></span></a>
|
||||
<ul class="dock_child hh2 thmc4" style="width: 60px;">
|
||||
<li class="dock_item disable"><a callback-method='' href="" class="widget_fn wh2 hh2" id='d_connection' onclick="return false;"><span class="widget_icon"><img src="" alt="Academia Connection" id="connection_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a callback-method='' href="" class="widget_fn wh2 hh2" id='d_connection' onclick="return false;"><span class="widget_icon"><img src="" alt="Academia Connection" id="connection_icon" width="30" height="30"/></span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="d_cate disable"><a callback-method='initializeAppstore' href="<%= desktop_appstore_appstore_path %>" class="widget_fn wh2 hh2" id='d_appstore' onclick="return false;"><span class="widget_icon"><img src="" alt="AppStore" id="appstore_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="d_cate"><a callback-method='initializeAppstore' href="<%= desktop_appstore_appstore_path %>" class="widget_fn wh2 hh2" id='d_appstore' onclick="return false;"><span class="widget_icon"><img src="" alt="AppStore" id="appstore_icon" width="30" height="30"/></span></a></li>
|
||||
</ul>
|
||||
<div class="fn_des hh2 admbg admtxt"></div>
|
||||
</div>
|
||||
|
||||
@@ -1,44 +1,42 @@
|
||||
<!-- Orbit Bar -->
|
||||
<!--#include virtual="include/orbit_bar.html"-->
|
||||
<section id="main-wrap">
|
||||
|
||||
|
||||
<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| %>
|
||||
<%= content_tag :p, msg, :class => [key, "alert alert-error in fade"] %>
|
||||
|
||||
<% flash.each do |key, msg| %>
|
||||
<%= content_tag :p, msg, :class => [key, "alert alert-error"] %>
|
||||
<% end %>
|
||||
|
||||
<div class="form">
|
||||
<h3 class="login-logo">Log In to Orbit</h3>
|
||||
<div>
|
||||
<input name="utf8" type="hidden" value="" />
|
||||
<input name="authenticity_token" type="hidden" value="" />
|
||||
</div>
|
||||
<!-- <div class="other-sign-in">
|
||||
<a class="btn btn-primary" type="submit">Other Sign In</a>
|
||||
|
||||
<div class="form">
|
||||
<h3 class="login-logo"><%= t(:login) %></h3>
|
||||
<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>
|
||||
<div class="form-block">
|
||||
<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">
|
||||
<label for="user_email">
|
||||
<i class="icon-user"></i>
|
||||
</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 class="control-group clear">
|
||||
<label for="user_password">
|
||||
<i class="icon-lock"></i>
|
||||
</label>
|
||||
<%= f.password_field :password, :placeholder => t(:dots), :id=>"user_password" %>
|
||||
<%= f.password_field :password, :placeholder => t(:dots) %>
|
||||
</div>
|
||||
<%= content_tag :button, t(:login), :type => :submit, :class => 'btn btn-primary' %>
|
||||
</form>
|
||||
<!-- <label class="checkbox">
|
||||
<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">
|
||||
<label for="user_email">
|
||||
<i class="icon-user"></i>
|
||||
@@ -51,14 +49,14 @@
|
||||
</label>
|
||||
<input type="text" id="user_email" name="user[email]" placeholder="電子郵件" />
|
||||
</div>
|
||||
</form>
|
||||
<button class="btn btn-primary" type="submit">Submit</button>
|
||||
</form> -->
|
||||
</div>
|
||||
<!-- <div class="switchboard"><span>Forgot Password ?</span> <i class="icons-arrow-left-2"></i></div> -->
|
||||
</div>
|
||||
<!-- <div class="register">
|
||||
<!-- <div class="register">
|
||||
<button class="btn btn-inverse" type="submit">Register</button>
|
||||
</div> -->
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@@ -1,4 +1,4 @@
|
||||
<%= javascript_include_tag "lib/jquery.cycle.all.latest.js"%>
|
||||
<script type='text/javascript' src='/assets/jquery.cycle.all.latest.js'></script>
|
||||
<div style='position:relative'>
|
||||
<ul id='banner_nav' class='clear banner_nav-<%= @ad_banner.title.dehumanize %>'></ul>
|
||||
<div id='slideshow-<%= @ad_banner.title.dehumanize %>' class='slideshow'>
|
||||
@@ -24,4 +24,4 @@ $(document).ready(function(){
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
@@ -53,6 +53,11 @@
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<%= 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">
|
||||
<span class="add-on">
|
||||
<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 %>
|
||||
</h2>
|
||||
<%= render ((local_assigns.has_key? :side_bar_content) ? side_bar_content : 'layouts/side_bar_content') %>
|
||||
<div class="sub-nav-arrow"></div>
|
||||
</nav>
|
||||
@@ -6,7 +6,6 @@
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav-arrow"></div>
|
||||
</div>
|
||||
|
||||
<div class="sub-nav-block-list">
|
||||
|
||||
@@ -6,23 +6,16 @@
|
||||
<!--[if lt IE 9]>
|
||||
<%= javascript_include_tag "html5" %>
|
||||
<![endif]-->
|
||||
<%= render 'layouts/meta' %>
|
||||
<%= render 'layouts/google_font' %>
|
||||
<%= stylesheet_link_tag "basic/global" %>
|
||||
<%= 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 %>
|
||||
<%= stylesheet_link_tag "devise" %>
|
||||
<%= javascript_include_tag "devise" %>
|
||||
<%= csrf_meta_tag %>
|
||||
</head>
|
||||
<body>
|
||||
<%= render 'layouts/orbit_bar' %>
|
||||
<%= yield %>
|
||||
<!--<div id="sign-footer">
|
||||
<p>Rulingcom</p>
|
||||
</div>
|
||||
-->
|
||||
</body>
|
||||
</html>
|
||||
@@ -16,7 +16,6 @@ en:
|
||||
deselect_all: Deselect all
|
||||
detail: Detail
|
||||
edit_category: Edit Categorie
|
||||
edit_order: Edit order
|
||||
editing:
|
||||
tag: Editing tag
|
||||
file:
|
||||
@@ -38,7 +37,6 @@ en:
|
||||
no_date: No date
|
||||
no_file: No file
|
||||
path: Path
|
||||
position: Position
|
||||
previous: Previous
|
||||
remove: Remove
|
||||
remove_default: Remove default
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
zh_tw:
|
||||
add_category: 新增類別
|
||||
add_link: 新增連結
|
||||
add_page: 新增頁面
|
||||
add_to_default: 加入預設
|
||||
alternative: 註解
|
||||
approval_setting: 審核設定
|
||||
authorization_: 授權
|
||||
change: 更換
|
||||
change_file: 更換檔案
|
||||
create:
|
||||
error:
|
||||
category: 建立類別時發生錯誤
|
||||
tag: 建立標籤時發生錯誤
|
||||
delete_warning: 刪除後無法還原,您確定要刪除嗎?
|
||||
deselect_all: 取消全選
|
||||
detail: 細節
|
||||
edit_category: 編輯類別
|
||||
edit_order: 編輯排序
|
||||
editing:
|
||||
tag: 編輯標籤
|
||||
file:
|
||||
name: 檔案名稱
|
||||
front_page:
|
||||
name_language: 網站標題
|
||||
select_template: 選擇樣版
|
||||
select_themes: 選擇主題
|
||||
select_module: 選擇模組
|
||||
language: 語言
|
||||
login_orbit: 登入 Orbit
|
||||
merge: 合併
|
||||
new:
|
||||
tag: 新增標籤
|
||||
next: 下一頁
|
||||
no_app: 無模組
|
||||
no_category: 無可用類別
|
||||
no_data: 無資料
|
||||
no_date: 無日期
|
||||
no_file: 無檔案
|
||||
path: 路徑
|
||||
position: 排序
|
||||
previous: 上一頁
|
||||
remove: 移除
|
||||
remove_default: 移除預設
|
||||
restful_actions:
|
||||
create: 建立
|
||||
delete: 刪除
|
||||
edit: 編輯
|
||||
index: Index
|
||||
new: 新增
|
||||
show: Show
|
||||
update: 更新
|
||||
search:
|
||||
tags: 搜尋標籤
|
||||
select_all: 全選
|
||||
select_file: 選擇檔案
|
||||
select_image: 選擇圖片
|
||||
sort_number: 排序數
|
||||
tag:
|
||||
add: 新增標籤
|
||||
delete: 刪除標籤
|
||||
new_name: 新標籤名稱
|
||||
merge_help: 自訂新標籤名稱或點選下方標籤
|
||||
merger: 合併標籤
|
||||
remove_default: 移除預設標籤
|
||||
warning:
|
||||
delete: 刪除後無法還原,您確定要刪除嗎?
|
||||
remove_default: 您確定要移除此預設標籤嗎?
|
||||
update:
|
||||
error:
|
||||
tag: 更新類別時發生錯誤
|
||||
tag: 更新標籤時發生錯誤
|
||||
url_alt: 註解
|
||||
+1
-1
@@ -8,7 +8,7 @@ defaults: &defaults
|
||||
|
||||
development:
|
||||
<<: *defaults
|
||||
database: test_site
|
||||
database: ntu_mb_orbit_test
|
||||
|
||||
|
||||
|
||||
|
||||
+16
-4
@@ -9,6 +9,14 @@ Orbit::Application.routes.draw do
|
||||
match "/users_passwd" => "desktop/registrations#update", :as => :users_passwd, :via => :put
|
||||
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 Rack::GridFS::Endpoint.new(:db => Mongoid.database,:lookup=>:path), :at => "gridfs"
|
||||
|
||||
@@ -200,6 +208,14 @@ Orbit::Application.routes.draw do
|
||||
get 'change_design'
|
||||
get 'preference'
|
||||
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"
|
||||
|
||||
|
||||
resources :tags do
|
||||
collection do
|
||||
@@ -214,10 +230,6 @@ Orbit::Application.routes.draw do
|
||||
member do
|
||||
get 'temp_edit'
|
||||
end
|
||||
collection do
|
||||
get 'edit_order'
|
||||
post 'update_order'
|
||||
end
|
||||
match "edit_passwd" => "users_new_interface#edit_passwd" ,:as => :edit_passwd
|
||||
end
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ module OrbitApp
|
||||
current_priority = @context_links.count
|
||||
if @approvable_with_link
|
||||
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,
|
||||
:available_for => [:manager]
|
||||
end
|
||||
|
||||
@@ -53,7 +53,6 @@ module OrbitApp
|
||||
def initialize(name,partial=nil,*args ,&block)
|
||||
@base_path = args[0][:base_path]
|
||||
@name = partial[0][:i18n].nil? ? name : lambda{ I18n.t(partial[0][:i18n]) }
|
||||
@sort_number = partial[0][:sort_number]
|
||||
@app_name = partial[0][:app_name]
|
||||
@intro_app_name = partial[0][:intro_app_name]
|
||||
@partial_path = ''
|
||||
@@ -69,10 +68,6 @@ module OrbitApp
|
||||
block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given?
|
||||
end
|
||||
|
||||
def sort_number
|
||||
return @sort_number
|
||||
end
|
||||
|
||||
def app_name
|
||||
return @app_name
|
||||
end
|
||||
|
||||
@@ -46,7 +46,7 @@ module OrbitTag
|
||||
|
||||
def tags=(tag_ids)
|
||||
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}
|
||||
tag_ids.each do |tag_id|
|
||||
unless ids.include? tag_id
|
||||
|
||||
@@ -91,8 +91,4 @@ namespace :new_ui do
|
||||
end
|
||||
end
|
||||
|
||||
task :save_users => :environment do
|
||||
User.all.each(&:save)
|
||||
end
|
||||
|
||||
end
|
||||
Vendored
-7
@@ -50,13 +50,6 @@ class Panel::Member::FrontEnd::MemberListsController < OrbitWidgetController
|
||||
|
||||
@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 = []
|
||||
|
||||
attribute_values = @member.attribute_values.asc("_id")
|
||||
|
||||
Vendored
+2
-21
@@ -18,8 +18,6 @@
|
||||
<div class="o-members">
|
||||
|
||||
<% @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>
|
||||
<ul class="o-members-list">
|
||||
@@ -30,14 +28,7 @@
|
||||
<div class="o-members-pic"><%= show_avatar(member) %></div>
|
||||
<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>
|
||||
<% @job_title = show_attribute_value(@member_lists.get_member_list_attribute_value(member.id,"teacher","job_title").get_value_by_locale(I18n.locale))
|
||||
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"><%= @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>
|
||||
<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>
|
||||
</ul>
|
||||
@@ -49,8 +40,6 @@
|
||||
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
|
||||
<% elsif @item.frontend_style == 'Two' or @item.frontend_style.blank? %>
|
||||
@@ -63,8 +52,6 @@
|
||||
|
||||
<% @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>
|
||||
<ul class="o-members-list">
|
||||
|
||||
@@ -74,11 +61,7 @@
|
||||
<div class="o-members-pic"><%= show_avatar(member) %></div>
|
||||
<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>
|
||||
<% @job_title = show_attribute_value(@member_lists.get_member_list_attribute_value(member.id,"teacher","job_title").get_value_by_locale(I18n.locale))
|
||||
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"><%= @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>
|
||||
<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>
|
||||
</ul>
|
||||
@@ -90,8 +73,6 @@
|
||||
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
|
||||
+12
-12
@@ -43,29 +43,29 @@
|
||||
</div>
|
||||
|
||||
<div class="member-pic">
|
||||
<%= image_tag(@member.avatar) %>
|
||||
<%= show_avatar(@member) %>
|
||||
</div>
|
||||
|
||||
<div class="member-module">
|
||||
<div class="module-nav">
|
||||
<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)
|
||||
@intro_data = plugin["intro_app_name"].classify.constantize.where(:user_id=>@member.id).first
|
||||
@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
|
||||
%>
|
||||
|
||||
<% if !@intro_data.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 %>
|
||||
|
||||
<% else %>
|
||||
|
||||
<% 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 %>
|
||||
@@ -75,18 +75,18 @@
|
||||
</div>
|
||||
<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)
|
||||
@intro_data = plugin["intro_app_name"].classify.constantize.where(:user_id=>@member.id).first
|
||||
@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
|
||||
%>
|
||||
|
||||
<% if !@intro_data.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? %>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -94,7 +94,7 @@
|
||||
<% else %>
|
||||
|
||||
<% 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? %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
vendor/built_in_modules/personal_book/app/assets/javascripts/personal_book/desktop/personal_books.js
Vendored
-1
@@ -29,7 +29,6 @@ orbitDesktop.prototype.initializePersonalBook = function(target,url,cache){ // t
|
||||
return false;
|
||||
})
|
||||
}
|
||||
o.enableSharing("div.share_mode");
|
||||
}
|
||||
this.initializePersonalBook.bookDelete = function(data,dom){
|
||||
var parent = dom.parent().parent().parent();
|
||||
|
||||
-1
@@ -282,7 +282,6 @@ class Panel::PersonalBook::BackEnd::WritingBooksController < OrbitBackendControl
|
||||
respond_to do |format|
|
||||
|
||||
format.html { redirect_to(admin_users_new_interface_url(:id=>params[:user_id],:show_plugin_profile=>"WritingBook")) }
|
||||
format.json { render json: {"success"=>true}.to_json}
|
||||
|
||||
end
|
||||
|
||||
|
||||
+5
-11
@@ -2,29 +2,23 @@ module Panel::PersonalBook::Desktop::PersonalBooksHelper
|
||||
def publication_record publication, view
|
||||
content_tag :li,
|
||||
"item" => "true",
|
||||
"data-id" => publication.id.to_s,
|
||||
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
|
||||
content_tag :div,
|
||||
:class => "inner" do
|
||||
marker(publication.id) + \
|
||||
content(publication, view) + \
|
||||
edit_or_delete(publication)
|
||||
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" }" do
|
||||
marker + \
|
||||
content(publication, view) + \
|
||||
edit_or_delete(publication)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def marker id
|
||||
def marker
|
||||
content_tag :div,
|
||||
:class => "list_item_action" do
|
||||
content_tag(:a, "",:href=>"",
|
||||
:class => "icon-check-empty",
|
||||
"toggle-onclick"=>"icon-check-empty icon-check",
|
||||
"data-id" => id.to_s,
|
||||
"ajax-remote"=>"false") + \
|
||||
content_tag(:a, "",:href=>"",
|
||||
:class => "icon-star-empty",
|
||||
"toggle-onclick"=>"icon-star-empty icon-star",
|
||||
"data-id" => id.to_s,
|
||||
"ajax-remote"=>"false")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -83,11 +83,12 @@ class WritingBook
|
||||
end
|
||||
|
||||
def create_link
|
||||
|
||||
title = ["\"#{self.extracted_chapters}\""]
|
||||
title << self.book_title
|
||||
title << self.publisher
|
||||
title << self.pages
|
||||
title = []
|
||||
# title = ["#{self.extracted_chapters}"] if self.extracted_chapters.present?
|
||||
title << self.paper_title if self.paper_title.present?
|
||||
title << self.book_title if self.book_title.present?
|
||||
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.join(', ')
|
||||
end
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
<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>
|
||||
<%= 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" %>
|
||||
</td>
|
||||
</tr>
|
||||
+27
-14
@@ -21,14 +21,14 @@
|
||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overview" content-layout="simple" base-width="420">
|
||||
<ul class="s_form" isotope="true">
|
||||
<li class="s_grid_row" >
|
||||
<div class="overview" content-layout="column" base-width="420">
|
||||
<div column="true">
|
||||
<div class="s_form">
|
||||
<ul>
|
||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
|
||||
<% 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.text_area locale,
|
||||
class: "s_grid_12 s_grid s_grid_h_3",
|
||||
@@ -36,7 +36,8 @@
|
||||
placeholder: t("personal_book.paper_title")+ "("+I18nVariable.from_locale(locale)+")",
|
||||
value: (@personal_book.paper_title_translations[locale.to_s] rescue nil) %>
|
||||
<% end %>
|
||||
|
||||
</li>
|
||||
<li class="s_grid_row" <%= style %> <%= data %> >
|
||||
<%= f.fields_for :book_title_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
size: "20",
|
||||
@@ -44,7 +45,8 @@
|
||||
class: "s_grid_12 s_grid",
|
||||
value: (@personal_book.book_title_translations[locale.to_s] rescue nil) %>
|
||||
<% end %>
|
||||
|
||||
</li>
|
||||
<li class="s_grid_row" <%= style %> <%= data %> >
|
||||
<%= f.fields_for :extracted_chapters_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
size: "20",
|
||||
@@ -52,7 +54,8 @@
|
||||
class: "s_grid_12 s_grid",
|
||||
value: (@personal_book.extracted_chapters_translations[locale.to_s] rescue nil) %>
|
||||
<% end %>
|
||||
|
||||
</li>
|
||||
<li class="s_grid_row" <%= style %> <%= data %> >
|
||||
<%= f.fields_for :publishers_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
size: "20",
|
||||
@@ -60,9 +63,8 @@
|
||||
class: "s_grid_12 s_grid",
|
||||
value: (@personal_book.publishers_translations[locale.to_s] rescue nil) %>
|
||||
<% end %>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= 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"} %>
|
||||
@@ -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"%>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div column="true">
|
||||
<div class="s_form">
|
||||
<ul>
|
||||
<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"%>
|
||||
</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"%>
|
||||
</li>
|
||||
<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>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div column="true">
|
||||
<div class="s_form">
|
||||
<ul>
|
||||
<li class="s_grid_row">
|
||||
<table class="s_table">
|
||||
<thead>
|
||||
@@ -153,7 +165,8 @@
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var get_html = function(old_id,new_id){
|
||||
|
||||
+22
-9
@@ -50,10 +50,25 @@
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Share</div>
|
||||
<div class="admbg sdm_o share_mode" data-link="<%= data_share_panel_personal_book_back_end_writing_books_path %>" data-var="disable" >
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="" item-class="private" data-mode="true" >Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="" item-class="public" data-mode="false" >Public</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Full</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Group</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1" id='ns'>New Share</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt remote_url" href="<%= panel_personal_book_desktop_personal_books_path %>">Full</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Group</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -61,10 +76,8 @@
|
||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></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" >
|
||||
<ul isotope="true">
|
||||
<% @writing_books.each do |w| %>
|
||||
<%= publication_record w, @view_by%>
|
||||
<% end %>
|
||||
</ul>
|
||||
<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" >
|
||||
<% @writing_books.each do |w| %>
|
||||
<%= publication_record w, @view_by%>
|
||||
<% end %>
|
||||
</div>
|
||||
+1
-1
@@ -2,7 +2,7 @@ module PersonalBook
|
||||
OrbitApp.registration "PersonalBook",:type=> 'ModuleApp' do
|
||||
module_label 'module_name.personal_book'
|
||||
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'
|
||||
|
||||
|
||||
|
||||
|
||||
-1
@@ -29,7 +29,6 @@ orbitDesktop.prototype.initializeConferencePapers = function(target,url,cache){
|
||||
return false;
|
||||
})
|
||||
}
|
||||
o.enableSharing("div.share_mode");
|
||||
}
|
||||
this.initializeConferencePapers.paperDelete = function(data,dom){
|
||||
var parent = dom.parent().parent().parent();
|
||||
|
||||
+1
-1
@@ -277,7 +277,7 @@ class Panel::PersonalConference::BackEnd::WritingConferencesController < OrbitBa
|
||||
respond_to do |format|
|
||||
|
||||
format.html { redirect_to(admin_users_new_interface_url(:id=>params[:user_id],:show_plugin_profile=>"WritingConference")) }
|
||||
format.json { render json: {"success"=>true}.to_json}
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
+5
-11
@@ -2,29 +2,23 @@ module Panel::PersonalConference::Desktop::ConferencePagesHelper
|
||||
def publication_record publication, view
|
||||
content_tag :li,
|
||||
"item" => "true",
|
||||
"data-id" => publication.id.to_s,
|
||||
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
|
||||
content_tag :div,
|
||||
:class => "inner" do
|
||||
marker(publication.id) + \
|
||||
content(publication, view) + \
|
||||
edit_or_delete(publication)
|
||||
end
|
||||
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" }" do
|
||||
marker + \
|
||||
content(publication, view) + \
|
||||
edit_or_delete(publication)
|
||||
end
|
||||
end
|
||||
|
||||
def marker id
|
||||
def marker
|
||||
content_tag :div,
|
||||
:class => "list_item_action" do
|
||||
content_tag(:a, "",:href=>"",
|
||||
:class => "icon-check-empty",
|
||||
"toggle-onclick"=>"icon-check-empty icon-check",
|
||||
"data-id" => id.to_s,
|
||||
"ajax-remote"=>"false") + \
|
||||
content_tag(:a, "",:href=>"",
|
||||
:class => "icon-star-empty",
|
||||
"toggle-onclick"=>"icon-star-empty icon-star",
|
||||
"data-id" => id.to_s,
|
||||
"ajax-remote"=>"false")
|
||||
end
|
||||
end
|
||||
|
||||
+5
-6
@@ -84,12 +84,11 @@ class WritingConference
|
||||
end
|
||||
|
||||
def create_link
|
||||
|
||||
title = ["\"#{self.paper_title}\""]
|
||||
title << self.conference_title
|
||||
title << self.sponsor
|
||||
title << self.location
|
||||
title << "#{period_start_date}-#{period_end_date}"
|
||||
title = ["#{self.paper_title}"]
|
||||
title << self.conference_title if self.conference_title.present?
|
||||
title << self.sponsor if self.sponsor.present?
|
||||
title << self.location if self.location.present?
|
||||
title << "#{period_start_date}-#{period_end_date}" if (self.period_start_date.present? && self.period_end_date.present?)
|
||||
# title << "(#{self.conference_paper_types.collect{|x| x.title}.join(', ')})"
|
||||
title.join(', ')
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
<td class="span2">
|
||||
|
||||
<a href="<%= panel_personal_conference_back_end_writing_conference_author_type_quick_edit_path(list_author_type) %>#myModal2" data-toggle="modal" data-remote="true" class="action">編輯</a>
|
||||
<%= link_to '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" %>
|
||||
</td>
|
||||
</tr>
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
<td class="span2">
|
||||
|
||||
<a href="<%= panel_personal_conference_back_end_writing_conference_paper_type_quick_edit_path(list_paper_type) %>#myModal1" data-toggle="modal" data-remote="true" class="action">編輯</a>
|
||||
<%= link_to '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" %>
|
||||
</td>
|
||||
</tr>
|
||||
+33
-16
@@ -29,13 +29,14 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="viewport"> -->
|
||||
<div class="overview" content-layout="simple" base-width="420">
|
||||
<ul class="s_form" isotope="true">
|
||||
<li class="s_grid_row" >
|
||||
<div class="overview" content-layout="column" base-width="420">
|
||||
<div column="true">
|
||||
<div class="s_form">
|
||||
<ul>
|
||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
|
||||
<% 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.text_area locale,
|
||||
class: "s_grid_12 s_grid_h_2 s_grid",
|
||||
@@ -43,6 +44,8 @@
|
||||
placeholder: t("personal_conference.paper_title")+ "("+I18nVariable.from_locale(locale)+")",
|
||||
value: (@writing_conference.paper_title_translations[locale.to_s] rescue nil) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||
<%= f.fields_for :conference_title_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
size: "20",
|
||||
@@ -50,9 +53,8 @@
|
||||
class: "s_grid_12 s_grid",
|
||||
value: (@writing_conference.conference_title_translations[locale.to_s] rescue nil) %>
|
||||
<% end %>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<div>
|
||||
<%= label_tag("", t("personal_conference.paper_type"), class: 's_grid s_grid_4') %>
|
||||
@@ -97,7 +99,11 @@
|
||||
<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"%>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div column="true">
|
||||
<div class="s_form">
|
||||
<ul>
|
||||
<li class="s_grid_row">
|
||||
<%= f.text_area :author_tokens,
|
||||
class: "s_grid_12 s_grid",
|
||||
@@ -149,7 +155,12 @@
|
||||
</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">
|
||||
<table class="s_table">
|
||||
<thead>
|
||||
@@ -179,16 +190,22 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
|
||||
<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 s_grid_h_full"%>
|
||||
</li>
|
||||
|
||||
<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 s_grid_h_full"%>
|
||||
</ul>
|
||||
</div>
|
||||
<div column="true">
|
||||
<ul class="s_form">
|
||||
<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"%>
|
||||
</li>
|
||||
</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> -->
|
||||
|
||||
+8
-7
@@ -51,10 +51,13 @@
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Share</div>
|
||||
<div class="admbg sdm_o share_mode" data-link="<%= data_share_panel_personal_conference_back_end_writing_conferences_path %>" data-var="disable" >
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="" item-class="private" data-mode="true" >Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="" item-class="public" data-mode="false" >Public</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Full</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Group</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -66,15 +69,13 @@
|
||||
<div class="scrollbar sb_h vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div>
|
||||
<div class="viewport"> -->
|
||||
<% if @view_by.eql?"abstract" %>
|
||||
<div class="overview" page-name="conference_p_list" content-layout="simple" per-column="1" base-width="300" pagination-var="page">
|
||||
<div class="overview" page-name="conference_p_list" content-layout="datalist" per-column="1" base-width="300" pagination-var="page">
|
||||
<% else %>
|
||||
<div class="overview" page-name="conference_p_list" content-layout="simple" per-column="5" base-width="300" pagination-var="page">
|
||||
<div class="overview" page-name="conference_p_list" content-layout="datalist" per-column="5" base-width="300" pagination-var="page">
|
||||
<% end %>
|
||||
<ul isotope="true">
|
||||
<% @writing_conferences.each do |w| %>
|
||||
<%= publication_record w, @view_by%>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- </div>
|
||||
</div> -->
|
||||
+1
-1
@@ -2,7 +2,7 @@ module PersonalConference
|
||||
OrbitApp.registration "PersonalConference",:type=> 'ModuleApp' do
|
||||
module_label 'module_name.personal_conference'
|
||||
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'
|
||||
|
||||
|
||||
|
||||
|
||||
-1
@@ -29,7 +29,6 @@ orbitDesktop.prototype.initializePersonalDiploma = function(target,url,cache){ /
|
||||
return false;
|
||||
})
|
||||
}
|
||||
o.enableSharing("div.share_mode");
|
||||
}
|
||||
this.initializePersonalDiploma.diplomaDelete = function(data,dom){
|
||||
var parent = dom.parent().parent().parent();
|
||||
|
||||
+1
-1
@@ -159,7 +159,7 @@ class Panel::PersonalDiploma::BackEnd::DiplomasController < OrbitBackendControll
|
||||
respond_to do |format|
|
||||
|
||||
format.html { redirect_to(admin_users_new_interface_url(:id=>params[:user_id],:show_plugin_profile=>"Diploma")) }
|
||||
format.json { render json: {"success"=>true}.to_json}
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
+3
-9
@@ -2,29 +2,23 @@ module Panel::PersonalDiploma::Desktop::PersonalDiplomasHelper
|
||||
def publication_record publication, view
|
||||
content_tag :li,
|
||||
"item" => "true",
|
||||
"data-id" => publication.id.to_s,
|
||||
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
|
||||
content_tag :div,
|
||||
:class => "inner" do
|
||||
marker(publication.id) + \
|
||||
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" }" do
|
||||
marker + \
|
||||
content(publication, view) + \
|
||||
edit_or_delete(publication)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def marker id
|
||||
def marker
|
||||
content_tag :div,
|
||||
:class => "list_item_action" do
|
||||
content_tag(:a, "",:href=>"",
|
||||
:class => "icon-check-empty",
|
||||
"toggle-onclick"=>"icon-check-empty icon-check",
|
||||
"data-id" => id.to_s,
|
||||
"ajax-remote"=>"false") + \
|
||||
content_tag(:a, "",:href=>"",
|
||||
:class => "icon-star-empty",
|
||||
"toggle-onclick"=>"icon-star-empty icon-star",
|
||||
"data-id" => id.to_s,
|
||||
"ajax-remote"=>"false")
|
||||
end
|
||||
end
|
||||
|
||||
+21
-12
@@ -21,8 +21,10 @@
|
||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overview" content-layout="simple" base-width="420">
|
||||
<ul class="s_form" isotope="true">
|
||||
<div class="overview" content-layout="column" base-width="420">
|
||||
<div column="true">
|
||||
<div class="s_form">
|
||||
<ul>
|
||||
<li class="s_grid_row">
|
||||
<%= 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'} %>
|
||||
@@ -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, :order => [:month, :day] }, {:class => 's_grid_2 s_grid'} %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
|
||||
<% 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.text_field locale,
|
||||
size: "20",
|
||||
@@ -45,7 +46,8 @@
|
||||
class: "s_grid_12 s_grid",
|
||||
value: (@diploma.school_name_translations[locale.to_s] rescue nil) %>
|
||||
<% end %>
|
||||
|
||||
</li>
|
||||
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||
<%= f.fields_for :country_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
size: "20",
|
||||
@@ -53,7 +55,8 @@
|
||||
class: "s_grid_12 s_grid",
|
||||
value: (@diploma.country_translations[locale.to_s] rescue nil) %>
|
||||
<% end %>
|
||||
|
||||
</li>
|
||||
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||
<%= f.fields_for :department_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
size: "20",
|
||||
@@ -61,7 +64,8 @@
|
||||
class: "s_grid_12 s_grid",
|
||||
value: (@diploma.department_translations[locale.to_s] rescue nil) %>
|
||||
<% end %>
|
||||
|
||||
</li>
|
||||
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||
<%= f.fields_for :degree_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
size: "20",
|
||||
@@ -69,9 +73,8 @@
|
||||
class: "s_grid_12 s_grid",
|
||||
value: (@diploma.degree_translations[locale.to_s] rescue nil) %>
|
||||
<% end %>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
</li>
|
||||
<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"%>
|
||||
</li>
|
||||
@@ -82,10 +85,16 @@
|
||||
<%= 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"} %>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div column="true">
|
||||
<div class="s_form">
|
||||
<ul>
|
||||
<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>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
+23
-10
@@ -47,12 +47,27 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Share</div>
|
||||
<div class="admbg sdm_o share_mode" data-link="<%= data_share_panel_personal_diploma_back_end_diplomas_path %>" data-var="disable" >
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="" item-class="private" data-mode="true" >Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="" item-class="public" data-mode="false" >Public</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Full</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Group</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1" id='ns'>New Share</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt remote_url" href="<%= panel_personal_diploma_desktop_personal_diplomas_path %>">Full</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Group</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -60,10 +75,8 @@
|
||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></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" >
|
||||
<ul isotope="true">
|
||||
<% @diplomas.each do |w| %>
|
||||
<%= publication_record w, @view_by%>
|
||||
<% end %>
|
||||
</ul>
|
||||
<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" >
|
||||
<% @diplomas.each do |w| %>
|
||||
<%= publication_record w, @view_by%>
|
||||
<% end %>
|
||||
</div>
|
||||
+1
-1
@@ -2,7 +2,7 @@ module PersonalDiploma
|
||||
OrbitApp.registration "PersonalDiploma",:type=> 'ModuleApp' do
|
||||
module_label 'module_name.personal_diploma'
|
||||
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'
|
||||
|
||||
|
||||
|
||||
|
||||
-1
@@ -29,7 +29,6 @@ orbitDesktop.prototype.initializePersonalExperience = function(target,url,cache)
|
||||
return false;
|
||||
})
|
||||
}
|
||||
o.enableSharing("div.share_mode");
|
||||
}
|
||||
this.initializePersonalExperience.experienceDelete = function(data,dom){
|
||||
var parent = dom.parent().parent().parent();
|
||||
|
||||
+1
-1
@@ -225,7 +225,7 @@ class Panel::PersonalExperience::BackEnd::ExperiencesController < OrbitBackendCo
|
||||
respond_to do |format|
|
||||
|
||||
format.html { redirect_to(admin_users_new_interface_url(:id=>params[:user_id],:show_plugin_profile=>"Experience")) }
|
||||
format.json { render json: {"success"=>true}.to_json}
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
+3
-9
@@ -2,28 +2,22 @@ module Panel::PersonalExperience::Desktop::PersonalExperiencesHelper
|
||||
def publication_record publication, view
|
||||
content_tag :li,
|
||||
"item" => "true",
|
||||
"data-id" => publication.id.to_s,
|
||||
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
|
||||
content_tag :div,
|
||||
:class => "inner" do
|
||||
marker(publication.id) + \
|
||||
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" }" do
|
||||
marker + \
|
||||
content(publication, view) + \
|
||||
edit_or_delete(publication)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def marker id
|
||||
def marker
|
||||
content_tag :div,
|
||||
:class => "list_item_action" do
|
||||
content_tag(:a, "",:href=>"",
|
||||
:class => "icon-check-empty",
|
||||
"data-id" => id.to_s,
|
||||
"toggle-onclick"=>"icon-check-empty icon-check",
|
||||
"ajax-remote"=>"false") + \
|
||||
content_tag(:a, "",:href=>"",
|
||||
:class => "icon-star-empty",
|
||||
"data-id" => id.to_s,
|
||||
"toggle-onclick"=>"icon-star-empty icon-star",
|
||||
"ajax-remote"=>"false")
|
||||
end
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
<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>
|
||||
<%= 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" %>
|
||||
</td>
|
||||
</tr>
|
||||
+19
-10
@@ -21,13 +21,14 @@
|
||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overview" content-layout="simple" base-width="420">
|
||||
<ul class="s_form" isotope="true">
|
||||
<li class="s_grid_row">
|
||||
<div class="overview" content-layout="column" base-width="420">
|
||||
<div column="true">
|
||||
<div class="s_form">
|
||||
<ul>
|
||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
|
||||
<% 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.text_field locale,
|
||||
size: "20",
|
||||
@@ -35,7 +36,8 @@
|
||||
class: "s_grid_12 s_grid",
|
||||
value: (@experience.organizationt_title_translations[locale.to_s] rescue nil) %>
|
||||
<% end %>
|
||||
|
||||
</li>
|
||||
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||
<%= f.fields_for :department_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
size: "20",
|
||||
@@ -43,7 +45,8 @@
|
||||
class: "s_grid_12 s_grid",
|
||||
value: (@experience.department_translations[locale.to_s] rescue nil) %>
|
||||
<% end %>
|
||||
|
||||
</li>
|
||||
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||
<%= f.fields_for :job_title_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
size: "20",
|
||||
@@ -51,9 +54,8 @@
|
||||
class: "s_grid_12 s_grid",
|
||||
value: (@experience.job_title_translations[locale.to_s] rescue nil) %>
|
||||
<% end %>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= 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"} %>
|
||||
@@ -78,9 +80,16 @@
|
||||
<%= 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"} %>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div column="true">
|
||||
<div class="s_form">
|
||||
<ul>
|
||||
<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>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
+22
-9
@@ -50,10 +50,25 @@
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Share</div>
|
||||
<div class="admbg sdm_o share_mode" data-link="<%= data_share_panel_personal_experience_back_end_experiences_path %>" data-var="disable" >
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="" item-class="private" data-mode="true" >Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="" item-class="public" data-mode="false" >Public</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Full</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Group</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1" id='ns'>New Share</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt remote_url" href="<%= panel_personal_experience_desktop_personal_experiences_path %>">Full</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Group</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -61,10 +76,8 @@
|
||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></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" >
|
||||
<ul isotope="true">
|
||||
<% @experiences.each do |w| %>
|
||||
<%= publication_record w, @view_by%>
|
||||
<% end %>
|
||||
</ul>
|
||||
<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" >
|
||||
<% @experiences.each do |w| %>
|
||||
<%= publication_record w, @view_by%>
|
||||
<% end %>
|
||||
</div>
|
||||
+1
-1
@@ -2,7 +2,7 @@ module PersonalExperience
|
||||
OrbitApp.registration "PersonalExperience",:type=> 'ModuleApp' do
|
||||
module_label 'module_name.personal_experience'
|
||||
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'
|
||||
|
||||
|
||||
|
||||
|
||||
-1
@@ -29,7 +29,6 @@ orbitDesktop.prototype.initializePersonalHonor = function(target,url,cache){ //
|
||||
return false;
|
||||
})
|
||||
}
|
||||
o.enableSharing("div.share_mode");
|
||||
}
|
||||
this.initializePersonalHonor.honorDelete = function(data,dom){
|
||||
var parent = dom.parent().parent().parent();
|
||||
|
||||
+1
-1
@@ -226,7 +226,7 @@ class Panel::PersonalHonor::BackEnd::HonorsController < OrbitBackendController
|
||||
respond_to do |format|
|
||||
|
||||
format.html { redirect_to(admin_users_new_interface_url(:id=>params[:user_id],:show_plugin_profile=>"Honor")) }
|
||||
format.json { render json: {"success"=>true}.to_json}
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
+3
-9
@@ -2,29 +2,23 @@ module Panel::PersonalHonor::Desktop::PersonalHonorsHelper
|
||||
def publication_record publication, view
|
||||
content_tag :li,
|
||||
"item" => "true",
|
||||
"data-id" => publication.id.to_s,
|
||||
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
|
||||
content_tag :div,
|
||||
:class => "inner" do
|
||||
marker(publication.id) + \
|
||||
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" }" do
|
||||
marker + \
|
||||
content(publication, view) + \
|
||||
edit_or_delete(publication)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def marker id
|
||||
def marker
|
||||
content_tag :div,
|
||||
:class => "list_item_action" do
|
||||
content_tag(:a, "",:href=>"",
|
||||
:class => "icon-check-empty",
|
||||
"toggle-onclick"=>"icon-check-empty icon-check",
|
||||
"data-id" => id.to_s,
|
||||
"ajax-remote"=>"false") + \
|
||||
content_tag(:a, "",:href=>"",
|
||||
:class => "icon-star-empty",
|
||||
"toggle-onclick"=>"icon-star-empty icon-star",
|
||||
"data-id" => id.to_s,
|
||||
"ajax-remote"=>"false")
|
||||
end
|
||||
end
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
<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>
|
||||
<%= 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" %>
|
||||
</td>
|
||||
</tr>
|
||||
+14
-6
@@ -21,9 +21,11 @@
|
||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overview" content-layout="simple" base-width="420">
|
||||
<ul class="s_form" isotope="true">
|
||||
<li class="s_grid_row" >
|
||||
<div class="overview" content-layout="column" base-width="420">
|
||||
<div column="true">
|
||||
<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"%>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
@@ -47,10 +49,16 @@
|
||||
<%= 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"} %>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div column="true">
|
||||
<div class="s_form">
|
||||
<ul>
|
||||
<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>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
+23
-10
@@ -46,12 +46,27 @@
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Share</div>
|
||||
<div class="admbg sdm_o share_mode" data-link="<%= data_share_panel_personal_honor_back_end_honors_path %>" data-var="disable" >
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="" item-class="private" data-mode="true" >Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="" item-class="public" data-mode="false" >Public</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Full</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Group</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1" id='ns'>New Share</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt remote_url" href="<%= panel_personal_honor_desktop_personal_honors_path %>">Full</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Group</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -59,10 +74,8 @@
|
||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></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" >
|
||||
<ul isotope="true">
|
||||
<% @honors.each do |w| %>
|
||||
<%= publication_record w, @view_by%>
|
||||
<% end %>
|
||||
</ul>
|
||||
<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" >
|
||||
<% @honors.each do |w| %>
|
||||
<%= publication_record w, @view_by%>
|
||||
<% end %>
|
||||
</div>
|
||||
+1
-1
@@ -2,7 +2,7 @@ module PersonalHonor
|
||||
OrbitApp.registration "PersonalHonor",:type=> 'ModuleApp' do
|
||||
module_label 'module_name.personal_honor'
|
||||
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'
|
||||
|
||||
|
||||
|
||||
|
||||
-1
@@ -29,7 +29,6 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
|
||||
return false;
|
||||
})
|
||||
}
|
||||
o.enableSharing("div.share_mode");
|
||||
}
|
||||
this.initializeJournalPapers.paperDelete = function(data,dom){
|
||||
var parent = dom.parent().parent().parent();
|
||||
|
||||
+1
-1
@@ -327,7 +327,7 @@ class Panel::PersonalJournal::BackEnd::WritingJournalsController < OrbitBackendC
|
||||
respond_to do |format|
|
||||
|
||||
format.html { redirect_to(admin_users_new_interface_url(:id=>params[:user_id],:show_plugin_profile=>"WritingJournal")) }
|
||||
format.json { render json: {"success"=>true}.to_json}
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
+5
-12
@@ -2,15 +2,10 @@ module Panel::PersonalJournal::Desktop::JournalPagesHelper
|
||||
def publication_record publication, view
|
||||
content_tag :li,
|
||||
"item" => "true",
|
||||
"data-id" => publication.id.to_s,
|
||||
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
|
||||
|
||||
content_tag :div,
|
||||
:class => "inner" do
|
||||
marker(publication.id) + \
|
||||
content(publication, view) + \
|
||||
edit_or_delete(publication)
|
||||
end
|
||||
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" }" do
|
||||
marker + \
|
||||
content(publication, view) + \
|
||||
edit_or_delete(publication)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -30,18 +25,16 @@ module Panel::PersonalJournal::Desktop::JournalPagesHelper
|
||||
height
|
||||
end
|
||||
|
||||
def marker id
|
||||
def marker
|
||||
content_tag :div,
|
||||
:class => "list_item_action" do
|
||||
content_tag(:a, "",:href=>"",
|
||||
:class => "icon-check-empty",
|
||||
"toggle-onclick"=>"icon-check-empty icon-check",
|
||||
"data-id" => id.to_s,
|
||||
"ajax-remote"=>"false") + \
|
||||
content_tag(:a, "",:href=>"",
|
||||
:class => "icon-star-empty",
|
||||
"toggle-onclick"=>"icon-star-empty icon-star",
|
||||
"data-id" => id.to_s,
|
||||
"ajax-remote"=>"false")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -90,10 +90,12 @@ class WritingJournal
|
||||
end
|
||||
|
||||
def create_link
|
||||
title = ["\"#{self.paper_title}\""]
|
||||
title << self.journal_title
|
||||
title.join(', ')
|
||||
title = ["#{self.paper_title}"]
|
||||
title << self.journal_title if self.journal_title.present?
|
||||
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(', ')
|
||||
end
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
<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>
|
||||
<%= 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" %>
|
||||
</td>
|
||||
</tr>
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
<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>
|
||||
<%= 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" %>
|
||||
</td>
|
||||
</tr>
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
<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>
|
||||
<%= 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" %>
|
||||
</td>
|
||||
</tr>
|
||||
+4
-5
@@ -32,11 +32,10 @@
|
||||
<div class="viewport"> -->
|
||||
<div class="overview" content-layout="simple" base-width="420">
|
||||
<ul class="s_form" isotope="true">
|
||||
<li class="s_grid_row" >
|
||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
|
||||
<% 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.text_area locale,
|
||||
class: "s_grid_12 s_grid s_grid_h_3",
|
||||
@@ -44,7 +43,8 @@
|
||||
placeholder: t("personal_journal.paper_title")+ "("+I18nVariable.from_locale(locale)+")",
|
||||
value: (@writing_journal.paper_title_translations[locale.to_s] rescue nil) %>
|
||||
<% end %>
|
||||
|
||||
</li>
|
||||
<li class="s_grid_row" <%= style %> <%= data %>>
|
||||
<%= f.fields_for :journal_title_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
size: "20",
|
||||
@@ -53,9 +53,8 @@
|
||||
value: (@writing_journal.journal_title_translations[locale.to_s] rescue nil) %>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", t("personal_journal.level_type"), :class => 's_grid s_grid_4') %>
|
||||
<div class="s_select_g s_grid s_grid_8 s_grid_h_2">
|
||||
|
||||
+18
-3
@@ -51,10 +51,25 @@
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Share</div>
|
||||
<div class="admbg sdm_o share_mode" data-link="<%= data_share_panel_personal_journal_back_end_writing_journals_path %>" data-var="disable" >
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="" item-class="private" data-mode="true" >Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="" item-class="public" data-mode="false" >Public</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Full</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Group</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1" id='ns'>New Share</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt remote_url" href="<%= panel_personal_journal_plugin_writing_journals_path %>">Full</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Group</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
zh_tw:
|
||||
module_name:
|
||||
personal_journal: 期刊論文
|
||||
personal_journal: 期刊著作
|
||||
personal_journal:
|
||||
paper_title : "論文名稱"
|
||||
journal_title : "期刊名稱"
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ module PersonalJournal
|
||||
OrbitApp.registration "PersonalJournal",:type=> 'ModuleApp' do
|
||||
module_label 'module_name.personal_journal'
|
||||
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
-1
@@ -29,7 +29,6 @@ orbitDesktop.prototype.initializePersonalLab = function(target,url,cache){ // th
|
||||
return false;
|
||||
})
|
||||
}
|
||||
o.enableSharing("div.share_mode");
|
||||
}
|
||||
this.initializePersonalLab.labDelete = function(data,dom){
|
||||
var parent = dom.parent().parent().parent();
|
||||
|
||||
Loaded 100 of 127 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user