Compare commits

..
Author SHA1 Message Date
Spen 4053ccbcdd sso for ntu mb all sites 2013-09-26 15:23:03 +08:00
103 changed files with 366 additions and 910 deletions

No files matched your search

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

+1 -1
View File
@@ -69,7 +69,7 @@ $(document).ready(function(){
$("input[type=checkbox]:checked").each(function(){
items_to_delete.push($(this).val());
})
$.post("/admin/assets/delete_files",{"files":items_to_delete,"type":type},function(){
$.post("<%= delete_files_admin_assets_path %>",{"files":items_to_delete,"type":type},function(){
deleteBtn.hide();
})
})
+6 -41
View File
@@ -29,9 +29,6 @@
//column="true" this option is only for column layout... the columns will be formed on this column=true attribute and it should be a div
//item=true this attribute should be present in the li tag. li with this attribute are considered as a separate item.
//enableLanguageSelect( dom ) children <a> will be binded with language, data-lang = string ex "en"|"zh_tw" will toggle all data-langunage throughout the page
//enableSharing( dom ) children <a> will be binded with share, data-mode = string ex "public"|"private" will change the mode for all the selected items. the dom with class should have data-link = url data-var = vaiable_name, default will be mode
$.extend($.expr[':'], {
'containsi': function (elem, i, match, array) {
@@ -226,8 +223,7 @@ var orbitDesktop = function(dom){
this.bindDesktopEvents = function(){ //this function will bind the global handlers to thd desktop, for example doc
$(".docklist a").click(function(){
if( !$( this ).hasClass( 'disable' ) )
o.menu_item($(this));
o.menu_item($(this));
return false;
});
@@ -275,11 +271,10 @@ var orbitDesktop = function(dom){
});
$("body").on("click","*[ajax-remote]",function(){
var $e = $(this),
t = $e.attr("ajax-remote"),
classes_to_toggle = $e.attr("toggle-onclick"),
responsetype = $e.attr('response-type') ? $e.attr('response-type') : "html",
exe = $e.attr("callback-method"); // (typeof $e.attr("callback-method") == "function"? $e.attr("callback-method") : "");
var $e = $(this);
var t = $e.attr("ajax-remote");
var classes_to_toggle = $e.attr("toggle-onclick");
var exe = $e.attr("callback-method"); // (typeof $e.attr("callback-method") == "function"? $e.attr("callback-method") : "");
if(classes_to_toggle){
$e.toggleClass(classes_to_toggle);
}
@@ -291,9 +286,9 @@ var orbitDesktop = function(dom){
}
var ca = $e.attr("content-holder");
var a = function(){
$.ajax({
type : t,
dataType : responsetype,
url : $e.attr("href"),
success : function(data){
if(typeof data == "string"){
@@ -304,7 +299,6 @@ var orbitDesktop = function(dom){
// $("div[container=true]").html(data);
}
}
if(exe)
window.o[o.data_method][exe](data,$e);
if(t == "delete"){
@@ -1887,35 +1881,6 @@ var orbitDesktop = function(dom){
return false;
});
}
this.enableSharing = function( dom ){
var el = $( dom ),
variable = ( el.data( 'var' ) ? el.data( "var" ) : "mode"),
_url = el.data( 'link' ) + "?" + variable + "=",
classes = [];
el.find( "a" ).each( function(){
classes.push( $( this ).attr( "item-class" ) ? $( this ).attr( "item-class" ) : $( this ).data( 'mode' ) );
})
el.find( "a" ).click( function(){
var ids = [],
mode = $( this ).data( 'mode' ),
inject_class = $( this ).attr( 'item-class' ) ? $( this ).attr( 'item-class' ) : mode;
$( ".overview li[item=true] a.icon-check" ).each( function(){
ids.push( $( this ).data( 'id' ) );
$( "li[data-id="+ $( this ).data( 'id' ) +"]").removeClass( classes.join( " " ) ).addClass( inject_class );
})
$.ajax({
url : _url + mode,
data : {"ids" : ids},
datatype : "json",
})
return false;
})
}
this.minimizeBarManager = function(){
var minimizedApps = [],
minimizeBar = $("#minimizebar");
+19 -20
View File
@@ -81,26 +81,25 @@ $(function() {
e.preventDefault();
});
$("#dialog").on(clickEvent, '.delete-item', function() {
var _v = [],
_t = $t.attr("rel");
$("tbody .list-check:checked").each(function() {
_v.push(this.value);
});
$.ajax({
url : _t,
type:"get",
data : {"ids":_v},
dataType : "json",
success : function(){
actionSuccess(_data.checkAction);
$("#dialog").on('show', function (e) {
$(this).find('.delete-item').on(clickEvent, function() {
var _v = [];
$("tbody .list-check").each(function() {
this.checked && _v.push("ids[]="+this.value)
});
var _t = $t.attr("rel");
if(_t.indexOf("?") > -1) {
$.ajax(_t + "&" + _v.join("&")).done(function() {
actionSuccess(_data.checkAction)
});
} else {
$.ajax(_t + "?" + _v.join("&")).done(function() {
actionSuccess(_data.checkAction)
});
}
$('#dialog').modal('hide');
$('.list-active-btn').addClass('disabled').data('actionable', false);
e.preventDefault();
})
$('#dialog').modal('hide');
$('.list-active-btn').addClass('disabled').data('actionable', false);
})
});
});
@@ -19,14 +19,6 @@
margin-left: 0;
}
}
.form_fix {
textarea {
margin-bottom: 12px;
}
input {
margin-left: 0;
}
}
// fixed width column with 12px gutter
// 276px width for 8 columns
// 420px width for 12 columns
@@ -323,29 +323,6 @@ a.admtxt.admbg2:hover {
float: left; }
.docklist .d_cate:hover .dock_child {
display: block; }
.disable {
opacity: .3;
}
.disable a {
cursor: not-allowed;
}
.private {
position: relative;
padding-right: 10px;
width: 300px;
opacity: .3 !important;
}
.private:after {
content: "\e073";
display: inline-block;
font-family: 'entypo';
font-size: 1.5em;
position: absolute;
right: 0;
text-align: center;
text-decoration: inherit;
top: 5px;
}
.fn_des.admtxt {
line-height: 60px;
@@ -737,8 +714,7 @@ a.admtxt.admbg2:hover {
/* list item */
.list_t_item {
overflow: hidden;
height: 100px; }
overflow: hidden; }
.list_t_title {
padding-bottom: 6px;
@@ -772,8 +748,7 @@ a.admtxt.admbg2:hover {
-webkit-text-size-adjust: none; }
.list_item_function a :first-child {
margin-left: 0; }
.datalist_item:hover .list_item_function,
.list_t_item:hover .list_item_function {
.datalist_item:hover .list_item_function {
bottom: 0; }
/* App */
-7
View File
@@ -39,13 +39,6 @@
.main-list td {
background-color: #FFFFFF;
}
.main-list td input[type="text"] {
margin-bottom: 0;
margin-left: -.4em;
margin-right: 3px;
padding: 0 .3em;
width: 4em;
}
.main-list td.action {
vertical-align: middle;
text-align: right;
@@ -258,206 +258,6 @@ class Admin::ImportDataController < OrbitBackendController
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")
+9 -9
View File
@@ -4,19 +4,19 @@ class Admin::PluginsController < ApplicationController
def index
@plugins = OrbitApp::Plugin::Registration.all
@plugins = OrbitApp::Plugin::Registration.all
if(!params[:show_plugin_profile].nil?)
@right_partial = OrbitApp::Plugin::Registration.find_by_app_name(params[:show_plugin_profile]).admin_partial_path
@right_partial = OrbitApp::Plugin::Registration.find_by_key(params[:show_plugin_profile]).admin_partial_path
if !@right_partial.blank?
respond_to do |format|
format.html { redirect_to( @right_partial ) }
end
else
@right_partial = ""
end
if !@right_partial.blank?
respond_to do |format|
format.html { redirect_to( @right_partial ) }
end
else
@right_partial = ""
end
else
@right_partial = ""
@@ -83,18 +83,9 @@ class Admin::UsersNewInterfaceController < OrbitMemberController
end
def show
@user = User.find(params[:id])
@plugins = OrbitApp::Plugin::Registration.all
@ppname = Array.new
@plugins.each do |aa|
@ppname << [aa.sort_number.to_i, [aa.name, aa.app_name, aa.intro_app_name, aa.front_partial_path]]
end
@plugin_shows = @ppname.sort.collect {|v| {"name"=>v[1][0],"app_name"=>v[1][1],"intro_app_name"=>v[1][2],"front_partial_path"=>v[1][3]} }
@profile_data = []
@teacher_data = []
@student_data = []
@@ -249,32 +240,6 @@ class Admin::UsersNewInterfaceController < OrbitMemberController
end
end
def edit_order
@users = User.not_guest_user
end
def update_order
if params[:users].present?
params[:users].values.sort.each do |pair|
to_go = pair[0].to_i
if to_go > 0
user_at_position = User.where(position: to_go - 1).first
user = User.find(pair[1])
if user_at_position && !(user_at_position == user)
if user.position > user_at_position.position
user.move_above(user_at_position)
else
user.move_below(user_at_position)
end
elsif to_go > User.count
user.move_to_bottom
end
end
end
end
@users = User.not_guest_user
end
protected
def get_tags
+5 -1
View File
@@ -271,7 +271,11 @@ module ApplicationHelper
end
def show_avatar(user)
image_tag(user.avatar.thumb.url)
if (user.avatar? rescue false)
image_tag(user.avatar.thumb.url)
else
image_tag "person.png"
end
end
# NTU link
-3
View File
@@ -1,8 +1,6 @@
class User
include Mongoid::Document
include Mongoid::Tree
include Mongoid::Tree::Ordering # use mongoid-tree because mongoid-ordering needs mongoid(~>3.0)
include Mongoid::Timestamps
devise :database_authenticatable, :recoverable, :rememberable, :trackable, :registerable, :validatable #, :timeoutable
@@ -16,7 +14,6 @@ class User
field :first_name, localize: true
field :last_name, localize: true
field :email
field :email_hidden, :type => Boolean, :default => false
field :sex, :default => 'unknown'
field :office_tel
field :cache_dept,type: Hash
-3
View File
@@ -21,9 +21,6 @@ class AvatarUploader < CarrierWave::Uploader::Base
# def default_url
# "/images/fallback/" + [version_name, "default.png"].compact.join('_')
# end
def default_url
[version_name, (Site.first.default_image.file.url rescue "person.png")].compact.join('_')
end
# Process files as they are uploaded:
# process :scale => [200, 300]
@@ -1 +0,0 @@
<p>Book Data Synced Successfully!</p>
@@ -1 +0,0 @@
<p>Conference Paper Data Synced Successfully!</p>
@@ -1 +0,0 @@
<p>Journal Paper Data Synced Successfully!</p>
@@ -7,8 +7,8 @@
<%= link_to t(:all_plugin_summary)%>
<% end -%>
<% @plugins.each do |plugin| %>
<%= content_tag :li, :class=>(params[:show_plugin_profile] == plugin.app_name ? "active" : nil) do %>
<%= link_to plugin.name, admin_plugins_path(:show_plugin_profile => plugin.app_name) %>
<%= content_tag :li, :class=>(params[:show_plugin_profile] == plugin.name ? "active" : nil) do %>
<%= link_to plugin.name, admin_plugins_path(:show_plugin_profile => plugin.name) %>
<% end -%>
<% end -%>
@@ -1,13 +1,12 @@
<div class="bottomnav clearfix">
<div class="action pull-right">
<% if is_admin? %>
<%= link_to t(:edit_order), edit_order_admin_users_new_interface_index_path, :class => "btn btn-primary" %>
<%= link_to(new_admin_users_new_interface_path,:class=> "btn btn-primary") do %>
<i class="icon-plus"></i><%= t(:add) %>
<% end -%>
<% end -%>
</div>
<div class="pagination pagination-centered">
<%= paginate @users, :params => {:inner => false} %>
</div>
</div>
<div class="bottomnav clearfix">
<div class="action pull-right">
<% if is_admin? %>
<%= link_to(new_admin_users_new_interface_path,:class=> "btn btn-primary pull-right") do%>
<i class="icon-plus"></i><%= t(:add)%>
<% end -%>
<%end -%>
</div>
<div class="pagination pagination-centered">
<%= paginate @users, :params => {:inner => false}%>
</div>
</div>
@@ -6,7 +6,6 @@
<%= stylesheet_link_tag "lib/main-list" %>
<%= stylesheet_link_tag "lib/filter" %>
<%= stylesheet_link_tag "lib/member" %>
<%= stylesheet_link_tag "lib/togglebox" %>
<% end -%>
<% content_for :page_specific_javascript do -%>
@@ -94,13 +94,7 @@
<%= f.email_field :email %>
</div>
</div>
<div class="control-group">
<%= f.label "Disable email", :class=>"control-label muted" %>
<div class="controls">
<%= f.check_box :email_hidden %>
</div>
</div>
<!-- ID Number -->
<div class="control-group">
<%= f.label t("users.sid"),:class=>"control-label muted" %>
@@ -1,15 +0,0 @@
<%
if user_edit_order.sex == 'male'
@user_sex = 'gender-man'
elsif user_edit_order.sex == 'female'
@user_sex = 'gender-woman'
else
@user_sex = 'gender-none'
end
%>
<tr id="<%= dom_id user_edit_order %>">
<td class="<%= @user_sex %>"></td>
<td><%= link_to user_edit_order.position + 1, '#', class: 'edit_position', 'data-user-id' => user_edit_order.id %></td>
<td><%= link_to user_edit_order.name, admin_users_new_interface_path(user_edit_order) %></td>
<td><%= user_edit_order.email %></td>
</tr>
@@ -15,7 +15,7 @@
<%= link_to(content_tag(:i, nil, :class => 'icon-key'),'#',:class=>"key" ) if is_admin?%>
<%= link_to(content_tag(:i, nil, :class => 'icon-trash'), admin_users_new_interface_path(user_for_summary, :at=>params[:at]), :confirm => t(:sure?), :method => :delete, :class=>"trash", :remote => true) if is_admin? %>
</div>
<%= image_tag(user_for_summary.avatar) %>
<%= show_avatar(user_for_summary) %>
</div>
<div class="member-info">
<h4 class="member-name"><%= link_to user_for_summary.name,admin_users_new_interface_path(user_for_summary)%></h4>
@@ -16,7 +16,7 @@
<%= link_to(content_tag(:i, nil, :class => 'icon-trash'), admin_users_new_interface_path(user_for_thumbnail, :at=>params[:at]), :confirm => t(:sure?), :method => :delete, :class=>"trash", :remote => true) if is_admin? %>
</div>
<%= image_tag(user_for_thumbnail.avatar) %>
<%= show_avatar(user_for_thumbnail) %>
</div>
<h4 class="member-name text-center"><%= link_to user_for_thumbnail.name,admin_users_new_interface_path(user_for_thumbnail)%></h4>
</li>
@@ -1,65 +0,0 @@
<% content_for :side_bar do %>
<%= render :partial => 'admin/users_new_interface/side_bar' %>
<% end %>
<% content_for :page_specific_css do -%>
<%= stylesheet_link_tag "lib/member" %>
<% end -%>
<div id="list-view">
<table id="member-list" class="table main-list">
<thead>
<tr class="sort-header">
<th class="gender"></th>
<th class="span2"><a href="#"><%= t(:position) %></a></th>
<th class="span4"><a href="#"><%= t(:name) %></a></th>
<th><a href="#"><%= t(:email) %></a></th>
</tr>
</thead>
<tbody>
<%= render partial: "user_edit_order", collection: @users %>
</tbody>
</table>
</div>
<div class="bottomnav clearfix">
<div class="action pull-right">
<%= link_to t(:update_), '#', class: "btn btn-primary pull-right" %>
</div>
</div>
<% content_for :page_specific_javascript do %>
<script>
$(function(){
var _userPosition = [];
$('#member-list').on(clickEvent, '.edit_position', function(e){
var $input = $('<input type="text">');
var $cross = $('<a class="btn btn-mini"><i class="icons-cross"/></a>');
$(this).after($cross);
$(this).after($input);
$(this).hide();
$input.val($(this).text()).attr('id', $(this).data('user-id'));
e.preventDefault();
$cross.click(function(event) {
$input.remove();
$(this).siblings('a').show().end().remove();
});
});
$('.bottomnav').on(clickEvent, '.btn', function(e) {
$('#member-list tbody input').each(function() {
_userPosition.push([$(this).val(), $(this).attr('id')])
});
e.preventDefault();
$.ajax({
url: '<%= update_order_admin_users_new_interface_index_path %>',
type: 'POST',
dataType: 'script',
data: {users: _userPosition}
}).done(function() {
_userPosition = [];
console.log(_userPosition)
});
});
});
</script>
<% end %>
@@ -5,6 +5,7 @@
<%= render :partial => "js_and_css"%>
<% content_for :page_specific_javascript do -%>
<%= javascript_include_tag "lib/jquery.lite.image.resize.js" %>
<%= javascript_include_tag "lib/member/member.js" %>
<%= javascript_include_tag "lib/footable-0.1.js" %>
<% end -%>
@@ -22,7 +23,6 @@
<%= link_to("<i class='icon-edit'></i> #{t(:edit)}".html_safe,edit_admin_users_new_interface_path(@user),:class=>"btn btn-mini" ) if is_admin?%>
<%= link_to("<i class='icons-cycle'></i> #{t("users.change_passwd")}".html_safe,admin_users_new_interface_edit_passwd_path(@user),:class=>"btn btn-mini" ) if is_admin?%>
</div>
</div>
<div id="member-roles" class="nano">
@@ -51,9 +51,9 @@
<a data-toggle="dropdown" class="dropdown-toggle" href="#">Module List <b class="caret"></b></a>
<ul class="dropdown-menu">
<% @plugin_shows.each do |plugin| %>
<%= content_tag :li, :class=>(params[:show_plugin_profile] == plugin["app_name"] ? "active" : nil) do %>
<%= link_to plugin["name"], :show_plugin_profile => plugin["app_name"] %>
<% @plugins.each do |plugin| %>
<%= content_tag :li, :class=>(params[:show_plugin_profile] == plugin.app_name ? "active" : nil) do %>
<%= link_to plugin.name, :show_plugin_profile => plugin.app_name %>
<% end -%>
<% end -%>
@@ -1 +0,0 @@
$('#list-view table tbody').html("<%= j render partial: 'user_edit_order', collection: @users %>")
+12 -12
View File
@@ -32,32 +32,32 @@
<li class="dock_item"><a callback-method='initializePersonalExperience' href="<%= panel_personal_experience_desktop_experience_window_path %>" class="widget_fn wh2 hh2" id='d_working' onclick="return false;"><span class="widget_icon"><img src="" alt="Working" id="working_icon" width="30" height="30"/></span></a></li>
<li class="dock_item"><a callback-method='initializePersonalDiploma' href="<%= panel_personal_diploma_desktop_diploma_window_path %>" class="widget_fn wh2 hh2" id='d_education' onclick="return false;"><span class="widget_icon"><img src="" alt="Education" id="education_icon" width="30" height="30"/></span></a></li>
<li class="dock_item"><a callback-method='initializePersonalHonor' href="<%= panel_personal_honor_desktop_honor_window_path %>" class="widget_fn wh2 hh2" id='d_honors' onclick="return false;"><span class="widget_icon"><img src="" alt="Honors" id="honors_icon" width="30" height="30"/></span></a></li>
<li class="dock_item disable"><a callback-method='' href="activities" class="widget_fn wh2 hh2" id='d_activities' onclick="return false;"><span class="widget_icon disable"><img src="" alt="Activities" id="activities_icon" width="30" height="30"/></span></a></li>
<li class="dock_item disable"><a callback-method='' href="clubs" class="widget_fn wh2 hh2" id='d_clubs' onclick="return false;"><span class="widget_icon"><img src="" alt="Clubs" id="clubs_icon" width="30" height="30"/></span></a></li>
<li class="dock_item"><a callback-method='' href="activities" class="widget_fn wh2 hh2" id='d_activities' onclick="return false;"><span class="widget_icon"><img src="" alt="Activities" id="activities_icon" width="30" height="30"/></span></a></li>
<li class="dock_item"><a callback-method='' href="clubs" class="widget_fn wh2 hh2" id='d_clubs' onclick="return false;"><span class="widget_icon"><img src="" alt="Clubs" id="clubs_icon" width="30" height="30"/></span></a></li>
</ul>
</li>
<li class="d_cate"><a callback-method='' href="" class="widget_fn wh2 hh2" id='d_landt' onclick="return false;"><span class="widget_icon"><img src="" alt="Learning & Teaching" id="landt_icon" width="30" height="30"/></span></a>
<ul class="dock_child hh2 thmc4" style="width: 180px;">
<li class="dock_item disable"><a callback-method='' href="courses" class="widget_fn wh2 hh2" id='d_courses' onclick="return false;"><span class="widget_icon"><img src="" alt="Courses" id="courses_icon" width="30" height="30"/></span></a></li>
<li class="dock_item disable"><a callback-method='' href="homework" class="widget_fn wh2 hh2" id='d_homework' onclick="return false;"><span class="widget_icon"><img src="" alt="Homework" id="homework_icon" width="30" height="30"/></span></a></li>
<li class="dock_item disable"><a callback-method='' href="certification" class="widget_fn wh2 hh2" id='d_certification' onclick="return false;"><span class="widget_icon"><img src="" alt="Certification" id="certification_icon" width="30" height="30"/></span></a></li>
<li class="dock_item"><a callback-method='' href="courses" class="widget_fn wh2 hh2" id='d_courses' onclick="return false;"><span class="widget_icon"><img src="" alt="Courses" id="courses_icon" width="30" height="30"/></span></a></li>
<li class="dock_item"><a callback-method='' href="homework" class="widget_fn wh2 hh2" id='d_homework' onclick="return false;"><span class="widget_icon"><img src="" alt="Homework" id="homework_icon" width="30" height="30"/></span></a></li>
<li class="dock_item"><a callback-method='' href="certification" class="widget_fn wh2 hh2" id='d_certification' onclick="return false;"><span class="widget_icon"><img src="" alt="Certification" id="certification_icon" width="30" height="30"/></span></a></li>
</ul>
</li>
<li class="d_cate"><a callback-method='' href="" class="widget_fn wh2 hh2" id='d_personal' onclick="return false;"><span class="widget_icon"><img src="" alt="Personal" id="personal_icon" width="30" height="30"/></span></a>
<ul class="dock_child hh2 thmc4" style="width: 300px;">
<li class="dock_item disable"><a callback-method='' href="mypage" class="widget_fn wh2 hh2" id='d_mypage' onclick="return false;"><span class="widget_icon"><img src="" alt="myPage" id="mypage_icon" width="30" height="30"/></span></a></li>
<li class="dock_item disable"><a callback-method='' href="blog" class="widget_fn wh2 hh2" id='d_blog' onclick="return false;"><span class="widget_icon"><img src="" alt="Blog" id="blog_icon" width="30" height="30"/></span></a></li>
<li class="dock_item disable"><a callback-method='' href="album" class="widget_fn wh2 hh2" id='d_album' onclick="return false;"><span class="widget_icon"><img src="" alt="Album" id="album_icon" width="30" height="30"/></span></a></li>
<li class="dock_item disable"><a callback-method='' href="calendar" class="widget_fn wh2 hh2" id='d_calendar' onclick="return false;"><span class="widget_icon"><img src="" alt="Calendar" id="calendar_icon" width="30" height="30"/></span></a></li>
<li class="dock_item disable"><a callback-method='' href="files" class="widget_fn wh2 hh2" id='d_files' onclick="return false;"><span class="widget_icon"><img src="" alt="Files" id="files_icon" width="30" height="30"/></span></a></li>
<li class="dock_item"><a callback-method='' href="mypage" class="widget_fn wh2 hh2" id='d_mypage' onclick="return false;"><span class="widget_icon"><img src="" alt="myPage" id="mypage_icon" width="30" height="30"/></span></a></li>
<li class="dock_item"><a callback-method='' href="blog" class="widget_fn wh2 hh2" id='d_blog' onclick="return false;"><span class="widget_icon"><img src="" alt="Blog" id="blog_icon" width="30" height="30"/></span></a></li>
<li class="dock_item"><a callback-method='' href="album" class="widget_fn wh2 hh2" id='d_album' onclick="return false;"><span class="widget_icon"><img src="" alt="Album" id="album_icon" width="30" height="30"/></span></a></li>
<li class="dock_item"><a callback-method='' href="calendar" class="widget_fn wh2 hh2" id='d_calendar' onclick="return false;"><span class="widget_icon"><img src="" alt="Calendar" id="calendar_icon" width="30" height="30"/></span></a></li>
<li class="dock_item"><a callback-method='' href="files" class="widget_fn wh2 hh2" id='d_files' onclick="return false;"><span class="widget_icon"><img src="" alt="Files" id="files_icon" width="30" height="30"/></span></a></li>
</ul>
</li>
<li class="d_cate"><a callback-method='initializeOrbitTimeline' href="<%= desktop_orbit_orbit_path %>" class="widget_fn wh2 hh2" id='d_orbit' onclick="return false;"><span class="widget_icon"><img src="" alt="Orbit" id="orbit_icon" width="30" height="30"/></span></a>
<ul class="dock_child hh2 thmc4" style="width: 60px;">
<li class="dock_item disable"><a callback-method='' href="" class="widget_fn wh2 hh2" id='d_connection' onclick="return false;"><span class="widget_icon"><img src="" alt="Academia Connection" id="connection_icon" width="30" height="30"/></span></a></li>
<li class="dock_item"><a callback-method='' href="" class="widget_fn wh2 hh2" id='d_connection' onclick="return false;"><span class="widget_icon"><img src="" alt="Academia Connection" id="connection_icon" width="30" height="30"/></span></a></li>
</ul>
</li>
<li class="d_cate disable"><a callback-method='initializeAppstore' href="<%= desktop_appstore_appstore_path %>" class="widget_fn wh2 hh2" id='d_appstore' onclick="return false;"><span class="widget_icon"><img src="" alt="AppStore" id="appstore_icon" width="30" height="30"/></span></a></li>
<li class="d_cate"><a callback-method='initializeAppstore' href="<%= desktop_appstore_appstore_path %>" class="widget_fn wh2 hh2" id='d_appstore' onclick="return false;"><span class="widget_icon"><img src="" alt="AppStore" id="appstore_icon" width="30" height="30"/></span></a></li>
</ul>
<div class="fn_des hh2 admbg admtxt"></div>
</div>
+2 -2
View File
@@ -1,4 +1,4 @@
<%= javascript_include_tag "lib/jquery.cycle.all.latest.js"%>
<script type='text/javascript' src='/assets/jquery.cycle.all.latest.js'></script>
<div style='position:relative'>
<ul id='banner_nav' class='clear banner_nav-<%= @ad_banner.title.dehumanize %>'></ul>
<div id='slideshow-<%= @ad_banner.title.dehumanize %>' class='slideshow'>
@@ -24,4 +24,4 @@ $(document).ready(function(){
});
});
});
</script>
</script>
+1 -1
View File
@@ -33,7 +33,7 @@
<ul class="dropdown-menu" role="menu" aria-labelledby="orbit-user">
<li><%= link_to content_tag(:i, nil, class: 'icons-tools') + ' ' + t(:account_settings), desktop_path + "#settings-account", tabindex: '-1' %></li>
<li><%= link_to content_tag(:i, nil, class: 'icons-screen') + ' ' + t(:desktop), desktop_path, tabindex: '-1' %></li>
<li><%= link_to content_tag(:i, nil, class: 'icons-logout') + ' ' + t(:logout), user_logout_path, tabindex: '-1' %></li>
<li><%= link_to content_tag(:i, nil, class: 'icons-logout') + ' ' + t(:logout), destroy_user_session_path, tabindex: '-1' %></li>
<li class="divider"></li>
<li><a tabindex="-1" href="#"><i class="icons-lifebuoy"></i> <%= t(:help) %></a></li>
</ul>
-2
View File
@@ -16,7 +16,6 @@ en:
deselect_all: Deselect all
detail: Detail
edit_category: Edit Categorie
edit_order: Edit order
editing:
tag: Editing tag
file:
@@ -38,7 +37,6 @@ en:
no_date: No date
no_file: No file
path: Path
position: Position
previous: Previous
remove: Remove
remove_default: Remove default
-73
View File
@@ -1,73 +0,0 @@
zh_tw:
add_category: 新增類別
add_link: 新增連結
add_page: 新增頁面
add_to_default: 加入預設
alternative: 註解
approval_setting: 審核設定
authorization_: 授權
change: 更換
change_file: 更換檔案
create:
error:
category: 建立類別時發生錯誤
tag: 建立標籤時發生錯誤
delete_warning: 刪除後無法還原,您確定要刪除嗎?
deselect_all: 取消全選
detail: 細節
edit_category: 編輯類別
edit_order: 編輯排序
editing:
tag: 編輯標籤
file:
name: 檔案名稱
front_page:
name_language: 網站標題
select_template: 選擇樣版
select_themes: 選擇主題
select_module: 選擇模組
language: 語言
login_orbit: 登入 Orbit
merge: 合併
new:
tag: 新增標籤
next: 下一頁
no_app: 無模組
no_category: 無可用類別
no_data: 無資料
no_date: 無日期
no_file: 無檔案
path: 路徑
position: 排序
previous: 上一頁
remove: 移除
remove_default: 移除預設
restful_actions:
create: 建立
delete: 刪除
edit: 編輯
index: Index
new: 新增
show: Show
update: 更新
search:
tags: 搜尋標籤
select_all: 全選
select_file: 選擇檔案
select_image: 選擇圖片
sort_number: 排序數
tag:
add: 新增標籤
delete: 刪除標籤
new_name: 新標籤名稱
merge_help: 自訂新標籤名稱或點選下方標籤
merger: 合併標籤
remove_default: 移除預設標籤
warning:
delete: 刪除後無法還原,您確定要刪除嗎?
remove_default: 您確定要移除此預設標籤嗎?
update:
error:
tag: 更新類別時發生錯誤
tag: 更新標籤時發生錯誤
url_alt: 註解
-7
View File
@@ -215,9 +215,6 @@ Orbit::Application.routes.draw do
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
@@ -233,10 +230,6 @@ Orbit::Application.routes.draw do
member do
get 'temp_edit'
end
collection do
get 'edit_order'
post 'update_order'
end
match "edit_passwd" => "users_new_interface#edit_passwd" ,:as => :edit_passwd
end
-5
View File
@@ -53,7 +53,6 @@ module OrbitApp
def initialize(name,partial=nil,*args ,&block)
@base_path = args[0][:base_path]
@name = partial[0][:i18n].nil? ? name : lambda{ I18n.t(partial[0][:i18n]) }
@sort_number = partial[0][:sort_number]
@app_name = partial[0][:app_name]
@intro_app_name = partial[0][:intro_app_name]
@partial_path = ''
@@ -69,10 +68,6 @@ module OrbitApp
block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given?
end
def sort_number
return @sort_number
end
def app_name
return @app_name
end
+1 -1
View File
@@ -46,7 +46,7 @@ module OrbitTag
def tags=(tag_ids)
tag_ids = [tag_ids].flatten
tag_ids.delete_if{|e| e.match(/^[0-1]$|^$/)}
tag_ids.delete('')
ids = self.taggings.blank? ? [] : self.taggings.map{|t| t.tag.id}
tag_ids.each do |tag_id|
unless ids.include? tag_id
-4
View File
@@ -91,8 +91,4 @@ namespace :new_ui do
end
end
task :save_users => :environment do
User.all.each(&:save)
end
end
+2 -2
View File
@@ -23,7 +23,7 @@ module Announcement
end
# category ["BulletinCategory"]
data_count 1..10
data_count 3..10
authorizable
approvable
@@ -37,7 +37,7 @@ module Announcement
image :image
field :postdate
link_field :title,{:method => 'panel_announcement_front_end_bulletin_path',:args=>:self}
link_field :bulletin_category_with_title,{:method => 'panel_announcement_front_end_bulletins_path',:args=>{:category_id => [:category,:id]}}
link_field :bulletin_category_with_title,{:method => 'panel_announcement_front_end_bulletins_path',:args=>{:category_id => [:bulletin_category,:id]}}
field :subtitle
link_to_more 'panel_announcement_front_end_bulletins_path',:title_i18n=> 'more_plus'
end
+1 -1
View File
@@ -27,7 +27,7 @@ module Faq
default_widget do
query 'Qa.all'
# enable ['typeA']
link_field :qa_category_with_title,{:method => 'panel_faq_front_end_qas_path',:args=>{:category_id => [:category,:id]}}
link_field :qa_category_with_title,{:method => 'panel_faq_front_end_qas_path',:args=>{:category_id => [:qa_category,:id]}}
link_field :title, {:method => 'panel_faq_front_end_qa_path',:args=>:self}
link_to_more 'panel_faq_front_end_qas_path',:title_i18n=> 'faq.default_widget.to_more'
end
@@ -50,13 +50,6 @@ class Panel::Member::FrontEnd::MemberListsController < OrbitWidgetController
@plugins = OrbitApp::Plugin::Registration.all
@ppname = Array.new
@plugins.each do |aa|
@ppname << [aa.sort_number.to_i, [aa.name, aa.app_name, aa.intro_app_name, aa.front_partial_path]]
end
@plugin_shows = @ppname.sort.collect {|v| {"name"=>v[1][0],"app_name"=>v[1][1],"intro_app_name"=>v[1][2],"front_partial_path"=>v[1][3]} }
@profile_data = []
attribute_values = @member.attribute_values.asc("_id")
@@ -1,30 +0,0 @@
<% show_office_field.attribute_fields.where(:disabled=>false).asc(:_id).each do |rf| %>
<%
if !@member.get_attribute_value(rf).blank?
if !@member.get_attribute_value(rf)['val'].blank?
@rodata = @member.get_attribute_value(rf)['val']
elsif !@member.get_attribute_value(rf)[I18n.locale].blank?
@rodata = @member.get_attribute_value(rf)[I18n.locale]
else
@rodata = nil
end
if !@rodata.blank? and !@member.get_attribute_value(rf).get_value_by_locale(I18n.locale).blank?
%>
<tr>
<% if (rf.title == "Office" || rf.title == "研究室")%>
<td><%= rf.title %></td>
<td><%= nl2br(show_attribute_value(@member.get_attribute_value(rf).get_value_by_locale(I18n.locale))) rescue '' %></td>
</tr>
<%end%>
</tr>
<% end -%>
<% end -%>
<% end -%>
@@ -1,30 +0,0 @@
<% show_research_field.attribute_fields.where(:disabled=>false).asc(:_id).each do |rf| %>
<%
if !@member.get_attribute_value(rf).blank?
if !@member.get_attribute_value(rf)['val'].blank?
@rodata = @member.get_attribute_value(rf)['val']
elsif !@member.get_attribute_value(rf)[I18n.locale].blank?
@rodata = @member.get_attribute_value(rf)[I18n.locale]
else
@rodata = nil
end
if !@rodata.blank? and !@member.get_attribute_value(rf).get_value_by_locale(I18n.locale).blank?
%>
<tr>
<% if (rf.title == "Research Field"|| rf.title == "研究領域")%>
<td><%= rf.title %></td>
<td><%= nl2br(show_attribute_value(@member.get_attribute_value(rf).get_value_by_locale(I18n.locale))) rescue '' %></td>
</tr>
<%end%>
</tr>
<% end -%>
<% end -%>
<% end -%>
@@ -1,3 +1,26 @@
<%
@status = @member.role_statuses.where(:role_id=>show_roles.id)
if !@status.blank?
%>
<tr>
<td><%= t('status')%></td>
<td><%= show_attribute_value(@member.role_statuses.where(:role_id=>show_roles.id).map{|t|t.title.to_s}.join(',')) rescue '' %></td>
</tr>
<% end -%>
<%
@category = @member.role_categorys.where(:role_id=>show_roles.id)
if !@category.blank?
%>
<tr>
<td><%= t('category')%></td>
<td><%= show_attribute_value(@member.role_categorys.where(:role_id=>show_roles.id).map{|t|t.title.to_s}.join(',')) rescue '' %></td>
</tr>
<% end -%>
<% show_roles.attribute_fields.where(:disabled=>false).asc(:_id).each do |rf| %>
@@ -11,7 +34,7 @@
@rodata = nil
end
if !@rodata.blank? and !@member.get_attribute_value(rf).get_value_by_locale(I18n.locale).blank? and rf.key != 'job_title'
if !@rodata.blank? and !@member.get_attribute_value(rf).get_value_by_locale(I18n.locale).blank?
%>
<tr>
@@ -18,8 +18,6 @@
<div class="o-members">
<% @member_status.each do |ms| %>
<% if @member_lists.where(:role_status_ids=>ms.id).count > 0 %>
<h3 class="o-members-category h3"><%= ms.title %></h3>
<ul class="o-members-list">
@@ -30,18 +28,8 @@
<div class="o-members-pic"><%= show_avatar(member) %></div>
<ul class="o-members-info">
<li><b class="o-members-label"><%= t("users.name")%></b><%= link_to member.name, panel_member_front_end_member_list_path(member.id), {:class => "o-members-link"} %></li>
<% @job_title = show_attribute_value(@member_lists.get_member_list_attribute_value(member.id,"teacher","job_title").get_value_by_locale(I18n.locale))
if @job_title != 'NoData' and !@job_title.blank?
%>
<li><b class="o-members-label">
<%= @member_lists.get_member_list_attribute_field_name("teacher","job_title") %></b>
<%= @job_title %>
</li>
<% end %>
<% if !member.email_hidden? %>
<li><b class="o-members-label"><%= t("users.email")%></b><%= member.email %></li>
<% end %>
<li><b class="o-members-label"><%= @member_lists.get_member_list_attribute_field_name("teacher","job_title") %></b><%= show_attribute_value(@member_lists.get_member_list_attribute_value(member.id,"teacher","job_title").get_value_by_locale(I18n.locale)) %></li>
<li><b class="o-members-label"><%= t("users.email")%></b><%= member.email %></li>
<li><b class="o-members-label"><%= t("users.office_tel")%></b><%= member.office_tel %></li>
</ul>
</li>
@@ -52,8 +40,6 @@
<% end %>
<% end %>
</div>
<% elsif @item.frontend_style == 'Two' or @item.frontend_style.blank? %>
@@ -66,8 +52,6 @@
<% @member_status.each do |ms| %>
<% if @member_lists.where(:role_status_ids=>ms.id).count > 0 %>
<h3 class="o-members-category h3"><%= ms.title %></h3>
<ul class="o-members-list">
@@ -77,14 +61,8 @@
<div class="o-members-pic"><%= show_avatar(member) %></div>
<ul class="o-members-info">
<li><b class="o-members-label"><%= t("users.name")%></b><%= link_to member.name, panel_member_front_end_member_list_path(member.id), {:class => "o-members-link"} %></li>
<% @job_title = show_attribute_value(@member_lists.get_member_list_attribute_value(member.id,"teacher","job_title").get_value_by_locale(I18n.locale))
if @job_title != 'NoData' and !@job_title.blank?
%>
<li><b class="o-members-label"><%= @member_lists.get_member_list_attribute_field_name("teacher","job_title") %></b><%= @job_title %></li>
<% end %>
<% if !member.email_hidden? %>
<li><b class="o-members-label"><%= t("users.email")%></b> <%= member.email %></li>
<% end %>
<li><b class="o-members-label"><%= @member_lists.get_member_list_attribute_field_name("teacher","job_title") %></b><%= show_attribute_value(@member_lists.get_member_list_attribute_value(member.id,"teacher","job_title").get_value_by_locale(I18n.locale)) %></li>
<li><b class="o-members-label"><%= t("users.email")%></b> <%= member.email %></li>
<li><b class="o-members-label"><%= t("users.office_tel")%></b><%= member.office_tel %></li>
</ul>
</li>
@@ -95,8 +73,6 @@
<% end %>
<% end %>
</div>
<% end %>
@@ -2,28 +2,6 @@
<div class="member-data">
<table>
<tbody>
<%
@member_role = @member.roles.asc(:created_at).first
@category = @member.role_categorys.where(:role_id=>@member_role.id)
if !@category.blank?
%>
<tr>
<td><%= t('category')%></td>
<td><%= show_attribute_value(@member.role_categorys.where(:role_id=>@member_role.id).map{|t|t.title.to_s}.join(',')) rescue '' %></td>
</tr>
<% end -%>
<% @job_title = show_attribute_value(User.get_member_list_attribute_value(@member.id,"teacher","job_title").get_value_by_locale(I18n.locale))
if @job_title != 'NoData' and !@job_title.blank?
%>
<tr>
<td><%= User.get_member_list_attribute_field_name("teacher","job_title") %></td>
<td><%= @job_title %></td>
</tr>
<% end -%>
<tr>
<td><%= t('users.name')%></td>
<td><%= @member.name%></td>
@@ -32,12 +10,22 @@
<td><%= t('users.email')%></td>
<td><a href="mailto:<%= @member.email %>"><%= @member.email %></a></td>
</tr>
<% if !@member.sid.blank? %>
<tr>
<td><%= t('users.sid')%></td>
<td><%= @member.sid%></td>
</tr>
<% end %>
<% if !@member.office_tel.blank? %>
<tr>
<td><%= t('users.office_tel')%></td>
<td><%= @member.office_tel%></td>
</tr>
<% end %>
<tr>
<td><%= t('users.sex')%></td>
<td><%= t("users.#{@member.sex}") %></td>
</tr>
<% @profile_data.each do |item| %>
<% if !item[:value].blank? %>
@@ -55,29 +43,29 @@
</div>
<div class="member-pic">
<%= image_tag(@member.avatar) %>
<%= show_avatar(@member) %>
</div>
<div class="member-module">
<div class="module-nav">
<ul>
<%
@plugin_shows.each do |plugin|
@plugins.each do |plugin|
@data = plugin["app_name"].classify.constantize.where(is_hidden: false, :create_user_id=>@member.id)
@intro_data = plugin["intro_app_name"].classify.constantize.where(:user_id=>@member.id).first
@data = plugin.app_name.classify.constantize.where(is_hidden: false, :create_user_id=>@member.id)
@intro_data = plugin.intro_app_name.classify.constantize.where(:user_id=>@member.id).first
%>
<% if !@intro_data.blank? %>
<% if !@intro_data.brief_intro.blank? or !@intro_data.complete_list.blank? %>
<li><a href="#<%= plugin["name"].gsub(' ', '') %>"><%= plugin["name"] %></a></li>
<li><a href="#<%= plugin.name.gsub(' ', '') %>"><%= plugin.name %></a></li>
<% end %>
<% else %>
<% if !@data.blank? %>
<li><a href="#<%= plugin["name"].gsub(' ', '') %>"><%= plugin["name"] %></a></li>
<li><a href="#<%= plugin.name.gsub(' ', '') %>"><%= plugin.name %></a></li>
<% end %>
<% end %>
@@ -87,18 +75,18 @@
</div>
<div class="module-content">
<%
@plugin_shows.each do |plugin|
@plugins.each do |plugin|
@plugin_partial = !plugin["front_partial_path"].blank? ? OrbitApp::Plugin::Registration.find_by_key(plugin["name"]).front_partial_path : nil
@plugin_partial = !plugin.front_partial_path.blank? ? OrbitApp::Plugin::Registration.find_by_key(plugin.name).front_partial_path : nil
@data = plugin["app_name"].classify.constantize.where(:create_user_id=>@member.id)
@intro_data = plugin["intro_app_name"].classify.constantize.where(:user_id=>@member.id).first
@data = plugin.app_name.classify.constantize.where(:create_user_id=>@member.id)
@intro_data = plugin.intro_app_name.classify.constantize.where(:user_id=>@member.id).first
%>
<% if !@intro_data.blank? %>
<% if !@intro_data.brief_intro.blank? or !@intro_data.complete_list.blank? %>
<div class="module-pane" id="<%= plugin["name"].gsub(' ', '') %>">
<div class="module-pane" id="<%= plugin.name.gsub(' ', '') %>">
<%= render :partial => @plugin_partial if !@plugin_partial.blank? %>
</div>
<% end %>
@@ -106,7 +94,7 @@
<% else %>
<% if !@data.blank? %>
<div class="module-pane" id="<%= plugin["name"].gsub(' ', '') %>">
<div class="module-pane" id="<%= plugin.name.gsub(' ', '') %>">
<%= render :partial => @plugin_partial if !@plugin_partial.blank? %>
</div>
<% end %>
@@ -29,7 +29,6 @@ orbitDesktop.prototype.initializePersonalBook = function(target,url,cache){ // t
return false;
})
}
o.enableSharing("div.share_mode");
}
this.initializePersonalBook.bookDelete = function(data,dom){
var parent = dom.parent().parent().parent();
@@ -93,11 +92,6 @@ orbitDesktop.prototype.initializePersonalBook = function(target,url,cache){ // t
});
}
this.initializePersonalBook.syncComplete = function(){
o.notify("Sync Complete","success");
o.sub_menu_item($("div[content-type=menu] a").eq(0));
}
this.initializePersonalBook.coAuthorformCallback = function(data){
if(data.success){
o.notify(data.msg,"success");
@@ -282,7 +282,6 @@ class Panel::PersonalBook::BackEnd::WritingBooksController < OrbitBackendControl
respond_to do |format|
format.html { redirect_to(admin_users_new_interface_url(:id=>params[:user_id],:show_plugin_profile=>"WritingBook")) }
format.json { render json: {"success"=>true}.to_json}
end
@@ -7,7 +7,7 @@ class Panel::PersonalBook::Desktop::PersonalBooksController < ApplicationControl
page ||= 1
@per_column = 5
@userid = current_user.id
case @view_by
when "abstract"
@per_column = 1
@@ -2,26 +2,23 @@ module Panel::PersonalBook::Desktop::PersonalBooksHelper
def publication_record publication, view
content_tag :li,
"item" => "true",
"data-id" => publication.id.to_s,
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
marker(publication.id) + \
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" }" do
marker + \
content(publication, view) + \
edit_or_delete(publication)
end
end
def marker id
def marker
content_tag :div,
:class => "list_item_action" do
content_tag(:a, "",:href=>"",
:class => "icon-check-empty",
"toggle-onclick"=>"icon-check-empty icon-check",
"data-id" => id.to_s,
"ajax-remote"=>"false") + \
content_tag(:a, "",:href=>"",
:class => "icon-star-empty",
"toggle-onclick"=>"icon-star-empty icon-star",
"data-id" => id.to_s,
"ajax-remote"=>"false")
end
end
@@ -50,16 +50,28 @@
</div>
<div class="hh1 hp sdm">
<div class="sdm_t hh1">Share</div>
<div class="admbg sdm_o share_mode" data-link="<%= data_share_panel_personal_book_back_end_writing_books_path %>" data-var="disable" >
<div class="admbg sdm_o">
<ul>
<li><a class="hp hh1 admtxt" href="" item-class="private" data-mode="true" >Private</a></li>
<li><a class="hp hh1 admtxt" href="" item-class="public" data-mode="false" >Public</a></li>
<li><a class="hp hh1 admtxt" href="">Full</a></li>
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
<li><a class="hp hh1 admtxt" href="">Private</a></li>
<li><a class="hp hh1 admtxt" href="">Group</a></li>
</ul>
</div>
</div>
<div class="hh1 hp sdm">
<div class="sdm_t hh1"><a href="<%= admin_import_data_sync_book_data_path(:user_id=>@userid) %>" class="icons-cycle" ajax-remote="get" response-type="json" callback-method="syncComplete" > Sync Books</a></div>
<div class="hh1 hp sdm">
<div class="sdm_t hh1" id='ns'>New Share</div>
<div class="admbg sdm_o">
<ul>
<li><a class="hp hh1 admtxt remote_url" href="<%= panel_personal_book_desktop_personal_books_path %>">Full</a></li>
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
<li><a class="hp hh1 admtxt" href="">Private</a></li>
<li><a class="hp hh1 admtxt" href="">Group</a></li>
</ul>
</div>
</div>
<div class="hh1 hp sdm">
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
</div>
@@ -75,8 +75,6 @@
<% if is_admin? %>
<div class="bottomnav clearfix">
<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('announcement.add_new'), new_panel_personal_book_back_end_writing_book_path(:user_id => @user.id), :class => 'btn btn-primary' %>
</div>
+1 -1
View File
@@ -2,7 +2,7 @@ module PersonalBook
OrbitApp.registration "PersonalBook",:type=> 'ModuleApp' do
module_label 'module_name.personal_book'
base_url File.expand_path File.dirname(__FILE__)
personal_plugin :enable => true, :sort_number => '25', :app_name=>"WritingBook", :intro_app_name=>"PersonalBookIntro",:path=>"panel/personal_book/plugin/profile",:front_path=>"panel/personal_book/front_end/profile",:admin_path=>"/panel/personal_book/back_end/writing_books",:i18n=>'module_name.personal_book'
personal_plugin :enable => true, :app_name=>"WritingBook", :intro_app_name=>"PersonalBookIntro",:path=>"panel/personal_book/plugin/profile",:front_path=>"panel/personal_book/front_end/profile",:admin_path=>"/panel/personal_book/back_end/writing_books",:i18n=>'module_name.personal_book'
@@ -29,7 +29,6 @@ orbitDesktop.prototype.initializeConferencePapers = function(target,url,cache){
return false;
})
}
o.enableSharing("div.share_mode");
}
this.initializeConferencePapers.paperDelete = function(data,dom){
var parent = dom.parent().parent().parent();
@@ -42,10 +41,7 @@ orbitDesktop.prototype.initializeConferencePapers = function(target,url,cache){
this.initializeConferencePapers.cancelpaper = function(){
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(){
$('#add_plugin_file a.add').click(function(){
var new_id = $(this).prev().attr('value');
@@ -277,7 +277,7 @@ class Panel::PersonalConference::BackEnd::WritingConferencesController < OrbitBa
respond_to do |format|
format.html { redirect_to(admin_users_new_interface_url(:id=>params[:user_id],:show_plugin_profile=>"WritingConference")) }
format.json { render json: {"success"=>true}.to_json}
end
end
@@ -4,7 +4,7 @@ class Panel::PersonalConference::Desktop::ConferencePagesController < Applicatio
@writing_conferences = WritingConference.where(create_user_id: current_user.id)
page = params[:page]
page ||= 1
@userid = current_user.id
if @view_by.nil?
@writing_conferences = @writing_conferences.asc(:paper_title)
else
@@ -1,26 +0,0 @@
class Panel::PersonalConference::FrontEnd::WritingConferencesController < OrbitWidgetController
def initialize
super
@app_title = 'personal_conference'
end
def index
@writing_conferences = WritingConference.desc(:year).page(params[:page]).per(10)
end
# GET /writing_conferences/1
# GET /writing_conferences/1.xml
def show
@writing_conference = WritingConference.find(params[:id])
@conference_paper_types = ( !@writing_conference.conference_paper_types.blank? ? @writing_conference.conference_paper_types.collect{|x| x.title}.join(', ') : nil)
@conference_author_types = ( !@writing_conference.conference_author_types.blank? ? @writing_conference.conference_author_types.collect{|x| x.title}.join(', ') : nil)
end
end
@@ -2,29 +2,23 @@ module Panel::PersonalConference::Desktop::ConferencePagesHelper
def publication_record publication, view
content_tag :li,
"item" => "true",
"data-id" => publication.id.to_s,
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
content_tag :div,
:class => "inner" do
marker(publication.id) + \
content(publication, view) + \
edit_or_delete(publication)
end
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" }" do
marker + \
content(publication, view) + \
edit_or_delete(publication)
end
end
def marker id
def marker
content_tag :div,
:class => "list_item_action" do
content_tag(:a, "",:href=>"",
:class => "icon-check-empty",
"toggle-onclick"=>"icon-check-empty icon-check",
"data-id" => id.to_s,
"ajax-remote"=>"false") + \
content_tag(:a, "",:href=>"",
:class => "icon-star-empty",
"toggle-onclick"=>"icon-star-empty icon-star",
"data-id" => id.to_s,
"ajax-remote"=>"false")
end
end
@@ -51,16 +51,16 @@
</div>
<div class="hh1 hp sdm">
<div class="sdm_t hh1">Share</div>
<div class="admbg sdm_o share_mode" data-link="<%= data_share_panel_personal_conference_back_end_writing_conferences_path %>" data-var="disable" >
<div class="admbg sdm_o">
<ul>
<li><a class="hp hh1 admtxt" href="" item-class="private" data-mode="true" >Private</a></li>
<li><a class="hp hh1 admtxt" href="" item-class="public" data-mode="false" >Public</a></li>
<li><a class="hp hh1 admtxt" href="">Full</a></li>
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
<li><a class="hp hh1 admtxt" href="">Private</a></li>
<li><a class="hp hh1 admtxt" href="">Group</a></li>
</ul>
</div>
</div>
<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>
@@ -69,15 +69,13 @@
<div class="scrollbar sb_h vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div>
<div class="viewport"> -->
<% if @view_by.eql?"abstract" %>
<div class="overview" page-name="conference_p_list" content-layout="simple" per-column="1" base-width="300" pagination-var="page">
<div class="overview" page-name="conference_p_list" content-layout="datalist" per-column="1" base-width="300" pagination-var="page">
<% else %>
<div class="overview" page-name="conference_p_list" content-layout="simple" per-column="5" base-width="300" pagination-var="page">
<div class="overview" page-name="conference_p_list" content-layout="datalist" per-column="5" base-width="300" pagination-var="page">
<% end %>
<ul isotope="true">
<% @writing_conferences.each do |w| %>
<%= publication_record w, @view_by%>
<% end %>
</ul>
</div>
<!-- </div>
</div> -->
@@ -75,8 +75,6 @@
<% if is_admin? %>
<div class="bottomnav clearfix">
<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('announcement.add_new'), new_panel_personal_conference_back_end_writing_conference_path(:user_id => @user.id), :class => 'btn btn-primary' %>
</div>
+1 -1
View File
@@ -2,7 +2,7 @@ module PersonalConference
OrbitApp.registration "PersonalConference",:type=> 'ModuleApp' do
module_label 'module_name.personal_conference'
base_url File.expand_path File.dirname(__FILE__)
personal_plugin :enable => true, :sort_number => '10', :app_name=>"WritingConference", :intro_app_name=>"PersonalConferenceIntro",:path=>"panel/personal_conference/plugin/profile",:front_path=>"panel/personal_conference/front_end/profile",:admin_path=>"/panel/personal_conference/back_end/writing_conferences",:i18n=>'module_name.personal_conference'
personal_plugin :enable => true, :app_name=>"WritingConference", :intro_app_name=>"PersonalConferenceIntro",:path=>"panel/personal_conference/plugin/profile",:front_path=>"panel/personal_conference/front_end/profile",:admin_path=>"/panel/personal_conference/back_end/writing_conferences",:i18n=>'module_name.personal_conference'
@@ -29,7 +29,6 @@ orbitDesktop.prototype.initializePersonalDiploma = function(target,url,cache){ /
return false;
})
}
o.enableSharing("div.share_mode");
}
this.initializePersonalDiploma.diplomaDelete = function(data,dom){
var parent = dom.parent().parent().parent();
@@ -159,7 +159,7 @@ class Panel::PersonalDiploma::BackEnd::DiplomasController < OrbitBackendControll
respond_to do |format|
format.html { redirect_to(admin_users_new_interface_url(:id=>params[:user_id],:show_plugin_profile=>"Diploma")) }
format.json { render json: {"success"=>true}.to_json}
end
end
@@ -2,26 +2,23 @@ module Panel::PersonalDiploma::Desktop::PersonalDiplomasHelper
def publication_record publication, view
content_tag :li,
"item" => "true",
"data-id" => publication.id.to_s,
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
marker(publication.id) + \
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" }" do
marker + \
content(publication, view) + \
edit_or_delete(publication)
end
end
def marker id
def marker
content_tag :div,
:class => "list_item_action" do
content_tag(:a, "",:href=>"",
:class => "icon-check-empty",
"toggle-onclick"=>"icon-check-empty icon-check",
"data-id" => id.to_s,
"ajax-remote"=>"false") + \
content_tag(:a, "",:href=>"",
:class => "icon-star-empty",
"toggle-onclick"=>"icon-star-empty icon-star",
"data-id" => id.to_s,
"ajax-remote"=>"false")
end
end
@@ -47,12 +47,27 @@
</ul>
</div>
</div>
<div class="hh1 hp sdm">
<div class="hh1 hp sdm">
<div class="sdm_t hh1">Share</div>
<div class="admbg sdm_o share_mode" data-link="<%= data_share_panel_personal_diploma_back_end_diplomas_path %>" data-var="disable" >
<div class="admbg sdm_o">
<ul>
<li><a class="hp hh1 admtxt" href="" item-class="private" data-mode="true" >Private</a></li>
<li><a class="hp hh1 admtxt" href="" item-class="public" data-mode="false" >Public</a></li>
<li><a class="hp hh1 admtxt" href="">Full</a></li>
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
<li><a class="hp hh1 admtxt" href="">Private</a></li>
<li><a class="hp hh1 admtxt" href="">Group</a></li>
</ul>
</div>
</div>
<div class="hh1 hp sdm">
<div class="sdm_t hh1" id='ns'>New Share</div>
<div class="admbg sdm_o">
<ul>
<li><a class="hp hh1 admtxt remote_url" href="<%= panel_personal_diploma_desktop_personal_diplomas_path %>">Full</a></li>
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
<li><a class="hp hh1 admtxt" href="">Private</a></li>
<li><a class="hp hh1 admtxt" href="">Group</a></li>
</ul>
</div>
</div>
+1 -1
View File
@@ -2,7 +2,7 @@ module PersonalDiploma
OrbitApp.registration "PersonalDiploma",:type=> 'ModuleApp' do
module_label 'module_name.personal_diploma'
base_url File.expand_path File.dirname(__FILE__)
personal_plugin :enable => true, :sort_number => '40', :app_name=>"Diploma", :intro_app_name=>"PersonalDiplomaIntro",:path=>"panel/personal_diploma/plugin/profile",:front_path=>"panel/personal_diploma/front_end/profile",:admin_path=>"/panel/personal_diploma/back_end/diplomas",:i18n=>'module_name.personal_diploma'
personal_plugin :enable => true, :app_name=>"Diploma", :intro_app_name=>"PersonalDiplomaIntro",:path=>"panel/personal_diploma/plugin/profile",:front_path=>"panel/personal_diploma/front_end/profile",:admin_path=>"/panel/personal_diploma/back_end/diplomas",:i18n=>'module_name.personal_diploma'
@@ -29,7 +29,6 @@ orbitDesktop.prototype.initializePersonalExperience = function(target,url,cache)
return false;
})
}
o.enableSharing("div.share_mode");
}
this.initializePersonalExperience.experienceDelete = function(data,dom){
var parent = dom.parent().parent().parent();
@@ -225,7 +225,7 @@ class Panel::PersonalExperience::BackEnd::ExperiencesController < OrbitBackendCo
respond_to do |format|
format.html { redirect_to(admin_users_new_interface_url(:id=>params[:user_id],:show_plugin_profile=>"Experience")) }
format.json { render json: {"success"=>true}.to_json}
end
end
@@ -2,25 +2,22 @@ module Panel::PersonalExperience::Desktop::PersonalExperiencesHelper
def publication_record publication, view
content_tag :li,
"item" => "true",
"data-id" => publication.id.to_s,
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
marker(publication.id) + \
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" }" do
marker + \
content(publication, view) + \
edit_or_delete(publication)
end
end
def marker id
def marker
content_tag :div,
:class => "list_item_action" do
content_tag(:a, "",:href=>"",
:class => "icon-check-empty",
"data-id" => id.to_s,
"toggle-onclick"=>"icon-check-empty icon-check",
"ajax-remote"=>"false") + \
content_tag(:a, "",:href=>"",
:class => "icon-star-empty",
"data-id" => id.to_s,
"toggle-onclick"=>"icon-star-empty icon-star",
"ajax-remote"=>"false")
end
@@ -50,10 +50,25 @@
</div>
<div class="hh1 hp sdm">
<div class="sdm_t hh1">Share</div>
<div class="admbg sdm_o share_mode" data-link="<%= data_share_panel_personal_experience_back_end_experiences_path %>" data-var="disable" >
<div class="admbg sdm_o">
<ul>
<li><a class="hp hh1 admtxt" href="" item-class="private" data-mode="true" >Private</a></li>
<li><a class="hp hh1 admtxt" href="" item-class="public" data-mode="false" >Public</a></li>
<li><a class="hp hh1 admtxt" href="">Full</a></li>
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
<li><a class="hp hh1 admtxt" href="">Private</a></li>
<li><a class="hp hh1 admtxt" href="">Group</a></li>
</ul>
</div>
</div>
<div class="hh1 hp sdm">
<div class="sdm_t hh1" id='ns'>New Share</div>
<div class="admbg sdm_o">
<ul>
<li><a class="hp hh1 admtxt remote_url" href="<%= panel_personal_experience_desktop_personal_experiences_path %>">Full</a></li>
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
<li><a class="hp hh1 admtxt" href="">Private</a></li>
<li><a class="hp hh1 admtxt" href="">Group</a></li>
</ul>
</div>
</div>
+1 -1
View File
@@ -2,7 +2,7 @@ module PersonalExperience
OrbitApp.registration "PersonalExperience",:type=> 'ModuleApp' do
module_label 'module_name.personal_experience'
base_url File.expand_path File.dirname(__FILE__)
personal_plugin :enable => true, :sort_number => '45', :app_name=>"Experience", :intro_app_name=>"PersonalExperienceIntro",:path=>"panel/personal_experience/plugin/profile",:front_path=>"panel/personal_experience/front_end/profile",:admin_path=>"/panel/personal_experience/back_end/experiences",:i18n=>'module_name.personal_experience'
personal_plugin :enable => true, :app_name=>"Experience", :intro_app_name=>"PersonalExperienceIntro",:path=>"panel/personal_experience/plugin/profile",:front_path=>"panel/personal_experience/front_end/profile",:admin_path=>"/panel/personal_experience/back_end/experiences",:i18n=>'module_name.personal_experience'
@@ -29,7 +29,6 @@ orbitDesktop.prototype.initializePersonalHonor = function(target,url,cache){ //
return false;
})
}
o.enableSharing("div.share_mode");
}
this.initializePersonalHonor.honorDelete = function(data,dom){
var parent = dom.parent().parent().parent();
@@ -226,7 +226,7 @@ class Panel::PersonalHonor::BackEnd::HonorsController < OrbitBackendController
respond_to do |format|
format.html { redirect_to(admin_users_new_interface_url(:id=>params[:user_id],:show_plugin_profile=>"Honor")) }
format.json { render json: {"success"=>true}.to_json}
end
end
@@ -2,26 +2,23 @@ module Panel::PersonalHonor::Desktop::PersonalHonorsHelper
def publication_record publication, view
content_tag :li,
"item" => "true",
"data-id" => publication.id.to_s,
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
marker(publication.id) + \
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" }" do
marker + \
content(publication, view) + \
edit_or_delete(publication)
end
end
def marker id
def marker
content_tag :div,
:class => "list_item_action" do
content_tag(:a, "",:href=>"",
:class => "icon-check-empty",
"toggle-onclick"=>"icon-check-empty icon-check",
"data-id" => id.to_s,
"ajax-remote"=>"false") + \
content_tag(:a, "",:href=>"",
:class => "icon-star-empty",
"toggle-onclick"=>"icon-star-empty icon-star",
"data-id" => id.to_s,
"ajax-remote"=>"false")
end
end
@@ -46,12 +46,27 @@
</ul>
</div>
</div>
<div class="hh1 hp sdm">
<div class="hh1 hp sdm">
<div class="sdm_t hh1">Share</div>
<div class="admbg sdm_o share_mode" data-link="<%= data_share_panel_personal_honor_back_end_honors_path %>" data-var="disable" >
<div class="admbg sdm_o">
<ul>
<li><a class="hp hh1 admtxt" href="" item-class="private" data-mode="true" >Private</a></li>
<li><a class="hp hh1 admtxt" href="" item-class="public" data-mode="false" >Public</a></li>
<li><a class="hp hh1 admtxt" href="">Full</a></li>
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
<li><a class="hp hh1 admtxt" href="">Private</a></li>
<li><a class="hp hh1 admtxt" href="">Group</a></li>
</ul>
</div>
</div>
<div class="hh1 hp sdm">
<div class="sdm_t hh1" id='ns'>New Share</div>
<div class="admbg sdm_o">
<ul>
<li><a class="hp hh1 admtxt remote_url" href="<%= panel_personal_honor_desktop_personal_honors_path %>">Full</a></li>
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
<li><a class="hp hh1 admtxt" href="">Private</a></li>
<li><a class="hp hh1 admtxt" href="">Group</a></li>
</ul>
</div>
</div>
+1 -1
View File
@@ -2,7 +2,7 @@ module PersonalHonor
OrbitApp.registration "PersonalHonor",:type=> 'ModuleApp' do
module_label 'module_name.personal_honor'
base_url File.expand_path File.dirname(__FILE__)
personal_plugin :enable => true, :sort_number => '50', :app_name=>"Honor", :intro_app_name=>"PersonalHonorIntro",:path=>"panel/personal_honor/plugin/profile",:front_path=>"panel/personal_honor/front_end/profile",:admin_path=>"/panel/personal_honor/back_end/honors",:i18n=>'module_name.personal_honor'
personal_plugin :enable => true, :app_name=>"Honor", :intro_app_name=>"PersonalHonorIntro",:path=>"panel/personal_honor/plugin/profile",:front_path=>"panel/personal_honor/front_end/profile",:admin_path=>"/panel/personal_honor/back_end/honors",:i18n=>'module_name.personal_honor'
@@ -29,7 +29,6 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
return false;
})
}
o.enableSharing("div.share_mode");
}
this.initializeJournalPapers.paperDelete = function(data,dom){
var parent = dom.parent().parent().parent();
@@ -42,10 +41,6 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
this.initializeJournalPapers.cancelpaper = function(){
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(){
$('#add_plugin_file a.add').click(function(){
@@ -327,7 +327,7 @@ class Panel::PersonalJournal::BackEnd::WritingJournalsController < OrbitBackendC
respond_to do |format|
format.html { redirect_to(admin_users_new_interface_url(:id=>params[:user_id],:show_plugin_profile=>"WritingJournal")) }
format.json { render json: {"success"=>true}.to_json}
end
end
@@ -7,7 +7,7 @@ class Panel::PersonalJournal::Desktop::JournalPagesController < ApplicationContr
page ||= 1
@per_column = 5
@userid = current_user.id
case @view_by
when "abstract"
@per_column = 1
@@ -2,15 +2,10 @@ module Panel::PersonalJournal::Desktop::JournalPagesHelper
def publication_record publication, view
content_tag :li,
"item" => "true",
"data-id" => publication.id.to_s,
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
content_tag :div,
:class => "inner" do
marker(publication.id) + \
content(publication, view) + \
edit_or_delete(publication)
end
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" }" do
marker + \
content(publication, view) + \
edit_or_delete(publication)
end
end
@@ -30,18 +25,16 @@ module Panel::PersonalJournal::Desktop::JournalPagesHelper
height
end
def marker id
def marker
content_tag :div,
:class => "list_item_action" do
content_tag(:a, "",:href=>"",
:class => "icon-check-empty",
"toggle-onclick"=>"icon-check-empty icon-check",
"data-id" => id.to_s,
"ajax-remote"=>"false") + \
content_tag(:a, "",:href=>"",
:class => "icon-star-empty",
"toggle-onclick"=>"icon-star-empty icon-star",
"data-id" => id.to_s,
"ajax-remote"=>"false")
end
end
@@ -32,11 +32,10 @@
<div class="viewport"> -->
<div class="overview" content-layout="simple" base-width="420">
<ul class="s_form" isotope="true">
<li class="s_grid_row" >
<% @site_valid_locales.each_with_index do |locale, i| %>
<% style = locale != I18n.locale.to_s ? 'style=display:none;' : "" %>
<% data = "data-language=" + locale %>
<div class="form_fix" <%= style %> <%= data %>>
<li class="s_grid_row" <%= style %> <%= data %>>
<%= f.fields_for :paper_title_translations do |f| %>
<%= f.text_area locale,
class: "s_grid_12 s_grid s_grid_h_3",
@@ -44,7 +43,8 @@
placeholder: t("personal_journal.paper_title")+ "("+I18nVariable.from_locale(locale)+")",
value: (@writing_journal.paper_title_translations[locale.to_s] rescue nil) %>
<% end %>
<p></p>
</li>
<li class="s_grid_row" <%= style %> <%= data %>>
<%= f.fields_for :journal_title_translations do |f| %>
<%= f.text_field locale,
size: "20",
@@ -53,9 +53,8 @@
value: (@writing_journal.journal_title_translations[locale.to_s] rescue nil) %>
<% end %>
</div>
</li>
<% end %>
</li>
<li class="s_grid_row">
<%= label_tag("", t("personal_journal.level_type"), :class => 's_grid s_grid_4') %>
<div class="s_select_g s_grid s_grid_8 s_grid_h_2">
@@ -51,16 +51,28 @@
</div>
<div class="hh1 hp sdm">
<div class="sdm_t hh1">Share</div>
<div class="admbg sdm_o share_mode" data-link="<%= data_share_panel_personal_journal_back_end_writing_journals_path %>" data-var="disable" >
<div class="admbg sdm_o">
<ul>
<li><a class="hp hh1 admtxt" href="" item-class="private" data-mode="true" >Private</a></li>
<li><a class="hp hh1 admtxt" href="" item-class="public" data-mode="false" >Public</a></li>
<li><a class="hp hh1 admtxt" href="">Full</a></li>
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
<li><a class="hp hh1 admtxt" href="">Private</a></li>
<li><a class="hp hh1 admtxt" href="">Group</a></li>
</ul>
</div>
</div>
<div class="hh1 hp sdm">
<div class="sdm_t hh1"><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 class="sdm_t hh1" id='ns'>New Share</div>
<div class="admbg sdm_o">
<ul>
<li><a class="hp hh1 admtxt remote_url" href="<%= panel_personal_journal_plugin_writing_journals_path %>">Full</a></li>
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
<li><a class="hp hh1 admtxt" href="">Private</a></li>
<li><a class="hp hh1 admtxt" href="">Group</a></li>
</ul>
</div>
</div>
<div class="hh1 hp sdm">
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
</div>
@@ -80,8 +80,6 @@
<% if is_admin? %>
<div class="bottomnav clearfix">
<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('announcement.add_new'), new_panel_personal_journal_back_end_writing_journal_path(:user_id => @user.id), :class => 'btn btn-primary' %>
</div>
@@ -1,6 +1,6 @@
zh_tw:
module_name:
personal_journal: 期刊論文
personal_journal: 期刊著作
personal_journal:
paper_title : "論文名稱"
journal_title : "期刊名稱"
+1 -1
View File
@@ -2,7 +2,7 @@ module PersonalJournal
OrbitApp.registration "PersonalJournal",:type=> 'ModuleApp' do
module_label 'module_name.personal_journal'
base_url File.expand_path File.dirname(__FILE__)
personal_plugin :enable => true, :sort_number => '5', :app_name=>"WritingJournal", :intro_app_name=>"PersonalJournalIntro",:path=>"panel/personal_journal/plugin/profile",:front_path=>"panel/personal_journal/front_end/profile",:admin_path=>"/panel/personal_journal/back_end/writing_journals",:i18n=>'module_name.personal_journal'
personal_plugin :enable => true, :app_name=>"WritingJournal", :intro_app_name=>"PersonalJournalIntro",:path=>"panel/personal_journal/plugin/profile",:front_path=>"panel/personal_journal/front_end/profile",:admin_path=>"/panel/personal_journal/back_end/writing_journals",:i18n=>'module_name.personal_journal'
@@ -29,7 +29,6 @@ orbitDesktop.prototype.initializePersonalLab = function(target,url,cache){ // th
return false;
})
}
o.enableSharing("div.share_mode");
}
this.initializePersonalLab.labDelete = function(data,dom){
var parent = dom.parent().parent().parent();
@@ -161,7 +161,7 @@ class Panel::PersonalLab::BackEnd::LabsController < OrbitBackendController
respond_to do |format|
format.html { redirect_to(admin_users_new_interface_url(:id=>params[:user_id],:show_plugin_profile=>"Lab")) }
format.json { render json: {"success"=>true}.to_json}
end
end
@@ -2,26 +2,23 @@ module Panel::PersonalLab::Desktop::PersonalLabsHelper
def publication_record publication, view
content_tag :li,
"item" => "true",
"data-id" => publication.id.to_s,
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
marker(publication.id) + \
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" }" do
marker + \
content(publication, view) + \
edit_or_delete(publication)
end
end
def marker id
def marker
content_tag :div,
:class => "list_item_action" do
content_tag(:a, "",:href=>"",
:class => "icon-check-empty",
"toggle-onclick"=>"icon-check-empty icon-check",
"data-id" => id.to_s,
"ajax-remote"=>"false") + \
content_tag(:a, "",:href=>"",
:class => "icon-star-empty",
"toggle-onclick"=>"icon-star-empty icon-star",
"data-id" => id.to_s,
"ajax-remote"=>"false")
end
end
@@ -48,12 +48,27 @@
</ul>
</div>
</div>
<div class="hh1 hp sdm">
<div class="hh1 hp sdm">
<div class="sdm_t hh1">Share</div>
<div class="admbg sdm_o share_mode" data-link="<%= data_share_panel_personal_lab_back_end_labs_path %>" data-var="disable" >
<div class="admbg sdm_o">
<ul>
<li><a class="hp hh1 admtxt" href="" item-class="private" data-mode="true" >Private</a></li>
<li><a class="hp hh1 admtxt" href="" item-class="public" data-mode="false" >Public</a></li>
<li><a class="hp hh1 admtxt" href="">Full</a></li>
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
<li><a class="hp hh1 admtxt" href="">Private</a></li>
<li><a class="hp hh1 admtxt" href="">Group</a></li>
</ul>
</div>
</div>
<div class="hh1 hp sdm">
<div class="sdm_t hh1" id='ns'>New Share</div>
<div class="admbg sdm_o">
<ul>
<li><a class="hp hh1 admtxt remote_url" href="<%= panel_personal_lab_desktop_personal_labs_path %>">Full</a></li>
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
<li><a class="hp hh1 admtxt" href="">Private</a></li>
<li><a class="hp hh1 admtxt" href="">Group</a></li>
</ul>
</div>
</div>
+1 -1
View File
@@ -2,7 +2,7 @@ module PersonalLab
OrbitApp.registration "PersonalLab",:type=> 'ModuleApp' do
module_label 'module_name.personal_lab'
base_url File.expand_path File.dirname(__FILE__)
personal_plugin :enable => true, :sort_number => '30', :app_name=>"Lab", :intro_app_name=>"PersonalLabIntro",:path=>"panel/personal_lab/plugin/profile",:front_path=>"panel/personal_lab/front_end/profile",:admin_path=>"/panel/personal_lab/back_end/labs",:i18n=>'module_name.personal_lab'
personal_plugin :enable => true, :app_name=>"Lab", :intro_app_name=>"PersonalLabIntro",:path=>"panel/personal_lab/plugin/profile",:front_path=>"panel/personal_lab/front_end/profile",:admin_path=>"/panel/personal_lab/back_end/labs",:i18n=>'module_name.personal_lab'
end
@@ -29,7 +29,6 @@ orbitDesktop.prototype.initializePersonalPatent = function(target,url,cache){ //
return false;
})
}
o.enableSharing("div.share_mode");
}
this.initializePersonalPatent.patentDelete = function(data,dom){
var parent = dom.parent().parent().parent();
@@ -226,7 +226,7 @@ class Panel::PersonalPatent::BackEnd::WritingPatentsController < OrbitBackendCon
respond_to do |format|
format.html { redirect_to(admin_users_new_interface_url(:id=>params[:user_id],:show_plugin_profile=>"WritingPatent")) }
format.json { render json: {"success"=>true}.to_json}
end
end
@@ -2,26 +2,23 @@ module Panel::PersonalPatent::Desktop::PersonalPatentsHelper
def publication_record publication, view
content_tag :li,
"item" => "true",
"data-id" => publication.id.to_s,
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
marker(publication.id) + \
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" }" do
marker + \
content(publication, view) + \
edit_or_delete(publication)
end
end
def marker id
def marker
content_tag :div,
:class => "list_item_action" do
content_tag(:a, "",:href=>"",
:class => "icon-check-empty",
"toggle-onclick"=>"icon-check-empty icon-check",
"data-id" => id.to_s,
"ajax-remote"=>"false") + \
content_tag(:a, "",:href=>"",
:class => "icon-star-empty",
"toggle-onclick"=>"icon-star-empty icon-star",
"data-id" => id.to_s,
"ajax-remote"=>"false")
end
end
@@ -47,12 +47,27 @@
</ul>
</div>
</div>
<div class="hh1 hp sdm">
<div class="hh1 hp sdm">
<div class="sdm_t hh1">Share</div>
<div class="admbg sdm_o share_mode" data-link="<%= data_share_panel_personal_patent_back_end_writing_patents_path %>" data-var="disable" >
<div class="admbg sdm_o">
<ul>
<li><a class="hp hh1 admtxt" href="" item-class="private" data-mode="true" >Private</a></li>
<li><a class="hp hh1 admtxt" href="" item-class="public" data-mode="false" >Public</a></li>
<li><a class="hp hh1 admtxt" href="">Full</a></li>
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
<li><a class="hp hh1 admtxt" href="">Private</a></li>
<li><a class="hp hh1 admtxt" href="">Group</a></li>
</ul>
</div>
</div>
<div class="hh1 hp sdm">
<div class="sdm_t hh1" id='ns'>New Share</div>
<div class="admbg sdm_o">
<ul>
<li><a class="hp hh1 admtxt remote_url" href="<%= panel_personal_patent_desktop_personal_patents_path %>">Full</a></li>
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
<li><a class="hp hh1 admtxt" href="">Private</a></li>
<li><a class="hp hh1 admtxt" href="">Group</a></li>
</ul>
</div>
</div>
+1 -1
View File
@@ -2,7 +2,7 @@ module PersonalPatent
OrbitApp.registration "PersonalPatent",:type=> 'ModuleApp' do
module_label 'module_name.personal_patent'
base_url File.expand_path File.dirname(__FILE__)
personal_plugin :enable => true, :sort_number => '35', :app_name=>"WritingPatent", :intro_app_name=>"PersonalPatentIntro",:path=>"panel/personal_patent/plugin/profile",:front_path=>"panel/personal_patent/front_end/profile",:admin_path=>"/panel/personal_patent/back_end/writing_patents",:i18n=>'module_name.personal_patent'
personal_plugin :enable => true, :app_name=>"WritingPatent", :intro_app_name=>"PersonalPatentIntro",:path=>"panel/personal_patent/plugin/profile",:front_path=>"panel/personal_patent/front_end/profile",:admin_path=>"/panel/personal_patent/back_end/writing_patents",:i18n=>'module_name.personal_patent'
@@ -29,7 +29,6 @@ orbitDesktop.prototype.initializePersonalProject = function(target,url,cache){ /
return false;
})
}
o.enableSharing("div.share_mode");
}
this.initializePersonalProject.projectDelete = function(data,dom){
var parent = dom.parent().parent().parent();
@@ -224,7 +224,7 @@ class Panel::PersonalProject::BackEnd::ProjectsController < OrbitBackendControll
respond_to do |format|
format.html { redirect_to(admin_users_new_interface_url(:id=>params[:user_id],:show_plugin_profile=>"Project")) }
format.json { render json: {"success"=>true}.to_json}
end
end
@@ -2,27 +2,23 @@ module Panel::PersonalProject::Desktop::PersonalProjectsHelper
def publication_record publication, view
content_tag :li,
"item" => "true",
"item" => "true",
"data-id" => publication.id.to_s,
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" } #{publication.is_hidden? ? "private" : "public" }" do
marker(publication.id) + \
:class => "list_t_item #{view.blank? ? '' : "#{view}_view" }" do
marker + \
content(publication, view) + \
edit_or_delete(publication)
end
end
def marker id
def marker
content_tag :div,
:class => "list_item_action" do
content_tag(:a, "",:href=>"",
:class => "icon-check-empty",
"toggle-onclick"=>"icon-check-empty icon-check",
"data-id" => id.to_s,
"ajax-remote"=>"false") + \
content_tag(:a, "",:href=>"",
:class => "icon-star-empty",
"toggle-onclick"=>"icon-star-empty icon-star",
"data-id" => id.to_s,
"ajax-remote"=>"false")
end
end
@@ -48,12 +48,27 @@
</ul>
</div>
</div>
<div class="hh1 hp sdm">
<div class="hh1 hp sdm">
<div class="sdm_t hh1">Share</div>
<div class="admbg sdm_o share_mode" data-link="<%= data_share_panel_personal_project_back_end_projects_path %>" data-var="disable" >
<div class="admbg sdm_o">
<ul>
<li><a class="hp hh1 admtxt" href="" item-class="private" data-mode="true" >Private</a></li>
<li><a class="hp hh1 admtxt" href="" item-class="public" data-mode="false" >Public</a></li>
<li><a class="hp hh1 admtxt" href="">Full</a></li>
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
<li><a class="hp hh1 admtxt" href="">Private</a></li>
<li><a class="hp hh1 admtxt" href="">Group</a></li>
</ul>
</div>
</div>
<div class="hh1 hp sdm">
<div class="sdm_t hh1" id='ns'>New Share</div>
<div class="admbg sdm_o">
<ul>
<li><a class="hp hh1 admtxt remote_url" href="<%= panel_personal_project_desktop_personal_projects_path %>">Full</a></li>
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
<li><a class="hp hh1 admtxt" href="">Private</a></li>
<li><a class="hp hh1 admtxt" href="">Group</a></li>
</ul>
</div>
</div>
+1 -1
View File
@@ -2,7 +2,7 @@ module PersonalProject
OrbitApp.registration "PersonalProject",:type=> 'ModuleApp' do
module_label 'module_name.personal_project'
base_url File.expand_path File.dirname(__FILE__)
personal_plugin :enable => true, :sort_number => '15', :app_name=>"Project", :intro_app_name=>"PersonalProjectIntro",:path=>"panel/personal_project/plugin/profile",:front_path=>"panel/personal_project/front_end/profile",:admin_path=>"/panel/personal_project/back_end/projects",:i18n=>'module_name.personal_project'
personal_plugin :enable => true, :app_name=>"Project", :intro_app_name=>"PersonalProjectIntro",:path=>"panel/personal_project/plugin/profile",:front_path=>"panel/personal_project/front_end/profile",:admin_path=>"/panel/personal_project/back_end/projects",:i18n=>'module_name.personal_project'
@@ -29,7 +29,6 @@ orbitDesktop.prototype.initializePersonalResearch = function(target,url,cache){
return false;
})
}
o.enableSharing("div.share_mode");
}
this.initializePersonalResearch.researchDelete = function(data,dom){
var parent = dom.parent().parent().parent();
@@ -150,7 +150,7 @@ class Panel::PersonalResearch::BackEnd::ResearchsController < OrbitBackendContro
respond_to do |format|
format.html { redirect_to(admin_users_new_interface_url(:id=>params[:user_id],:show_plugin_profile=>"Research")) }
format.json { render json: {"success"=>true}.to_json}
end
end
Loaded 100 of 103 files, more files were not shown because too many files have changed in this diff. Show more