Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
056e622d7a | ||
|
|
30646b12ab | ||
|
|
fe1869199e | ||
|
|
061225f56c | ||
|
|
b3e16ce23b | ||
|
|
fad191aefe | ||
|
|
2f866891b1 | ||
|
|
48aa7ed638 | ||
|
|
21db2a2cba | ||
|
|
1194bdd9b4 | ||
|
|
831bd722b8 | ||
|
|
940a915125 | ||
|
|
792785f7ba | ||
|
|
43cf6b70b7 | ||
|
|
ba8da9b6bb | ||
|
|
ff93670949 | ||
|
|
f85354c2b6 |
No files matched your search
@@ -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'
|
gem 'rubyzip', '< 1.0.0'
|
||||||
|
|
||||||
gem 'sunspot_mongo'
|
gem 'sunspot_mongo'
|
||||||
gem 'sunspot_solr'
|
gem 'sunspot_solr'
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
@@ -43,7 +43,7 @@ $(function(){
|
|||||||
placeholder: 'placeholder',
|
placeholder: 'placeholder',
|
||||||
startCollapsed: true,
|
startCollapsed: true,
|
||||||
disableNesting: 'no-nest',
|
disableNesting: 'no-nest',
|
||||||
stop: function(event, ui) {
|
update: 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() } );
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -80,27 +80,22 @@ $(function() {
|
|||||||
_data.actionable ? $('#dialog').modal('show') : "";
|
_data.actionable ? $('#dialog').modal('show') : "";
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
|
$('.delete-item').on(clickEvent, function() {
|
||||||
$("#dialog").on(clickEvent, '.delete-item', function() {
|
var _v = [];
|
||||||
var _v = [],
|
$("tbody .list-check").each(function() {
|
||||||
_t = $t.attr("rel");
|
this.checked && _v.push("ids[]="+this.value)
|
||||||
|
|
||||||
$("tbody .list-check:checked").each(function() {
|
|
||||||
_v.push(this.value);
|
|
||||||
});
|
});
|
||||||
|
var _t = $t.attr("rel");
|
||||||
$.ajax({
|
if(_t.indexOf("?") > -1) {
|
||||||
url : _t,
|
$.ajax(_t + "&" + _v.join("&")).done(function() {
|
||||||
type:"get",
|
actionSuccess(_data.checkAction)
|
||||||
data : {"ids":_v},
|
});
|
||||||
dataType : "json",
|
} else {
|
||||||
success : function(){
|
$.ajax(_t + "?" + _v.join("&")).done(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);
|
||||||
})
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
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,5 +1,5 @@
|
|||||||
//= require basic
|
//= require basic
|
||||||
//= require lib/jquery-ui-1.10.2.custom.min.js
|
//= require jquery.ui.sortable
|
||||||
//= 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
|
||||||
|
|||||||
@@ -125,6 +125,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#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) {
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
/* 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; }
|
||||||
+20
-18
@@ -1,21 +1,23 @@
|
|||||||
@import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/ambiance-mobile.css);
|
/*
|
||||||
@import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/ambiance.css);
|
*= require 'lib/codemirror/theme/ambiance-mobile'
|
||||||
@import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/blackboard.css);
|
*= require "lib/codemirror/theme/ambiance"
|
||||||
@import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/cobalt.css);
|
*= require "lib/codemirror/theme/blackboard"
|
||||||
@import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/eclipse.css);
|
*= require "lib/codemirror/theme/cobalt"
|
||||||
@import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/elegant.css);
|
*= require "lib/codemirror/theme/eclipse"
|
||||||
@import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/erlang-dark.css);
|
*= require "lib/codemirror/theme/elegant"
|
||||||
@import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/midnight.css);
|
*= require "lib/codemirror/theme/erlang-dark"
|
||||||
@import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/monokai.css);
|
*= require "lib/codemirror/theme/midnight"
|
||||||
@import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/neat.css);
|
*= require "lib/codemirror/theme/monokai"
|
||||||
@import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/night.css);
|
*= require "lib/codemirror/theme/neat"
|
||||||
@import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/rubyblue.css);
|
*= require "lib/codemirror/theme/night"
|
||||||
@import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/solarized.css);
|
*= require "lib/codemirror/theme/rubyblue"
|
||||||
@import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/theme.css);
|
*= require "lib/codemirror/theme/solarized"
|
||||||
@import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/twilight.css);
|
*= require "lib/codemirror/theme/theme"
|
||||||
@import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/vibrant-ink.css);
|
*= require "lib/codemirror/theme/twilight"
|
||||||
@import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/xq-dark.css);
|
*= require "lib/codemirror/theme/vibrant-ink"
|
||||||
@import url(/orbit_4.0.1/assets/stylesheets/lib/codemirror/theme/xq-light.css);
|
*= require "lib/codemirror/theme/xq-dark"
|
||||||
|
*= 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);
|
||||||
}
|
}
|
||||||
@@ -1,200 +0,0 @@
|
|||||||
/* 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,6 +39,13 @@
|
|||||||
.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,6 +10,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* 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;
|
||||||
@@ -189,6 +195,10 @@
|
|||||||
#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;
|
||||||
|
|||||||
@@ -29,6 +29,9 @@
|
|||||||
.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: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
font-family: "Chivo";
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
|
|||||||
@@ -22,8 +22,10 @@ class Admin::AdImagesController < Admin::AdBannersController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
@ad_image = AdImage.find(params[:id])
|
@ad_banner = AdBanner.find params[:ad_banner][: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
|
||||||
|
|
||||||
@@ -38,10 +40,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
|
||||||
|
|||||||
@@ -0,0 +1,573 @@
|
|||||||
|
# encoding: utf-8
|
||||||
|
|
||||||
|
require 'net/http'
|
||||||
|
require 'open-uri'
|
||||||
|
|
||||||
|
class Admin::ImportDataController < OrbitBackendController
|
||||||
|
helper Admin::PagePartsHelper
|
||||||
|
include Admin::FrontendWidgetInterface
|
||||||
|
|
||||||
|
def get_teacher_data
|
||||||
|
uri = URI("https://localhost:8000/teachers.xml")
|
||||||
|
|
||||||
|
#params = {"UnitName" => "管理學院".encode('big5-uao'), "account" => "manage"}
|
||||||
|
#uri.query = URI.encode_www_form(params)
|
||||||
|
res = Net::HTTP.get_response(uri)
|
||||||
|
|
||||||
|
@teacher_data = Hash.from_xml(res.body)
|
||||||
|
@teachers = @teacher_data["objects"]
|
||||||
|
@i = 5000
|
||||||
|
@teachers.each do |hash|
|
||||||
|
# @roles = Role.skip(1).first
|
||||||
|
@roles = Role.all
|
||||||
|
@teacher = User.new
|
||||||
|
I18n.locale = :zh_tw
|
||||||
|
if !hash['teacher_zh_tw'].blank?
|
||||||
|
@teacher.first_name = hash['teacher_zh_tw']
|
||||||
|
elsif hash['teacher_zh_tw'].blank? && !hash['teacher_en'].blank?
|
||||||
|
@teacher.first_name = hash['teacher_en']
|
||||||
|
elsif hash['teacher_zh_tw'].blank? && hash['teacher_en'].blank?
|
||||||
|
@teacher.first_name = "Please Fill the Name"
|
||||||
|
end
|
||||||
|
|
||||||
|
I18n.locale = :en
|
||||||
|
if !hash['teacher_en'].blank?
|
||||||
|
@teacher.first_name = hash['teacher_en']
|
||||||
|
elsif hash['teacher_en'].blank? && !hash['teacher_zh_tw'].blank?
|
||||||
|
@teacher.first_name = hash['teacher_zh_tw']
|
||||||
|
elsif hash['teacher_en'].blank? && hash['teacher_zh_tw'].blank?
|
||||||
|
@teacher.first_name = "Please Fill the Name"
|
||||||
|
end
|
||||||
|
|
||||||
|
#@teacher.first_name = hash['teacher_en']
|
||||||
|
@teacher.ntu_seq = hash['ntu_seq']
|
||||||
|
@teacher.sid = hash['ntu_seq']
|
||||||
|
@teacher.role_ids = ["#{@roles.skip(1).first.id}"]
|
||||||
|
@teacher.password = "testpass"
|
||||||
|
@i += 10
|
||||||
|
if !hash['email'].blank?
|
||||||
|
@user = User.where(email: "#{hash['email']}")
|
||||||
|
if @user.length == 0
|
||||||
|
@teacher.email = hash['email']
|
||||||
|
elsif @user.length > 0
|
||||||
|
@teacher.email = "#{@i}duplicate@ntu.edu.tw"
|
||||||
|
end
|
||||||
|
else
|
||||||
|
@teacher.email = "#{@i}@ntu.edu.tw"
|
||||||
|
end
|
||||||
|
|
||||||
|
if hash['teacher_zh_tw'].blank? && hash['teacher_en'].blank?
|
||||||
|
@teacher.user_id = "defaultuser"
|
||||||
|
elsif hash['teacher_en'].blank?
|
||||||
|
@teacher.user_id = hash['teacher_zh_tw']
|
||||||
|
elsif hash['teacher_zh_tw']
|
||||||
|
@teacher.user_id = hash['teacher_en']
|
||||||
|
end
|
||||||
|
@teacher.save!
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def get_book_data
|
||||||
|
uri = URI("http://ann.cc.ntu.edu.tw/Achv/xmlTeacherData.asp")
|
||||||
|
params = {"UnitName" => "管理學院".encode('big5-uao'), "account" => "manage"}
|
||||||
|
uri.query = URI.encode_www_form(params)
|
||||||
|
res = Net::HTTP.get_response(uri)
|
||||||
|
|
||||||
|
teachers = User.all
|
||||||
|
|
||||||
|
teachers.each do |hash|
|
||||||
|
if hash.sid.present?
|
||||||
|
ntu_seq = hash.sid
|
||||||
|
books_xml = Nokogiri::XML( \
|
||||||
|
open("http://ann.cc.ntu.edu.tw/Achv/xmlBook.asp?Seq=#{ntu_seq}"))
|
||||||
|
@books = books_xml.xpath("//Book").map do |book_node|
|
||||||
|
{
|
||||||
|
author: (book_node>"Authors").text,
|
||||||
|
year: (book_node>"PublishYear").text,
|
||||||
|
title: (book_node>"DocTitle").text,
|
||||||
|
remarks: (book_node>"Remarks").text,
|
||||||
|
publisher: (book_node>"Publisher").text,
|
||||||
|
book_title: (book_node>"BookTitle").text
|
||||||
|
}
|
||||||
|
end
|
||||||
|
if @books.present?
|
||||||
|
@books.each do |b|
|
||||||
|
@book = WritingBook.new
|
||||||
|
I18n.locale = :zh_tw
|
||||||
|
@book.authors = b[:author]
|
||||||
|
@book.paper_title = b[:title]
|
||||||
|
@book.book_title = b[:book_title]
|
||||||
|
@book.note = b[:remarks]
|
||||||
|
@book.publisher = b[:publisher]
|
||||||
|
I18n.locale = :en
|
||||||
|
@book.authors = b[:author]
|
||||||
|
@book.paper_title = b[:title]
|
||||||
|
@book.book_title = b[:book_title]
|
||||||
|
@book.note = b[:remarks]
|
||||||
|
@book.publisher = b[:publisher]
|
||||||
|
@book.year = b[:year]
|
||||||
|
@book.create_user_id = hash.id
|
||||||
|
@book.save
|
||||||
|
end
|
||||||
|
else
|
||||||
|
puts "No books by Teacher"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def get_conference_data
|
||||||
|
uri = URI("http://ann.cc.ntu.edu.tw/Achv/xmlTeacherData.asp")
|
||||||
|
params = {"UnitName" => "管理學院".encode('big5-uao'), "account" => "manage"}
|
||||||
|
uri.query = URI.encode_www_form(params)
|
||||||
|
res = Net::HTTP.get_response(uri)
|
||||||
|
|
||||||
|
teachers = User.all
|
||||||
|
|
||||||
|
teachers.each do |hash|
|
||||||
|
if hash.sid.present?
|
||||||
|
ntu_seq = hash.sid
|
||||||
|
conference_xml = Nokogiri::XML( \
|
||||||
|
open("http://ann.cc.ntu.edu.tw/Achv/xmlPaper.asp?Seq=#{ntu_seq}&type=C"))
|
||||||
|
#open("http://versatile.management.ntu.edu.tw/publication1/conference/#{ntuseq}.xml"))
|
||||||
|
@conference_papers = conference_xml.xpath("//Paper").map do |cp_node|
|
||||||
|
{
|
||||||
|
author: (cp_node>"Authors").text,
|
||||||
|
year: (cp_node>"PublishYear").text,
|
||||||
|
title: (cp_node>"PaperTitle").text,
|
||||||
|
conference: (cp_node>"PublishOn").text,
|
||||||
|
date: Date::MONTHNAMES[(cp_node>"PublishMonth").text.to_i],
|
||||||
|
location: "#{(cp_node>"Country").text} #{(cp_node>"location").text}",
|
||||||
|
conference_title: (cp_node>"PublishOn").text,
|
||||||
|
remarks: (cp_node>"Remarks").text
|
||||||
|
}
|
||||||
|
end
|
||||||
|
if @conference_papers.present?
|
||||||
|
@conference_papers.each do |b|
|
||||||
|
@conference_paper = WritingConference.new
|
||||||
|
I18n.locale = :zh_tw
|
||||||
|
@conference_paper.authors = b[:author]
|
||||||
|
if b[:title].blank?
|
||||||
|
@conference_paper.paper_title = "No Title Present"
|
||||||
|
else
|
||||||
|
@conference_paper.paper_title = b[:title]
|
||||||
|
end
|
||||||
|
if b[:conference_title].blank?
|
||||||
|
@conference_paper.conference_title = "No Title Present"
|
||||||
|
else
|
||||||
|
@conference_paper.conference_title = b[:conference_title]
|
||||||
|
end
|
||||||
|
|
||||||
|
@conference_paper.note = b[:remarks]
|
||||||
|
I18n.locale = :en
|
||||||
|
@conference_paper.authors = b[:author]
|
||||||
|
if b[:title].blank?
|
||||||
|
@conference_paper.paper_title = "No Title Present"
|
||||||
|
else
|
||||||
|
@conference_paper.paper_title = b[:title]
|
||||||
|
end
|
||||||
|
if b[:conference_title].blank?
|
||||||
|
@conference_paper.conference_title = "No Title Present"
|
||||||
|
else
|
||||||
|
@conference_paper.conference_title = b[:conference_title]
|
||||||
|
end
|
||||||
|
@conference_paper.note = b[:remarks]
|
||||||
|
|
||||||
|
@conference_paper.location = b[:location]
|
||||||
|
@conference_paper.year = b[:year]
|
||||||
|
@conference_paper.create_user_id = hash.id
|
||||||
|
|
||||||
|
@conference_paper.save!
|
||||||
|
end
|
||||||
|
else
|
||||||
|
puts "No conference by Teacher"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
def get_journal_paper_data
|
||||||
|
uri = URI("http://ann.cc.ntu.edu.tw/Achv/xmlTeacherData.asp")
|
||||||
|
params = {"UnitName" => "管理學院".encode('big5-uao'), "account" => "manage"}
|
||||||
|
uri.query = URI.encode_www_form(params)
|
||||||
|
res = Net::HTTP.get_response(uri)
|
||||||
|
|
||||||
|
teachers = User.all
|
||||||
|
|
||||||
|
teachers.each do |hash|
|
||||||
|
if hash.sid.present?
|
||||||
|
ntu_seq = hash.sid
|
||||||
|
paper_xml = Nokogiri::XML( \
|
||||||
|
#open("http://versatile.management.ntu.edu.tw/publication1/journal/#{ntuseq}.xml"))
|
||||||
|
open("http://ann.cc.ntu.edu.tw/Achv/xmlPaper.asp?Seq=#{ntu_seq}&type=J"))
|
||||||
|
@journal_papers = paper_xml.xpath("//Paper").map do |paper_node|
|
||||||
|
{
|
||||||
|
author: (paper_node>"Authors").text,
|
||||||
|
year: (paper_node>"PublishYear").text,
|
||||||
|
title: (paper_node>"PaperTitle").text,
|
||||||
|
journal: (paper_node>"PublishOn").text,
|
||||||
|
volume:(paper_node>"Volume").text,
|
||||||
|
volumeno:(paper_node>"VolumeNo").text,
|
||||||
|
beginpage:(paper_node>"BeginPage").text,
|
||||||
|
endpage:(paper_node>"EndPage").text,
|
||||||
|
subgroup:(paper_node>"subgroup").text,
|
||||||
|
remarks: (paper_node>"Remarks").text,
|
||||||
|
cate: ((paper_node>"subgroup")>"Group").text
|
||||||
|
}
|
||||||
|
end
|
||||||
|
if @journal_papers.present?
|
||||||
|
@journal_papers.each do |b|
|
||||||
|
@journal_paper = WritingJournal.new
|
||||||
|
I18n.locale = :zh_tw
|
||||||
|
@journal_paper.authors = b[:author]
|
||||||
|
if b[:title].blank?
|
||||||
|
@journal_paper.paper_title = "No Title Present"
|
||||||
|
else
|
||||||
|
@journal_paper.paper_title = b[:title]
|
||||||
|
end
|
||||||
|
@journal_paper.journal_title = b[:journal]
|
||||||
|
@journal_paper.note = b[:remarks]
|
||||||
|
I18n.locale = :en
|
||||||
|
@journal_paper.authors = b[:author]
|
||||||
|
if b[:title].blank?
|
||||||
|
@journal_paper.paper_title = "No Title Present"
|
||||||
|
else
|
||||||
|
@journal_paper.paper_title = b[:title]
|
||||||
|
end
|
||||||
|
@journal_paper.journal_title = b[:journal]
|
||||||
|
@journal_paper.note = b[:remarks]
|
||||||
|
@journal_paper.year = b[:year]
|
||||||
|
@journal_paper.vol_no = b[:volumeno]
|
||||||
|
@journal_paper.form_to_start = b[:beginpage]
|
||||||
|
@journal_paper.form_to_end = b[:endpage]
|
||||||
|
if !b[:cate].blank?
|
||||||
|
@level_type = JournalLevelType.where(:key => b[:cate])
|
||||||
|
if @level_type.present?
|
||||||
|
@journal_paper.journal_level_type_ids = ["#{@level_type.first.id}"]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
@journal_paper.create_user_id = hash.id
|
||||||
|
@journal_paper.save!
|
||||||
|
end
|
||||||
|
else
|
||||||
|
puts "No journal paper by Teacher"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def sync_conference_data
|
||||||
|
@conference_data = WritingConference.where(create_user_id: "#{params[:user_id]}")
|
||||||
|
@conference_data.delete_all
|
||||||
|
@user = User.find("#{params[:user_id]}")
|
||||||
|
|
||||||
|
# teachers.each do |hash|
|
||||||
|
if @user.sid.present?
|
||||||
|
ntu_seq = @user.sid
|
||||||
|
conference_xml = Nokogiri::XML( \
|
||||||
|
open("http://ann.cc.ntu.edu.tw/Achv/xmlPaper.asp?Seq=#{ntu_seq}&type=C"))
|
||||||
|
#open("http://versatile.management.ntu.edu.tw/publication1/conference/#{ntuseq}.xml"))
|
||||||
|
@conference_papers = conference_xml.xpath("//Paper").map do |cp_node|
|
||||||
|
{
|
||||||
|
author: (cp_node>"Authors").text,
|
||||||
|
year: (cp_node>"PublishYear").text,
|
||||||
|
title: (cp_node>"PaperTitle").text,
|
||||||
|
conference: (cp_node>"PublishOn").text,
|
||||||
|
date: Date::MONTHNAMES[(cp_node>"PublishMonth").text.to_i],
|
||||||
|
location: "#{(cp_node>"Country").text} #{(cp_node>"location").text}",
|
||||||
|
conference_title: (cp_node>"PublishOn").text,
|
||||||
|
remarks: (cp_node>"Remarks").text
|
||||||
|
}
|
||||||
|
end
|
||||||
|
if @conference_papers.present?
|
||||||
|
@conference_papers.each do |b|
|
||||||
|
@conference_paper = WritingConference.new
|
||||||
|
I18n.locale = :zh_tw
|
||||||
|
@conference_paper.authors = b[:author]
|
||||||
|
if b[:title].blank?
|
||||||
|
@conference_paper.paper_title = "No Title Present"
|
||||||
|
else
|
||||||
|
@conference_paper.paper_title = b[:title]
|
||||||
|
end
|
||||||
|
if b[:conference_title].blank?
|
||||||
|
@conference_paper.conference_title = "No Title Present"
|
||||||
|
else
|
||||||
|
@conference_paper.conference_title = b[:conference_title]
|
||||||
|
end
|
||||||
|
|
||||||
|
@conference_paper.note = b[:remarks]
|
||||||
|
I18n.locale = :en
|
||||||
|
@conference_paper.authors = b[:author]
|
||||||
|
if b[:title].blank?
|
||||||
|
@conference_paper.paper_title = "No Title Present"
|
||||||
|
else
|
||||||
|
@conference_paper.paper_title = b[:title]
|
||||||
|
end
|
||||||
|
if b[:conference_title].blank?
|
||||||
|
@conference_paper.conference_title = "No Title Present"
|
||||||
|
else
|
||||||
|
@conference_paper.conference_title = b[:conference_title]
|
||||||
|
end
|
||||||
|
@conference_paper.note = b[:remarks]
|
||||||
|
|
||||||
|
@conference_paper.location = b[:location]
|
||||||
|
@conference_paper.year = b[:year]
|
||||||
|
@conference_paper.create_user_id = @user.id
|
||||||
|
|
||||||
|
@conference_paper.save!
|
||||||
|
end
|
||||||
|
else
|
||||||
|
puts "No conference by Teacher"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
respond_to do |format|
|
||||||
|
|
||||||
|
format.html
|
||||||
|
format.json { render json: {"success"=>true}.to_json}
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
def sync_journal_paper_data
|
||||||
|
@journal_data = WritingJournal.where(create_user_id: "#{params[:user_id]}")
|
||||||
|
@journal_data.delete_all
|
||||||
|
@user = User.find("#{params[:user_id]}")
|
||||||
|
|
||||||
|
# teachers.each do |hash|
|
||||||
|
if @user.sid.present?
|
||||||
|
ntu_seq = @user.sid
|
||||||
|
paper_xml = Nokogiri::XML( \
|
||||||
|
#open("http://versatile.management.ntu.edu.tw/publication1/journal/#{ntuseq}.xml"))
|
||||||
|
open("http://ann.cc.ntu.edu.tw/Achv/xmlPaper.asp?Seq=#{ntu_seq}&type=J"))
|
||||||
|
@journal_papers = paper_xml.xpath("//Paper").map do |paper_node|
|
||||||
|
{
|
||||||
|
author: (paper_node>"Authors").text,
|
||||||
|
year: (paper_node>"PublishYear").text,
|
||||||
|
title: (paper_node>"PaperTitle").text,
|
||||||
|
journal: (paper_node>"PublishOn").text,
|
||||||
|
volume:(paper_node>"Volume").text,
|
||||||
|
volumeno:(paper_node>"VolumeNo").text,
|
||||||
|
beginpage:(paper_node>"BeginPage").text,
|
||||||
|
endpage:(paper_node>"EndPage").text,
|
||||||
|
subgroup:(paper_node>"subgroup").text,
|
||||||
|
remarks: (paper_node>"Remarks").text,
|
||||||
|
cate: ((paper_node>"subgroup")>"Group").text
|
||||||
|
}
|
||||||
|
end
|
||||||
|
if @journal_papers.present?
|
||||||
|
@journal_papers.each do |b|
|
||||||
|
@journal_paper = WritingJournal.new
|
||||||
|
I18n.locale = :zh_tw
|
||||||
|
@journal_paper.authors = b[:author]
|
||||||
|
|
||||||
|
if b[:title].blank?
|
||||||
|
@journal_paper.paper_title = "No Title Present"
|
||||||
|
else
|
||||||
|
@journal_paper.paper_title = b[:title]
|
||||||
|
end
|
||||||
|
|
||||||
|
@journal_paper.journal_title = b[:journal]
|
||||||
|
@journal_paper.note = b[:remarks]
|
||||||
|
I18n.locale = :en
|
||||||
|
@journal_paper.authors = b[:author]
|
||||||
|
|
||||||
|
if b[:title].blank?
|
||||||
|
@journal_paper.paper_title = "No Title Present"
|
||||||
|
else
|
||||||
|
@journal_paper.paper_title = b[:title]
|
||||||
|
end
|
||||||
|
|
||||||
|
@journal_paper.journal_title = b[:journal]
|
||||||
|
@journal_paper.note = b[:remarks]
|
||||||
|
@journal_paper.year = b[:year]
|
||||||
|
@journal_paper.vol_no = b[:volumeno]
|
||||||
|
@journal_paper.form_to_start = b[:beginpage]
|
||||||
|
@journal_paper.form_to_end = b[:endpage]
|
||||||
|
|
||||||
|
if !b[:cate].blank?
|
||||||
|
@level_type = JournalLevelType.where(:key => b[:cate])
|
||||||
|
if @level_type.present?
|
||||||
|
@journal_paper.journal_level_type_ids = ["#{@level_type.first.id}"]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
@journal_paper.create_user_id = @user.id
|
||||||
|
@journal_paper.save!
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
respond_to do |format|
|
||||||
|
|
||||||
|
format.html
|
||||||
|
format.json { render json: {"success"=>true}.to_json}
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def sync_book_data
|
||||||
|
@books_data = WritingBook.where(create_user_id: "#{params[:user_id]}")
|
||||||
|
@books_data.delete_all
|
||||||
|
@user = User.find("#{params[:user_id]}")
|
||||||
|
|
||||||
|
# teachers.each do |hash|
|
||||||
|
if @user.sid.present?
|
||||||
|
ntu_seq = @user.sid
|
||||||
|
books_xml = Nokogiri::XML( \
|
||||||
|
open("http://ann.cc.ntu.edu.tw/Achv/xmlBook.asp?Seq=#{ntu_seq}"))
|
||||||
|
@books = books_xml.xpath("//Book").map do |book_node|
|
||||||
|
{
|
||||||
|
author: (book_node>"Authors").text,
|
||||||
|
year: (book_node>"PublishYear").text,
|
||||||
|
title: (book_node>"DocTitle").text,
|
||||||
|
remarks: (book_node>"Remarks").text,
|
||||||
|
publisher: (book_node>"Publisher").text,
|
||||||
|
book_title: (book_node>"BookTitle").text
|
||||||
|
}
|
||||||
|
end
|
||||||
|
if @books.present?
|
||||||
|
@books.each do |b|
|
||||||
|
@book = WritingBook.new
|
||||||
|
I18n.locale = :zh_tw
|
||||||
|
@book.authors = b[:author]
|
||||||
|
@book.paper_title = b[:title]
|
||||||
|
@book.book_title = b[:book_title]
|
||||||
|
@book.note = b[:remarks]
|
||||||
|
@book.publisher = b[:publisher]
|
||||||
|
I18n.locale = :en
|
||||||
|
@book.authors = b[:author]
|
||||||
|
@book.paper_title = b[:title]
|
||||||
|
@book.book_title = b[:book_title]
|
||||||
|
@book.note = b[:remarks]
|
||||||
|
@book.publisher = b[:publisher]
|
||||||
|
@book.year = b[:year]
|
||||||
|
@book.create_user_id = @user.id
|
||||||
|
@book.save
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
respond_to do |format|
|
||||||
|
|
||||||
|
format.html
|
||||||
|
format.json { render json: {"success"=>true}.to_json}
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
def get_announcement_data
|
||||||
|
uri = URI("https://localhost:8000/announcements.xml")
|
||||||
|
|
||||||
|
#params = {"UnitName" => "管理學院".encode('big5-uao'), "account" => "manage"}
|
||||||
|
#uri.query = URI.encode_www_form(params)
|
||||||
|
res = Net::HTTP.get_response(uri)
|
||||||
|
|
||||||
|
@announcement_data = Hash.from_xml(res.body)
|
||||||
|
@announcements = @announcement_data["objects"]
|
||||||
|
@announcements.each do |hash|
|
||||||
|
@bulletin = Bulletin.new
|
||||||
|
|
||||||
|
I18n.locale = :zh_tw
|
||||||
|
if hash['announcement_title_zh_tw'].blank?
|
||||||
|
@bulletin.title = hash['announcement_title_en']
|
||||||
|
@bulletin.text = hash['announcement_content_zh_tw']
|
||||||
|
elsif hash['announcement_title_zh_tw'].blank? && hash['announcement_title_en'].blank?
|
||||||
|
@bulletin.title = "Please Fill the Name"
|
||||||
|
@bulletin.text = hash['announcement_content_zh_tw']
|
||||||
|
else
|
||||||
|
@bulletin.title = hash['announcement_title_zh_tw']
|
||||||
|
@bulletin.text = hash['announcement_content_zh_tw']
|
||||||
|
end
|
||||||
|
|
||||||
|
I18n.locale = :en
|
||||||
|
if hash['announcement_title_zh_tw'].blank? && hash['announcement_title_en'].blank?
|
||||||
|
@bulletin.title = "Please Fill the Name"
|
||||||
|
@bulletin.text = hash['announcement_content_en']
|
||||||
|
|
||||||
|
elsif hash['announcement_title_en'].blank?
|
||||||
|
@bulletin.title = hash['announcement_zh_tw']
|
||||||
|
@bulletin.text = hash['announcement_content_en']
|
||||||
|
|
||||||
|
elsif hash['announcement_title_zh_tw'].blank?
|
||||||
|
@bulletin.title = hash['announcement_title_en']
|
||||||
|
@bulletin.text = hash['announcement_content_en']
|
||||||
|
end
|
||||||
|
@bulletin.category_id = "51d2a16438178423c2000001"
|
||||||
|
@bulletin.is_pending = true
|
||||||
|
|
||||||
|
@bulletin.save!
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def get_page_data
|
||||||
|
f = File.open("/home/rwub/orbit-db/ntu_mb/pages/management_pages.xml")
|
||||||
|
page_xml = Nokogiri::XML(f)
|
||||||
|
#open("http://versatile.management.ntu.edu.tw/publication1/conference/#{ntuseq}.xml"))
|
||||||
|
@pages = page_xml.xpath("//management-page").map do |cp_node|
|
||||||
|
{
|
||||||
|
menu_title: (cp_node>"menu-title").text,
|
||||||
|
content: (cp_node>"content").text
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
if @pages.present?
|
||||||
|
@i=0
|
||||||
|
@pages.each do |b|
|
||||||
|
|
||||||
|
get_variables_for_new
|
||||||
|
@page = Page.new
|
||||||
|
|
||||||
|
@page.parent = "4f45f3b9e9d02c5db900005d"
|
||||||
|
@page.design = "50ac424983e75219d2000021"
|
||||||
|
@page.theme_id = "50ac424a83e75219d2000025"
|
||||||
|
@page.menu_enabled_for= ["en", "zh_tw", ""]
|
||||||
|
@page.enabled_for= ["en", "zh_tw", ""]
|
||||||
|
@page.is_published = false
|
||||||
|
if b[:menu_title].blank?
|
||||||
|
@page.title = 'No Title Present'
|
||||||
|
@i += 1
|
||||||
|
@page.name = "#{@i}Page"
|
||||||
|
else
|
||||||
|
@i += 1
|
||||||
|
@page.title = b[:menu_title]
|
||||||
|
@page.name = "#{@i}Page"
|
||||||
|
end
|
||||||
|
if b[:content].blank?
|
||||||
|
@page.content = "No Content Present"
|
||||||
|
else
|
||||||
|
@page.content = b[:content]
|
||||||
|
end
|
||||||
|
@page.save!
|
||||||
|
end
|
||||||
|
else
|
||||||
|
puts "No Page Data"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
def get_variables_for_new
|
||||||
|
@designs = Design.all.entries
|
||||||
|
@themes = Design.first.themes
|
||||||
|
@module_apps = ModuleApp.for_frontend_select
|
||||||
|
@app_frontend_urls = nil
|
||||||
|
@categories = nil
|
||||||
|
@tags = nil
|
||||||
|
@page_frontend_data_counts = nil
|
||||||
|
@frontend_styles = nil
|
||||||
|
@selected={
|
||||||
|
:design => @designs.first,
|
||||||
|
:theme=> @themes.first,
|
||||||
|
:module_app=>nil,#@module_apps.first
|
||||||
|
:app_frontend_url=> nil, #@module_apps.first
|
||||||
|
:category=>nil,
|
||||||
|
:tag=>nil,
|
||||||
|
:page_frontend_data_count=>nil,
|
||||||
|
:frontend_style => nil
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
@@ -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])
|
item.shift_to(params[:parent_id], params[:position].to_i - 1)
|
||||||
render :nothing => true
|
render :nothing => true, status: 200
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
@@ -250,11 +250,39 @@ class Admin::UsersNewInterfaceController < OrbitMemberController
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit_order
|
def edit_order_card
|
||||||
@users = User.not_guest_user
|
@users = User.not_guest_user
|
||||||
|
@type = 'card'
|
||||||
|
render 'edit_order'
|
||||||
end
|
end
|
||||||
|
|
||||||
def update_order
|
def edit_order_list
|
||||||
|
@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
|
||||||
|
|||||||
@@ -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 !Me.backend_openness_on
|
if Site.first.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 'tag'
|
when 'tags'
|
||||||
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,4 +1,4 @@
|
|||||||
class DesktopAppsController < OrbitBackendController
|
class DesktopAppsController < ApplicationController
|
||||||
require "net/http"
|
require "net/http"
|
||||||
require "uri"
|
require "uri"
|
||||||
require 'zip/zip'
|
require 'zip/zip'
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class DesktopWidgetsController < OrbitBackendController
|
class DesktopWidgetsController < ApplicationController
|
||||||
require "net/http"
|
require "net/http"
|
||||||
require "uri"
|
require "uri"
|
||||||
require 'zip/zip'
|
require 'zip/zip'
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ class PagesController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def check_frontend_open
|
def check_frontend_open
|
||||||
if Me.frontend_closed && current_user.nil? #Need to be change
|
if !Site.first.frontend_closed && current_user.nil? #Need to be change
|
||||||
redirect_to '/admin/dashboards'
|
redirect_to '/admin/dashboards'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
+3
-2
@@ -45,9 +45,10 @@ class Item
|
|||||||
end
|
end
|
||||||
|
|
||||||
def shift_to(new_parent, position)
|
def shift_to(new_parent, position)
|
||||||
unless self.parent_id.to_s.eql?(new_parent) && self.position.eql?(position.to_i)
|
position = 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.to_i)
|
current_position_sibling = find_by_parent_and_position(new_parent, position)
|
||||||
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
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ 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")
|
||||||
@@ -289,7 +290,7 @@ class User
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
protected
|
private
|
||||||
|
|
||||||
def rebuild_status_record
|
def rebuild_status_record
|
||||||
self.status_record = {}
|
self.status_record = {}
|
||||||
@@ -299,4 +300,9 @@ 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
|
||||||
@@ -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",params[:ad_banner_id]) , :class=>"input-medium" %>
|
<%= select_tag 'ad_banner[id]',options_from_collection_for_select(AdBanner.all, "id", "title", @ad_image.ad_banner_id) , :class=>"input-medium" %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -244,6 +244,7 @@
|
|||||||
|
|
||||||
</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' %>
|
||||||
|
|||||||
@@ -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>
|
||||||
@@ -1,11 +1,12 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr class="sort-header">
|
||||||
<th class="span1 strong"></th>
|
<th></th>
|
||||||
<th class="span2"></th>
|
<th class="first span3"><a href="#">Templates Title</a></th>
|
||||||
<th class="span1"></th>
|
<th data-hide="phone" class="active span3">Active</th>
|
||||||
<th class="span7"></th>
|
<th data-hide="phone" class="active span3">Date of purchase</th>
|
||||||
<th class="span2"></th>
|
<th data-hide="phone" class="active span3">Designer</th>
|
||||||
</tr>
|
<th class="span1"></th>
|
||||||
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tbody id="tbody_designs" class="sort-holder">
|
<tbody id="tbody_designs" class="sort-holder">
|
||||||
|
|||||||
@@ -18,5 +18,5 @@
|
|||||||
<%= f.text_field :intro %>
|
<%= f.text_field :intro %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<%= f.submit t(:update_) %>
|
<%= f.submit t(:update_), :class=>"btn btn-primary" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -2,7 +2,27 @@
|
|||||||
<%= 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 %>
|
||||||
|
|
||||||
<h1><%= t('editing.design') %></h1>
|
<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/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>
|
||||||
|
|||||||
@@ -2,6 +2,21 @@
|
|||||||
<%= 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' %>
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
<p>Successfully Imported Announcement Data!</p>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<p>Successfully Book Data!</p>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<p>Successfully Conference Data!</p>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<p>Successfully Journal Paper Data!</p>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<p>Successfully Imported Page Data!</p>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<p>Successfully Imported Teacher Data!</p>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<p>Book Data Synced Successfully!</p>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<p>Conference Paper Data Synced Successfully!</p>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
<p>Journal Paper Data Synced Successfully!</p>
|
||||||
@@ -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" %>
|
||||||
@@ -2,86 +2,84 @@
|
|||||||
<%= 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 %>
|
||||||
|
|
||||||
<% content_for :page_specific_css do %>
|
<head>
|
||||||
<%= stylesheet_link_tag 'normalize' %>
|
<%= stylesheet_link_tag "lib/wrap-nav"%>
|
||||||
<%= stylesheet_link_tag 'bootstrap-responsive' %>
|
<%= stylesheet_link_tag "lib/main-list"%>
|
||||||
<%= stylesheet_link_tag 'rulingorbit' %>
|
<%= stylesheet_link_tag "lib/mt-list"%>
|
||||||
<%= stylesheet_link_tag 'module-store' %>
|
<%= stylesheet_link_tag "lib/filter"%>
|
||||||
<% end %>
|
<%= stylesheet_link_tag "lib/togglebox"%>
|
||||||
<% content_for :page_specific_javascript do %>
|
|
||||||
<%= javascript_include_tag "jquery.cycle" %>
|
|
||||||
<%= javascript_include_tag "modules" %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<div class="wrapper">
|
<%= javascript_include_tag 'lib/footable-0.1' %>
|
||||||
<div id="toolbar">
|
<%= javascript_include_tag 'lib/all-list' %>
|
||||||
<div class="filter fn">
|
<%= javascript_include_tag 'lib/retina' %>
|
||||||
<span class="label">Price</span>
|
<%= javascript_include_tag 'lib/mudole_templates_status' %>
|
||||||
<div class="drop-menu ui">
|
</head>
|
||||||
<a href="" class="controller">
|
|
||||||
<span class="option-default">All</span>
|
<table id="mt-list" class="table main-list">
|
||||||
<span class="arrow down"></span>
|
<thead>
|
||||||
</a>
|
<tr class="sort-header">
|
||||||
<ul class="option-list">
|
<th class="first"><a href="#">Module Title</a></th>
|
||||||
<li><a class="option-item" href="">All</a></li>
|
<th data-hide="phone" class="active span3">Date of purchase</th>
|
||||||
<li><a class="option-item" href="">3000</a></li>
|
<th data-hide="all" class="active"><a href="#">Description</a></th>
|
||||||
<li><a class="option-item" href="">4000</a></li>
|
<th class="span2">Active</th>
|
||||||
<li><a class="option-item" href="">5000</a></li>
|
</tr>
|
||||||
</ul>
|
</thead>
|
||||||
</div>
|
<tbody>
|
||||||
</div>
|
<tr>
|
||||||
<div class="filter fn">
|
<td class="detail-row">
|
||||||
<span class="label">Category</span>
|
<div class="module_icon pull-left">
|
||||||
<div class="drop-menu ui">
|
<%= image_tag "module_icon.png"%>
|
||||||
<a href="" class="controller">
|
</div>
|
||||||
<span class="option-default">All</span>
|
<h5 class="mt_title"><span>Module Title</span><span class="muted">2.0.1</span></h5>
|
||||||
<span class="arrow down"></span>
|
<p class="mt_dev muted">Rulingcom</p>
|
||||||
</a>
|
</td>
|
||||||
<ul class="option-list">
|
<td class="detail-row">2013/07/12</td>
|
||||||
<li><a class="option-item" href="">All</a></li>
|
<td>
|
||||||
<li><a class="option-item" href="">National Taiwan University</a></li>
|
@detail
|
||||||
<li><a class="option-item" href="">Category 1</a></li>
|
</td>
|
||||||
<li><a class="option-item" href="">Category 2</a></li>
|
<td class="active"><button class="act btn btn-mini" type="button">Uninstall</button></td>
|
||||||
<li><a class="option-item" href="">Category 3</a></li>
|
</tr>
|
||||||
</ul>
|
<tr class="download">
|
||||||
</div>
|
<td class="detail-row">
|
||||||
</div>
|
<div class="module_icon pull-left">
|
||||||
<div class="filter fn">
|
<%= image_tag "module_icon.png"%>
|
||||||
<span class="label">Sort by</span>
|
</div>
|
||||||
<div class="drop-menu ui">
|
<h5 class="mt_title"><span>Module Title Module Title Module Title</span><span class="muted">2.0.1</span></h5>
|
||||||
<a href="" class="controller">
|
<p class="mt_dev muted">Rulingcom</p>
|
||||||
<span class="option-default">Date</span>
|
</td>
|
||||||
<span class="arrow down"></span>
|
<td class="detail-row">2013/07/12</td>
|
||||||
</a>
|
<td>
|
||||||
<ul class="option-list">
|
@detail
|
||||||
<li><a class="option-item" href="">Date</a></li>
|
</td>
|
||||||
<li><a class="option-item" href="">Popular</a></li>
|
<td class="active"><button class="act btn btn-mini btn-success" type="button">Download</button></td>
|
||||||
<li><a class="option-item" href="">Recent Upload</a></li>
|
</tr>
|
||||||
</ul>
|
<tr class="install">
|
||||||
</div>
|
<td class="detail-row">
|
||||||
</div>
|
<div class="module_icon pull-left">
|
||||||
</div>
|
<%= image_tag "module_icon.png"%>
|
||||||
<div id="feature" class="clearfix">
|
</div>
|
||||||
<div id="feature-nav">
|
<h5 class="mt_title"><span>Module Title</span><span class="muted">2.0.1</span></h5>
|
||||||
<ul>
|
<p class="mt_dev muted">Rulingcom</p>
|
||||||
<li><a href=""><img class="item-thumb" src="<%= asset_path "f1.jpg"%>" alt="Thumbnail 1" width="228" height="67"></a></li>
|
</td>
|
||||||
<li><a href=""><img class="item-thumb" src="<%= asset_path "f2.jpg"%>" alt="Thumbnail 2" width="228" height="67"></a></li>
|
<td class="detail-row">2013/07/12</td>
|
||||||
<li><a href=""><img class="item-thumb" src="<%= asset_path "f3.jpg"%>" alt="Thumbnail 3" width="228" height="67"></a></li>
|
<td>
|
||||||
</ul>
|
@detail
|
||||||
</div>
|
</td>
|
||||||
<div class="holder">
|
<td class="active"><button class="act btn btn-mini btn-primary" type="button">Install</button></td>
|
||||||
<ul>
|
</tr>
|
||||||
<li><a href=""><img class="item-thumb" src="<%= asset_path "f1.jpg"%>" alt="Thumbnail 1" width="740" height="220"></a></li>
|
<tr class="update">
|
||||||
<li><a href=""><img class="item-thumb" src="<%= asset_path "f2.jpg"%>" alt="Thumbnail 2" width="740" height="220"></a></li>
|
<td class="detail-row">
|
||||||
<li><a href=""><img class="item-thumb" src="<%= asset_path "f3.jpg"%>" alt="Thumbnail 3" width="740" height="220"></a></li>
|
<div class="module_icon pull-left">
|
||||||
</ul>
|
<%= image_tag "module_icon.png"%>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<h5 class="mt_title"><span>Module Title</span><span class="muted">2.0.1</span></h5>
|
||||||
<div id="item-list">
|
<p class="mt_dev muted">Rulingcom</p>
|
||||||
<ul class="clearfix">
|
</td>
|
||||||
<% 12.times do |i| %>
|
<td class="detail-row">2013/07/12</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>
|
<td>
|
||||||
<% end %>
|
@detail
|
||||||
</ul>
|
</td>
|
||||||
</div>
|
<td class="active"><button class="act btn btn-mini btn-info" type="button">Update</button></td>
|
||||||
</div>
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
@@ -1,10 +1,16 @@
|
|||||||
<% sitemap_block.children.each_with_index do |child, i| %>
|
<li>
|
||||||
<li "<%= 'disabled' if !child.show_in_sitemap_for(temp_locale) %>">
|
<h6>
|
||||||
|
<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>
|
||||||
@@ -1,9 +1,4 @@
|
|||||||
<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"%>
|
||||||
@@ -18,75 +13,27 @@
|
|||||||
<%= 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 %>
|
||||||
|
|
||||||
<% content_for :page_specific_javascript do %>
|
<section>
|
||||||
<%= javascript_include_tag "lib/jquery.masonry.min.js" %>
|
<h3>Sitemap</h3>
|
||||||
<script>
|
<div>
|
||||||
$(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">
|
|
||||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
<ul id="map-tree-language" class="nav nav-pills">
|
||||||
<li <%= ( i == 0 ) ? " class=active" : '' %>><a data-toggle="tab" href=".<%= locale %>"><%= I18nVariable.from_locale(locale) %></a></li>
|
<% @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>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
<% @site_valid_locales.each_with_index do |temp_locale, i| %>
|
<div class="tab-content map-tree-content">
|
||||||
<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| %>
|
||||||
<div class="tab-pane site-map <%= temp_locale %> fade tab-pane <%= ( i == 0 ) ? "in active" : '' %>">
|
<ul id="<%= temp_locale %>" class="map-tree tab-pane fade in active">
|
||||||
<%= render :partial => 'sitemap_block', :collection => @items, :locals => {:temp_locale => temp_locale} %>
|
<%= render :partial => 'sitemap_block', :collection => @items, :locals => {:temp_locale => temp_locale} %>
|
||||||
</div>
|
</ul>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
<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>
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
<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_admin_users_new_interface_index_path, :class => "btn btn-primary" %>
|
<%= link_to t(:edit_order), edit_order_list_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 -%>
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
<%
|
|
||||||
if user_edit_order.sex == 'male'
|
|
||||||
@user_sex = 'gender-man'
|
|
||||||
elsif user_edit_order.sex == 'female'
|
|
||||||
@user_sex = 'gender-woman'
|
|
||||||
else
|
|
||||||
@user_sex = 'gender-none'
|
|
||||||
end
|
|
||||||
%>
|
|
||||||
<tr id="<%= dom_id user_edit_order %>">
|
|
||||||
<td class="<%= @user_sex %>"></td>
|
|
||||||
<td><%= link_to user_edit_order.position + 1, '#', class: 'edit_position', 'data-user-id' => user_edit_order.id %></td>
|
|
||||||
<td><%= link_to user_edit_order.name, admin_users_new_interface_path(user_edit_order) %></td>
|
|
||||||
<td><%= user_edit_order.email %></td>
|
|
||||||
</tr>
|
|
||||||
@@ -1,65 +1,30 @@
|
|||||||
<% 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" %>
|
||||||
<% end -%>
|
<%= stylesheet_link_tag "lib/checkbox-card" %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<div id="list-view">
|
<% content_for :right_nav do %>
|
||||||
<table id="member-list" class="table main-list">
|
<div class="view-switch btn-group pull-right" data-toggle="buttons-radio">
|
||||||
<thead>
|
<%= 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')}" %>
|
||||||
<tr class="sort-header">
|
<%= 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')}" %>
|
||||||
<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 %>
|
||||||
<script>
|
<%= javascript_include_tag "jquery.ui.sortable" %>
|
||||||
$(function(){
|
<%= javascript_include_tag "lib/jquery.ui.touch-punch.min.js" %>
|
||||||
var _userPosition = [];
|
<%= javascript_include_tag "lib/jquery.lite.image.resize.js" %>
|
||||||
$('#member-list').on(clickEvent, '.edit_position', function(e){
|
<%= javascript_include_tag "lib/member/sort.js.erb" %>
|
||||||
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 %>
|
||||||
@@ -1 +0,0 @@
|
|||||||
$('#list-view table tbody').html("<%= j render partial: 'user_edit_order', collection: @users %>")
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
$('#order_content').html("<%= j render 'edit_order_list' %>")
|
||||||
+1
-3
@@ -10,8 +10,6 @@ development:
|
|||||||
<<: *defaults
|
<<: *defaults
|
||||||
database: test_site
|
database: test_site
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
<<: *defaults
|
<<: *defaults
|
||||||
database: test_site
|
database: test_site
|
||||||
@@ -24,4 +22,4 @@ production:
|
|||||||
# password: <%= ENV['MONGOID_PASSWORD'] %>
|
# password: <%= ENV['MONGOID_PASSWORD'] %>
|
||||||
# database: <%= ENV['MONGOID_DATABASE'] %>
|
# database: <%= ENV['MONGOID_DATABASE'] %>
|
||||||
<<: *defaults
|
<<: *defaults
|
||||||
database: test_site_new
|
database: test_site
|
||||||
+14
-2
@@ -201,6 +201,16 @@ Orbit::Application.routes.draw do
|
|||||||
get 'preference'
|
get 'preference'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
get "import_data/get_teacher_data"
|
||||||
|
get "import_data/get_book_data"
|
||||||
|
get "import_data/get_conference_data"
|
||||||
|
get "import_data/get_journal_paper_data"
|
||||||
|
get "import_data/get_announcement_data"
|
||||||
|
get "import_data/get_page_data"
|
||||||
|
get "import_data/sync_book_data"
|
||||||
|
get "import_data/sync_journal_paper_data"
|
||||||
|
get "import_data/sync_conference_data"
|
||||||
|
|
||||||
resources :tags do
|
resources :tags do
|
||||||
collection do
|
collection do
|
||||||
post 'add_to_default'
|
post 'add_to_default'
|
||||||
@@ -215,8 +225,10 @@ Orbit::Application.routes.draw do
|
|||||||
get 'temp_edit'
|
get 'temp_edit'
|
||||||
end
|
end
|
||||||
collection do
|
collection do
|
||||||
get 'edit_order'
|
get 'edit_order_card'
|
||||||
post 'update_order'
|
get 'edit_order_list'
|
||||||
|
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
|
||||||
|
|||||||
@@ -91,8 +91,11 @@ namespace :new_ui do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
task :save_users => :environment do
|
task :reset_user_position => :environment do
|
||||||
User.all.each(&:save)
|
User.where(email: /guest/).each{|d|d.update_attribute(:position, nil)}
|
||||||
|
User.not_guest_user.each_with_index do |user, i|
|
||||||
|
user.update_attribute(:position, i)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
+1
-1
@@ -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 )
|
home = Page.new( :design_id => design.id, :name => 'home', :is_published => true, :theme_id => theme.id, :menu_enabled_for => [] )
|
||||||
|
|
||||||
home.title_translations = {"zh_tw"=>"首頁", "en"=>"Home"}
|
home.title_translations = {"zh_tw"=>"首頁", "en"=>"Home"}
|
||||||
home.save
|
home.save
|
||||||
|
|||||||
Vendored
+9
-9
@@ -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
|
@frontend_style = !@item.frontend_style.blank? ? @item.frontend_style : "1"
|
||||||
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]).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], :title.nin=>[""]).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).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, :title.nin=>[""]).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]).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], :title.nin=>[""]).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).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, :title.nin=>[""]).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]).desc( :is_top ).default_sort(params[:sort])
|
@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])
|
||||||
elsif !params[:category_id].blank?
|
elsif !params[:category_id].blank?
|
||||||
@archive_files = ArchiveFile.can_display.where(:category_id.in => [afcg.id]).desc( :is_top ).default_sort(params[:sort])
|
@archive_files = ArchiveFile.can_display.where(:category_id.in => [afcg.id], :title.nin=>[""]).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]).desc( :is_top ).default_sort(params[:sort])
|
@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])
|
||||||
else
|
else
|
||||||
@archive_files = ArchiveFile.can_display.where(:category_id => afcg.id).desc( :is_top ).default_sort(params[:sort])
|
@archive_files = ArchiveFile.can_display.where(:category_id => afcg.id, :title.nin=>[""]).desc( :is_top ).default_sort(params[:sort])
|
||||||
end
|
end
|
||||||
|
|
||||||
archive_file_datas = Array.new
|
archive_file_datas = Array.new
|
||||||
|
|||||||
Vendored
+9
-8
@@ -23,6 +23,7 @@ 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
|
||||||
|
|
||||||
@@ -64,13 +65,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]).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], :title.nin=>[""]).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).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, :title.nin=>[""]).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]).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], :title.nin=>[""]).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).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, :title.nin=>[""]).desc( :is_top ).default_sort(params[:sort]).page( params[:page_main] ).per(@page_num)
|
||||||
end
|
end
|
||||||
|
|
||||||
elsif @widget_style == "2"
|
elsif @widget_style == "2"
|
||||||
@@ -80,13 +81,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]).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], :title.nin=>[""]).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]).desc( :is_top ).default_sort(params[:sort]).limit(@page_num)
|
@archive_files = ArchiveFile.can_display.where(:category_id.in => [afcg.id], :title.nin=>[""]).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]).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], :title.nin=>[""]).desc( :is_top ).default_sort(params[:sort]).limit(@page_num)
|
||||||
else
|
else
|
||||||
@archive_files = ArchiveFile.can_display.where(:category_id => afcg.id).desc( :is_top ).default_sort(params[:sort]).limit(@page_num)
|
@archive_files = ArchiveFile.can_display.where(:category_id => afcg.id, :title.nin=>[""]).desc( :is_top ).default_sort(params[:sort]).limit(@page_num)
|
||||||
end
|
end
|
||||||
|
|
||||||
archive_file_datas = Array.new
|
archive_file_datas = Array.new
|
||||||
|
|||||||
Vendored
+6
-4
@@ -87,9 +87,11 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div class="pull_right">
|
<div class="pull_right">
|
||||||
<% if !params[:category_id].blank? %>
|
<% if !@archive_files.blank? or !@archive_file_datas.blank? %>
|
||||||
<%= link_to t(:more_plus), panel_archive_front_end_archive_files_path(:category_id => @part.category) %>
|
<% if !params[:category_id].blank? %>
|
||||||
<% else %>
|
<%= 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 %>
|
<% else %>
|
||||||
|
<%= link_to t(:more_plus), panel_archive_front_end_archive_files_path %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
vendor/built_in_modules/personal_book/app/assets/javascripts/personal_book/desktop/personal_books.js
Vendored
+5
@@ -92,6 +92,11 @@ orbitDesktop.prototype.initializePersonalBook = function(target,url,cache){ // t
|
|||||||
width: $(".overview").width() - 20
|
width: $(".overview").width() - 20
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.initializePersonalBook.syncComplete = function(){
|
||||||
|
o.notify("Sync Complete","success");
|
||||||
|
o.sub_menu_item($("div[content-type=menu] a").eq(0));
|
||||||
|
}
|
||||||
|
|
||||||
this.initializePersonalBook.coAuthorformCallback = function(data){
|
this.initializePersonalBook.coAuthorformCallback = function(data){
|
||||||
if(data.success){
|
if(data.success){
|
||||||
|
|||||||
+1
@@ -8,6 +8,7 @@ class Panel::PersonalBook::Desktop::PersonalBooksController < ApplicationControl
|
|||||||
|
|
||||||
@per_column = 5
|
@per_column = 5
|
||||||
|
|
||||||
|
@userid = current_user.id
|
||||||
case @view_by
|
case @view_by
|
||||||
when "abstract"
|
when "abstract"
|
||||||
@per_column = 1
|
@per_column = 1
|
||||||
|
|||||||
@@ -83,13 +83,14 @@ class WritingBook
|
|||||||
end
|
end
|
||||||
|
|
||||||
def create_link
|
def create_link
|
||||||
|
title = []
|
||||||
title = ["\"#{self.extracted_chapters}\""]
|
# title = ["#{self.extracted_chapters}"] if self.extracted_chapters.present?
|
||||||
title << self.book_title
|
title << self.paper_title if self.paper_title.present?
|
||||||
title << self.publisher
|
title << self.book_title if self.book_title.present?
|
||||||
title << self.pages
|
title << self.publisher if self.publisher.present?
|
||||||
# title << "(#{self.journal_level_types.collect{|x| x.title}.join(', ')})"
|
title << self.pages if self.pages.present?
|
||||||
title.join(', ')
|
# title << "(#{self.journal_level_types.collect{|x| x.title}.join(', ')})"
|
||||||
|
title.join(', ')
|
||||||
end
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|||||||
+5
@@ -57,6 +57,11 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="hh1 hp sdm">
|
||||||
|
<div class="sdm_t hh1"><a href="<%= admin_import_data_sync_book_data_path(:user_id=>@userid) %>" class="icons-cycle" ajax-remote="get" response-type="json" callback-method="syncComplete" > Sync Books</a></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="hh1 hp sdm">
|
<div class="hh1 hp sdm">
|
||||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Vendored
+2
@@ -75,6 +75,8 @@
|
|||||||
<% if is_admin? %>
|
<% if is_admin? %>
|
||||||
<div class="bottomnav clearfix">
|
<div class="bottomnav clearfix">
|
||||||
<div class="action pull-right">
|
<div class="action pull-right">
|
||||||
|
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.sync_data'),admin_import_data_sync_book_data_path(:user_id => @user.id), :class => 'btn btn-primary' %>
|
||||||
|
|
||||||
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.edit_brief_intro'), panel_personal_book_back_end_personal_book_intros_path(:user_id => @user.id), :class => 'btn btn-primary' %>
|
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.edit_brief_intro'), panel_personal_book_back_end_personal_book_intros_path(:user_id => @user.id), :class => 'btn btn-primary' %>
|
||||||
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('announcement.add_new'), new_panel_personal_book_back_end_writing_book_path(:user_id => @user.id), :class => 'btn btn-primary' %>
|
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('announcement.add_new'), new_panel_personal_book_back_end_writing_book_path(:user_id => @user.id), :class => 'btn btn-primary' %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+4
@@ -42,6 +42,10 @@ orbitDesktop.prototype.initializeConferencePapers = function(target,url,cache){
|
|||||||
this.initializeConferencePapers.cancelpaper = function(){
|
this.initializeConferencePapers.cancelpaper = function(){
|
||||||
o.highlight_sub_menu_item(0);
|
o.highlight_sub_menu_item(0);
|
||||||
}
|
}
|
||||||
|
this.initializeConferencePapers.syncComplete = function(){
|
||||||
|
o.notify("Sync Complete","success");
|
||||||
|
o.sub_menu_item($("div[content-type=menu] a").eq(0));
|
||||||
|
}
|
||||||
|
|
||||||
var uploadFiles = function(){
|
var uploadFiles = function(){
|
||||||
$('#add_plugin_file a.add').click(function(){
|
$('#add_plugin_file a.add').click(function(){
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ class Panel::PersonalConference::Desktop::ConferencePagesController < Applicatio
|
|||||||
@writing_conferences = WritingConference.where(create_user_id: current_user.id)
|
@writing_conferences = WritingConference.where(create_user_id: current_user.id)
|
||||||
page = params[:page]
|
page = params[:page]
|
||||||
page ||= 1
|
page ||= 1
|
||||||
|
@userid = current_user.id
|
||||||
if @view_by.nil?
|
if @view_by.nil?
|
||||||
@writing_conferences = @writing_conferences.asc(:paper_title)
|
@writing_conferences = @writing_conferences.asc(:paper_title)
|
||||||
else
|
else
|
||||||
|
|||||||
+5
-7
@@ -84,15 +84,13 @@ class WritingConference
|
|||||||
end
|
end
|
||||||
|
|
||||||
def create_link
|
def create_link
|
||||||
|
title = ["#{self.paper_title}"]
|
||||||
title = ["\"#{self.paper_title}\""]
|
title << self.conference_title if self.conference_title.present?
|
||||||
title << self.conference_title
|
title << self.sponsor if self.sponsor.present?
|
||||||
title << self.sponsor
|
title << self.location if self.location.present?
|
||||||
title << self.location
|
title << "#{period_start_date}-#{period_end_date}" if (self.period_start_date.present? && self.period_end_date.present?)
|
||||||
title << "#{period_start_date}-#{period_end_date}"
|
|
||||||
# title << "(#{self.conference_paper_types.collect{|x| x.title}.join(', ')})"
|
# title << "(#{self.conference_paper_types.collect{|x| x.title}.join(', ')})"
|
||||||
title.join(', ')
|
title.join(', ')
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|||||||
+5
@@ -58,7 +58,12 @@
|
|||||||
</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>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|||||||
+4
@@ -75,7 +75,11 @@
|
|||||||
<% if is_admin? %>
|
<% if is_admin? %>
|
||||||
<div class="bottomnav clearfix">
|
<div class="bottomnav clearfix">
|
||||||
<div class="action pull-right">
|
<div class="action pull-right">
|
||||||
|
|
||||||
|
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.sync_data'), admin_import_data_sync_conference_data_path(:user_id => @user.id), :class => 'btn btn-primary' %>
|
||||||
|
|
||||||
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.edit_brief_intro'), panel_personal_conference_back_end_personal_conference_intros_path(:user_id => @user.id), :class => 'btn btn-primary' %>
|
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.edit_brief_intro'), panel_personal_conference_back_end_personal_conference_intros_path(:user_id => @user.id), :class => 'btn btn-primary' %>
|
||||||
|
|
||||||
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('announcement.add_new'), new_panel_personal_conference_back_end_writing_conference_path(:user_id => @user.id), :class => 'btn btn-primary' %>
|
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('announcement.add_new'), new_panel_personal_conference_back_end_writing_conference_path(:user_id => @user.id), :class => 'btn btn-primary' %>
|
||||||
</div>
|
</div>
|
||||||
<div class="pagination pagination-centered">
|
<div class="pagination pagination-centered">
|
||||||
|
|||||||
+4
@@ -42,6 +42,10 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
|
|||||||
this.initializeJournalPapers.cancelpaper = function(){
|
this.initializeJournalPapers.cancelpaper = function(){
|
||||||
o.highlight_sub_menu_item(0);
|
o.highlight_sub_menu_item(0);
|
||||||
}
|
}
|
||||||
|
this.initializeJournalPapers.syncComplete = function(){
|
||||||
|
o.notify("Sync Complete","success");
|
||||||
|
o.sub_menu_item($("div[content-type=menu] a").eq(0));
|
||||||
|
}
|
||||||
|
|
||||||
var uploadFiles = function(){
|
var uploadFiles = function(){
|
||||||
$('#add_plugin_file a.add').click(function(){
|
$('#add_plugin_file a.add').click(function(){
|
||||||
|
|||||||
+2
-1
@@ -7,7 +7,8 @@ class Panel::PersonalJournal::Desktop::JournalPagesController < ApplicationContr
|
|||||||
page ||= 1
|
page ||= 1
|
||||||
|
|
||||||
@per_column = 5
|
@per_column = 5
|
||||||
|
|
||||||
|
@userid = current_user.id
|
||||||
case @view_by
|
case @view_by
|
||||||
when "abstract"
|
when "abstract"
|
||||||
@per_column = 1
|
@per_column = 1
|
||||||
|
|||||||
@@ -90,10 +90,12 @@ class WritingJournal
|
|||||||
end
|
end
|
||||||
|
|
||||||
def create_link
|
def create_link
|
||||||
title = ["\"#{self.paper_title}\""]
|
title = ["#{self.paper_title}"]
|
||||||
title << self.journal_title
|
title << self.journal_title if self.journal_title.present?
|
||||||
title.join(', ')
|
|
||||||
title << ( !self.journal_level_types.blank? ? "(#{self.journal_level_types.collect{|x| x.title}.join(', ')})" : nil)
|
title << ( !self.journal_level_types.blank? ? "(#{self.journal_level_types.collect{|x| x.title}.join(', ')})" : nil)
|
||||||
|
title << "Volume No: "+self.vol_no if (self.vol_no.present? && self.vol_no != "0")
|
||||||
|
title << "From Page: "+self.form_to_start if (self.form_to_start.present? && self.form_to_start != "0")
|
||||||
|
title << "To Page: "+self.form_to_end if (self.form_to_end.present? && self.form_to_end != "0")
|
||||||
title.join(', ')
|
title.join(', ')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
+4
@@ -58,6 +58,10 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="hh1 hp sdm">
|
||||||
|
<div class="sdm_t hh1"><a href="<%= admin_import_data_sync_journal_paper_data_path(:user_id => @userid) %>" class="icons-cycle" ajax-remote="get" response-type="json" callback-method="syncComplete" > Sync Books</a></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="hh1 hp sdm">
|
<div class="hh1 hp sdm">
|
||||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Vendored
+2
@@ -80,6 +80,8 @@
|
|||||||
<% if is_admin? %>
|
<% if is_admin? %>
|
||||||
<div class="bottomnav clearfix">
|
<div class="bottomnav clearfix">
|
||||||
<div class="action pull-right">
|
<div class="action pull-right">
|
||||||
|
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.sync_data'), admin_import_data_sync_journal_paper_data_path(:user_id => @user.id), :class => 'btn btn-primary' %>
|
||||||
|
|
||||||
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.edit_brief_intro'), panel_personal_journal_back_end_personal_journal_intros_path(:user_id => @user.id), :class => 'btn btn-primary' %>
|
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.edit_brief_intro'), panel_personal_journal_back_end_personal_journal_intros_path(:user_id => @user.id), :class => 'btn btn-primary' %>
|
||||||
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('announcement.add_new'), new_panel_personal_journal_back_end_writing_journal_path(:user_id => @user.id), :class => 'btn btn-primary' %>
|
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('announcement.add_new'), new_panel_personal_journal_back_end_writing_journal_path(:user_id => @user.id), :class => 'btn btn-primary' %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
vendor/built_in_modules/web_resource/app/views/panel/web_resource/front_end/web_links/index.html.erb
Vendored
+2
@@ -12,12 +12,14 @@
|
|||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
<% wlcg["web_links"].each do |post| %>
|
<% wlcg["web_links"].each do |post| %>
|
||||||
|
<% if !post["title"].blank? %>
|
||||||
<li>
|
<li>
|
||||||
<%= link_to post["title"], post["url"], {:target => '_blank', :title => post["title"], :class=>"o-links-title"} %>
|
<%= link_to post["title"], post["url"], {:target => '_blank', :title => post["title"], :class=>"o-links-title"} %>
|
||||||
<% if !post["is_hot"].blank? %><span class="o-links-hot"><%= t('hot')%></span><% end %>
|
<% if !post["is_hot"].blank? %><span class="o-links-hot"><%= t('hot')%></span><% end %>
|
||||||
<div class="o-links-description"><%= post["context"] %></div>
|
<div class="o-links-description"><%= post["context"] %></div>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Vendored
+1
-1
@@ -10,7 +10,7 @@
|
|||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
<% wlcg["web_links"].each do |post| %>
|
<% wlcg["web_links"].each do |post| %>
|
||||||
<% if !web_link.title.empty? %>
|
<% if !post["title"].blank? %>
|
||||||
<li>
|
<li>
|
||||||
<%= link_to post["title"], post["url"], {:target => '_blank', :title => post["title"], :class=>"o-links-title"} %>
|
<%= link_to post["title"], post["url"], {:target => '_blank', :title => post["title"], :class=>"o-links-title"} %>
|
||||||
<% if !post["is_hot"].blank? %><span class="o-links-hot"><%= t('hot')%></span><% end %>
|
<% if !post["is_hot"].blank? %><span class="o-links-hot"><%= t('hot')%></span><% end %>
|
||||||
|
|||||||
Reference in new issue
Block a user