Compare commits

..
Author SHA1 Message Date
Spen 8609263ec6 fix member show fields 2013-11-05 17:35:18 +08:00
Spen 20a9f60c09 fix new ui announcement init data count 2013-10-29 15:05:13 +08:00
Manson Wang 32dbd57d29 Fix filemanager delete url path 2013-10-25 21:29:50 +08:00
Spen 12a5c5617e Fix new ui [app_name]_category_with_title and change announcement & faq init 2013-10-25 21:29:26 +08:00
chris de5541013f Fix tag to remove ['0', '1'] from the form 2013-10-25 21:29:04 +08:00
Spen 4df19748ed ntu mb sso logout fix 2013-10-01 18:02:54 +08:00
saurabhbhatia db00b8c2b6 Fixed Sync multiple redirect issue 2013-09-27 16:22:47 +08:00
saurabhbhatia 4b56866d23 Updated file name in writing conferences front end 2013-09-27 15:09:18 +08:00
saurabhbhatia 8ec129f559 Updated order for zh_tw translation 2013-09-27 14:36:06 +08:00
chris a6b47d9e72 Fix for user order 2013-09-27 12:49:11 +08:00
harrybomrah fd77230247 email hide show facility available 2013-09-27 12:34:43 +08:00
saurabhbhatia 250a03f074 Fixed order of Teacher Show page 2013-09-27 12:02:28 +08:00
saurabhbhatia 471987f800 Merge branch 'development' of https://github.com/Rulingcom/orbit into 0917_ntu_mb
Conflicts:
	vendor/built_in_modules/member/app/views/panel/member/front_end/member_lists/show.html.erb
2013-09-27 11:10:07 +08:00
harrybomrah 9a03e7a6b2 added sync for journal paper books and conference.. and also disabled the icons 2013-09-26 22:29:21 +08:00
saurabhbhatia 096aec3406 Merge branch 'development' of https://github.com/Rulingcom/orbit into 0917_ntu_mb
Bring Development Related Changes to ntu_mb
2013-09-26 20:31:46 +08:00
Spen 09e0d5bd92 sso for ntu mb all sites 2013-09-26 18:52:32 +08:00
saurabhbhatia 1159375de7 Updated Import to Sync Data for all personal plugins 2013-09-26 18:51:31 +08:00
saurabhbhatia 843775a2c0 Fixed the order in Personal Plugin member show page 2013-09-26 16:39:45 +08:00
saurabhbhatia 1021ac2e9b Merge branch '0917_ntu_mb' of https://github.com/Rulingcom/orbit into 0917_ntu_mb 2013-09-26 14:46:14 +08:00
saurabhbhatia ab04070a8e Updated show to remove test code 2013-09-26 14:45:43 +08:00
saurabhbhatia 5ec011a5ff Fixed Personal Plugins tabs for en locale 2013-09-26 14:45:43 +08:00
Spen cd8448d447 Add Brief intro. for all personal plugins
Add Share Setting for Personal Plugins ( if have old data must be add default value "field: is_hidden => false " )
Apply New UI to Member Plugin Edit Page
Personal Plugin Summary fix
Academic Info. list fix

Updated Import method in teachers to make all false positives.

Updated Data import and sync code

Updated Books,Conference, Journal to display properly in the frontend

Journal title being imported correctly now

Fixed Import data to import journal level types, fixed writing journal
2013-09-26 14:45:43 +08:00
saurabhbhatia 7990d4388c Import Announcements, Journal Paper, Conference Data, book data
Conflicts:
	app/models/user/user.rb

Updated import data controller to check for blank user_id

Updated import data controller to check the absense of title data

Updated route to get announcement data

Conflicts:
	config/routes.rb

Updated import data controller

Updated import data controller to import data correctly

Added method for importing page data

Updated import data with pages working

Updated Import data with page data importing successfully

Updated import controller

Updated import data to get complete teacher and announcement data
2013-09-26 14:45:42 +08:00
saurabhbhatia 367cf67928 Get data from database
Conflicts:
	app/controllers/admin/import_data_controller.rb

Conflicts:
	app/controllers/admin/import_data_controller.rb
	app/views/admin/import_data/get_teacher_data.html.erb
2013-09-26 14:45:42 +08:00
harrybomrah e7c04c6e6e small add question fix for survey module. 2013-09-26 09:33:25 +08:00
harrybomrah 6ac600fb5c brief added to desktop for all plugins 2013-09-26 09:33:18 +08:00
harrybomrah 42dcf0a2d2 survey edit completed 2013-09-26 09:33:10 +08:00
harrybomrah c35d42d671 external links and link widget fixed for development 2013-09-26 09:33:01 +08:00
saurabhbhatia 6fc47d7afd Updated show to remove test code 2013-09-25 17:33:05 +08:00
saurabhbhatia 79c4cd2075 Fixed Personal Plugins tabs for en locale 2013-09-25 17:07:15 +08:00
saurabhbhatia 2a41e3440e Fixed Import data to import journal level types, fixed writing journal 2013-09-25 12:58:37 +08:00
saurabhbhatia e29b08d0dc Journal title being imported correctly now 2013-09-24 17:13:00 +08:00
saurabhbhatia d5bb2a1889 Updated Books,Conference, Journal to display properly in the frontend 2013-09-24 15:07:49 +08:00
saurabhbhatia b535f2cf9c Updated Data import and sync code 2013-09-23 16:18:07 +08:00
saurabhbhatia f2a27c6b40 Updated Import method in teachers to make all false positives. 2013-09-23 09:52:33 +08:00
Spen 9613a52305 Add Brief intro. for all personal plugins
Add Share Setting for Personal Plugins ( if have old data must be add default value "field: is_hidden => false " )
Apply New UI to Member Plugin Edit Page
Personal Plugin Summary fix
Academic Info. list fix
2013-09-18 18:56:36 +08:00
saurabhbhatia dc8815d619 Fixed Pagination Errors in member module 2013-09-18 16:10:39 +08:00
harrybomrah b5b416d531 add page completed with attributes and reordering 2013-09-18 12:27:01 +08:00
harrybomrah f27f96b994 commit for survey questions 2013-09-18 12:26:52 +08:00
saurabhbhatia cd1d4356fb Updated import data to get complete teacher and announcement data 2013-09-17 11:36:50 +08:00
saurabhbhatia d5357ea63c Updated import controller 2013-09-17 11:36:45 +08:00
saurabhbhatia 50bb2a870c Updated Import data with page data importing successfully 2013-09-17 11:36:41 +08:00
saurabhbhatia a93945cd45 Updated import data with pages working 2013-09-17 11:36:38 +08:00
saurabhbhatia 249644e72c Added method for importing page data 2013-09-17 11:36:35 +08:00
saurabhbhatia f16d1908be Updated import data controller to import data correctly 2013-09-17 11:36:31 +08:00
saurabhbhatia c8be884291 Updated import data controller 2013-09-17 11:36:29 +08:00
saurabhbhatia 6280fdfba0 Updated route to get announcement data
Conflicts:
	config/routes.rb
2013-09-17 11:36:26 +08:00
saurabhbhatia 2a9948868f Updated import data controller to check the absense of title data 2013-09-17 11:36:24 +08:00
saurabhbhatia e4514a353a Updated import data controller to check for blank user_id 2013-09-17 11:36:07 +08:00
saurabhbhatia d2a07d9ffb Import Announcements, Journal Paper, Conference Data, book data
Conflicts:
	app/models/user/user.rb
2013-09-17 11:36:05 +08:00
saurabhbhatia 93909eeca0 Get data from database
Conflicts:
	app/controllers/admin/import_data_controller.rb

Conflicts:
	app/controllers/admin/import_data_controller.rb
	app/views/admin/import_data/get_teacher_data.html.erb
2013-09-17 11:36:02 +08:00
131 changed files with 1178 additions and 938 deletions

No files matched your search

+1 -1
View File
@@ -38,7 +38,7 @@ gem 'resque-scheduler' # job scheduling
gem 'resque-restriction' gem 'resque-restriction'
#gem 'rb-readline' #gem 'rb-readline'
# gem 'ruby-debug19' # gem 'ruby-debug19'
gem 'rubyzip', '< 1.0.0' gem 'rubyzip'
gem 'sunspot_mongo' gem 'sunspot_mongo'
gem 'sunspot_solr' gem 'sunspot_solr'
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

+1 -1
View File
@@ -69,7 +69,7 @@ $(document).ready(function(){
$("input[type=checkbox]:checked").each(function(){ $("input[type=checkbox]:checked").each(function(){
items_to_delete.push($(this).val()); items_to_delete.push($(this).val());
}) })
$.post("<%= delete_files_admin_assets_path %>",{"files":items_to_delete,"type":type},function(){ $.post("/admin/assets/delete_files",{"files":items_to_delete,"type":type},function(){
deleteBtn.hide(); deleteBtn.hide();
}) })
}) })
@@ -226,7 +226,7 @@ var orbitDesktop = function(dom){
this.bindDesktopEvents = function(){ //this function will bind the global handlers to thd desktop, for example doc this.bindDesktopEvents = function(){ //this function will bind the global handlers to thd desktop, for example doc
$(".docklist a").click(function(){ $(".docklist a").click(function(){
if( !$( this ).parent().hasClass( 'disable' ) ) if( !$( this ).hasClass( 'disable' ) )
o.menu_item($(this)); o.menu_item($(this));
return false; return false;
}); });
@@ -43,7 +43,7 @@ $(function(){
placeholder: 'placeholder', placeholder: 'placeholder',
startCollapsed: true, startCollapsed: true,
disableNesting: 'no-nest', disableNesting: 'no-nest',
update: function(event, ui) { stop: function(event, ui) {
$.post("<%= Rails.application.routes.url_helpers.admin_update_position_path %>", { id: ui.item.attr('id'), parent_id: (ui.item.parent().closest('li').attr('id') || ui.item.parent().closest('ol').attr('id')), position: ui.item.index() } ); $.post("<%= Rails.application.routes.url_helpers.admin_update_position_path %>", { id: ui.item.attr('id'), parent_id: (ui.item.parent().closest('li').attr('id') || ui.item.parent().closest('ol').attr('id')), position: ui.item.index() } );
} }
}); });
+20 -15
View File
@@ -80,22 +80,27 @@ $(function() {
_data.actionable ? $('#dialog').modal('show') : ""; _data.actionable ? $('#dialog').modal('show') : "";
e.preventDefault(); e.preventDefault();
}); });
$('.delete-item').on(clickEvent, function() {
var _v = []; $("#dialog").on(clickEvent, '.delete-item', function() {
$("tbody .list-check").each(function() { var _v = [],
this.checked && _v.push("ids[]="+this.value) _t = $t.attr("rel");
$("tbody .list-check:checked").each(function() {
_v.push(this.value);
}); });
var _t = $t.attr("rel");
if(_t.indexOf("?") > -1) { $.ajax({
$.ajax(_t + "&" + _v.join("&")).done(function() { url : _t,
actionSuccess(_data.checkAction) type:"get",
}); data : {"ids":_v},
} else { dataType : "json",
$.ajax(_t + "?" + _v.join("&")).done(function() { success : function(){
actionSuccess(_data.checkAction) actionSuccess(_data.checkAction);
}); }
} })
$('#dialog').modal('hide'); $('#dialog').modal('hide');
$('.list-active-btn').addClass('disabled').data('actionable', false); $('.list-active-btn').addClass('disabled').data('actionable', false);
}); })
}); });
@@ -1,56 +0,0 @@
function dragMode() {
$('#card-list').sortable({
placeholder: "highlight",
update: function( event, ui ) {
var _userPosition = {};
_userPosition.position = $(ui.item).index();
_userPosition.id = $(ui.item).data('user-id');
$.ajax({
url: "<%= Rails.application.routes.url_helpers.update_order_card_admin_users_new_interface_index_path %>",
type: 'POST',
dataType: 'script',
data: {users: _userPosition}
});
}
});
$('#card-list').disableSelection();
}
function typeMode() {
var _userPosition = [];
$('#list-view tbody tr').each(function(i) {
$(this).data('user-index', i);
});
$('#member-list').on(clickEvent, '.edit_position', function(e){
var $input = $('<input type="text">'),
$cross = $('<a class="btn btn-mini"><i class="icons-cross"/></a>');
if($(this).siblings('input').length) {
$(this).siblings('input').attr('type', 'text').after($cross);
} else {
$(this).after($cross);
$(this).after($input);
}
$(this).hide();
$input.val($(this).text());
e.preventDefault();
$cross.click(function(event) {
$input.remove();
$(this).siblings('a').show().end().remove();
});
});
$('.bottomnav').on(clickEvent, '.btn', function(e) {
_userPosition = [];
$('#member-list tbody input').each(function(i) {
_userPosition.push([$(this).val(), $(this).siblings('a').data('user-id')]);
});
$.ajax({
url: "<%= Rails.application.routes.url_helpers.update_order_list_admin_users_new_interface_index_path %>",
type: 'POST',
dataType: 'script',
data: {users: _userPosition}
});
e.preventDefault();
});
};
+1 -1
View File
@@ -1,5 +1,5 @@
//= require basic //= require basic
//= require jquery.ui.sortable //= require lib/jquery-ui-1.10.2.custom.min.js
//= require lib/jquery.ui.touch-punch.min.js //= require lib/jquery.ui.touch-punch.min.js
//= require lib/jquery.mjs.nestedSortable.js //= require lib/jquery.mjs.nestedSortable.js
//= require lib/items/items //= require lib/items/items
+3 -3
View File
@@ -191,7 +191,7 @@ legend {
} }
#sidebar .sidebar-nav > li i { #sidebar .sidebar-nav > li i {
font-size: 1.6em; font-size: 1.6em;
line-height: 45px; line-height: 60px;
} }
#sidebar .sidebar-nav > li.active i { #sidebar .sidebar-nav > li.active i {
font-size: 2.2em; font-size: 2.2em;
@@ -621,8 +621,8 @@ legend {
margin-bottom: 25px; margin-bottom: 25px;
} }
.sign-in .btn { .sign-in .btn {
padding: 4px 0;
display: block; display: block;
padding: 4px 0;
width: 100%; width: 100%;
margin-bottom: 10px; margin-bottom: 10px;
} }
@@ -650,7 +650,7 @@ legend {
.sign-in .checkbox { .sign-in .checkbox {
position: absolute; position: absolute;
text-align: left; text-align: left;
bottom: 37px; bottom: 47px;
} }
.sign-in .switchboard { .sign-in .switchboard {
color: #08C; color: #08C;
+65 -12
View File
@@ -2,16 +2,17 @@
top: 0px; top: 0px;
left: -10px; left: -10px;
right: -10px; right: -10px;
height: 40px;
z-index: 1041; z-index: 1041;
position: fixed; position: fixed;
margin-bottom: 0; margin-bottom: 0;
height: 40px;
} }
#orbit-bar .orbitlogo { #orbit-bar .orbitlogo {
width: 20px; width: 50px;
height: 20px; height: 40px;
padding: 0!important;
background-size: 70%; background-size: 70%;
display: inline-block; display: block;
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;
background-image: url(<%= asset_path 'orbit-logo.svg' %>); background-image: url(<%= asset_path 'orbit-logo.svg' %>);
@@ -19,8 +20,23 @@
/* For Suck IE */ /* For Suck IE */
background-image: url(<%= asset_path 'orbit-logo.png' %>)\9; background-image: url(<%= asset_path 'orbit-logo.png' %>)\9;
} }
#orbit-bar .dropdown-menu li > a {
padding: 0 20px;
display: block;
height: 30px;
line-height: 30px;
}
#orbit-bar .dropdown-menu li i {
float: left;
display: inline-block;
margin-right: 5px;
line-height: 30px;
height: 100%;
}
#orbit-bar.navbar .nav > li > a { #orbit-bar.navbar .nav > li > a {
color: #EEE; color: #EEE;
padding: 0 15px;
display: block;
text-shadow: 0 -1px 0 #000; text-shadow: 0 -1px 0 #000;
border-right: 1px solid #363636; border-right: 1px solid #363636;
box-shadow: 1px 0px 0px rgba(0, 0, 0, 0.3); box-shadow: 1px 0px 0px rgba(0, 0, 0, 0.3);
@@ -34,6 +50,11 @@
background-color: #0095CF; background-color: #0095CF;
text-shadow: 0 -1px 0 #014380; text-shadow: 0 -1px 0 #014380;
} }
#orbit-bar.navbar .nav > li > a > [class^="icon"],
#orbit-bar.navbar .nav > li > a > [class*=" icon"] {
line-height: 40px;
display: block;
}
#orbit-bar.navbar .nav li.dropdown.open > .dropdown-toggle, #orbit-bar.navbar .nav li.dropdown.open > .dropdown-toggle,
#orbit-bar.navbar .nav li.dropdown.active > .dropdown-toggle, #orbit-bar.navbar .nav li.dropdown.active > .dropdown-toggle,
#orbit-bar.navbar .nav li.dropdown.open.active > .dropdown-toggle { #orbit-bar.navbar .nav li.dropdown.open.active > .dropdown-toggle {
@@ -41,9 +62,7 @@
text-shadow: 0 -1px 0 #014380; text-shadow: 0 -1px 0 #014380;
} }
#orbit-bar .navbar-inner { #orbit-bar .navbar-inner {
height: 40px;
border-width: 0; border-width: 0;
min-height: 40px;
background-color: #333333; background-color: #333333;
-webkit-border-radius: 0px; -webkit-border-radius: 0px;
-moz-border-radius: 0px; -moz-border-radius: 0px;
@@ -66,6 +85,10 @@
right: auto; right: auto;
bottom: auto; bottom: auto;
} }
#orbit-bar .nav > li {
display: block;
line-height: 40px;
}
#orbit-bar .nav [class^="icon"], #orbit-bar .nav [class^="icon"],
#orbit-bar .nav [class*=" icon"] { #orbit-bar .nav [class*=" icon"] {
font-size: 1.5em; font-size: 1.5em;
@@ -92,17 +115,45 @@
#orbit-bar .modal .input-prepend { #orbit-bar .modal .input-prepend {
margin-bottom: 15px; margin-bottom: 15px;
} }
#orbit-bar .modal .other-sign-in {
position: relative;
text-align: center;
margin-top: 20px;
margin-bottom: 30px;
padding-bottom: 20px;
border-bottom: 1px solid #EDEDED;
}
#orbit-bar .modal .other-sign-in .btn {
padding: 4px 0;
display: block;
margin-bottom: 5px;
width: 100%;
}
#orbit-bar .modal .other-sign-in p {
position: absolute;
width: 30px;
height: 30px;
background-color: #FFF;
padding: 0 10px;
margin-bottom: 0;
margin-left: -25px;
line-height: 30px;
left: 50%;
bottom: -15px;
font-size: 1.3em;
color: #B1B1B1;
}
/*Search*/ /*Search*/
#orbit-bar #search { #orbit-bar #search {
margin-bottom: 0; margin-bottom: 0;
position: relative; position: relative;
padding: 8px 10px 0; padding: 0 10px;
border-right: 1px solid #363636; border-right: 1px solid #363636;
box-shadow: 1px 0px 0px rgba(0, 0, 0, 0.3); box-shadow: 1px 0px 0px rgba(0, 0, 0, 0.3);
} }
#orbit-bar #search form { #orbit-bar #search form {
margin-bottom: 8px; margin: 8px 0;
} }
#orbit-bar #search input[type="text"] { #orbit-bar #search input[type="text"] {
height: 14px; height: 14px;
@@ -110,6 +161,7 @@
font-size: 13px; font-size: 13px;
padding-left: 25px; padding-left: 25px;
padding-right: 25px; padding-right: 25px;
display: block;
-webkit-border-radius: 12px; -webkit-border-radius: 12px;
-moz-border-radius: 12px; -moz-border-radius: 12px;
-o-border-radius: 12px; -o-border-radius: 12px;
@@ -122,15 +174,16 @@
#orbit-bar #search .search-clear { #orbit-bar #search .search-clear {
position: absolute; position: absolute;
color: #A3A3A3; color: #A3A3A3;
top: 14px; top: 16px;
} }
#orbit-bar #search .icon-search { #orbit-bar #search .icon-search {
left: 13px; left: 15px;
top: 15px;
font-size: 1.2em; font-size: 1.2em;
width: 1.25em;
margin-top: 0;
} }
#orbit-bar #search .search-clear { #orbit-bar #search .search-clear {
right: 14px; right: 13px;
font-size: 1.3em; font-size: 1.3em;
} }
#orbit-bar #search .search-clear:hover { #orbit-bar #search .search-clear:hover {
@@ -21,14 +21,10 @@
} }
.form_fix { .form_fix {
textarea { textarea {
margin-bottom: 12px; margin-bottom: 12px;
} }
input[type="text"] { input {
margin-left: 0; margin-left: 0;
margin-top: 0;
}
input[type="text"] + input {
margin-top: 12px;
} }
} }
// fixed width column with 12px gutter // fixed width column with 12px gutter
@@ -125,14 +125,6 @@
} }
#list-view .checkbox-card li {
-webkit-transition: none;
-moz-transition: none;
-o-transition: none;
transition: none;
}
/* Responsive */ /* Responsive */
@media (max-width: 767px) { @media (max-width: 767px) {
@@ -1,52 +0,0 @@
/* Based on the theme at http://bonsaiden.github.com/JavaScript-Garden */
/*<!--breakpoint-->*/
.breakpoints {width: .8em;}
.breakpoint { color: #822; }
/*<!--match-->*/
span.CodeMirror-matchhighlight { background: #494949 }
.CodeMirror-focused span.CodeMirror-matchhighlight { background: #314D67 !important; }
/*<!--activeline-->*/
.activeline {background: #253540 !important;}
.cm-s-midnight.CodeMirror {
background: #0F192A;
color: #D1EDFF;
}
.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}
.cm-s-midnight div.CodeMirror-selected {background: #314D67 !important;}
.cm-s-midnight .CodeMirror-gutters {background: #0F192A; border-right: 1px solid;}
.cm-s-midnight .CodeMirror-linenumber {color: #D0D0D0;}
.cm-s-midnight .CodeMirror-cursor {
border-left: 1px solid #F8F8F0 !important;
}
.cm-s-midnight span.cm-comment {color: #428BDD;}
.cm-s-midnight span.cm-atom {color: #AE81FF;}
.cm-s-midnight span.cm-number {color: #D1EDFF;}
.cm-s-midnight span.cm-property, .cm-s-tropicaleve span.cm-attribute {color: #A6E22E;}
.cm-s-midnight span.cm-keyword {color: #E83737;}
.cm-s-midnight span.cm-string {color: #1DC116;}
.cm-s-midnight span.cm-variable {color: #FFAA3E;}
.cm-s-midnight span.cm-variable-2 {color: #FFAA3E;}
.cm-s-midnight span.cm-def {color: #4DD;}
.cm-s-midnight span.cm-error {background: #F92672; color: #F8F8F0;}
.cm-s-midnight span.cm-bracket {color: #D1EDFF;}
.cm-s-midnight span.cm-tag {color: #008;}
.cm-s-midnight span.cm-link {color: #AE81FF;}
.cm-s-midnight .CodeMirror-matchingbracket {
text-decoration: underline;
color: white !important;
}
.typ { color: #FFAA3E; }
.atn { color: #606; }
.atv { color: #080; }
.dec { color: #606; }
+18 -20
View File
@@ -1,23 +1,21 @@
/* @import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/ambiance-mobile.css);
*= require 'lib/codemirror/theme/ambiance-mobile' @import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/ambiance.css);
*= require "lib/codemirror/theme/ambiance" @import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/blackboard.css);
*= require "lib/codemirror/theme/blackboard" @import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/cobalt.css);
*= require "lib/codemirror/theme/cobalt" @import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/eclipse.css);
*= require "lib/codemirror/theme/eclipse" @import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/elegant.css);
*= require "lib/codemirror/theme/elegant" @import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/erlang-dark.css);
*= require "lib/codemirror/theme/erlang-dark" @import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/midnight.css);
*= require "lib/codemirror/theme/midnight" @import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/monokai.css);
*= require "lib/codemirror/theme/monokai" @import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/neat.css);
*= require "lib/codemirror/theme/neat" @import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/night.css);
*= require "lib/codemirror/theme/night" @import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/rubyblue.css);
*= require "lib/codemirror/theme/rubyblue" @import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/solarized.css);
*= require "lib/codemirror/theme/solarized" @import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/theme.css);
*= require "lib/codemirror/theme/theme" @import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/twilight.css);
*= require "lib/codemirror/theme/twilight" @import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/vibrant-ink.css);
*= require "lib/codemirror/theme/vibrant-ink" @import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/xq-dark.css);
*= require "lib/codemirror/theme/xq-dark" @import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/xq-light.css);
*= require "lib/codemirror/theme/xq-light"
*/
.cm-tab { .cm-tab {
border-left: 1px solid rgba(200, 200, 200, .2); border-left: 1px solid rgba(200, 200, 200, .2);
} }
+200
View File
@@ -0,0 +1,200 @@
/* Main List */
.main-list {
margin-bottom: 10px;
}
.main-list tbody {
border: 1px solid #dddddd;
}
.main-list thead {
border: 1px solid #454545;
}
.main-list thead th {
vertical-align: middle;
background-color: #454545;
white-space: nowrap;
color: #FFFFFF;
}
.main-list tbody tr.disable td {
color: #C5C5C5;
background-color: #eeeeee;
}
.main-list tbody tr.disable td .label-info {
background-color: #999999;
}
.main-list tbody tr.active td:first-child {
position: relative;
}
.main-list tbody tr.active td:first-child:before {
content: "";
width: 0px;
height: 0px;
left: -21px;
top: 50%;
margin-top: -6px;
position: absolute;
border-style: solid;
border-width: 6px 0 6px 6px;
border-color: transparent transparent transparent #333333;
}
.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;
}
.main-list td.preview img {
width: 100%;
}
.main-list td .banner-link {
width: 100px;
max-width: 120px;
display: inline-block;
text-overflow: ellipsis;
overflow: hidden;
}
.main-list td .file-list {
display: inline-block;
margin: 0 0 -6px;
}
.main-list td .file-list:after {
content: "";
clear: both;
display: block;
height: 0;
visibility: hidden;
}
.main-list td .file-type {
position: relative;
list-style: none;
float: left;
display: inline-block;
}
.main-list td .file-type a {
background-color: #A6A6A6;
color: #FFFFFF;
margin-right: 10px;
padding: 2px 5px 2px 3px;
border-radius: 3px;
text-decoration: none;
text-shadow: 0px -1px 0px rgba(100, 100, 100, .6);
}
.main-list td .file-type i,
.main-forms fieldset .input-area .controls .file-type i {
width: 16px;
height: 16px;
margin-bottom: -1px;
display: inline-block;
}
.main-list td .file-type[class^="type-"] i,
.main-list td .file-type[class*=" type-"] i,
.main-forms fieldset .input-area .controls .file-type[class*=" type-"] i,
.main-forms fieldset .input-area .controls .file-type[class^="type-"] i {
background-image: url(/orbit_4.0.1/assets/images/file_type.png);
}
.file-type.type-pdf i {background-position: 0px 0px;}
.file-type.type-psd i {background-position: -16px 0px;}
.file-type.type-ai i {background-position: -32px 0px;}
.file-type.type-fla i {background-position: -48px 0px;}
.file-type.type-in i {background-position: -64px 0px;}
.file-type.type-acc i {background-position: 0px -16px;}
.file-type.type-do i {background-position: -16px -16px;}
.file-type.type-xl i {background-position: -32px -16px;}
.file-type.type-pp i {background-position: -48px -16px;}
.file-type.type-zip i {background-position: -64px -16px;}
.file-type.type-txt i {background-position: 0px -32px;}
.file-type.type-jp i {background-position: -16px -32px;}
.file-type.type-gif i {background-position: -32px -32px;}
.file-type.type-png i {background-position: -48px -32px;}
.file-type.type-audio i {background-position: -64px -32px;}
.main-list td .quick-edit {
height: 24px;
margin-top: 5px;
}
.main-list td .quick-edit .nav {
display: none;
margin-bottom: 0;
}
.main-list tr:hover .quick-edit .nav {
display: block;
}
.main-list td .quick-edit .nav > li > a {
padding-top: 4px;
padding-bottom: 4px;
margin-top: 0px;
margin-bottom: 0px;
border: 1px dotted #d1d1d1;
}
.main-list td .quick-edit .nav > li > a:hover {
border: 1px dotted transparent;
}
.main-list thead tr.sort-header th a {
padding: 8px;
margin: -8px;
display: block;
color: #FFFFFF;
text-decoration: none;
}
.main-list thead tr.sort-header th.active a {
padding-bottom: 4px;
border-bottom: 4px solid #08c;
}
.main-list .footable-row-detail td {
padding: 0;
border-top: none;
}
.main-list .footable-row-detail td .footable-row-detail-inner {
display: none;
padding: 8px;
position: relative;
border-radius: 5px;
margin: 0 8px 8px;
background-color: #ededed;
}
.main-list .footable-row-detail td .footable-row-detail-inner:after {
display: block;
height: 0px;
width: 0px;
position: absolute;
top: -6px;
left: 50%;
margin-left: -3px;
content: "";
border-style: solid;
border-width: 0 6px 6px 6px;
border-color: transparent transparent #ededed transparent;
}
.main-list .footable-row-detail td .footable-row-detail-inner div {
margin: 10px 0;
}
#preview .preview {
margin: 0 auto;
}
/* For Retina */
@media screen and (-webkit-min-device-pixel-ratio: 2), screen and (max--moz-device-pixel-ratio: 2) {
.main-list td .file-type[class^="type-"] i,
.main-list td .file-type[class*=" type-"] i,
.main-forms fieldset .input-area .controls .file-type[class*=" type-"] i,
.main-forms fieldset .input-area .controls .file-type[class^="type-"] i {
background-image: url(/orbit_4.0.1/assets/images/file_type@2x.png);
background-size: 80px 48px;
}
}
/* Responsive */
@media (max-width: 480px) {
.main-list td .quick-edit .nav {
display: block;
}
}
@@ -39,13 +39,6 @@
.main-list td { .main-list td {
background-color: #FFFFFF; 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 { .main-list td.action {
vertical-align: middle; vertical-align: middle;
text-align: right; text-align: right;
-10
View File
@@ -10,12 +10,6 @@
} }
/* List */ /* List */
#list-view #member-list tr.highlight td {
background-color: #FFFAE5;
}
#list-view #member-list tr.highlight td:first-child {
padding: 0
}
#list-view #member-list .gender, #list-view #member-list .gender,
#list-view #member-list td[class^="gender-"] { #list-view #member-list td[class^="gender-"] {
width: 5px; width: 5px;
@@ -195,10 +189,6 @@
#list-view #member-card > li:hover .member-avatar .action { #list-view #member-card > li:hover .member-avatar .action {
visibility: visible; visibility: visible;
} }
#list-view #member-card .highlight {
background-color: #F0F0F0;
outline: 1px dashed #9E9E9E;
}
#list-view #member-card .member-avatar { #list-view #member-card .member-avatar {
width: 150px; width: 150px;
height: 150px; height: 150px;
-3
View File
@@ -29,9 +29,6 @@
.topnav .btn-group { .topnav .btn-group {
margin-left: 0; margin-left: 0;
} }
.topnav .view-switch {
margin-left: 10px;
}
/* Bottom Nav */ /* Bottom Nav */
.bottomnav { .bottomnav {
@@ -223,7 +223,7 @@
#orbit-bar { #orbit-bar {
margin: 0; margin: 0;
font-family: "Chivo"; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 12px; font-size: 12px;
line-height: 20px; line-height: 20px;
color: #333333; color: #333333;
@@ -22,10 +22,8 @@ class Admin::AdImagesController < Admin::AdBannersController
end end
def update def update
@ad_banner = AdBanner.find params[:ad_banner][:id] @ad_image = AdImage.find(params[:id])
@ad_image = AdImage.find(params[:ad_image][:id])
@ad_image.update_attributes(params[:ad_image]) @ad_image.update_attributes(params[:ad_image])
@ad_banner.ad_images << @ad_image
redirect_to admin_ad_images_path redirect_to admin_ad_images_path
end end
@@ -40,10 +38,10 @@ class Admin::AdImagesController < Admin::AdBannersController
end end
def create def create
@ad_banner = AdBanner.find params[:ad_banner][:id] # @ad_banner = AdBanner.find params[:ad_banner][:id]
@ad_image = AdImage.new params[:ad_image] @ad_image = AdImage.new params[:ad_image]
@ad_image.to_save = true #@ad_image.to_save = true
@ad_banner.ad_images << @ad_image #@ad_banner.ad_images << ad_image
if @ad_image.save if @ad_image.save
redirect_to admin_ad_images_path redirect_to admin_ad_images_path
@@ -76,8 +76,8 @@ class Admin::ImportDataController < OrbitBackendController
teachers = User.all teachers = User.all
teachers.each do |hash| teachers.each do |hash|
if hash.sid.present? if hash.ntu_seq.present?
ntu_seq = hash.sid ntu_seq = hash.ntu_seq
books_xml = Nokogiri::XML( \ books_xml = Nokogiri::XML( \
open("http://ann.cc.ntu.edu.tw/Achv/xmlBook.asp?Seq=#{ntu_seq}")) open("http://ann.cc.ntu.edu.tw/Achv/xmlBook.asp?Seq=#{ntu_seq}"))
@books = books_xml.xpath("//Book").map do |book_node| @books = books_xml.xpath("//Book").map do |book_node|
@@ -125,8 +125,8 @@ class Admin::ImportDataController < OrbitBackendController
teachers = User.all teachers = User.all
teachers.each do |hash| teachers.each do |hash|
if hash.sid.present? if hash.ntu_seq.present?
ntu_seq = hash.sid ntu_seq = hash.ntu_seq
conference_xml = Nokogiri::XML( \ conference_xml = Nokogiri::XML( \
open("http://ann.cc.ntu.edu.tw/Achv/xmlPaper.asp?Seq=#{ntu_seq}&type=C")) 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")) #open("http://versatile.management.ntu.edu.tw/publication1/conference/#{ntuseq}.xml"))
@@ -196,8 +196,8 @@ class Admin::ImportDataController < OrbitBackendController
teachers = User.all teachers = User.all
teachers.each do |hash| teachers.each do |hash|
if hash.sid.present? if hash.ntu_seq.present?
ntu_seq = hash.sid ntu_seq = hash.ntu_seq
paper_xml = Nokogiri::XML( \ paper_xml = Nokogiri::XML( \
#open("http://versatile.management.ntu.edu.tw/publication1/journal/#{ntuseq}.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")) open("http://ann.cc.ntu.edu.tw/Achv/xmlPaper.asp?Seq=#{ntu_seq}&type=J"))
+2 -2
View File
@@ -27,8 +27,8 @@ class Admin::ItemsController < OrbitBackendController
def update_position def update_position
item = Item.find(params[:id]) item = Item.find(params[:id])
item.shift_to(params[:parent_id], params[:position].to_i - 1) item.shift_to(params[:parent_id], params[:position])
render :nothing => true, status: 200 render :nothing => true
end end
end end
+1 -1
View File
@@ -95,7 +95,7 @@ class Admin::PagesController < Admin::ItemsController
if @item.module_app && @item.module_app.key == 'page_content' if @item.module_app && @item.module_app.key == 'page_content'
@item.page_contexts.build(:create_user_id => current_user.id, :update_user_id => current_user.id ) @item.page_contexts.build(:create_user_id => current_user.id, :update_user_id => current_user.id )
end end
if @item.save if @item.save
flash.now[:notice] = t('create.success.page') flash.now[:notice] = t('create.success.page')
respond_to do |format| respond_to do |format|
@@ -250,39 +250,11 @@ class Admin::UsersNewInterfaceController < OrbitMemberController
end end
def edit_order_card def edit_order
@users = User.not_guest_user @users = User.not_guest_user
@type = 'card'
render 'edit_order'
end end
def edit_order_list def update_order
@users = User.not_guest_user
@type = 'list'
render 'edit_order'
end
def update_order_card
@error = false
if params[:users].present?
to_go = params[:users][:position].to_i
user_at_position = User.where(position: to_go).first
user = User.find(params[:users][:id])
if user_at_position
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
render nothing: true, status: 200
end
def update_order_list
@error = []
if params[:users].present? if params[:users].present?
params[:users].values.sort.each do |pair| params[:users].values.sort.each do |pair|
to_go = pair[0].to_i to_go = pair[0].to_i
+2 -2
View File
@@ -18,7 +18,7 @@ class ApplicationController < ActionController::Base
helper_attr :site_valid_locales helper_attr :site_valid_locales
def check_backend_openness def check_backend_openness
if Site.first.backend_openness_on if !Me.backend_openness_on
redirect_to '/users/sign_in' if not (authenticate_user! and is_member? ) redirect_to '/users/sign_in' if not (authenticate_user! and is_member? )
end end
end end
@@ -321,7 +321,7 @@ class ApplicationController < ActionController::Base
a << object if (value.include?(object.category.id.to_s) rescue nil) a << object if (value.include?(object.category.id.to_s) rescue nil)
end end
objects = a.uniq objects = a.uniq
when 'tags' when 'tag'
a = Array.new a = Array.new
objects.each do |object| objects.each do |object|
object.tags.each do |tag| object.tags.each do |tag|
+1 -1
View File
@@ -1,4 +1,4 @@
class DesktopAppsController < ApplicationController class DesktopAppsController < OrbitBackendController
require "net/http" require "net/http"
require "uri" require "uri"
require 'zip/zip' require 'zip/zip'
@@ -1,4 +1,4 @@
class DesktopWidgetsController < ApplicationController class DesktopWidgetsController < OrbitBackendController
require "net/http" require "net/http"
require "uri" require "uri"
require 'zip/zip' require 'zip/zip'
+1 -1
View File
@@ -113,7 +113,7 @@ class PagesController < ApplicationController
end end
def check_frontend_open def check_frontend_open
if !Site.first.frontend_closed && current_user.nil? #Need to be change if Me.frontend_closed && current_user.nil? #Need to be change
redirect_to '/admin/dashboards' redirect_to '/admin/dashboards'
end end
end end
+40
View File
@@ -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
+2 -3
View File
@@ -45,10 +45,9 @@ class Item
end end
def shift_to(new_parent, position) def shift_to(new_parent, position)
position = position.to_i unless self.parent_id.to_s.eql?(new_parent) && self.position.eql?(position.to_i)
unless self.parent_id.to_s.eql?(new_parent) && self.position == position
new_parent = Item.find(new_parent) new_parent = Item.find(new_parent)
current_position_sibling = find_by_parent_and_position(new_parent, position) current_position_sibling = find_by_parent_and_position(new_parent, position.to_i)
if current_position_sibling if current_position_sibling
move_above(current_position_sibling) move_above(current_position_sibling)
elsif self.parent != new_parent elsif self.parent != new_parent
+3 -3
View File
@@ -185,18 +185,18 @@ class ModuleApp
user_ids = self.auth_approvals.inject([]) do |users, auth| user_ids = self.auth_approvals.inject([]) do |users, auth|
users += auth.authorized_users.map{|user| user.id} users += auth.authorized_users.map{|user| user.id}
end end
self.update_attribute(:auth_approval_users, user_ids.uniq) update_attribute(:auth_approval_users, user_ids.uniq)
end end
def update_auth_manager_users def update_auth_manager_users
self.update_attribute(:auth_manager_users, self.auth_manager_authorized_users.map{|user| user.id}) update_attribute(:auth_manager_users, self.auth_manager_authorized_users.map{|user| user.id})
end end
def update_auth_sub_manager_users def update_auth_sub_manager_users
user_ids = self.auth_sub_managers.inject([]) do |users, auth| user_ids = self.auth_sub_managers.inject([]) do |users, auth|
users += auth.authorized_users.map{|user| user.id} users += auth.authorized_users.map{|user| user.id}
end end
self.update_attribute(:auth_sub_manager_users, user_ids.uniq) update_attribute(:auth_sub_manager_users, user_ids.uniq)
end end
def managers def managers
+4 -7
View File
@@ -16,10 +16,13 @@ class User
field :first_name, localize: true field :first_name, localize: true
field :last_name, localize: true field :last_name, localize: true
field :email field :email
field :email_hidden, :type => Boolean, :default => false
field :sex, :default => 'unknown' field :sex, :default => 'unknown'
field :office_tel field :office_tel
field :cache_dept,type: Hash field :cache_dept,type: Hash
field :status_record,type: Hash field :status_record,type: Hash
field :ntu_seq
#validates :ntu_seq, :uniqueness => true
has_and_belongs_to_many :approving_apps, class_name: 'AuthApproval', inverse_of: 'authorized_users' has_and_belongs_to_many :approving_apps, class_name: 'AuthApproval', inverse_of: 'authorized_users'
has_and_belongs_to_many :managing_apps, class_name: 'AuthManager', inverse_of: 'authorized_users' has_and_belongs_to_many :managing_apps, class_name: 'AuthManager', inverse_of: 'authorized_users'
@@ -52,7 +55,6 @@ class User
accepts_nested_attributes_for :attribute_values, :allow_destroy => true accepts_nested_attributes_for :attribute_values, :allow_destroy => true
before_create :initialize_desktop before_create :initialize_desktop
before_save :assign_default_position, :if => :assign_default_position?
before_save :rebuild_status_record before_save :rebuild_status_record
scope :remote_account, where(:nccu_id.ne => nil) scope :remote_account, where(:nccu_id.ne => nil)
scope :not_guest_user, all_of(:name.ne => "guest") scope :not_guest_user, all_of(:name.ne => "guest")
@@ -290,7 +292,7 @@ class User
end end
end end
private protected
def rebuild_status_record def rebuild_status_record
self.status_record = {} self.status_record = {}
@@ -300,9 +302,4 @@ class User
end end
end end
# override mongoid-tree's method
def assign_default_position?
!self['name'].eql?('guest') && (self.position.nil? || self.parent_id_changed?)
end
end end
+1 -2
View File
@@ -55,7 +55,7 @@
<div class="control-group"> <div class="control-group">
<label class="control-label muted">Banner</label> <label class="control-label muted">Banner</label>
<div class="controls"> <div class="controls">
<%= select_tag 'ad_banner[id]',options_from_collection_for_select(AdBanner.all, "id", "title", @ad_image.ad_banner_id) , :class=>"input-medium" %> <%= select_tag 'ad_banner[id]',options_from_collection_for_select(AdBanner.all, "id", "title",params[:ad_banner_id]) , :class=>"input-medium" %>
</div> </div>
</div> </div>
@@ -244,7 +244,6 @@
</div> </div>
<!-- Form Actions --> <!-- Form Actions -->
<%= f.hidden_field :id, :value => @ad_image.id %>
<div class="form-actions"> <div class="form-actions">
<%= f.submit t("submit"),:class=>"btn btn-primary" %> <%= f.submit t("submit"),:class=>"btn btn-primary" %>
<%= f.submit t("cancel"),:class=>"btn ",:type => 'reset' %> <%= f.submit t("cancel"),:class=>"btn ",:type => 'reset' %>
@@ -10,7 +10,7 @@
<li><%= link_to show_toggle_archive_btn(category) , toggle_admin_module_app_category_path(@module_app_id, category), method: :post, remote: true, class: "archive_toggle" %></li> <li><%= link_to show_toggle_archive_btn(category) , toggle_admin_module_app_category_path(@module_app_id, category), method: :post, remote: true, class: "archive_toggle" %></li>
<% end %> <% end %>
<% if is_manager? || is_admin? %> <% if is_manager? || is_admin? %>
<li><%= link_to t(:category_auth), admin_authorizations_path(@module_app.key, 'category_authorization', category.id) %></li> <li><%= link_to t(:category_auth), admin_authorizations_path(@module_app.key, 'category', category.id) %></li>
<% end %> <% end %>
</ul> </ul>
</div> </div>
+1 -1
View File
@@ -9,7 +9,7 @@
</ul> </ul>
</div> </div>
</td> </td>
<td class="span1"><%= radio_button_tag 'design_default', design.id, (@site.design.id.to_s.eql?(design.id.to_s) ? true : false), :class => 'design_default', :rel => admin_sites_path %></td>
<td class="span7"><%= design.intro %></td> <td class="span7"><%= design.intro %></td>
<td class="span2"><%= design.author %></td> <td class="span2"><%= design.author %></td>
<td class="span1 active"><%= radio_button_tag 'design_default', design.id, (@site.design.id.to_s.eql?(design.id.to_s) ? true : false), :class => 'design_default toggle-check', :rel => admin_sites_path %></td>
</tr> </tr>
+7 -8
View File
@@ -1,12 +1,11 @@
<thead> <thead>
<tr class="sort-header"> <tr>
<th></th> <th class="span1 strong"></th>
<th class="first span3"><a href="#">Templates Title</a></th> <th class="span2"></th>
<th data-hide="phone" class="active span3">Active</th> <th class="span1"></th>
<th data-hide="phone" class="active span3">Date of purchase</th> <th class="span7"></th>
<th data-hide="phone" class="active span3">Designer</th> <th class="span2"></th>
<th class="span1"></th> </tr>
</tr>
</thead> </thead>
<tbody> <tbody>
<tbody id="tbody_designs" class="sort-holder"> <tbody id="tbody_designs" class="sort-holder">
+1 -1
View File
@@ -18,5 +18,5 @@
<%= f.text_field :intro %> <%= f.text_field :intro %>
</div> </div>
</div> </div>
<%= f.submit t(:update_), :class=>"btn btn-primary" %> <%= f.submit t(:update_) %>
<% end %> <% end %>
+1 -21
View File
@@ -2,27 +2,7 @@
<%= render :partial => 'layouts/side_bar', :locals => {:link_name => t('site.settings'), :link_url => admin_site_site_info_path(@site), :side_bar_content => 'admin/sites/side_bar'} %> <%= render :partial => 'layouts/side_bar', :locals => {:link_name => t('site.settings'), :link_url => admin_site_site_info_path(@site), :side_bar_content => 'admin/sites/side_bar'} %>
<% end %> <% end %>
<head> <h1><%= t('editing.design') %></h1>
<%= stylesheet_link_tag "lib/wrap-nav"%>
<%= stylesheet_link_tag "lib/main-list"%>
<%= stylesheet_link_tag "lib/mt-list"%>
<%= stylesheet_link_tag "lib/filter"%>
<%= stylesheet_link_tag "lib/codemirror/theme/theme"%>
<%= javascript_include_tag 'codemirror/codemirror' %>
<%= javascript_include_tag 'codemirror/jquery.codemirror' %>
<%= javascript_include_tag 'codemirror/mode/css' %>
<%= javascript_include_tag 'codemirror/mode/xml' %>
<%= javascript_include_tag 'codemirror/mode/vbscript' %>
<%= javascript_include_tag 'codemirror/mode/javascript' %>
<%= javascript_include_tag 'codemirror/mode/htmlmixed' %>
<%= javascript_include_tag 'codemirror/addon/edit/closetag' %>
<%= javascript_include_tag 'codemirror/addon/edit/closebrackets' %>
<%= javascript_include_tag 'codemirror/util/formatting' %>
<%= javascript_include_tag 'lib/templates_code' %>
</head>
<h1><%= @design.title %></h1>
<ul class="nav nav-tabs" id="myTab"> <ul class="nav nav-tabs" id="myTab">
<li class="active"><a href="#info" data-toggle="tab"><%= t(:info) %></a></li> <li class="active"><a href="#info" data-toggle="tab"><%= t(:info) %></a></li>
-15
View File
@@ -2,21 +2,6 @@
<%= render :partial => 'layouts/side_bar', :locals => {:link_name => t('site.settings'), :link_url => admin_site_site_info_path(@site), :side_bar_content => 'admin/sites/side_bar'} %> <%= render :partial => 'layouts/side_bar', :locals => {:link_name => t('site.settings'), :link_url => admin_site_site_info_path(@site), :side_bar_content => 'admin/sites/side_bar'} %>
<% end %> <% end %>
<head>
<%= stylesheet_link_tag "lib/wrap-nav"%>
<%= stylesheet_link_tag "lib/main-list"%>
<%= stylesheet_link_tag "lib/mt-list"%>
<%= stylesheet_link_tag "lib/filter"%>
<%= stylesheet_link_tag "lib/togglebox"%>
<%= javascript_include_tag 'lib/footable-0.1' %>
<%= javascript_include_tag 'lib/all-list' %>
<%= javascript_include_tag 'lib/retina' %>
<%= javascript_include_tag 'lib/mudole_templates_status' %>
</head>
<%= render 'filter' %> <%= render 'filter' %>
<table class="table main-list"> <table class="table main-list">
<%= render 'designs' %> <%= render 'designs' %>
@@ -1 +0,0 @@
<p>Successfully Book Data!</p>
@@ -1 +0,0 @@
<p>Successfully Conference Data!</p>
+2 -2
View File
@@ -1,9 +1,9 @@
<% node = Item.root %> <% node = Item.root %>
<% unless node.nil? %>
<ol id='<%= node.id %>' class="sortable item-groups"> <ol id='<%= node.id %>' class="sortable item-groups">
<%= render 'node_and_children', node: node %> <%= render 'node_and_children', node: node %>
</ol> </ol>
<% end %>
<%= render 'layouts/delete_modal', delete_options: {remote: true} %> <%= render 'layouts/delete_modal', delete_options: {remote: true} %>
<%= javascript_include_tag "lib/jquery.pageslide.js" %> <%= javascript_include_tag "lib/jquery.pageslide.js" %>
+82 -80
View File
@@ -2,84 +2,86 @@
<%= render :partial => 'layouts/side_bar', :locals => {:link_name => t('site.settings'), :link_url => admin_site_site_info_path(@site), :icon => 'icons-cog', :side_bar_content => 'admin/sites/side_bar'} %> <%= render :partial => 'layouts/side_bar', :locals => {:link_name => t('site.settings'), :link_url => admin_site_site_info_path(@site), :icon => 'icons-cog', :side_bar_content => 'admin/sites/side_bar'} %>
<% end %> <% end %>
<head> <% content_for :page_specific_css do %>
<%= stylesheet_link_tag "lib/wrap-nav"%> <%= stylesheet_link_tag 'normalize' %>
<%= stylesheet_link_tag "lib/main-list"%> <%= stylesheet_link_tag 'bootstrap-responsive' %>
<%= stylesheet_link_tag "lib/mt-list"%> <%= stylesheet_link_tag 'rulingorbit' %>
<%= stylesheet_link_tag "lib/filter"%> <%= stylesheet_link_tag 'module-store' %>
<%= stylesheet_link_tag "lib/togglebox"%> <% end %>
<% content_for :page_specific_javascript do %>
<%= javascript_include_tag "jquery.cycle" %>
<%= javascript_include_tag "modules" %>
<% end %>
<%= javascript_include_tag 'lib/footable-0.1' %> <div class="wrapper">
<%= javascript_include_tag 'lib/all-list' %> <div id="toolbar">
<%= javascript_include_tag 'lib/retina' %> <div class="filter fn">
<%= javascript_include_tag 'lib/mudole_templates_status' %> <span class="label">Price</span>
</head> <div class="drop-menu ui">
<a href="" class="controller">
<table id="mt-list" class="table main-list"> <span class="option-default">All</span>
<thead> <span class="arrow down"></span>
<tr class="sort-header"> </a>
<th class="first"><a href="#">Module Title</a></th> <ul class="option-list">
<th data-hide="phone" class="active span3">Date of purchase</th> <li><a class="option-item" href="">All</a></li>
<th data-hide="all" class="active"><a href="#">Description</a></th> <li><a class="option-item" href="">3000</a></li>
<th class="span2">Active</th> <li><a class="option-item" href="">4000</a></li>
</tr> <li><a class="option-item" href="">5000</a></li>
</thead> </ul>
<tbody> </div>
<tr> </div>
<td class="detail-row"> <div class="filter fn">
<div class="module_icon pull-left"> <span class="label">Category</span>
<%= image_tag "module_icon.png"%> <div class="drop-menu ui">
</div> <a href="" class="controller">
<h5 class="mt_title"><span>Module Title</span><span class="muted">2.0.1</span></h5> <span class="option-default">All</span>
<p class="mt_dev muted">Rulingcom</p> <span class="arrow down"></span>
</td> </a>
<td class="detail-row">2013/07/12</td> <ul class="option-list">
<td> <li><a class="option-item" href="">All</a></li>
@detail <li><a class="option-item" href="">National Taiwan University</a></li>
</td> <li><a class="option-item" href="">Category 1</a></li>
<td class="active"><button class="act btn btn-mini" type="button">Uninstall</button></td> <li><a class="option-item" href="">Category 2</a></li>
</tr> <li><a class="option-item" href="">Category 3</a></li>
<tr class="download"> </ul>
<td class="detail-row"> </div>
<div class="module_icon pull-left"> </div>
<%= image_tag "module_icon.png"%> <div class="filter fn">
</div> <span class="label">Sort by</span>
<h5 class="mt_title"><span>Module Title Module Title Module Title</span><span class="muted">2.0.1</span></h5> <div class="drop-menu ui">
<p class="mt_dev muted">Rulingcom</p> <a href="" class="controller">
</td> <span class="option-default">Date</span>
<td class="detail-row">2013/07/12</td> <span class="arrow down"></span>
<td> </a>
@detail <ul class="option-list">
</td> <li><a class="option-item" href="">Date</a></li>
<td class="active"><button class="act btn btn-mini btn-success" type="button">Download</button></td> <li><a class="option-item" href="">Popular</a></li>
</tr> <li><a class="option-item" href="">Recent Upload</a></li>
<tr class="install"> </ul>
<td class="detail-row"> </div>
<div class="module_icon pull-left"> </div>
<%= image_tag "module_icon.png"%> </div>
</div> <div id="feature" class="clearfix">
<h5 class="mt_title"><span>Module Title</span><span class="muted">2.0.1</span></h5> <div id="feature-nav">
<p class="mt_dev muted">Rulingcom</p> <ul>
</td> <li><a href=""><img class="item-thumb" src="<%= asset_path "f1.jpg"%>" alt="Thumbnail 1" width="228" height="67"></a></li>
<td class="detail-row">2013/07/12</td> <li><a href=""><img class="item-thumb" src="<%= asset_path "f2.jpg"%>" alt="Thumbnail 2" width="228" height="67"></a></li>
<td> <li><a href=""><img class="item-thumb" src="<%= asset_path "f3.jpg"%>" alt="Thumbnail 3" width="228" height="67"></a></li>
@detail </ul>
</td> </div>
<td class="active"><button class="act btn btn-mini btn-primary" type="button">Install</button></td> <div class="holder">
</tr> <ul>
<tr class="update"> <li><a href=""><img class="item-thumb" src="<%= asset_path "f1.jpg"%>" alt="Thumbnail 1" width="740" height="220"></a></li>
<td class="detail-row"> <li><a href=""><img class="item-thumb" src="<%= asset_path "f2.jpg"%>" alt="Thumbnail 2" width="740" height="220"></a></li>
<div class="module_icon pull-left"> <li><a href=""><img class="item-thumb" src="<%= asset_path "f3.jpg"%>" alt="Thumbnail 3" width="740" height="220"></a></li>
<%= image_tag "module_icon.png"%> </ul>
</div> </div>
<h5 class="mt_title"><span>Module Title</span><span class="muted">2.0.1</span></h5> </div>
<p class="mt_dev muted">Rulingcom</p> <div id="item-list">
</td> <ul class="clearfix">
<td class="detail-row">2013/07/12</td> <% 12.times do |i| %>
<td> <li><a href="module_store/show?m=<%= i + 1 %>"><img src="/assets/module/thumb/mt<%= i + 1 %>.jpg" alt="" class="item-thumb"><span class="item-info"><b class="item-name">Module <%= i + 1 %></b><span class="item-price">Free</span></span></a></li>
@detail <% end %>
</td> </ul>
<td class="active"><button class="act btn btn-mini btn-info" type="button">Update</button></td> </div>
</tr> </div>
</tbody>
</table>
+5 -11
View File
@@ -1,16 +1,10 @@
<li> <% sitemap_block.children.each_with_index do |child, i| %>
<h6> <li "<%= 'disabled' if !child.show_in_sitemap_for(temp_locale) %>">
<input type="checkbox" class="toggle-check" data-deploy="right">
<span><%= sitemap_block_counter + 1 %> <%= sitemap_block.title_translations[temp_locale] %></span>
</h6>
<ul>
<% sitemap_block.children.each_with_index do |child, i| %>
<li "<%= 'disabled' if !child.show_in_sitemap_for(temp_locale) %>">
<h6> <h6>
<%= content_tag :button, :id => child.id, :temp_locale => temp_locale, :disabled => !child.show_in_sitemap_for(temp_locale) do %>
<% end %>
<input type="checkbox" class="toggle-check" data-deploy="right"> <input type="checkbox" class="toggle-check" data-deploy="right">
<span><%= "#{sitemap_block_counter + 1}-#{i + 1}" %> <%= child.title_translations[temp_locale] %></span> <span><%= "#{sitemap_block_counter + 1}-#{i + 1}" %> <%= child.title_translations[temp_locale] %></span>
</h6> </h6>
</li> </li>
<% end if sitemap_block.children %> <% end if sitemap_block.children %>
</ul>
</li>
+42 -41
View File
@@ -43,48 +43,49 @@
<hr> <hr>
<!-- Description --> <% @site_valid_locales.each do |locale|%>
<div class="control-group"> <%= content_tag :div, :class => "tab-pane fade #{active_when_current_locale_eq locale} #{locale}" do %>
<label class="control-label muted">Keywords</label> <div class="control-group">
<div class="controls"> <label class="control-label muted">Site Keywords</label>
<div class="tab-content textarea-lang"> <div class="controls">
<div class="btn-group" data-toggle="buttons-radio"> <div class="tab-content textarea-lang">
<% @site_valid_locales.each_with_index do |locale, i| %> <div class="btn-group" data-toggle="buttons-radio">
<a class="btn <%= ( i == 0 ) ? "active" : '' %>" href="#textarea_<%= locale %>_0" data-toggle="tab"><%= I18nVariable.from_locale(locale) %></a> <% @site_valid_locales.each do |locale|%>
<% end %> <%= content_tag :li, link_to(I18nVariable.from_locale(locale), ".#{locale}", :data => {:toggle => "tab"}), :class => "btn #{(active_when_current_locale_eq locale)}" %>
<% end %>
</div>
<div class="tab-pane fade active in" id="keywords_en_0">
<%= f.fields_for :keywords do |f| %>
<%= f.text_area locale, :class => "resizable",:rows=>3, :value => (@site.keywords(locale) rescue nil) %>
<% end %>
</div>
</div>
</div>
</div>
<%end%>
<%end%>
<% @site_valid_locales.each do |locale|%>
<%= content_tag :div, :class => "tab-pane fade #{active_when_current_locale_eq locale} #{locale}" do %>
<div class="control-group">
<label class="control-label muted">Site Description</label>
<div class="controls">
<div class="tab-content textarea-lang">
<div class="btn-group" data-toggle="buttons-radio">
<% @site_valid_locales.each do |locale|%>
<%= content_tag :li, link_to(I18nVariable.from_locale(locale), ".#{locale}", :data => {:toggle => "tab"}), :class => "btn #{(active_when_current_locale_eq locale)}" %>
<% end %>
</div>
<div class="tab-pane fade active in" id="description_en_0">
<%= f.fields_for :description do |f| %>
<%= f.text_area locale, :class => "resizable",:rows=>3, :value => (@site.description(locale) rescue nil) %>
<% end %>
</div>
</div>
</div>
</div> </div>
<% @site_valid_locales.each_with_index do |locale, i| %> <%end%>
<div class="tab-pane fade in <%= ( i == 0 ) ? "active" : '' %>" id="textarea_<%= locale %>_0"> <%end%>
<%= f.fields_for :keywords do |f| %>
<%= f.text_area locale, :class=>'resizable', :value => (@site.keywords(locale) rescue nil), :placeholder => I18nVariable.from_locale(locale), :rows=>"3" %>
<% end %>
</div>
<% end %>
</div>
</div>
</div>
<div class="control-group">
<label class="control-label muted">Description</label>
<div class="controls">
<div class="tab-content textarea-lang">
<div class="btn-group" data-toggle="buttons-radio">
<% @site_valid_locales.each_with_index do |locale, i| %>
<a class="btn <%= ( i == 0 ) ? "active" : '' %>" href="#textarea_<%= locale %>_0" data-toggle="tab"><%= I18nVariable.from_locale(locale) %></a>
<% end %>
</div>
<% @site_valid_locales.each_with_index do |locale, i| %>
<div class="tab-pane fade in <%= ( i == 0 ) ? "active" : '' %>" id="textarea_<%= locale %>_0">
<%= f.fields_for :description do |f| %>
<%= f.text_area locale, :class=>'resizable', :value => (@site.description(locale) rescue nil), :placeholder => I18nVariable.from_locale(locale), :rows=>"3" %>
<% end %>
</div>
<% end %>
</div>
</div>
</div>
</div> </div>
<!-- Form Actions --> <!-- Form Actions -->
<div class="form-actions"> <div class="form-actions">
+65 -12
View File
@@ -1,4 +1,9 @@
<head> <head>
<!-- Meta -->
<!--#include virtual="/orbit_4.0.1/include/meta.html"-->
<!-- Basic CSS -->
<!--#include virtual="/orbit_4.0.1/include/basic_css.html"-->
<%= stylesheet_link_tag "lib/wrap-nav"%> <%= stylesheet_link_tag "lib/wrap-nav"%>
<%= stylesheet_link_tag "lib/filter"%> <%= stylesheet_link_tag "lib/filter"%>
<%= stylesheet_link_tag "lib/sitemap"%> <%= stylesheet_link_tag "lib/sitemap"%>
@@ -13,27 +18,75 @@
<%= render :partial => 'layouts/side_bar', :locals => {:link_name => t('site.settings'), :link_url => admin_site_site_info_path(@site), :icon => 'icons-cog', :side_bar_content => 'admin/sites/side_bar'} %> <%= render :partial => 'layouts/side_bar', :locals => {:link_name => t('site.settings'), :link_url => admin_site_site_info_path(@site), :icon => 'icons-cog', :side_bar_content => 'admin/sites/side_bar'} %>
<% end %> <% end %>
<section> <% content_for :page_specific_javascript do %>
<h3>Sitemap</h3> <%= javascript_include_tag "lib/jquery.masonry.min.js" %>
<div> <script>
$(document).ready(function(){
$('.site-map').masonry({
itemSelector: '.map-block',
columnWidth: 260
});
$('a[data-toggle="tab"]').on('shown', function (e) {
$('.site-map').masonry({
itemSelector: '.map-block',
columnWidth: 260
});
})
});
$(document).on('click', 'li .onoff', function () {
$(this).parents("li").toggleClass("disabled");
if($(this).parents("li").attr("class").indexOf("disabled") > 0){
$(this).text("<%= t('off_upcase') %>")
} else {
$(this).text("<%= t('on_upcase') %>")
}
$.getScript('<%= admin_sites_path %>' + '/' + $(this).attr('id') + '/sitemap_toggle?temp_locale=' + $(this).attr('temp_locale'));
});
$(document).on('click', 'h4 .onoff', function () {
$(this).parents(".map-block").toggleClass("disabled");
if($(this).parents("h4").parents("div").attr("class").indexOf("disabled") > 0){
$(this).text("<%= t('off_upcase') %>")
$(this).parents(".map-block").find('li').addClass('disabled')
$(this).parents(".map-block").find('button').text("<%= t('off_upcase') %>")
$(this).parents(".map-block").find('li button').attr('disabled', 'disabled')
} else {
$(this).text("<%= t('on_upcase') %>")
$(this).parents(".map-block").find('li').removeClass('disabled')
$(this).parents(".map-block").find('button').text("<%= t('on_upcase') %>")
$(this).parents(".map-block").find('li button').removeAttr("disabled")
}
$.getScript('<%= admin_sites_path %>' + '/' + $(this).attr('id') + '/sitemap_toggle?parent=true&temp_locale=' + $(this).attr('temp_locale'));
});
</script>
<% end %>
<section id="main-wrap">
<div class="wrap-inner">
<div id="sitemap"> <div id="sitemap">
<ul id="map-tree-language" class="nav nav-pills">
<ul id="map-tree-language" class="nav nav-pills"> <% @site_valid_locales.each_with_index do |locale, i| %>
<% @site_valid_locales.each_with_index do |locale, i| %> <li <%= ( i == 0 ) ? " class=active" : '' %>><a data-toggle="tab" href=".<%= locale %>"><%= I18nVariable.from_locale(locale) %></a></li>
<li <%= ( i == 0 ) ? " class=active" : '' %>><a data-toggle="tab" href="#<%= locale %>"><%= I18nVariable.from_locale(locale) %></a></li>
<% end %> <% end %>
</ul> </ul>
<div class="tab-content map-tree-content"> <% @site_valid_locales.each_with_index do |temp_locale, i| %>
<div class="tab-content map-tree-content">
<div class="line"></div> <div class="line"></div>
<ul id="<%= temp_locale %>" class="map-tree tab-pane fade <%= ( i == 0 ) ? "in active" : '' %>">
<%= render :partial => 'sitemap_block', :collection => @items, :locals => {:temp_locale => temp_locale} %>
</ul>
<% end %>
<br/><br/><br/>
<% @site_valid_locales.each_with_index do |temp_locale, i| %> <% @site_valid_locales.each_with_index do |temp_locale, i| %>
<ul id="<%= temp_locale %>" class="map-tree tab-pane fade in active"> <div class="tab-pane site-map <%= temp_locale %> fade tab-pane <%= ( i == 0 ) ? "in active" : '' %>">
<%= render :partial => 'sitemap_block', :collection => @items, :locals => {:temp_locale => temp_locale} %> <%= render :partial => 'sitemap_block', :collection => @items, :locals => {:temp_locale => temp_locale} %>
</ul> </div>
<% end %> <% end %>
</div> </div>
</div>
</div>
</div> </div>
</section> </section>
@@ -1,23 +0,0 @@
<div id="list-view">
<div id="member-card" class="mini-layout-body">
<ul id="card-list" class="checkbox-card clearfix">
<% @users.each do |user| %>
<li class="filter-item" data-user-id="<%= user.id %>">
<label>
<div class="user-pic">
<%= show_avatar(user) %>
</div>
<span class="user-name"><%= user.name %></span>
<span><%= user.email %></span>
</label>
</li>
<% end %>
</ul>
</div>
</div>
<script>
$(function() {
dragMode();
});
</script>
@@ -1,44 +0,0 @@
<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>
<% @users.each do |user| %>
<%
case user.sex
when 'male'
user_sex = 'gender-man'
when 'female'
user_sex = 'gender-woman'
else
user_sex = 'gender-none'
end
%>
<tr id="<%= dom_id user %>">
<td class="<%= user_sex %>"></td>
<td><%= link_to user.position + 1, '#', class: 'edit_position', 'data-user-id' => user.id %></td>
<td><%= link_to user.name, admin_users_new_interface_path(user) %></td>
<td><%= user.email %></td>
</tr>
<% end %>
</tbody>
</table>
</div>
<div class="bottomnav clearfix">
<div class="action pull-right">
<%= link_to t(:update_), '#', class: "btn btn-primary pull-right" %>
</div>
</div>
<script>
$(function() {
typeMode();
});
</script>
@@ -1,7 +1,7 @@
<div class="bottomnav clearfix"> <div class="bottomnav clearfix">
<div class="action pull-right"> <div class="action pull-right">
<% if is_admin? %> <% if is_admin? %>
<%= link_to t(:edit_order), edit_order_list_admin_users_new_interface_index_path, :class => "btn btn-primary" %> <%= 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 %> <%= link_to(new_admin_users_new_interface_path,:class=> "btn btn-primary") do %>
<i class="icon-plus"></i><%= t(:add) %> <i class="icon-plus"></i><%= t(:add) %>
<% end -%> <% end -%>
@@ -6,6 +6,7 @@
<%= stylesheet_link_tag "lib/main-list" %> <%= stylesheet_link_tag "lib/main-list" %>
<%= stylesheet_link_tag "lib/filter" %> <%= stylesheet_link_tag "lib/filter" %>
<%= stylesheet_link_tag "lib/member" %> <%= stylesheet_link_tag "lib/member" %>
<%= stylesheet_link_tag "lib/togglebox" %>
<% end -%> <% end -%>
<% content_for :page_specific_javascript do -%> <% content_for :page_specific_javascript do -%>
@@ -94,7 +94,13 @@
<%= f.email_field :email %> <%= f.email_field :email %>
</div> </div>
</div> </div>
<div class="control-group">
<%= f.label "Disable email", :class=>"control-label muted" %>
<div class="controls">
<%= f.check_box :email_hidden %>
</div>
</div>
<!-- ID Number --> <!-- ID Number -->
<div class="control-group"> <div class="control-group">
<%= f.label t("users.sid"),:class=>"control-label muted" %> <%= f.label t("users.sid"),:class=>"control-label muted" %>
@@ -0,0 +1,15 @@
<%
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>
@@ -1,30 +1,65 @@
<% content_for :side_bar do %> <% content_for :side_bar do %>
<%= render :partial => 'admin/users_new_interface/side_bar' %> <%= render :partial => 'admin/users_new_interface/side_bar' %>
<% end %> <% end %>
<% content_for :page_specific_css do %> <% content_for :page_specific_css do -%>
<%= stylesheet_link_tag "lib/member" %> <%= stylesheet_link_tag "lib/member" %>
<%= stylesheet_link_tag "lib/checkbox-card" %> <% end -%>
<% end %>
<% content_for :right_nav do %> <div id="list-view">
<div class="view-switch btn-group pull-right" data-toggle="buttons-radio"> <table id="member-list" class="table main-list">
<%= link_to content_tag(:i, nil, class: 'icon-list'), edit_order_list_admin_users_new_interface_index_path, class: "btn btn-small#{' active' if @type.eql?('list')}" %> <thead>
<%= link_to content_tag(:i, nil, class: 'icon-th'), edit_order_card_admin_users_new_interface_index_path, class: "btn btn-small#{' active' if @type.eql?('card')}" %> <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>
<% end %>
<div id="order_content">
<% case @type %>
<% when 'card' %>
<%= render 'edit_order_card' %>
<% when 'list' %>
<%= render 'edit_order_list' %>
<% end %>
</div> </div>
<% content_for :page_specific_javascript do %> <% content_for :page_specific_javascript do %>
<%= javascript_include_tag "jquery.ui.sortable" %> <script>
<%= javascript_include_tag "lib/jquery.ui.touch-punch.min.js" %> $(function(){
<%= javascript_include_tag "lib/jquery.lite.image.resize.js" %> var _userPosition = [];
<%= javascript_include_tag "lib/member/sort.js.erb" %> $('#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 %> <% end %>
@@ -21,6 +21,7 @@
</form> </form>
</div> </div>
<ul class="nav nav-pills filter-nav pull-right"> <ul class="nav nav-pills filter-nav pull-right">
<li class="accordion-group"> <li class="accordion-group">
<div class="accordion-heading"> <div class="accordion-heading">
@@ -22,6 +22,7 @@
<%= link_to("<i class='icon-edit'></i> #{t(:edit)}".html_safe,edit_admin_users_new_interface_path(@user),:class=>"btn btn-mini" ) if is_admin?%> <%= link_to("<i class='icon-edit'></i> #{t(:edit)}".html_safe,edit_admin_users_new_interface_path(@user),:class=>"btn btn-mini" ) if is_admin?%>
<%= link_to("<i class='icons-cycle'></i> #{t("users.change_passwd")}".html_safe,admin_users_new_interface_edit_passwd_path(@user),:class=>"btn btn-mini" ) if is_admin?%> <%= link_to("<i class='icons-cycle'></i> #{t("users.change_passwd")}".html_safe,admin_users_new_interface_edit_passwd_path(@user),:class=>"btn btn-mini" ) if is_admin?%>
</div> </div>
</div> </div>
<div id="member-roles" class="nano"> <div id="member-roles" class="nano">
@@ -0,0 +1 @@
$('#list-view table tbody').html("<%= j render partial: 'user_edit_order', collection: @users %>")
@@ -1 +0,0 @@
$('#order_content').html("<%= j render 'edit_order_list' %>")
+27 -29
View File
@@ -1,44 +1,42 @@
<!-- Orbit Bar -->
<!--#include virtual="include/orbit_bar.html"-->
<section id="main-wrap">
<div class="sign-in have-other-sign-in"> <div class="sign-in have-other-sign-in">
<!-- <p class="alert alert-error in fade">You need to sign in.</p>
--> <% flash.each do |key, msg| %>
<% flash.each do |key, msg| %> <%= content_tag :p, msg, :class => [key, "alert alert-error"] %>
<%= content_tag :p, msg, :class => [key, "alert alert-error in fade"] %>
<% end %> <% end %>
<div class="form">
<h3 class="login-logo">Log In to Orbit</h3> <div class="form">
<div> <h3 class="login-logo"><%= t(:login) %></h3>
<input name="utf8" type="hidden" value="" /> <div class="other-sign-in">
<input name="authenticity_token" type="hidden" value="" /> <% @request_hosts = request.host_with_port.split(".") %>
</div> <a class="btn btn-primary" type="submit" href="https://adfs.ntu.edu.tw/adfs/ls/?wa=wsignin1.0&wtrealm=https://management.ntu.edu.tw/saml_login&wctx=<%= @request_hosts[0] %>">使用計中帳號登入</a>
<!-- <div class="other-sign-in">
<a class="btn btn-primary" type="submit">Other Sign In</a>
<p>or</p> <p>or</p>
</div> --> </div>
<div class="form-block"> <div class="form-block">
<div class="form-list clearfix"> <div class="form-list clearfix">
<form class="content" accept-charset="UTF-8" action="/users/sign_in" method="post"> <%= form_for resource, :as => resource_name, :url => session_path(resource_name), :html => {:class => 'content'} do |f| %>
<%= form_for resource, :as => resource_name, :url => session_path(resource_name), :html => {:class => 'content'} do |f| %>
<div class="control-group clear"> <div class="control-group clear">
<label for="user_email"> <label for="user_email">
<i class="icon-user"></i> <i class="icon-user"></i>
</label> </label>
<%= f.text_field :user_id, :placeholder => t("users.user_id"), :id=>"user_email" %> <%= f.text_field :user_id, :placeholder => t("users.user_id") %>
</div> </div>
<div class="control-group clear"> <div class="control-group clear">
<label for="user_password"> <label for="user_password">
<i class="icon-lock"></i> <i class="icon-lock"></i>
</label> </label>
<%= f.password_field :password, :placeholder => t(:dots), :id=>"user_password" %> <%= f.password_field :password, :placeholder => t(:dots) %>
</div> </div>
<%= content_tag :button, t(:login), :type => :submit, :class => 'btn btn-primary' %> <!-- <label class="checkbox">
</form> <input type="checkbox" value="">
<small>Remember me</small>
</label> -->
<%= content_tag :button, t(:login), :type => :submit, :class => 'btn btn-primary' %>
<% end %>
<form class="content" accept-charset="UTF-8" action="/users/sign_in" method="post"> <!-- <form class="content" accept-charset="UTF-8" action="/users/sign_in" method="post">
<div class="control-group clear"> <div class="control-group clear">
<label for="user_email"> <label for="user_email">
<i class="icon-user"></i> <i class="icon-user"></i>
@@ -51,14 +49,14 @@
</label> </label>
<input type="text" id="user_email" name="user[email]" placeholder="電子郵件" /> <input type="text" id="user_email" name="user[email]" placeholder="電子郵件" />
</div> </div>
</form> <button class="btn btn-primary" type="submit">Submit</button>
</form> -->
</div> </div>
<!-- <div class="switchboard"><span>Forgot Password ?</span> <i class="icons-arrow-left-2"></i></div> -->
</div> </div>
<!-- <div class="register"> <!-- <div class="register">
<button class="btn btn-inverse" type="submit">Register</button> <button class="btn btn-inverse" type="submit">Register</button>
</div> --> </div> -->
<% end %>
</div> </div>
</div> </div>
</section>
+6 -1
View File
@@ -33,7 +33,7 @@
<ul class="dropdown-menu" role="menu" aria-labelledby="orbit-user"> <ul class="dropdown-menu" role="menu" aria-labelledby="orbit-user">
<li><%= link_to content_tag(:i, nil, class: 'icons-tools') + ' ' + t(:account_settings), desktop_path + "#settings-account", tabindex: '-1' %></li> <li><%= link_to content_tag(:i, nil, class: 'icons-tools') + ' ' + t(:account_settings), desktop_path + "#settings-account", tabindex: '-1' %></li>
<li><%= link_to content_tag(:i, nil, class: 'icons-screen') + ' ' + t(:desktop), desktop_path, tabindex: '-1' %></li> <li><%= link_to content_tag(:i, nil, class: 'icons-screen') + ' ' + t(:desktop), desktop_path, tabindex: '-1' %></li>
<li><%= link_to content_tag(:i, nil, class: 'icons-logout') + ' ' + t(:logout), destroy_user_session_path, tabindex: '-1' %></li> <li><%= link_to content_tag(:i, nil, class: 'icons-logout') + ' ' + t(:logout), user_logout_path, tabindex: '-1' %></li>
<li class="divider"></li> <li class="divider"></li>
<li><a tabindex="-1" href="#"><i class="icons-lifebuoy"></i> <%= t(:help) %></a></li> <li><a tabindex="-1" href="#"><i class="icons-lifebuoy"></i> <%= t(:help) %></a></li>
</ul> </ul>
@@ -53,6 +53,11 @@
</div> </div>
<div class="modal-body"> <div class="modal-body">
<%= form_for :user, url: user_session_path, html: {class: 'container'} do |f| %> <%= form_for :user, url: user_session_path, html: {class: 'container'} do |f| %>
<div class="other-sign-in">
<% @request_hosts = request.host_with_port.split(".") %>
<a class="btn btn-primary" type="submit" href="https://adfs.ntu.edu.tw/adfs/ls/?wa=wsignin1.0&wtrealm=https://management.ntu.edu.tw/saml_login&wctx=<%= @request_hosts[0] %>">使用計中帳號登入</a>
<p>or</p>
</div>
<div class="input-prepend"> <div class="input-prepend">
<span class="add-on"> <span class="add-on">
<i class="icon-user"></i> <i class="icon-user"></i>
+1
View File
@@ -3,4 +3,5 @@
<%= link_to content_tag(:i, nil, :class => (local_assigns.has_key? :icon) ? icon : 'icons-gauge'), (local_assigns.has_key? :link_url) ? link_url : admin_dashboards_path %> <%= link_to content_tag(:i, nil, :class => (local_assigns.has_key? :icon) ? icon : 'icons-gauge'), (local_assigns.has_key? :link_url) ? link_url : admin_dashboards_path %>
</h2> </h2>
<%= render ((local_assigns.has_key? :side_bar_content) ? side_bar_content : 'layouts/side_bar_content') %> <%= render ((local_assigns.has_key? :side_bar_content) ? side_bar_content : 'layouts/side_bar_content') %>
<div class="sub-nav-arrow"></div>
</nav> </nav>
@@ -6,7 +6,6 @@
<% end %> <% end %>
</ul> </ul>
</div> </div>
<div class="sub-nav-arrow"></div>
</div> </div>
<div class="sub-nav-block-list"> <div class="sub-nav-block-list">
+7 -14
View File
@@ -6,23 +6,16 @@
<!--[if lt IE 9]> <!--[if lt IE 9]>
<%= javascript_include_tag "html5" %> <%= javascript_include_tag "html5" %>
<![endif]--> <![endif]-->
<%= render 'layouts/meta' %> <%= stylesheet_link_tag "devise" %>
<%= render 'layouts/google_font' %> <%= javascript_include_tag "devise" %>
<%= stylesheet_link_tag "basic/global" %> <%= csrf_meta_tag %>
<%= stylesheet_link_tag "basic" %>
<%= render 'layouts/ie_html5_fix' %>
<%= javascript_include_tag "basic" %>
<%= yield :page_specific_css %>
<%= yield :page_specific_javascript %>
<style>
</style>
<%= csrf_meta_tag %>
</head> </head>
<body> <body>
<%= render 'layouts/orbit_bar' %> <%= render 'layouts/orbit_bar' %>
<%= yield %> <%= yield %>
<!--<div id="sign-footer">
<p>Rulingcom</p>
</div>
-->
</body> </body>
</html> </html>
+4 -2
View File
@@ -8,7 +8,9 @@ defaults: &defaults
development: development:
<<: *defaults <<: *defaults
database: test_site database: ntu_mb_orbit_test
test: test:
<<: *defaults <<: *defaults
@@ -22,4 +24,4 @@ production:
# password: <%= ENV['MONGOID_PASSWORD'] %> # password: <%= ENV['MONGOID_PASSWORD'] %>
# database: <%= ENV['MONGOID_DATABASE'] %> # database: <%= ENV['MONGOID_DATABASE'] %>
<<: *defaults <<: *defaults
database: test_site database: test_site_new
+12 -5
View File
@@ -9,6 +9,14 @@ Orbit::Application.routes.draw do
match "/users_passwd" => "desktop/registrations#update", :as => :users_passwd, :via => :put match "/users_passwd" => "desktop/registrations#update", :as => :users_passwd, :via => :put
end end
devise_scope :user do
get 'user_login' => 'sessions#create'
match 'user_logout' => 'sessions#destroy'
end
match "saml_login" => 'saml_logins#index'
mount Resque::Server, :at => "/admin/resque" mount Resque::Server, :at => "/admin/resque"
mount Rack::GridFS::Endpoint.new(:db => Mongoid.database,:lookup=>:path), :at => "gridfs" mount Rack::GridFS::Endpoint.new(:db => Mongoid.database,:lookup=>:path), :at => "gridfs"
@@ -200,7 +208,7 @@ Orbit::Application.routes.draw do
get 'change_design' get 'change_design'
get 'preference' get 'preference'
end end
get "import_data/get_teacher_data" get "import_data/get_teacher_data"
get "import_data/get_book_data" get "import_data/get_book_data"
get "import_data/get_conference_data" get "import_data/get_conference_data"
@@ -211,6 +219,7 @@ Orbit::Application.routes.draw do
get "import_data/sync_journal_paper_data" get "import_data/sync_journal_paper_data"
get "import_data/sync_conference_data" get "import_data/sync_conference_data"
resources :tags do resources :tags do
collection do collection do
post 'add_to_default' post 'add_to_default'
@@ -225,10 +234,8 @@ Orbit::Application.routes.draw do
get 'temp_edit' get 'temp_edit'
end end
collection do collection do
get 'edit_order_card' get 'edit_order'
get 'edit_order_list' post 'update_order'
post 'update_order_card'
post 'update_order_list'
end end
match "edit_passwd" => "users_new_interface#edit_passwd" ,:as => :edit_passwd match "edit_passwd" => "users_new_interface#edit_passwd" ,:as => :edit_passwd
end end
+1 -1
View File
@@ -112,7 +112,7 @@ module OrbitApp
current_priority = @context_links.count current_priority = @context_links.count
if @approvable_with_link if @approvable_with_link
context_link 'approval_setting', context_link 'approval_setting',
:link_path => "admin_authorizations_path(get_module_app.key, 'category_approval')", :link_path => "admin_authorizations_path(get_module_app.key, 'approval')",
:priority => current_priority + 1, :priority => current_priority + 1,
:available_for => [:manager] :available_for => [:manager]
end end
+2 -5
View File
@@ -91,11 +91,8 @@ namespace :new_ui do
end end
end end
task :reset_user_position => :environment do task :save_users => :environment do
User.where(email: /guest/).each{|d|d.update_attribute(:position, nil)} User.all.each(&:save)
User.not_guest_user.each_with_index do |user, i|
user.update_attribute(:position, i)
end
end end
end end
+1 -1
View File
@@ -27,7 +27,7 @@ namespace :site do
site.design = design site.design = design
site.save site.save
theme = design.themes.first theme = design.themes.first
home = Page.new( :design_id => design.id, :name => 'home', :is_published => true, :theme_id => theme.id, :menu_enabled_for => [] ) home = Page.new( :design_id => design.id, :name => 'home', :is_published => true, :theme_id => theme.id )
home.title_translations = {"zh_tw"=>"首頁", "en"=>"Home"} home.title_translations = {"zh_tw"=>"首頁", "en"=>"Home"}
home.save home.save
+2 -2
View File
@@ -23,7 +23,7 @@ module Announcement
end end
# category ["BulletinCategory"] # category ["BulletinCategory"]
data_count 3..10 data_count 1..10
authorizable authorizable
approvable approvable
@@ -37,7 +37,7 @@ module Announcement
image :image image :image
field :postdate field :postdate
link_field :title,{:method => 'panel_announcement_front_end_bulletin_path',:args=>:self} link_field :title,{:method => 'panel_announcement_front_end_bulletin_path',:args=>:self}
link_field :bulletin_category_with_title,{:method => 'panel_announcement_front_end_bulletins_path',:args=>{:category_id => [:bulletin_category,:id]}} link_field :bulletin_category_with_title,{:method => 'panel_announcement_front_end_bulletins_path',:args=>{:category_id => [:category,:id]}}
field :subtitle field :subtitle
link_to_more 'panel_announcement_front_end_bulletins_path',:title_i18n=> 'more_plus' link_to_more 'panel_announcement_front_end_bulletins_path',:title_i18n=> 'more_plus'
end end
@@ -21,7 +21,7 @@ class Panel::Archive::FrontEnd::ArchiveFilesController < OrbitWidgetController
def index def index
@item = Page.find(params[:page_id]) @item = Page.find(params[:page_id])
@title = @item.title @title = @item.title
@frontend_style = !@item.frontend_style.blank? ? @item.frontend_style : "1" @frontend_style = @item.frontend_style
if !@item.frontend_data_count.blank? if !@item.frontend_data_count.blank?
@page_num = @item.frontend_data_count @page_num = @item.frontend_data_count
else else
@@ -43,15 +43,15 @@ class Panel::Archive::FrontEnd::ArchiveFilesController < OrbitWidgetController
if @frontend_style == "1" if @frontend_style == "1"
if !params[:category_id].blank? && !params[:tag_id].blank? if !params[:category_id].blank? && !params[:tag_id].blank?
@archive_files = ArchiveFile.can_display.where(:category_id.in => @archive_file_category_ids, :tagged_ids.in => params[:tag_id], :title.nin=>[""]).desc( :is_top ).default_sort(params[:sort]).page( params[:page_main] ).per(@page_num) @archive_files = ArchiveFile.can_display.where(:category_id.in => @archive_file_category_ids, :tagged_ids.in => params[:tag_id]).desc( :is_top ).default_sort(params[:sort]).page( params[:page_main] ).per(@page_num)
# @current_category = ArchiveFileCategory.from_id(params[:category_id]) rescue nil # @current_category = ArchiveFileCategory.from_id(params[:category_id]) rescue nil
elsif !params[:category_id].blank? elsif !params[:category_id].blank?
@archive_files = ArchiveFile.can_display.where(:category_id.in => @archive_file_category_ids, :title.nin=>[""]).desc( :is_top ).default_sort(params[:sort]).page( params[:page_main] ).per(@page_num) @archive_files = ArchiveFile.can_display.where(:category_id.in => @archive_file_category_ids).desc( :is_top ).default_sort(params[:sort]).page( params[:page_main] ).per(@page_num)
# @current_category = ArchiveFileCategory.from_id(params[:category_id]) rescue nil # @current_category = ArchiveFileCategory.from_id(params[:category_id]) rescue nil
elsif !params[:tag_id].blank? elsif !params[:tag_id].blank?
@archive_files = ArchiveFile.can_display.where(:category_id.in => @archive_file_category_ids,:tagged_ids.in => params[:tag_id], :title.nin=>[""]).desc( :is_top ).default_sort(params[:sort]).page( params[:page_main] ).per(@page_num) @archive_files = ArchiveFile.can_display.where(:category_id.in => @archive_file_category_ids,:tagged_ids.in => params[:tag_id]).desc( :is_top ).default_sort(params[:sort]).page( params[:page_main] ).per(@page_num)
else else
@archive_files = ArchiveFile.can_display.where(:category_id.in => @archive_file_category_ids, :title.nin=>[""]).desc( :is_top ).default_sort(params[:sort]).page( params[:page_main] ).per(@page_num) @archive_files = ArchiveFile.can_display.where(:category_id.in => @archive_file_category_ids).desc( :is_top ).default_sort(params[:sort]).page( params[:page_main] ).per(@page_num)
end end
elsif @frontend_style == "2" elsif @frontend_style == "2"
@@ -61,13 +61,13 @@ class Panel::Archive::FrontEnd::ArchiveFilesController < OrbitWidgetController
@archive_file_categorys.each do |afcg| @archive_file_categorys.each do |afcg|
if !params[:category_id].blank? && !params[:tag_id].blank? if !params[:category_id].blank? && !params[:tag_id].blank?
@archive_files = ArchiveFile.can_display.where(:category_id.in => [afcg.id], :tagged_ids.in => params[:tag_id], :title.nin=>[""]).desc( :is_top ).default_sort(params[:sort]) @archive_files = ArchiveFile.can_display.where(:category_id.in => [afcg.id], :tagged_ids.in => params[:tag_id]).desc( :is_top ).default_sort(params[:sort])
elsif !params[:category_id].blank? elsif !params[:category_id].blank?
@archive_files = ArchiveFile.can_display.where(:category_id.in => [afcg.id], :title.nin=>[""]).desc( :is_top ).default_sort(params[:sort]) @archive_files = ArchiveFile.can_display.where(:category_id.in => [afcg.id]).desc( :is_top ).default_sort(params[:sort])
elsif !params[:tag_id].blank? elsif !params[:tag_id].blank?
@archive_files = ArchiveFile.can_display.where(:category_id => afcg.id, :tagged_ids.in => params[:tag_id], :title.nin=>[""]).desc( :is_top ).default_sort(params[:sort]) @archive_files = ArchiveFile.can_display.where(:category_id => afcg.id, :tagged_ids.in => params[:tag_id]).desc( :is_top ).default_sort(params[:sort])
else else
@archive_files = ArchiveFile.can_display.where(:category_id => afcg.id, :title.nin=>[""]).desc( :is_top ).default_sort(params[:sort]) @archive_files = ArchiveFile.can_display.where(:category_id => afcg.id).desc( :is_top ).default_sort(params[:sort])
end end
archive_file_datas = Array.new archive_file_datas = Array.new
@@ -23,7 +23,6 @@ class Panel::Archive::Widget::ArchiveFilesController < OrbitWidgetController
end end
@widget_style = @part.widget_style @widget_style = @part.widget_style
@widget_style = !@part.widget_style.blank? ? @part.widget_style : "1"
@category_id = @part.category @category_id = @part.category
@@ -65,13 +64,13 @@ class Panel::Archive::Widget::ArchiveFilesController < OrbitWidgetController
if @widget_style == "1" if @widget_style == "1"
if !params[:category_id].blank? && !params[:tag_id].blank? if !params[:category_id].blank? && !params[:tag_id].blank?
@archive_files = ArchiveFile.can_display.where(:category_id.in => @archive_file_category_ids, :tagged_ids.in => params[:tag_id], :title.nin=>[""]).desc( :is_top ).default_sort(params[:sort]).page( params[:page_main] ).per(@page_num) @archive_files = ArchiveFile.can_display.where(:category_id.in => @archive_file_category_ids, :tagged_ids.in => params[:tag_id]).desc( :is_top ).default_sort(params[:sort]).page( params[:page_main] ).per(@page_num)
elsif !params[:category_id].blank? elsif !params[:category_id].blank?
@archive_files = ArchiveFile.can_display.where(:category_id.in => @archive_file_category_ids, :title.nin=>[""]).desc( :is_top ).default_sort(params[:sort]).page( params[:page_main] ).per(@page_num) @archive_files = ArchiveFile.can_display.where(:category_id.in => @archive_file_category_ids).desc( :is_top ).default_sort(params[:sort]).page( params[:page_main] ).per(@page_num)
elsif !params[:tag_id].blank? elsif !params[:tag_id].blank?
@archive_files = ArchiveFile.can_display.where(:category_id.in => @archive_file_category_ids,:tagged_ids.in => params[:tag_id], :title.nin=>[""]).desc( :is_top ).default_sort(params[:sort]).page( params[:page_main] ).per(@page_num) @archive_files = ArchiveFile.can_display.where(:category_id.in => @archive_file_category_ids,:tagged_ids.in => params[:tag_id]).desc( :is_top ).default_sort(params[:sort]).page( params[:page_main] ).per(@page_num)
else else
@archive_files = ArchiveFile.can_display.where(:category_id.in => @archive_file_category_ids, :title.nin=>[""]).desc( :is_top ).default_sort(params[:sort]).page( params[:page_main] ).per(@page_num) @archive_files = ArchiveFile.can_display.where(:category_id.in => @archive_file_category_ids).desc( :is_top ).default_sort(params[:sort]).page( params[:page_main] ).per(@page_num)
end end
elsif @widget_style == "2" elsif @widget_style == "2"
@@ -81,13 +80,13 @@ class Panel::Archive::Widget::ArchiveFilesController < OrbitWidgetController
@archive_file_categorys.each do |afcg| @archive_file_categorys.each do |afcg|
if !params[:category_id].blank? && !params[:tag_id].blank? if !params[:category_id].blank? && !params[:tag_id].blank?
@archive_files = ArchiveFile.can_display.where(:category_id.in => [afcg.id], :tagged_ids.in => params[:tag_id], :title.nin=>[""]).desc( :is_top ).default_sort(params[:sort]).limit(@page_num) @archive_files = ArchiveFile.can_display.where(:category_id.in => [afcg.id], :tagged_ids.in => params[:tag_id]).desc( :is_top ).default_sort(params[:sort]).limit(@page_num)
elsif !params[:category_id].blank? elsif !params[:category_id].blank?
@archive_files = ArchiveFile.can_display.where(:category_id.in => [afcg.id], :title.nin=>[""]).desc( :is_top ).default_sort(params[:sort]).limit(@page_num) @archive_files = ArchiveFile.can_display.where(:category_id.in => [afcg.id]).desc( :is_top ).default_sort(params[:sort]).limit(@page_num)
elsif !params[:tag_id].blank? elsif !params[:tag_id].blank?
@archive_files = ArchiveFile.can_display.where(:category_id => afcg.id, :tagged_ids.in => params[:tag_id], :title.nin=>[""]).desc( :is_top ).default_sort(params[:sort]).limit(@page_num) @archive_files = ArchiveFile.can_display.where(:category_id => afcg.id, :tagged_ids.in => params[:tag_id]).desc( :is_top ).default_sort(params[:sort]).limit(@page_num)
else else
@archive_files = ArchiveFile.can_display.where(:category_id => afcg.id, :title.nin=>[""]).desc( :is_top ).default_sort(params[:sort]).limit(@page_num) @archive_files = ArchiveFile.can_display.where(:category_id => afcg.id).desc( :is_top ).default_sort(params[:sort]).limit(@page_num)
end end
archive_file_datas = Array.new archive_file_datas = Array.new
@@ -87,11 +87,9 @@
<% end %> <% end %>
<div class="pull_right"> <div class="pull_right">
<% if !@archive_files.blank? or !@archive_file_datas.blank? %> <% if !params[:category_id].blank? %>
<% if !params[:category_id].blank? %> <%= link_to t(:more_plus), panel_archive_front_end_archive_files_path(:category_id => @part.category) %>
<%= link_to t(:more_plus), panel_archive_front_end_archive_files_path(:category_id => @part.category) %> <% else %>
<% else %> <%= link_to t(:more_plus), panel_archive_front_end_archive_files_path %>
<%= link_to t(:more_plus), panel_archive_front_end_archive_files_path %>
<% end %> <% end %>
<% end %>
</div> </div>
+1 -1
View File
@@ -27,7 +27,7 @@ module Faq
default_widget do default_widget do
query 'Qa.all' query 'Qa.all'
# enable ['typeA'] # enable ['typeA']
link_field :qa_category_with_title,{:method => 'panel_faq_front_end_qas_path',:args=>{:category_id => [:qa_category,:id]}} link_field :qa_category_with_title,{:method => 'panel_faq_front_end_qas_path',:args=>{:category_id => [:category,:id]}}
link_field :title, {:method => 'panel_faq_front_end_qa_path',:args=>:self} link_field :title, {:method => 'panel_faq_front_end_qa_path',:args=>:self}
link_to_more 'panel_faq_front_end_qas_path',:title_i18n=> 'faq.default_widget.to_more' link_to_more 'panel_faq_front_end_qas_path',:title_i18n=> 'faq.default_widget.to_more'
end end
@@ -0,0 +1,30 @@
<% show_office_field.attribute_fields.where(:disabled=>false).asc(:_id).each do |rf| %>
<%
if !@member.get_attribute_value(rf).blank?
if !@member.get_attribute_value(rf)['val'].blank?
@rodata = @member.get_attribute_value(rf)['val']
elsif !@member.get_attribute_value(rf)[I18n.locale].blank?
@rodata = @member.get_attribute_value(rf)[I18n.locale]
else
@rodata = nil
end
if !@rodata.blank? and !@member.get_attribute_value(rf).get_value_by_locale(I18n.locale).blank?
%>
<tr>
<% if (rf.title == "Office" || rf.title == "研究室")%>
<td><%= rf.title %></td>
<td><%= nl2br(show_attribute_value(@member.get_attribute_value(rf).get_value_by_locale(I18n.locale))) rescue '' %></td>
</tr>
<%end%>
</tr>
<% end -%>
<% end -%>
<% end -%>
@@ -0,0 +1,30 @@
<% show_research_field.attribute_fields.where(:disabled=>false).asc(:_id).each do |rf| %>
<%
if !@member.get_attribute_value(rf).blank?
if !@member.get_attribute_value(rf)['val'].blank?
@rodata = @member.get_attribute_value(rf)['val']
elsif !@member.get_attribute_value(rf)[I18n.locale].blank?
@rodata = @member.get_attribute_value(rf)[I18n.locale]
else
@rodata = nil
end
if !@rodata.blank? and !@member.get_attribute_value(rf).get_value_by_locale(I18n.locale).blank?
%>
<tr>
<% if (rf.title == "Research Field"|| rf.title == "研究領域")%>
<td><%= rf.title %></td>
<td><%= nl2br(show_attribute_value(@member.get_attribute_value(rf).get_value_by_locale(I18n.locale))) rescue '' %></td>
</tr>
<%end%>
</tr>
<% end -%>
<% end -%>
<% end -%>
@@ -1,26 +1,3 @@
<%
@status = @member.role_statuses.where(:role_id=>show_roles.id)
if !@status.blank?
%>
<tr>
<td><%= t('status')%></td>
<td><%= show_attribute_value(@member.role_statuses.where(:role_id=>show_roles.id).map{|t|t.title.to_s}.join(',')) rescue '' %></td>
</tr>
<% end -%>
<%
@category = @member.role_categorys.where(:role_id=>show_roles.id)
if !@category.blank?
%>
<tr>
<td><%= t('category')%></td>
<td><%= show_attribute_value(@member.role_categorys.where(:role_id=>show_roles.id).map{|t|t.title.to_s}.join(',')) rescue '' %></td>
</tr>
<% end -%>
<% show_roles.attribute_fields.where(:disabled=>false).asc(:_id).each do |rf| %> <% show_roles.attribute_fields.where(:disabled=>false).asc(:_id).each do |rf| %>
@@ -34,7 +11,7 @@
@rodata = nil @rodata = nil
end end
if !@rodata.blank? and !@member.get_attribute_value(rf).get_value_by_locale(I18n.locale).blank? if !@rodata.blank? and !@member.get_attribute_value(rf).get_value_by_locale(I18n.locale).blank? and rf.key != 'job_title'
%> %>
<tr> <tr>
@@ -38,7 +38,10 @@
<%= @job_title %> <%= @job_title %>
</li> </li>
<% end %> <% end %>
<li><b class="o-members-label"><%= t("users.email")%></b><%= member.email %></li>
<% if !member.email_hidden? %>
<li><b class="o-members-label"><%= t("users.email")%></b><%= member.email %></li>
<% end %>
<li><b class="o-members-label"><%= t("users.office_tel")%></b><%= member.office_tel %></li> <li><b class="o-members-label"><%= t("users.office_tel")%></b><%= member.office_tel %></li>
</ul> </ul>
</li> </li>
@@ -79,7 +82,9 @@
%> %>
<li><b class="o-members-label"><%= @member_lists.get_member_list_attribute_field_name("teacher","job_title") %></b><%= @job_title %></li> <li><b class="o-members-label"><%= @member_lists.get_member_list_attribute_field_name("teacher","job_title") %></b><%= @job_title %></li>
<% end %> <% end %>
<li><b class="o-members-label"><%= t("users.email")%></b> <%= member.email %></li> <% if !member.email_hidden? %>
<li><b class="o-members-label"><%= t("users.email")%></b> <%= member.email %></li>
<% end %>
<li><b class="o-members-label"><%= t("users.office_tel")%></b><%= member.office_tel %></li> <li><b class="o-members-label"><%= t("users.office_tel")%></b><%= member.office_tel %></li>
</ul> </ul>
</li> </li>
@@ -2,6 +2,28 @@
<div class="member-data"> <div class="member-data">
<table> <table>
<tbody> <tbody>
<%
@member_role = @member.roles.asc(:created_at).first
@category = @member.role_categorys.where(:role_id=>@member_role.id)
if !@category.blank?
%>
<tr>
<td><%= t('category')%></td>
<td><%= show_attribute_value(@member.role_categorys.where(:role_id=>@member_role.id).map{|t|t.title.to_s}.join(',')) rescue '' %></td>
</tr>
<% end -%>
<% @job_title = show_attribute_value(User.get_member_list_attribute_value(@member.id,"teacher","job_title").get_value_by_locale(I18n.locale))
if @job_title != 'NoData' and !@job_title.blank?
%>
<tr>
<td><%= User.get_member_list_attribute_field_name("teacher","job_title") %></td>
<td><%= @job_title %></td>
</tr>
<% end -%>
<tr> <tr>
<td><%= t('users.name')%></td> <td><%= t('users.name')%></td>
<td><%= @member.name%></td> <td><%= @member.name%></td>
@@ -10,22 +32,12 @@
<td><%= t('users.email')%></td> <td><%= t('users.email')%></td>
<td><a href="mailto:<%= @member.email %>"><%= @member.email %></a></td> <td><a href="mailto:<%= @member.email %>"><%= @member.email %></a></td>
</tr> </tr>
<% if !@member.sid.blank? %>
<tr>
<td><%= t('users.sid')%></td>
<td><%= @member.sid%></td>
</tr>
<% end %>
<% if !@member.office_tel.blank? %> <% if !@member.office_tel.blank? %>
<tr> <tr>
<td><%= t('users.office_tel')%></td> <td><%= t('users.office_tel')%></td>
<td><%= @member.office_tel%></td> <td><%= @member.office_tel%></td>
</tr> </tr>
<% end %> <% end %>
<tr>
<td><%= t('users.sex')%></td>
<td><%= t("users.#{@member.sex}") %></td>
</tr>
<% @profile_data.each do |item| %> <% @profile_data.each do |item| %>
<% if !item[:value].blank? %> <% if !item[:value].blank? %>
@@ -92,11 +92,11 @@ orbitDesktop.prototype.initializePersonalBook = function(target,url,cache){ // t
width: $(".overview").width() - 20 width: $(".overview").width() - 20
}); });
} }
this.initializePersonalBook.syncComplete = function(){ this.initializePersonalBook.syncComplete = function(){
o.notify("Sync Complete","success"); o.notify("Sync Complete","success");
o.sub_menu_item($("div[content-type=menu] a").eq(0)); o.sub_menu_item($("div[content-type=menu] a").eq(0));
} }
this.initializePersonalBook.coAuthorformCallback = function(data){ this.initializePersonalBook.coAuthorformCallback = function(data){
if(data.success){ if(data.success){
@@ -7,7 +7,6 @@ class Panel::PersonalBook::Desktop::PersonalBooksController < ApplicationControl
page ||= 1 page ||= 1
@per_column = 5 @per_column = 5
@userid = current_user.id @userid = current_user.id
case @view_by case @view_by
when "abstract" when "abstract"
@@ -4,13 +4,10 @@ module Panel::PersonalBook::Desktop::PersonalBooksHelper
"item" => "true", "item" => "true",
"data-id" => publication.id.to_s, "data-id" => publication.id.to_s,
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do :class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
content_tag :div, marker(publication.id) + \
:class => "inner" do content(publication, view) + \
marker(publication.id) + \ edit_or_delete(publication)
content(publication, view) + \
edit_or_delete(publication)
end end
end
end end
def marker id def marker id
@@ -83,14 +83,14 @@ class WritingBook
end end
def create_link def create_link
title = [] title = []
# title = ["#{self.extracted_chapters}"] if self.extracted_chapters.present? # title = ["#{self.extracted_chapters}"] if self.extracted_chapters.present?
title << self.paper_title if self.paper_title.present? title << self.paper_title if self.paper_title.present?
title << self.book_title if self.book_title.present? title << self.book_title if self.book_title.present?
title << self.publisher if self.publisher.present? title << self.publisher if self.publisher.present?
title << self.pages if self.pages.present? title << self.pages if self.pages.present?
# title << "(#{self.journal_level_types.collect{|x| x.title}.join(', ')})" # title << "(#{self.journal_level_types.collect{|x| x.title}.join(', ')})"
title.join(', ') title.join(', ')
end end
protected protected
@@ -5,7 +5,7 @@
<td class="span2"> <td class="span2">
<a href="<%= panel_personal_book_back_end_writing_book_author_type_quick_edit_path(list_author_type) %>#myModal2" data-toggle="modal" data-remote="true" class="action"><%= t('edit')%></a> <a href="<%= panel_personal_book_back_end_writing_book_author_type_quick_edit_path(list_author_type) %>#myModal2" data-toggle="modal" data-remote="true" class="action"><%= t('edit')%></a>
<%= link_to 'Delete', <%= link_to show_toggle_archive_btn(list_author_type),
polymorphic_path([:panel, :personal_book, :back_end, list_author_type]), :confirm => t('sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %> polymorphic_path([:panel, :personal_book, :back_end, list_author_type]), :confirm => t('sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %>
</td> </td>
</tr> </tr>
@@ -21,14 +21,14 @@
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div> <div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
</div> </div>
</div> </div>
<div class="overview" content-layout="simple" base-width="420"> <div class="overview" content-layout="column" base-width="420">
<ul class="s_form" isotope="true"> <div column="true">
<li class="s_grid_row" > <div class="s_form">
<ul>
<% @site_valid_locales.each_with_index do |locale, i| %> <% @site_valid_locales.each_with_index do |locale, i| %>
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %> <% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
<% data = "data-language=" + locale %> <% data = "data-language=" + locale %>
<li class="s_grid_row" <%= style %> <%= data %> >
<div class="form_fix" <%= style %> <%= data %>>
<%= f.fields_for :paper_title_translations do |f| %> <%= f.fields_for :paper_title_translations do |f| %>
<%= f.text_area locale, <%= f.text_area locale,
class: "s_grid_12 s_grid s_grid_h_3", class: "s_grid_12 s_grid s_grid_h_3",
@@ -36,7 +36,8 @@
placeholder: t("personal_book.paper_title")+ "("+I18nVariable.from_locale(locale)+")", placeholder: t("personal_book.paper_title")+ "("+I18nVariable.from_locale(locale)+")",
value: (@personal_book.paper_title_translations[locale.to_s] rescue nil) %> value: (@personal_book.paper_title_translations[locale.to_s] rescue nil) %>
<% end %> <% end %>
</li>
<li class="s_grid_row" <%= style %> <%= data %> >
<%= f.fields_for :book_title_translations do |f| %> <%= f.fields_for :book_title_translations do |f| %>
<%= f.text_field locale, <%= f.text_field locale,
size: "20", size: "20",
@@ -44,7 +45,8 @@
class: "s_grid_12 s_grid", class: "s_grid_12 s_grid",
value: (@personal_book.book_title_translations[locale.to_s] rescue nil) %> value: (@personal_book.book_title_translations[locale.to_s] rescue nil) %>
<% end %> <% end %>
</li>
<li class="s_grid_row" <%= style %> <%= data %> >
<%= f.fields_for :extracted_chapters_translations do |f| %> <%= f.fields_for :extracted_chapters_translations do |f| %>
<%= f.text_field locale, <%= f.text_field locale,
size: "20", size: "20",
@@ -52,7 +54,8 @@
class: "s_grid_12 s_grid", class: "s_grid_12 s_grid",
value: (@personal_book.extracted_chapters_translations[locale.to_s] rescue nil) %> value: (@personal_book.extracted_chapters_translations[locale.to_s] rescue nil) %>
<% end %> <% end %>
</li>
<li class="s_grid_row" <%= style %> <%= data %> >
<%= f.fields_for :publishers_translations do |f| %> <%= f.fields_for :publishers_translations do |f| %>
<%= f.text_field locale, <%= f.text_field locale,
size: "20", size: "20",
@@ -60,9 +63,8 @@
class: "s_grid_12 s_grid", class: "s_grid_12 s_grid",
value: (@personal_book.publishers_translations[locale.to_s] rescue nil) %> value: (@personal_book.publishers_translations[locale.to_s] rescue nil) %>
<% end %> <% end %>
</div> </li>
<% end %> <% end %>
</li>
<li class="s_grid_row"> <li class="s_grid_row">
<%= label_tag("", t("personal_book.book_paper_type"), class: "s_grid_4 s_grid") %> <%= label_tag("", t("personal_book.book_paper_type"), class: "s_grid_4 s_grid") %>
<%= f.select :book_paper_type_id, BookPaperType.all.collect {|t| [ t.title, t.id ]}, {:class => "s_grid s_grid_8"} %> <%= f.select :book_paper_type_id, BookPaperType.all.collect {|t| [ t.title, t.id ]}, {:class => "s_grid s_grid_8"} %>
@@ -105,7 +107,12 @@
<%= label_tag("", t("personal_book.url"), class: "s_grid_4 s_grid") %><%= f.text_field :url, size: "20", class: "s_grid_8 s_grid"%> <%= label_tag("", t("personal_book.url"), class: "s_grid_4 s_grid") %><%= f.text_field :url, size: "20", class: "s_grid_8 s_grid"%>
</li> </li>
</ul>
</div>
</div>
<div column="true">
<div class="s_form">
<ul>
<li class="s_grid_row"> <li class="s_grid_row">
<%= f.text_area :keywords, size: "20x3", placeholder: t("personal_book.keywords"), class: "s_grid_12 s_grid_h_2 s_grid"%> <%= f.text_area :keywords, size: "20x3", placeholder: t("personal_book.keywords"), class: "s_grid_12 s_grid_h_2 s_grid"%>
</li> </li>
@@ -120,9 +127,14 @@
<%= label_tag("", t("personal_book.isbn"), class: "s_grid_4 s_grid") %><%= f.text_field :isbn, size: "20", class: "s_grid_8 s_grid"%> <%= label_tag("", t("personal_book.isbn"), class: "s_grid_4 s_grid") %><%= f.text_field :isbn, size: "20", class: "s_grid_8 s_grid"%>
</li> </li>
<li class="s_grid_row"> <li class="s_grid_row">
<%= f.text_area :note, size: "20x3", placeholder: t("personal_book.note"), class: "s_grid_12 s_grid s_grid_h_5 s_grid_h_full"%> <%= f.text_area :note, size: "20x3", placeholder: t("personal_book.note"), class: "s_grid_12 s_grid s_grid_h_5"%>
</li> </li>
</ul>
</div>
</div>
<div column="true">
<div class="s_form">
<ul>
<li class="s_grid_row"> <li class="s_grid_row">
<table class="s_table"> <table class="s_table">
<thead> <thead>
@@ -153,7 +165,8 @@
</table> </table>
</li> </li>
</ul> </ul>
</div>
</div>
</div> </div>
<script> <script>
var get_html = function(old_id,new_id){ var get_html = function(old_id,new_id){
@@ -57,19 +57,15 @@
</ul> </ul>
</div> </div>
</div> </div>
<div class="hh1 hp sdm">
<div class="hh1 hp sdm"> <div class="sdm_t hh1"><a href="<%= admin_import_data_sync_book_data_path(:user_id=>@userid) %>" class="icons-cycle" ajax-remote="get" response-type="json" callback-method="syncComplete" > Sync Books</a></div>
<div class="sdm_t hh1"><a href="<%= admin_import_data_sync_book_data_path(:user_id=>@userid) %>" class="icons-cycle" ajax-remote="get" response-type="json" callback-method="syncComplete" > Sync Books</a></div> </div>
</div>
<div class="hh1 hp sdm"> <div class="hh1 hp sdm">
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div> <div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
</div> </div>
</div> </div>
<div class="overview" page-name="books_list" content-layout="simple" base-width="300" per-column="<%= @per_column.to_s %>" pagination-var="view=<%= @view_by %>&page" > <div class="overview" page-name="books_list" content-layout="datalist" base-width="300" per-column="<%= @per_column.to_s %>" pagination-var="view=<%= @view_by %>&page" >
<ul isotope="true"> <% @writing_books.each do |w| %>
<% @writing_books.each do |w| %> <%= publication_record w, @view_by%>
<%= publication_record w, @view_by%> <% end %>
<% end %>
</ul>
</div> </div>
@@ -75,7 +75,7 @@
<% if is_admin? %> <% if is_admin? %>
<div class="bottomnav clearfix"> <div class="bottomnav clearfix">
<div class="action pull-right"> <div class="action pull-right">
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.sync_data'),admin_import_data_sync_book_data_path(:user_id => @user.id), :class => 'btn btn-primary' %> <%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.sync_data'), admin_import_data_sync_book_data_path(:user_id => @user.id), :class => 'btn btn-primary' %>
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.edit_brief_intro'), panel_personal_book_back_end_personal_book_intros_path(:user_id => @user.id), :class => 'btn btn-primary' %> <%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.edit_brief_intro'), panel_personal_book_back_end_personal_book_intros_path(:user_id => @user.id), :class => 'btn btn-primary' %>
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('announcement.add_new'), new_panel_personal_book_back_end_writing_book_path(:user_id => @user.id), :class => 'btn btn-primary' %> <%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('announcement.add_new'), new_panel_personal_book_back_end_writing_book_path(:user_id => @user.id), :class => 'btn btn-primary' %>
@@ -46,7 +46,6 @@ orbitDesktop.prototype.initializeConferencePapers = function(target,url,cache){
o.notify("Sync Complete","success"); o.notify("Sync Complete","success");
o.sub_menu_item($("div[content-type=menu] a").eq(0)); o.sub_menu_item($("div[content-type=menu] a").eq(0));
} }
var uploadFiles = function(){ var uploadFiles = function(){
$('#add_plugin_file a.add').click(function(){ $('#add_plugin_file a.add').click(function(){
var new_id = $(this).prev().attr('value'); var new_id = $(this).prev().attr('value');
@@ -0,0 +1,26 @@
class Panel::PersonalConference::FrontEnd::WritingConferencesController < OrbitWidgetController
def initialize
super
@app_title = 'personal_conference'
end
def index
@writing_conferences = WritingConference.desc(:year).page(params[:page]).per(10)
end
# GET /writing_conferences/1
# GET /writing_conferences/1.xml
def show
@writing_conference = WritingConference.find(params[:id])
@conference_paper_types = ( !@writing_conference.conference_paper_types.blank? ? @writing_conference.conference_paper_types.collect{|x| x.title}.join(', ') : nil)
@conference_author_types = ( !@writing_conference.conference_author_types.blank? ? @writing_conference.conference_author_types.collect{|x| x.title}.join(', ') : nil)
end
end
@@ -87,10 +87,11 @@ class WritingConference
title = ["#{self.paper_title}"] title = ["#{self.paper_title}"]
title << self.conference_title if self.conference_title.present? title << self.conference_title if self.conference_title.present?
title << self.sponsor if self.sponsor.present? title << self.sponsor if self.sponsor.present?
title << self.location if self.location.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 << "#{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 << "(#{self.conference_paper_types.collect{|x| x.title}.join(', ')})"
title.join(', ') title.join(', ')
end end
protected protected
@@ -5,7 +5,7 @@
<td class="span2"> <td class="span2">
<a href="<%= panel_personal_conference_back_end_writing_conference_author_type_quick_edit_path(list_author_type) %>#myModal2" data-toggle="modal" data-remote="true" class="action">編輯</a> <a href="<%= panel_personal_conference_back_end_writing_conference_author_type_quick_edit_path(list_author_type) %>#myModal2" data-toggle="modal" data-remote="true" class="action">編輯</a>
<%= link_to 'Delete', <%= link_to show_toggle_archive_btn(list_author_type),
polymorphic_path([:panel, :personal_conference, :back_end, list_author_type]), :confirm => t('sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %> polymorphic_path([:panel, :personal_conference, :back_end, list_author_type]), :confirm => t('sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %>
</td> </td>
</tr> </tr>
@@ -5,7 +5,7 @@
<td class="span2"> <td class="span2">
<a href="<%= panel_personal_conference_back_end_writing_conference_paper_type_quick_edit_path(list_paper_type) %>#myModal1" data-toggle="modal" data-remote="true" class="action">編輯</a> <a href="<%= panel_personal_conference_back_end_writing_conference_paper_type_quick_edit_path(list_paper_type) %>#myModal1" data-toggle="modal" data-remote="true" class="action">編輯</a>
<%= link_to 'Delete', <%= link_to show_toggle_archive_btn(list_paper_type),
polymorphic_path([:panel, :personal_conference, :back_end, list_paper_type]), :confirm => t('sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %> polymorphic_path([:panel, :personal_conference, :back_end, list_paper_type]), :confirm => t('sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %>
</td> </td>
</tr> </tr>
@@ -29,13 +29,14 @@
</div> </div>
</div> </div>
<div class="viewport"> --> <div class="viewport"> -->
<div class="overview" content-layout="simple" base-width="420"> <div class="overview" content-layout="column" base-width="420">
<ul class="s_form" isotope="true"> <div column="true">
<li class="s_grid_row" > <div class="s_form">
<ul>
<% @site_valid_locales.each_with_index do |locale, i| %> <% @site_valid_locales.each_with_index do |locale, i| %>
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %> <% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
<% data = "data-language=" + locale %> <% data = "data-language=" + locale %>
<div class="form_fix" <%= style %> <%= data %>> <li class="s_grid_row" <%= style %> <%= data %>>
<%= f.fields_for :paper_title_translations do |f| %> <%= f.fields_for :paper_title_translations do |f| %>
<%= f.text_area locale, <%= f.text_area locale,
class: "s_grid_12 s_grid_h_2 s_grid", class: "s_grid_12 s_grid_h_2 s_grid",
@@ -43,6 +44,8 @@
placeholder: t("personal_conference.paper_title")+ "("+I18nVariable.from_locale(locale)+")", placeholder: t("personal_conference.paper_title")+ "("+I18nVariable.from_locale(locale)+")",
value: (@writing_conference.paper_title_translations[locale.to_s] rescue nil) %> value: (@writing_conference.paper_title_translations[locale.to_s] rescue nil) %>
<% end %> <% end %>
</li>
<li class="s_grid_row" <%= style %> <%= data %>>
<%= f.fields_for :conference_title_translations do |f| %> <%= f.fields_for :conference_title_translations do |f| %>
<%= f.text_field locale, <%= f.text_field locale,
size: "20", size: "20",
@@ -50,9 +53,8 @@
class: "s_grid_12 s_grid", class: "s_grid_12 s_grid",
value: (@writing_conference.conference_title_translations[locale.to_s] rescue nil) %> value: (@writing_conference.conference_title_translations[locale.to_s] rescue nil) %>
<% end %> <% end %>
</div> </li>
<% end %> <% end %>
</li>
<li class="s_grid_row"> <li class="s_grid_row">
<div> <div>
<%= label_tag("", t("personal_conference.paper_type"), class: 's_grid s_grid_4') %> <%= label_tag("", t("personal_conference.paper_type"), class: 's_grid s_grid_4') %>
@@ -97,7 +99,11 @@
<li class="s_grid_row"> <li class="s_grid_row">
<%= label_tag("", t("personal_conference.url"), class: "s_grid_4 s_grid") %><%= f.text_field :url, size: "20", placeholder: "www.sample.com", class: "s_grid_8 s_grid"%> <%= label_tag("", t("personal_conference.url"), class: "s_grid_4 s_grid") %><%= f.text_field :url, size: "20", placeholder: "www.sample.com", class: "s_grid_8 s_grid"%>
</li> </li>
</ul>
</div>
<div column="true">
<div class="s_form">
<ul>
<li class="s_grid_row"> <li class="s_grid_row">
<%= f.text_area :author_tokens, <%= f.text_area :author_tokens,
class: "s_grid_12 s_grid", class: "s_grid_12 s_grid",
@@ -149,7 +155,12 @@
</li> </li>
<li class="s_grid_row"><input class="s_grid s_grid_12" type="text" placeholder=<%= t("personal_conference.tags") %>></li> <li class="s_grid_row"><input class="s_grid s_grid_12" type="text" placeholder=<%= t("personal_conference.tags") %>></li>
</ul>
</div>
</div>
<div column="true">
<div class="s_form">
<ul>
<li class="s_grid_row"> <li class="s_grid_row">
<table class="s_table"> <table class="s_table">
<thead> <thead>
@@ -179,16 +190,22 @@
</tbody> </tbody>
</table> </table>
</li> </li>
</ul>
<li class="s_grid_row"> </div>
<%= f.text_area :abstract, size: "20x22", placeholder: t("personal_conference.abstract"), class: "s_grid_12 s_grid_h_10 s_grid s_grid_h_full"%> <div column="true">
</li> <ul class="s_form">
<li class="s_grid_row">
<li class="s_grid_row"> <%= f.text_area :abstract, size: "20x22", placeholder: t("personal_conference.abstract"), class: "s_grid_12 s_grid_h_10 s_grid"%>
<%= f.text_area :note, size: "20x22", placeholder: t("personal_conference.note"), class: "s_grid_12 s_grid_h_10 s_grid s_grid_h_full"%>
</li> </li>
</ul> </ul>
</div>
<div column="true">
<ul class="s_form">
<li class="s_grid_row">
<%= f.text_area :note, size: "20x22", placeholder: t("personal_conference.note"), class: "s_grid_12 s_grid_h_10 s_grid"%>
</li>
</ul>
</div>
</div> </div>
<!-- </div> <!-- </div>
</div> --> </div> -->
@@ -58,12 +58,10 @@
</ul> </ul>
</div> </div>
</div> </div>
<div class="hh1 hp sdm"> <div class="hh1 hp sdm">
<div class="sdm_t hh1"><a href="<%= admin_import_data_sync_conference_data_path(:user_id => @userid) %>" class="icons-cycle" ajax-remote="get" response-type="json" callback-method="syncComplete" > Sync Conference Papers</a></div> <div class="sdm_t hh1"><a href="<%= admin_import_data_sync_conference_data_path(:user_id => @userid) %>" class="icons-cycle" ajax-remote="get" response-type="json" callback-method="syncComplete" > Sync Conference Papers</a></div>
</div> </div>
<div class="hh1 hp sdm">
<div class="hh1 hp sdm">
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div> <div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
</div> </div>
</div> </div>
@@ -75,11 +75,9 @@
<% if is_admin? %> <% if is_admin? %>
<div class="bottomnav clearfix"> <div class="bottomnav clearfix">
<div class="action pull-right"> <div class="action pull-right">
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.sync_data'), admin_import_data_sync_conference_data_path(:user_id => @user.id), :class => 'btn btn-primary' %>
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.sync_data'), admin_import_data_sync_conference_data_path(:user_id => @user.id), :class => 'btn btn-primary' %>
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.edit_brief_intro'), panel_personal_conference_back_end_personal_conference_intros_path(:user_id => @user.id), :class => 'btn btn-primary' %> <%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.edit_brief_intro'), panel_personal_conference_back_end_personal_conference_intros_path(:user_id => @user.id), :class => 'btn btn-primary' %>
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('announcement.add_new'), new_panel_personal_conference_back_end_writing_conference_path(:user_id => @user.id), :class => 'btn btn-primary' %> <%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('announcement.add_new'), new_panel_personal_conference_back_end_writing_conference_path(:user_id => @user.id), :class => 'btn btn-primary' %>
</div> </div>
<div class="pagination pagination-centered"> <div class="pagination pagination-centered">
@@ -4,13 +4,10 @@ module Panel::PersonalDiploma::Desktop::PersonalDiplomasHelper
"item" => "true", "item" => "true",
"data-id" => publication.id.to_s, "data-id" => publication.id.to_s,
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do :class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
content_tag :div,
:class => "inner" do
marker(publication.id) + \ marker(publication.id) + \
content(publication, view) + \ content(publication, view) + \
edit_or_delete(publication) edit_or_delete(publication)
end end
end
end end
def marker id def marker id
@@ -21,8 +21,10 @@
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div> <div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
</div> </div>
</div> </div>
<div class="overview" content-layout="simple" base-width="420"> <div class="overview" content-layout="column" base-width="420">
<ul class="s_form" isotope="true"> <div column="true">
<div class="s_form">
<ul>
<li class="s_grid_row"> <li class="s_grid_row">
<%= label_tag("", t("personal_diploma.start_date"), class: "s_grid_4 s_grid") %> <%= label_tag("", t("personal_diploma.start_date"), class: "s_grid_4 s_grid") %>
<%= f.date_select :start_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year] }, {:class => 's_grid_4 s_grid'} %> <%= f.date_select :start_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year] }, {:class => 's_grid_4 s_grid'} %>
@@ -33,11 +35,10 @@
<%= f.date_select :end_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year] }, {:class => 's_grid_4 s_grid'} %> <%= f.date_select :end_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year] }, {:class => 's_grid_4 s_grid'} %>
<%= f.date_select :end_date, {:use_month_numbers => true, :order => [:month, :day] }, {:class => 's_grid_2 s_grid'} %> <%= f.date_select :end_date, {:use_month_numbers => true, :order => [:month, :day] }, {:class => 's_grid_2 s_grid'} %>
</li> </li>
<li class="s_grid_row">
<% @site_valid_locales.each_with_index do |locale, i| %> <% @site_valid_locales.each_with_index do |locale, i| %>
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %> <% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
<% data = "data-language=" + locale %> <% data = "data-language=" + locale %>
<div class="form_fix" <%= style %> <%= data %>> <li class="s_grid_row" <%= style %> <%= data %>>
<%= f.fields_for :school_name_translations do |f| %> <%= f.fields_for :school_name_translations do |f| %>
<%= f.text_field locale, <%= f.text_field locale,
size: "20", size: "20",
@@ -45,7 +46,8 @@
class: "s_grid_12 s_grid", class: "s_grid_12 s_grid",
value: (@diploma.school_name_translations[locale.to_s] rescue nil) %> value: (@diploma.school_name_translations[locale.to_s] rescue nil) %>
<% end %> <% end %>
</li>
<li class="s_grid_row" <%= style %> <%= data %>>
<%= f.fields_for :country_translations do |f| %> <%= f.fields_for :country_translations do |f| %>
<%= f.text_field locale, <%= f.text_field locale,
size: "20", size: "20",
@@ -53,7 +55,8 @@
class: "s_grid_12 s_grid", class: "s_grid_12 s_grid",
value: (@diploma.country_translations[locale.to_s] rescue nil) %> value: (@diploma.country_translations[locale.to_s] rescue nil) %>
<% end %> <% end %>
</li>
<li class="s_grid_row" <%= style %> <%= data %>>
<%= f.fields_for :department_translations do |f| %> <%= f.fields_for :department_translations do |f| %>
<%= f.text_field locale, <%= f.text_field locale,
size: "20", size: "20",
@@ -61,7 +64,8 @@
class: "s_grid_12 s_grid", class: "s_grid_12 s_grid",
value: (@diploma.department_translations[locale.to_s] rescue nil) %> value: (@diploma.department_translations[locale.to_s] rescue nil) %>
<% end %> <% end %>
</li>
<li class="s_grid_row" <%= style %> <%= data %>>
<%= f.fields_for :degree_translations do |f| %> <%= f.fields_for :degree_translations do |f| %>
<%= f.text_field locale, <%= f.text_field locale,
size: "20", size: "20",
@@ -69,9 +73,8 @@
class: "s_grid_12 s_grid", class: "s_grid_12 s_grid",
value: (@diploma.degree_translations[locale.to_s] rescue nil) %> value: (@diploma.degree_translations[locale.to_s] rescue nil) %>
<% end %> <% end %>
</div> </li>
<% end %> <% end %>
</li>
<li class="s_grid_row"> <li class="s_grid_row">
<%= label_tag("", t("personal_diploma.url"), class: "s_grid_4 s_grid") %><%= f.text_field :url, size: "20", class: "s_grid_8 s_grid"%> <%= label_tag("", t("personal_diploma.url"), class: "s_grid_4 s_grid") %><%= f.text_field :url, size: "20", class: "s_grid_8 s_grid"%>
</li> </li>
@@ -82,10 +85,16 @@
<%= f.label :language, t("personal_diploma.language"), :class => "s_grid s_grid_4" %> <%= f.label :language, t("personal_diploma.language"), :class => "s_grid s_grid_4" %>
<%= f.select :language, Diploma::LANGUAGE_TYPES,{} ,{:class => "s_grid s_grid_8"} %> <%= f.select :language, Diploma::LANGUAGE_TYPES,{} ,{:class => "s_grid s_grid_8"} %>
</li> </li>
</ul>
</div>
</div>
<div column="true">
<div class="s_form">
<ul>
<li class="s_grid_row"> <li class="s_grid_row">
<%= f.text_area :note, size: "20x3", placeholder: t("personal_diploma.note"), class: "s_grid_12 s_grid s_grid_h_10 s_grid_h_full"%> <%= f.text_area :note, size: "20x3", placeholder: t("personal_diploma.note"), class: "s_grid_12 s_grid s_grid_h_5"%>
</li> </li>
</ul> </ul>
</div>
</div>
</div> </div>
@@ -60,10 +60,8 @@
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div> <div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
</div> </div>
</div> </div>
<div class="overview" page-name="diploma_list" content-layout="simple" base-width="300" per-column="<%= @per_column.to_s %>" pagination-var="view=<%= @view_by %>&page" > <div class="overview" page-name="diploma_list" content-layout="datalist" base-width="300" per-column="<%= @per_column.to_s %>" pagination-var="view=<%= @view_by %>&page" >
<ul isotope="true"> <% @diplomas.each do |w| %>
<% @diplomas.each do |w| %> <%= publication_record w, @view_by%>
<%= publication_record w, @view_by%> <% end %>
<% end %>
</ul>
</div> </div>
@@ -4,13 +4,10 @@ module Panel::PersonalExperience::Desktop::PersonalExperiencesHelper
"item" => "true", "item" => "true",
"data-id" => publication.id.to_s, "data-id" => publication.id.to_s,
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do :class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
content_tag :div,
:class => "inner" do
marker(publication.id) + \ marker(publication.id) + \
content(publication, view) + \ content(publication, view) + \
edit_or_delete(publication) edit_or_delete(publication)
end end
end
end end
def marker id def marker id
@@ -5,7 +5,7 @@
<td class="span2"> <td class="span2">
<a href="<%= panel_personal_experience_back_end_experience_experience_category_quick_edit_path(list_experience_type) %>#myModal1" data-toggle="modal" data-remote="true" class="action"><%= t('edit')%></a> <a href="<%= panel_personal_experience_back_end_experience_experience_category_quick_edit_path(list_experience_type) %>#myModal1" data-toggle="modal" data-remote="true" class="action"><%= t('edit')%></a>
<%= link_to 'Delete', <%= link_to show_toggle_archive_btn(list_experience_type),
polymorphic_path([:panel, :personal_experience, :back_end, list_experience_type]), :confirm => t('sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %> polymorphic_path([:panel, :personal_experience, :back_end, list_experience_type]), :confirm => t('sure?'), :method => :delete, :remote => true,:class=>"archive_toggle action" %>
</td> </td>
</tr> </tr>
@@ -21,13 +21,14 @@
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div> <div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
</div> </div>
</div> </div>
<div class="overview" content-layout="simple" base-width="420"> <div class="overview" content-layout="column" base-width="420">
<ul class="s_form" isotope="true"> <div column="true">
<li class="s_grid_row"> <div class="s_form">
<ul>
<% @site_valid_locales.each_with_index do |locale, i| %> <% @site_valid_locales.each_with_index do |locale, i| %>
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %> <% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
<% data = "data-language=" + locale %> <% data = "data-language=" + locale %>
<div class="form_fix" <%= style %> <%= data %>> <li class="s_grid_row" <%= style %> <%= data %>>
<%= f.fields_for :organizationt_title_translations do |f| %> <%= f.fields_for :organizationt_title_translations do |f| %>
<%= f.text_field locale, <%= f.text_field locale,
size: "20", size: "20",
@@ -35,7 +36,8 @@
class: "s_grid_12 s_grid", class: "s_grid_12 s_grid",
value: (@experience.organizationt_title_translations[locale.to_s] rescue nil) %> value: (@experience.organizationt_title_translations[locale.to_s] rescue nil) %>
<% end %> <% end %>
</li>
<li class="s_grid_row" <%= style %> <%= data %>>
<%= f.fields_for :department_translations do |f| %> <%= f.fields_for :department_translations do |f| %>
<%= f.text_field locale, <%= f.text_field locale,
size: "20", size: "20",
@@ -43,7 +45,8 @@
class: "s_grid_12 s_grid", class: "s_grid_12 s_grid",
value: (@experience.department_translations[locale.to_s] rescue nil) %> value: (@experience.department_translations[locale.to_s] rescue nil) %>
<% end %> <% end %>
</li>
<li class="s_grid_row" <%= style %> <%= data %>>
<%= f.fields_for :job_title_translations do |f| %> <%= f.fields_for :job_title_translations do |f| %>
<%= f.text_field locale, <%= f.text_field locale,
size: "20", size: "20",
@@ -51,9 +54,8 @@
class: "s_grid_12 s_grid", class: "s_grid_12 s_grid",
value: (@experience.job_title_translations[locale.to_s] rescue nil) %> value: (@experience.job_title_translations[locale.to_s] rescue nil) %>
<% end %> <% end %>
</div> </li>
<% end %> <% end %>
</li>
<li class="s_grid_row"> <li class="s_grid_row">
<%= label_tag("", t("personal_experience.experience_category"), class: "s_grid_4 s_grid") %> <%= label_tag("", t("personal_experience.experience_category"), class: "s_grid_4 s_grid") %>
<%= f.select :experience_category_id, ExperienceCategory.all.collect {|t| [ t.title, t.id ]}, {:class => "s_grid s_grid_8"} %> <%= f.select :experience_category_id, ExperienceCategory.all.collect {|t| [ t.title, t.id ]}, {:class => "s_grid s_grid_8"} %>
@@ -78,9 +80,16 @@
<%= f.label :language, t("personal_experience.language"), :class => "s_grid s_grid_4" %> <%= f.label :language, t("personal_experience.language"), :class => "s_grid s_grid_4" %>
<%= f.select :language, Experience::LANGUAGE_TYPES,{} ,{:class => "s_grid s_grid_8"} %> <%= f.select :language, Experience::LANGUAGE_TYPES,{} ,{:class => "s_grid s_grid_8"} %>
</li> </li>
</ul>
</div>
</div>
<div column="true">
<div class="s_form">
<ul>
<li class="s_grid_row"> <li class="s_grid_row">
<%= f.text_area :note, size: "20x3", placeholder: t("personal_experience.note"), value: @experience.note , class: "s_grid_12 s_grid s_grid_h_3 s_grid_h_full"%> <%= f.text_area :note, size: "20x3", placeholder: t("personal_experience.note"), value: @experience.note , class: "s_grid_12 s_grid s_grid_h_3"%>
</li> </li>
</ul> </ul>
</div>
</div>
</div> </div>
Loaded 100 of 131 files, more files were not shown because too many files have changed in this diff. Show more