Compare commits
19
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f8ad13a9f5 | ||
|
|
7ed2afb405 | ||
|
|
20e2f07b26 | ||
|
|
c291f15e23 | ||
|
|
ce8e9c0a5f | ||
|
|
dc5ef21516 | ||
|
|
ea3f9c8163 | ||
|
|
e129b25554 | ||
|
|
7028390248 | ||
|
|
8f3a68b3d7 | ||
|
|
eeb7f72876 | ||
|
|
a49562e341 | ||
|
|
a3d921c47a | ||
|
|
6d5b3a35e9 | ||
|
|
2e5b3e8ef7 | ||
|
|
635f82db2f | ||
|
|
182729a7fe | ||
|
|
a1840c86de | ||
|
|
3d091b692d |
No files matched your search
@@ -39,10 +39,8 @@ if($.support.touch) {
|
|||||||
if(!$(this).closest('div').hasClass('togglebox')) {
|
if(!$(this).closest('div').hasClass('togglebox')) {
|
||||||
$(this).wrap('<div class="toggle-control"/>');
|
$(this).wrap('<div class="toggle-control"/>');
|
||||||
if($(this).attr('type') == "hidden" && $(this).attr('value') == 'true') {
|
if($(this).attr('type') == "hidden" && $(this).attr('value') == 'true') {
|
||||||
console.log('true')
|
|
||||||
$(this).wrap('<div class="togglebox disable" />');
|
$(this).wrap('<div class="togglebox disable" />');
|
||||||
} else {
|
} else {
|
||||||
console.log('false')
|
|
||||||
$(this).wrap('<div class="togglebox" />');
|
$(this).wrap('<div class="togglebox" />');
|
||||||
}
|
}
|
||||||
$('<label><b></b></label>').insertAfter($(this));
|
$('<label><b></b></label>').insertAfter($(this));
|
||||||
@@ -73,7 +71,6 @@ if($.support.touch) {
|
|||||||
$(this).parent('.togglebox').removeClass('disable').closest('li').removeClass('disabled');
|
$(this).parent('.togglebox').removeClass('disable').closest('li').removeClass('disabled');
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
console.log($(this))
|
|
||||||
if($(this).prop('checked')) {
|
if($(this).prop('checked')) {
|
||||||
$(this).parent('.togglebox').addClass('disable').closest('li').addClass('disabled');
|
$(this).parent('.togglebox').addClass('disable').closest('li').addClass('disabled');
|
||||||
};
|
};
|
||||||
@@ -543,7 +540,6 @@ function changeStatusHidden() {
|
|||||||
|
|
||||||
// Document Ready
|
// Document Ready
|
||||||
$(function() {
|
$(function() {
|
||||||
console.log('true')
|
|
||||||
showFiltersOnPageRefresh();
|
showFiltersOnPageRefresh();
|
||||||
|
|
||||||
new ini();
|
new ini();
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ var banner_index = 0;
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$.each($(".dymanic_load"),function(){
|
$.each($(".dymanic_load"),function(){
|
||||||
if($(this).attr("path")==''){
|
if($(this).attr("path")==''){
|
||||||
$(this).html("App setting Failed");
|
$(this).html("");
|
||||||
}else{
|
}else{
|
||||||
ajax_load_proc($(this),$(this).attr("path"));
|
ajax_load_proc($(this),$(this).attr("path"));
|
||||||
}
|
}
|
||||||
@@ -16,7 +16,7 @@ $(document).ready(function() {
|
|||||||
function ajax_load_proc(wapper,url,isBanner){
|
function ajax_load_proc(wapper,url,isBanner){
|
||||||
$.get(encodeURI(url), {}, function(respText,textSta,XML){
|
$.get(encodeURI(url), {}, function(respText,textSta,XML){
|
||||||
if (textSta == 'success') {
|
if (textSta == 'success') {
|
||||||
wapper.html(respText);
|
if (respText.indexOf("<title>") == -1) wapper.html(respText);
|
||||||
};
|
};
|
||||||
if(textSta == 'error')
|
if(textSta == 'error')
|
||||||
wapper.html("Loading Failed<br/> <a href='"+$(this).attr('path')+"'>Go See</a>");
|
wapper.html("Loading Failed<br/> <a href='"+$(this).attr('path')+"'>Go See</a>");
|
||||||
|
|||||||
@@ -111,30 +111,30 @@ function customOpenSlide() {
|
|||||||
.closest('.navbar-inner')
|
.closest('.navbar-inner')
|
||||||
.addClass('active');
|
.addClass('active');
|
||||||
pageslide.find('.content').css('padding', 0);
|
pageslide.find('.content').css('padding', 0);
|
||||||
iFrameContent()
|
// iFrameContent()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function iFrameContent() {
|
// function iFrameContent() {
|
||||||
function iFrameFunction(iContents, pc) {
|
// function iFrameFunction(iContents, pc) {
|
||||||
pc.each(function(index, el) {
|
// pc.each(function(index, el) {
|
||||||
if($(this).siblings('*').length == 0) {
|
// if($(this).siblings('*').length == 0) {
|
||||||
var _parentH = $(this).parent('*').outerHeight();
|
// var _parentH = $(this).parent('*').outerHeight();
|
||||||
$(this).css('height', _parentH);
|
// $(this).css('min-height', _parentH);
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
iContents.find('#orbit-bar').hide();
|
// iContents.find('#orbit-bar').hide();
|
||||||
iContents.find('.main_wrap').css('margin-top', 0);
|
// iContents.find('.main_wrap').css('margin-top', 0);
|
||||||
iContents.find('a').not('.edit_link a').on('click', function(event) {
|
// iContents.find('a').not('.edit_link a').on('click', function(event) {
|
||||||
event.preventDefault();
|
// event.preventDefault();
|
||||||
}).css('cursor', 'default');
|
// }).css('cursor', 'default');
|
||||||
}
|
// }
|
||||||
$('#pageslide_iframe').load(function() {
|
// $('#pageslide_iframe').load(function() {
|
||||||
var $iContents = $(this).contents(),
|
// var $iContents = $(this).contents(),
|
||||||
$pc = $iContents.find('.page_content');
|
// $pc = $iContents.find('.page_content');
|
||||||
iFrameFunction($iContents, $pc);
|
// iFrameFunction($iContents, $pc);
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
function pageSetting(id, edit, ps) {
|
function pageSetting(id, edit, ps) {
|
||||||
$pageModule = $('#pageslide #page_module_app_id');
|
$pageModule = $('#pageslide #page_module_app_id');
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
$(function() {
|
||||||
|
// for toggle-check
|
||||||
|
$('.role_filter_checked').on({
|
||||||
|
change: function() {
|
||||||
|
var _path = $(this).data('path');
|
||||||
|
// var path = <%= @path %>
|
||||||
|
$.ajax({
|
||||||
|
url: _path,
|
||||||
|
type: 'POST',
|
||||||
|
dataType: 'json',
|
||||||
|
data: {remote: true},
|
||||||
|
})
|
||||||
|
.done(function() {})
|
||||||
|
.fail(function() {})
|
||||||
|
.always(function() {});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -3,4 +3,5 @@
|
|||||||
//= require lib/all-list
|
//= require lib/all-list
|
||||||
//= require lib/jquery.fastLiveFilter.js
|
//= require lib/jquery.fastLiveFilter.js
|
||||||
//= require lib/checkbox.card.js
|
//= require lib/checkbox.card.js
|
||||||
//= require lib/jquery.form.js
|
//= require lib/jquery.form.js
|
||||||
|
//= require lib/member/member-role.js
|
||||||
@@ -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
|
||||||
@@ -40,8 +40,18 @@ class Admin::ItemsController < OrbitBackendController
|
|||||||
m["main"] = [module_app.label, module_app.id.to_s]
|
m["main"] = [module_app.label, module_app.id.to_s]
|
||||||
m["sub"] = module_app.app_pages.map{|name, data| [t(data["i18n"]), name]} rescue []
|
m["sub"] = module_app.app_pages.map{|name, data| [t(data["i18n"]), name]} rescue []
|
||||||
m["sub"] << [I18n.t('default_widget.default_widget'),'default_widget'] if module_app.has_default_widget?
|
m["sub"] << [I18n.t('default_widget.default_widget'),'default_widget'] if module_app.has_default_widget?
|
||||||
m["category"] = module_app.categories.map{|category| [category.title, category.id.to_s] } rescue ''
|
|
||||||
m["tags"] = module_app.tags.map{|tag| [tag.name, tag.id.to_s] } rescue ''
|
if module_app.key == 'member'
|
||||||
|
m["category"] = RoleStatus.where(:role_id=> RoleStatus.get_role_data("teacher") ).map{|category| [category.title, category.id.to_s] } rescue ''
|
||||||
|
m["tags"] = RoleCategory.where(:role_id=> RoleCategory.get_role_data("teacher") ).map{|category| [category.title, category.id.to_s] } rescue ''
|
||||||
|
elsif module_app.key == 'member_staff'
|
||||||
|
m["category"] = RoleStatus.where(:role_id=> RoleStatus.get_role_data("staff") ).map{|category| [category.title, category.id.to_s] } rescue ''
|
||||||
|
m["tags"] = RoleCategory.where(:role_id=> RoleCategory.get_role_data("staff") ).map{|category| [category.title, category.id.to_s] } rescue ''
|
||||||
|
else
|
||||||
|
m["category"] = module_app.categories.map{|category| [category.title, category.id.to_s] } rescue ''
|
||||||
|
m["tags"] = module_app.tags.map{|tag| [tag.name, tag.id.to_s] } rescue ''
|
||||||
|
end
|
||||||
|
|
||||||
m["count"] = module_app.get_registration.get_data_count.to_a
|
m["count"] = module_app.get_registration.get_data_count.to_a
|
||||||
module_apps << m
|
module_apps << m
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -63,8 +63,19 @@ class Admin::PagePartsController < OrbitBackendController
|
|||||||
m = {}
|
m = {}
|
||||||
m["main"] = [module_app.label, module_app.id.to_s]
|
m["main"] = [module_app.label, module_app.id.to_s]
|
||||||
m["sub"] = module_app.widgets.map{|name, data| [t(data["i18n"]), name]} rescue []
|
m["sub"] = module_app.widgets.map{|name, data| [t(data["i18n"]), name]} rescue []
|
||||||
m["category"] = module_app.categories.map{|category| [category.title, category.id.to_s] } rescue ''
|
|
||||||
m["tags"] = module_app.tags.map{|tag| [tag.name, tag.id.to_s] } rescue ''
|
|
||||||
|
if module_app.key == 'member'
|
||||||
|
m["category"] = RoleStatus.can_display.where(:role_id=> RoleStatus.get_role_data("teacher") ).map{|category| [category.title, category.id.to_s] } rescue ''
|
||||||
|
m["tags"] = RoleCategory.can_display.where(:role_id=> RoleCategory.get_role_data("teacher") ).map{|category| [category.title, category.id.to_s] } rescue ''
|
||||||
|
elsif module_app.key == 'member_staff'
|
||||||
|
m["category"] = RoleStatus.can_display.where(:role_id=> RoleStatus.get_role_data("staff") ).map{|category| [category.title, category.id.to_s] } rescue ''
|
||||||
|
m["tags"] = RoleCategory.can_display.where(:role_id=> RoleCategory.get_role_data("staff") ).map{|category| [category.title, category.id.to_s] } rescue ''
|
||||||
|
else
|
||||||
|
m["category"] = module_app.categories.map{|category| [category.title, category.id.to_s] } rescue ''
|
||||||
|
m["tags"] = module_app.tags.map{|tag| [tag.name, tag.id.to_s] } rescue ''
|
||||||
|
end
|
||||||
|
|
||||||
m["count"] = module_app.get_registration.get_data_count.to_a
|
m["count"] = module_app.get_registration.get_data_count.to_a
|
||||||
module_apps << m
|
module_apps << m
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ class OrbitBackendController < ApplicationController
|
|||||||
status << 'is_top'
|
status << 'is_top'
|
||||||
status << 'is_hot'
|
status << 'is_hot'
|
||||||
status << 'is_hidden' unless is_guest?
|
status << 'is_hidden' unless is_guest?
|
||||||
if @module_app.is_approvable && is_manager?
|
if @module_app.is_approvable && (is_manager? || is_sub_manager?)
|
||||||
status << 'is_pending'
|
status << 'is_pending'
|
||||||
status << 'is_checked'
|
status << 'is_checked'
|
||||||
status << 'is_rejected'
|
status << 'is_rejected'
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ class OrbitMemberController < ApplicationController
|
|||||||
status << 'is_top'
|
status << 'is_top'
|
||||||
status << 'is_hot'
|
status << 'is_hot'
|
||||||
status << 'is_hidden' unless is_guest?
|
status << 'is_hidden' unless is_guest?
|
||||||
if @module_app.is_approvable && is_manager?
|
if @module_app.is_approvable && (is_manager? || is_sub_manager?)
|
||||||
status << 'is_pending'
|
status << 'is_pending'
|
||||||
status << 'is_checked'
|
status << 'is_checked'
|
||||||
status << 'is_rejected'
|
status << 'is_rejected'
|
||||||
|
|||||||
@@ -12,13 +12,13 @@ module OrbitBackendHelper
|
|||||||
|
|
||||||
def show_form_status_field(object)
|
def show_form_status_field(object)
|
||||||
#by_object = (!object.is_expired? and object.is_pending?)
|
#by_object = (!object.is_expired? and object.is_pending?)
|
||||||
by_user = ((object.category.authed_users("approval_#{@module_app.key}").include?(current_user) rescue nil) or is_manager? or is_admin?)
|
by_user = ((object.category.authed_users("approval_#{@module_app.key}").include?(current_user) rescue nil) or is_manager? or is_admin? or is_sub_manager?)
|
||||||
by_user
|
by_user
|
||||||
end
|
end
|
||||||
|
|
||||||
def show_approval_link(object)
|
def show_approval_link(object)
|
||||||
by_object = (!object.is_expired? and object.is_pending?)
|
by_object = (!object.is_expired? and object.is_pending?)
|
||||||
by_user = ((object.category.authed_users("approval_#{@module_app.key}").include?(current_user) rescue nil) or is_manager? or is_admin?)
|
by_user = ((object.category.authed_users("approval_#{@module_app.key}").include?(current_user) rescue nil) or is_manager? or is_admin? or is_sub_manager?)
|
||||||
by_object and by_user
|
by_object and by_user
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ class RoleCategory < RoleFilter
|
|||||||
has_and_belongs_to_many :users
|
has_and_belongs_to_many :users
|
||||||
belongs_to :role
|
belongs_to :role
|
||||||
|
|
||||||
|
scope :can_display,where(disable: false)
|
||||||
|
|
||||||
def self.get_role_data(role_key)
|
def self.get_role_data(role_key)
|
||||||
|
|
||||||
@role = Role.where(:key =>role_key).first
|
@role = Role.where(:key =>role_key).first
|
||||||
|
|||||||
@@ -186,20 +186,21 @@ class User
|
|||||||
}.uniq!
|
}.uniq!
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.get_member_list_attribute_field_name(role_type,field_key)
|
def self.get_member_list_attribute_field(role_type,field_key)
|
||||||
@attribute = ::Attribute.where(:key => role_type).first
|
@attribute = ::Attribute.where(:key => role_type).first
|
||||||
return ::AttributeField.where(:key => field_key, :attribute_id => @attribute.id).first.title
|
return ::AttributeField.where(:key => field_key, :attribute_id => @attribute.id).first
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.get_member_list_attribute_value(user_id,role_type,field_key)
|
def self.get_member_list_attribute_value(user_id,field_id)
|
||||||
@attribute = ::Attribute.where(:key => role_type).first
|
# @attribute = ::Attribute.where(:key => role_type).first
|
||||||
@AttributeField = ::AttributeField.where(:key => field_key, :attribute_id => @attribute.id).first
|
# @AttributeField = ::AttributeField.where(:key => field_key, :attribute_id => @attribute.id).first
|
||||||
return ::AttributeValue.where(attribute_field_id: @AttributeField.id, :user_id => user_id).first
|
return ::AttributeValue.where(attribute_field_id: field_id, :user_id => user_id).first
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.get_role_member_data_by_sort(role_status_id)
|
def self.get_role_member_data_by_sort(role, field_key, role_status_id)
|
||||||
a = Array.new
|
a = Array.new
|
||||||
where(:role_status_ids=>role_status_id).desc(:_id).collect{|t| a << [ get_member_list_attribute_value(t.id,"staff","job_title")['val'].to_i, t ] }
|
attribute_field_data = get_member_list_attribute_field(role,field_key)
|
||||||
|
where(:role_status_ids=>role_status_id).desc(:_id).collect{|t| a << [ get_member_list_attribute_value(t.id,attribute_field_data.id)['val'].to_i, t ] }
|
||||||
member_data = a.sort
|
member_data = a.sort
|
||||||
member_data_tmp = member_data.collect {|v| v[1] }
|
member_data_tmp = member_data.collect {|v| v[1] }
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
<td class="action span3">
|
<td class="action span3">
|
||||||
<div class="toggle-control" style="float: right;">
|
<div class="toggle-control" style="float: right;">
|
||||||
<div class="togglebox <%= attribute.disabled ? 'disabled' : '' %>">
|
<div class="togglebox <%= attribute.disabled ? 'disabled' : '' %>">
|
||||||
<%= link_to (check_box_tag 'accept', false , :class => 'toggle-check', :data=>{:deploy=>"right"}) , eval("admin_#{@attribute_type}_toggle_path(attribute)"), method: :post, remote: true, class: "switch" %>
|
<%= check_box_tag 'accept', attribute.disabled ? 'fasle' : 'true', false ,{ :class => 'toggle-check role_filter_checked', :data=>{:deploy=>"right"}, :data=>{:path=> eval("admin_#{@attribute_type}_toggle_path(attribute)")}, :checked=> attribute.disabled} %>
|
||||||
<label><b></b></label>
|
<label><b></b></label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
$("#attributes_index").html("<%= j render 'admin/attributes/index' %>")
|
// $("#attributes_index").html("<%= j render 'admin/attributes/index' %>")
|
||||||
|
location.reload();
|
||||||
$.pageslide.close();
|
$.pageslide.close();
|
||||||
openSlide();
|
openSlide();
|
||||||
@@ -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,5 +1,5 @@
|
|||||||
|
|
||||||
<tr id="<%= dom_id role_filter %>" class="<% role_filter.disable ? 'disable' : '' %>">
|
<tr id="<%= dom_id role_filter %>" class="<%= role_filter.disable ? 'disable' : '' %>">
|
||||||
<td><span class="label label-info"><%= role_filter.key %></span></td>
|
<td><span class="label label-info"><%= role_filter.key %></span></td>
|
||||||
<% if @types.is_localized?(:title) %>
|
<% if @types.is_localized?(:title) %>
|
||||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||||
@@ -18,15 +18,7 @@
|
|||||||
<td><%= role_filter.title %></td>
|
<td><%= role_filter.title %></td>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<td class="action">
|
<td class="action dsrgsdgsdg">
|
||||||
<%#= link_to role_filter.disable ? t(:disable) : t(:enable), polymorphic_path([:admin, role_filter]), :confirm => t('sure?'), :method => :delete, :remote => true,:class=>"btn btn-mini btn-success", :type=>"button" %>
|
<%= check_box_tag 'accept', role_filter.disable ? 'fasle' : 'true', false ,{ :class => 'toggle-check role_filter_checked', :data=>{:deploy=>"right"}, :data=>{:path=> eval("admin_#{@app_type == 'role_statuses' ? 'role_status' : @app_type }_toggle_path(role_filter)")}, :checked=> role_filter.disable} %>
|
||||||
|
|
||||||
<div class="toggle-control" style="float: right;">
|
|
||||||
<div class="togglebox <%= role_filter.disable ? 'disabled' : '' %>">
|
|
||||||
<%= link_to (check_box_tag 'accept', false , :class => 'toggle-check', :data=>{:deploy=>"right"}) , eval("admin_#{@app_type == 'role_statuses' ? 'role_status' : @app_type }_toggle_path(role_filter)"), method: :post, remote: true, class: "switch" %>
|
|
||||||
<label><b></b></label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
<% 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 %>
|
||||||
@@ -9,14 +10,6 @@
|
|||||||
<%= stylesheet_link_tag "lib/togglebox.css" %>
|
<%= stylesheet_link_tag "lib/togglebox.css" %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
<div id="filter" class="topnav clearfix">
|
|
||||||
<ul class="breadcrumb text-info pull-left">
|
|
||||||
<li><%= link_to( t("role"), admin_roles_path ) %> <span class="divider">/</span></li>
|
|
||||||
<li class="active">( <%= @role.title %> ) <%= t(@app_type_name) %></a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<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: "icons-plus") + " " + t(:add), eval("new_admin_#{@app_type == 'role_statuses' ? 'role_status' : @app_type }_path(:role_id=>params[:role_id])"), class: "btn btn-primary open-slide" %>
|
<%= link_to content_tag(:i, nil, class: "icons-plus") + " " + t(:add), eval("new_admin_#{@app_type == 'role_statuses' ? 'role_status' : @app_type }_path(:role_id=>params[:role_id])"), class: "btn btn-primary open-slide" %>
|
||||||
@@ -27,4 +20,4 @@
|
|||||||
<%= render 'index' %>
|
<%= render 'index' %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<% @path = "/admin/#{@app_type == 'role_category' ? 'role_categorys' : @app_type }/" %>
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
$("#role_filters_index").html("<%= j render 'index' %>")
|
// $("#role_filters_index").html("<%= j render 'index' %>")
|
||||||
|
location.reload();
|
||||||
$.pageslide.close();
|
$.pageslide.close();
|
||||||
openSlide();
|
openSlide();
|
||||||
@@ -2,7 +2,6 @@
|
|||||||
<%= 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/wrap-nav.css" %>
|
<%= stylesheet_link_tag "lib/wrap-nav.css" %>
|
||||||
<%= stylesheet_link_tag "lib/pageslide.css" %>
|
<%= stylesheet_link_tag "lib/pageslide.css" %>
|
||||||
@@ -10,13 +9,6 @@
|
|||||||
<%= stylesheet_link_tag "lib/togglebox.css" %>
|
<%= stylesheet_link_tag "lib/togglebox.css" %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
<div id="filter" class="topnav clearfix">
|
|
||||||
<ul class="breadcrumb text-info pull-left">
|
|
||||||
<li><%= link_to( t("#{@attribute_type}"), admin_roles_path ) %>/</span></li>
|
|
||||||
<li class="active"><%= @attribute.title %></a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="bottomnav clearfix">
|
<div class="bottomnav clearfix">
|
||||||
<div class="action pull-right">
|
<div class="action pull-right">
|
||||||
<%= link_to content_tag(:i,t("new.sub_role"),:class=>"icon-plus"),eval("admin_#{@attribute_type}_add_sub_role_path(@attribute)"),:class=>"btn btn-primary open-slide"%>
|
<%= link_to content_tag(:i,t("new.sub_role"),:class=>"icon-plus"),eval("admin_#{@attribute_type}_add_sub_role_path(@attribute)"),:class=>"btn btn-primary open-slide"%>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<%=render :partial=>"role",:collection=>Role.all.asc("_id")%>
|
<%=render :partial=>"role",:collection=>Role.where(:disabled=>false).asc("_id")%>
|
||||||
@@ -1,12 +1,20 @@
|
|||||||
<% if @menu_page && @menu_page.visible_children.size > 0 %>
|
<% if @menu_page %>
|
||||||
<div class='category_list'>
|
<div class='category_list'>
|
||||||
<!-- <h3 class='h3'><%#= @menu_page.title %></h3> -->
|
<!-- <h3 class='h3'><%#= @menu_page.title %></h3> -->
|
||||||
<ul class='list'>
|
<ul class='list'>
|
||||||
|
|
||||||
<% @menu_page.visible_children.each do |child| %>
|
<% @menu_page.visible_children.each do |child| %>
|
||||||
|
<% if @menu_page.visible_children.nil?%>
|
||||||
|
<p>Test</p>
|
||||||
|
<li class="<%= @page_id.eql?(child.parent.id) ? 'active' : nil %>">
|
||||||
|
<a href="<%= (child.parent.class.to_s.eql?('Page') ? '/' + child.parent.path : child.parent.url) %>"><%= child.parent.title %></a>
|
||||||
|
</li>
|
||||||
|
<% else %>
|
||||||
<li class="<%= @page_id.eql?(child.id) ? 'active' : nil %>">
|
<li class="<%= @page_id.eql?(child.id) ? 'active' : nil %>">
|
||||||
<a href="<%= (child.class.to_s.eql?('Page') ? '/' + child.path : child.url) %>"><%= child.title %></a>
|
<a href="<%= (child.class.to_s.eql?('Page') ? '/' + child.path : child.url) %>"><%= child.title %></a>
|
||||||
</li>
|
</li>
|
||||||
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -24,8 +24,16 @@
|
|||||||
<div class="wrap-inner">
|
<div class="wrap-inner">
|
||||||
<div id="filter" class="topnav clearfix">
|
<div id="filter" class="topnav clearfix">
|
||||||
<ul class="breadcrumb text-info pull-left">
|
<ul class="breadcrumb text-info pull-left">
|
||||||
|
<% if !@role.blank? %>
|
||||||
|
<li><%= link_to( t("role"), admin_roles_path ) %> <span class="divider">/</span></li>
|
||||||
|
<li class="active">( <%= @role.title %> ) <%= t(@app_type_name) %></a></li>
|
||||||
|
<% elsif !@attribute.blank? %>
|
||||||
|
<li><%= link_to( t("#{@attribute_type}"), admin_roles_path ) %>/</span></li>
|
||||||
|
<li class="active"><%= @attribute.title %></a></li>
|
||||||
|
<% else %>
|
||||||
<li><a href="<%= admin_users_new_interface_index_path %>">Member</a> <span class="divider">/</span></li>
|
<li><a href="<%= admin_users_new_interface_index_path %>">Member</a> <span class="divider">/</span></li>
|
||||||
<li class="active">All</li>
|
<li class="active">All</li>
|
||||||
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
<%= yield :right_nav %>
|
<%= yield :right_nav %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+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: orbit_site_new
|
database: test_site
|
||||||
@@ -207,6 +207,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'
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ module ParserFrontEnd
|
|||||||
ret = ''
|
ret = ''
|
||||||
part = PagePart.find(front['part_id']) if front['part_id']
|
part = PagePart.find(front['part_id']) if front['part_id']
|
||||||
ret << eval("\"#{front['path']}\"") rescue ''
|
ret << eval("\"#{front['path']}\"") rescue ''
|
||||||
ret << (ret.include?("?") ? "&#{args.to_param}" : "?#{args.to_param}") if args
|
ret << (ret.include?("?") ? "&#{args.to_param}" : "?#{args.to_param}") if args.present?
|
||||||
fragment = Nokogiri::HTML::DocumentFragment.new(body, "<div class='dymanic_load widget' path='#{ret}'></div>")
|
fragment = Nokogiri::HTML::DocumentFragment.new(body, "<div class='dymanic_load widget' path='#{ret}'></div>")
|
||||||
end
|
end
|
||||||
front.swap(fragment)
|
front.swap(fragment)
|
||||||
|
|||||||
Whitespace-only changes.
@@ -0,0 +1,131 @@
|
|||||||
|
var Locations = function(ls){
|
||||||
|
l = this;
|
||||||
|
this.name = "Locations";
|
||||||
|
this.locations = ls;
|
||||||
|
this.markerCounts = 0;
|
||||||
|
var map = null,
|
||||||
|
infowindow = new google.maps.InfoWindow(),
|
||||||
|
default_location = new google.maps.LatLng( 24.8043107, 121.03042159999995 ),
|
||||||
|
infowindow_template = "<div class='title'></div><div class='image'><img class='thumbnail' src='' /></div>",
|
||||||
|
markers = [];
|
||||||
|
|
||||||
|
|
||||||
|
var initialize = function() {
|
||||||
|
google.maps.visualRefresh = true;
|
||||||
|
var location = ( l.locations.length ? new google.maps.LatLng( l.locations[0].latitude, l.locations[0].longitude ) : default_location ),
|
||||||
|
mapOptions = {
|
||||||
|
zoom: 16,
|
||||||
|
center: location,
|
||||||
|
mapTypeId: google.maps.MapTypeId.ROADMAP
|
||||||
|
};
|
||||||
|
|
||||||
|
map = new google.maps.Map( document.getElementById('map'), mapOptions );
|
||||||
|
|
||||||
|
for( i = 0; i < l.locations.length; i++ ){
|
||||||
|
markers.push( addMarker( new google.maps.LatLng(l.locations[i].latitude, l.locations[i].longitude), l.locations[i].color, i, function( index ){
|
||||||
|
|
||||||
|
}) );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
var addMarker = function( location, pinColor, index, markerCallback ){
|
||||||
|
|
||||||
|
var pin = getPin(( pinColor.substr( 0, 1 ) == "#" ? pinColor.replace("#","") : pinColor )),
|
||||||
|
marker = new google.maps.Marker({
|
||||||
|
map: map,
|
||||||
|
icon: pin.image,
|
||||||
|
shadow: pin.shadow,
|
||||||
|
position: location,
|
||||||
|
zIndex: 10
|
||||||
|
});
|
||||||
|
|
||||||
|
google.maps.event.addListener( marker, 'click', function() {
|
||||||
|
|
||||||
|
infowindow.setContent( getTemplate( index ) );
|
||||||
|
infowindow.open( map, marker );
|
||||||
|
if( typeof markerCallback == "function" )
|
||||||
|
markerCallback.call( this, index );
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
l.markerCounts++;
|
||||||
|
return {"marker" : marker, "category_id" : l.locations[index].category_id};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var getTemplate = function( obj ){
|
||||||
|
|
||||||
|
var object = ( typeof obj == "number" ? l.locations[obj] : ( typeof obj == "object" ? obj : null ) );
|
||||||
|
|
||||||
|
if ( object ){
|
||||||
|
|
||||||
|
var template = $( "<div></div>" );
|
||||||
|
template.html( infowindow_template );
|
||||||
|
template.find( '.title' ).text( object.name );
|
||||||
|
template.find( "img.thumbnail" ).attr( "src", object.file.thumb.url );
|
||||||
|
return template.html();
|
||||||
|
|
||||||
|
}else{
|
||||||
|
|
||||||
|
throw new InvalidObjectError();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
var getPin = function( color ){
|
||||||
|
|
||||||
|
var pinImage = new google.maps.MarkerImage("http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld=%E2%80%A2|" + color,
|
||||||
|
new google.maps.Size(21, 34),
|
||||||
|
new google.maps.Point(0,0),
|
||||||
|
new google.maps.Point(10, 34));
|
||||||
|
|
||||||
|
var pinShadow = new google.maps.MarkerImage("http://chart.apis.google.com/chart?chst=d_map_pin_shadow",
|
||||||
|
new google.maps.Size(40, 37),
|
||||||
|
new google.maps.Point(0, 0),
|
||||||
|
new google.maps.Point(12, 35));
|
||||||
|
|
||||||
|
return {"image":pinImage,"shadow":pinShadow};
|
||||||
|
}
|
||||||
|
|
||||||
|
this.getMarker = function( index ){
|
||||||
|
return markers[index];
|
||||||
|
}
|
||||||
|
this.getAllMarkers = function( ){
|
||||||
|
return markers;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.clearFilter = function(){
|
||||||
|
var m = l.getAllMarkers();
|
||||||
|
for( i = 0; i < m.length; i++ ){
|
||||||
|
m[i].marker.setVisible(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.filterMarkers = function( categories ){
|
||||||
|
var filtered = [],
|
||||||
|
m = l.getAllMarkers();
|
||||||
|
|
||||||
|
for( i = 0; i < m.length; i++ ){
|
||||||
|
m[i].marker.setVisible(false);
|
||||||
|
}
|
||||||
|
for( i = 0; i < categories.length; i++ ){
|
||||||
|
filtered = filtered.concat(m.filter(function(a){return a.category_id == categories[i]}));
|
||||||
|
}
|
||||||
|
for( i = 0; i < filtered.length; i++ ){
|
||||||
|
filtered[i].marker.setVisible(true);
|
||||||
|
}
|
||||||
|
return filtered;
|
||||||
|
}
|
||||||
|
initialize();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
var InvalidObjectError = function(){
|
||||||
|
this.name = "InvalidObjectError";
|
||||||
|
this.message = "Object not valid";
|
||||||
|
}
|
||||||
|
|
||||||
|
InvalidObjectError.prototype = new Error();
|
||||||
|
InvalidObjectError.prototype.constructor = InvalidObjectError;
|
||||||
-2
@@ -1,2 +0,0 @@
|
|||||||
// Place all the behaviors and hooks related to the matching controller here.
|
|
||||||
// All this logic will automatically be available in application.js.
|
|
||||||
Vendored
+9
-1
@@ -2,8 +2,13 @@ class Panel::Location::BackEnd::LocationsController < OrbitBackendController
|
|||||||
include AdminHelper
|
include AdminHelper
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@location_infos = LocationInfo.all
|
@locations = LocationInfo.all
|
||||||
@categories = get_categories_for_index
|
@categories = get_categories_for_index
|
||||||
|
@location_infos = [];
|
||||||
|
@locations.each do |loc|
|
||||||
|
loc['color'] = Category.find(loc.category_id).custom_value
|
||||||
|
@location_infos << loc
|
||||||
|
end
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html # new.html.erb
|
format.html # new.html.erb
|
||||||
format.json { render json: @locations }
|
format.json { render json: @locations }
|
||||||
@@ -22,6 +27,8 @@ class Panel::Location::BackEnd::LocationsController < OrbitBackendController
|
|||||||
|
|
||||||
def edit
|
def edit
|
||||||
@location_info = LocationInfo.find(params[:id])
|
@location_info = LocationInfo.find(params[:id])
|
||||||
|
@categories = get_categories_for_index
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
@@ -34,6 +41,7 @@ class Panel::Location::BackEnd::LocationsController < OrbitBackendController
|
|||||||
|
|
||||||
def create
|
def create
|
||||||
@location_info = LocationInfo.new(params[:location_info])
|
@location_info = LocationInfo.new(params[:location_info])
|
||||||
|
@categories = get_categories_for_index
|
||||||
if @location_info.save
|
if @location_info.save
|
||||||
flash[:success] = "Success!!"
|
flash[:success] = "Success!!"
|
||||||
redirect_to panel_location_back_end_locations_url
|
redirect_to panel_location_back_end_locations_url
|
||||||
|
|||||||
Vendored
+12
@@ -0,0 +1,12 @@
|
|||||||
|
class Panel::Location::FrontEnd::LocationsController < OrbitWidgetController
|
||||||
|
def index
|
||||||
|
@categories = @module_app.categories.enabled
|
||||||
|
@locations = LocationInfo.all
|
||||||
|
|
||||||
|
@location_infos = [];
|
||||||
|
@locations.each do |loc|
|
||||||
|
loc['color'] = Category.find(loc.category_id).custom_value
|
||||||
|
@location_infos << loc
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
Vendored
+17
@@ -0,0 +1,17 @@
|
|||||||
|
class Panel::Location::Widget::LocationsController < OrbitWidgetController
|
||||||
|
def location_widget
|
||||||
|
@categories = params[:category_id]
|
||||||
|
locations = LocationInfo.where(:category_id.in => @categories)
|
||||||
|
@url = "http://maps.googleapis.com/maps/api/staticmap?zoom=16&size=400x400&maptype=roadmap%20&sensor=false&"
|
||||||
|
markers = ""
|
||||||
|
locations.each do |loc|
|
||||||
|
color = Category.find(loc.category_id).custom_value
|
||||||
|
color.gsub!("#","")
|
||||||
|
markers = markers + "markers=color:0x#{color}|#{loc.latitude},#{loc.longitude}&"
|
||||||
|
end
|
||||||
|
@url = @url + markers.chop
|
||||||
|
# http://maps.googleapis.com/maps/api/staticmap?zoom=13&size=600x300&maptype=roadmap%20&markers=color:0xCF2C9B|40.702147,-74.015794&markers=color:CF2C9B|label:G|40.711614,-74.012318%20&markers=color:red|color:red|label:C|40.718217,-73.998284&sensor=false
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
Vendored
+1
-1
@@ -19,8 +19,8 @@
|
|||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label" for=""><%= t 'coordinates' %></label>
|
<label class="control-label" for=""><%= t 'coordinates' %></label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
|
<%= f.text_field :latitude, :class=>"span2", :placeholder => "Latitude" %>
|
||||||
<%= f.text_field :longitude, :class=>"span2", :placeholder => "Longitude" %>
|
<%= f.text_field :longitude, :class=>"span2", :placeholder => "Longitude" %>
|
||||||
<%= f.text_field :latitude, :class=>"span2", :placeholder => "Langitude" %>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Vendored
+40
@@ -1,3 +1,5 @@
|
|||||||
|
<script src="http://maps.google.com/maps/api/js?sensor=true"></script>
|
||||||
|
<%= javascript_include_tag "location" %>
|
||||||
<table class="table main-list">
|
<table class="table main-list">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -28,6 +30,44 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<div>
|
||||||
|
Categories :
|
||||||
|
</div>
|
||||||
|
<div class="btn-group">
|
||||||
|
<% @categories.each do |category| %>
|
||||||
|
<button class="btn cat-filter" data-category='<%= category.id %>'><%= category.title %></button>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<a href="javascript:void(0);" id="clear_filter">Clear Filter</a>
|
||||||
|
<div id="map" style="width: 100%; height: 500px;"></div>
|
||||||
<%if is_manager? %>
|
<%if is_manager? %>
|
||||||
<td><%= link_to 'Add', new_panel_location_back_end_location_path, :class => "btn btn-primary pull-right", :id=>"create_event_btn", :ref=>"add-btn"%></td>
|
<td><%= link_to 'Add', new_panel_location_back_end_location_path, :class => "btn btn-primary pull-right", :id=>"create_event_btn", :ref=>"add-btn"%></td>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
var loc = new Locations(<%= @location_infos.to_json.html_safe %>);
|
||||||
|
jQuery(document).ready(function($) {
|
||||||
|
var filterCategories = [];
|
||||||
|
$("button.cat-filter").bind( clickEvent,function(){
|
||||||
|
var catid = $( this ).data('category');
|
||||||
|
|
||||||
|
if ( $( this ).hasClass('active') ){
|
||||||
|
$( this ).removeClass('active');
|
||||||
|
var index = filterCategories.indexOf(filterCategories.filter(function(a,i){ return a == catid })[0]);
|
||||||
|
filterCategories.splice( index, 1 );
|
||||||
|
}else{
|
||||||
|
$( this ).addClass('active');
|
||||||
|
filterCategories.push( catid );
|
||||||
|
}
|
||||||
|
loc.filterMarkers(filterCategories);
|
||||||
|
})
|
||||||
|
|
||||||
|
$("a#clear_filter").bind( clickEvent, function(){
|
||||||
|
filterCategories = [];
|
||||||
|
$("button.cat-filter").removeClass('active');
|
||||||
|
loc.clearFilter();
|
||||||
|
})
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
Vendored
+40
@@ -0,0 +1,40 @@
|
|||||||
|
<%= javascript_include_tag "location" %>
|
||||||
|
<div>
|
||||||
|
Categories :
|
||||||
|
<% @categories.each do |category| %>
|
||||||
|
<input type="checkbox" class="btn cat-filter" data-category='<%= category.id %>' /><%= category.title %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<a href="javascript:void(0);" id="clear_filter">Clear Filter</a>
|
||||||
|
<div id="map" style="width: 100%; height: 500px;"></div>
|
||||||
|
<script>
|
||||||
|
var loc = null;
|
||||||
|
var initialize = function(){
|
||||||
|
loc = new Locations(<%= @location_infos.to_json.html_safe %>);
|
||||||
|
}
|
||||||
|
|
||||||
|
jQuery(document).ready(function($) {
|
||||||
|
var filterCategories = [];
|
||||||
|
$("input.cat-filter").bind( "click",function(){
|
||||||
|
var catid = $( this ).data('category');
|
||||||
|
|
||||||
|
if ( !$( this ).is(':checked') ){
|
||||||
|
|
||||||
|
var index = filterCategories.indexOf(filterCategories.filter(function(a,i){ return a == catid })[0]);
|
||||||
|
filterCategories.splice( index, 1 );
|
||||||
|
}else{
|
||||||
|
|
||||||
|
filterCategories.push( catid );
|
||||||
|
}
|
||||||
|
loc.filterMarkers(filterCategories);
|
||||||
|
})
|
||||||
|
|
||||||
|
$("a#clear_filter").bind( "click", function(){
|
||||||
|
filterCategories = [];
|
||||||
|
$("input.cat-filter").prop('checked',false);
|
||||||
|
loc.clearFilter();
|
||||||
|
})
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<script src="http://maps.google.com/maps/api/js?sensor=true&callback=initialize"></script>
|
||||||
Vendored
+3
@@ -0,0 +1,3 @@
|
|||||||
|
<a href="<%= panel_location_front_end_locations_path %>" >
|
||||||
|
<%= image_tag @url, :width=>"300", :height=>"300" %>
|
||||||
|
</a>
|
||||||
@@ -9,6 +9,12 @@ Rails.application.routes.draw do
|
|||||||
|
|
||||||
resources :locations
|
resources :locations
|
||||||
end
|
end
|
||||||
|
namespace :front_end do
|
||||||
|
resources :locations
|
||||||
|
end
|
||||||
|
namespace :widget do
|
||||||
|
match "location_widget" => "locations#location_widget"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
+16
-8
@@ -4,15 +4,17 @@ module Location
|
|||||||
base_url File.expand_path File.dirname(__FILE__)
|
base_url File.expand_path File.dirname(__FILE__)
|
||||||
# personal_plugin :enable => true,:path=>"panel/location/plugin/profile",:i18n=>'admin.location'
|
# personal_plugin :enable => true,:path=>"panel/location/plugin/profile",:i18n=>'admin.location'
|
||||||
|
|
||||||
# version "0.1"
|
version "0.1"
|
||||||
# organization "Rulingcom"
|
organization "Rulingcom"
|
||||||
# author "RD dep"
|
author "RD dep"
|
||||||
# intro "I am intro"
|
intro "I am intro"
|
||||||
# update_info 'some update_info'
|
update_info 'some update_info'
|
||||||
|
|
||||||
# front_end do
|
front_end do
|
||||||
# app_page 'bulletins'
|
app_page 'locations' do
|
||||||
# end
|
frontend_i18n 'location.location'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
# category ["BulletinCategory"]
|
# category ["BulletinCategory"]
|
||||||
|
|
||||||
@@ -33,6 +35,12 @@ module Location
|
|||||||
|
|
||||||
categorizable
|
categorizable
|
||||||
authorizable
|
authorizable
|
||||||
|
|
||||||
|
widgets do
|
||||||
|
customize_widget "location_widget" do
|
||||||
|
widget_i18n "location.location"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
side_bar do
|
side_bar do
|
||||||
head_label_i18n 'location.location',:icon_class=>"icons-location"
|
head_label_i18n 'location.location',:icon_class=>"icons-location"
|
||||||
|
|||||||
Vendored
+16
-11
@@ -27,22 +27,27 @@ class Panel::Member::FrontEnd::MemberListsController < OrbitWidgetController
|
|||||||
@member_role = Role.where(:_id => @role_id)
|
@member_role = Role.where(:_id => @role_id)
|
||||||
|
|
||||||
@member_subroles = SubRole.where(:role_id => @role_id, :disabled => false)
|
@member_subroles = SubRole.where(:role_id => @role_id, :disabled => false)
|
||||||
|
|
||||||
|
@member_list_categorys = RoleCategory.can_display.any_in(:_id => params[:tag_id]).asc("key")
|
||||||
|
|
||||||
@member_list_categorys = RoleCategory.where(:role_id => @role_id,disable: false).asc("key")
|
@member_status = RoleStatus.can_display.any_in(:_id => params[:category_id]).asc("key")
|
||||||
|
|
||||||
if !params[:category_id].blank?
|
@mlcs = @member_list_categorys.map{|category| category.id.to_s }
|
||||||
@member_status = RoleStatus.can_display.any_in(:_id => params[:category_id]).asc("key")
|
|
||||||
|
@mcs = params[:mcid].blank? ? @mlcs.first : params[:mcid]
|
||||||
|
|
||||||
|
if !@member_list_categorys.blank? or !@member_status.blank?
|
||||||
|
|
||||||
|
if !@mcs.blank? and @mlcs.include?(@mcs)
|
||||||
|
@member_lists = User.where(:role_ids => @role_id,:role_category_ids => @mcs).asc(:position)
|
||||||
|
else
|
||||||
|
@member_lists = User.where(:role_ids => @role_id).asc(:position)
|
||||||
|
end
|
||||||
else
|
else
|
||||||
@member_status = RoleStatus.can_display.where(:role_id => @role_id).asc("key")
|
# @member_lists = User.where(:role_ids => @role_id)
|
||||||
|
@member_lists = ''
|
||||||
end
|
end
|
||||||
|
|
||||||
if !params[:mcid].blank?
|
|
||||||
@member_lists = User.where(:role_ids => @role_id, :role_category_ids => params[:mcid])
|
|
||||||
else
|
|
||||||
@member_lists = User.where(:role_ids => @role_id)
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
|||||||
Vendored
+15
-10
@@ -1,5 +1,9 @@
|
|||||||
<% # encoding: utf-8 %>
|
<% # encoding: utf-8 %>
|
||||||
|
|
||||||
|
<% if !@member_lists.blank? %>
|
||||||
|
|
||||||
|
<% @job_title_field = @member_lists.get_member_list_attribute_field("teacher","job_title") %>
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
|
|
||||||
<div class="side"></div>
|
<div class="side"></div>
|
||||||
@@ -8,7 +12,7 @@
|
|||||||
<% if !@member_list_categorys.blank? %>
|
<% if !@member_list_categorys.blank? %>
|
||||||
<ul class="o-members-nav">
|
<ul class="o-members-nav">
|
||||||
<% @member_list_categorys.each do |mc| %>
|
<% @member_list_categorys.each do |mc| %>
|
||||||
<li class="<%= (params[:mcid] == mc.id.to_s) ? 'active' : '' %>"><a href="?&mcid=<%= mc.id %>"><%= mc.title %></a></li>
|
<li class="<%= (params[:mcid] == mc.id.to_s or @mcs.to_s == mc.id.to_s) ? 'active' : '' %>"><a href="?&mcid=<%= mc.id %>"><%= mc.title %></a></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -17,6 +21,8 @@
|
|||||||
|
|
||||||
<div class="o-members">
|
<div class="o-members">
|
||||||
|
|
||||||
|
<%# @member_lists = @member_lists.where(:role_category_ids => @mcs) if !@mcs.blank? and @mlcs.include?(@mcs) %>
|
||||||
|
|
||||||
<% @member_status.each do |ms| %>
|
<% @member_status.each do |ms| %>
|
||||||
|
|
||||||
<% if @member_lists.where(:role_status_ids=>ms.id).count > 0 %>
|
<% if @member_lists.where(:role_status_ids=>ms.id).count > 0 %>
|
||||||
@@ -30,11 +36,11 @@
|
|||||||
<div class="o-members-pic"><%= show_avatar(member) %></div>
|
<div class="o-members-pic"><%= show_avatar(member) %></div>
|
||||||
<ul class="o-members-info">
|
<ul class="o-members-info">
|
||||||
<li><b class="o-members-label"><%= t("users.name")%></b><%= link_to member.name, panel_member_front_end_member_list_path(member.id), {:class => "o-members-link"} %></li>
|
<li><b class="o-members-label"><%= t("users.name")%></b><%= link_to member.name, panel_member_front_end_member_list_path(member.id), {:class => "o-members-link"} %></li>
|
||||||
<% @job_title = show_attribute_value(@member_lists.get_member_list_attribute_value(member.id,"teacher","job_title").get_value_by_locale(I18n.locale))
|
<% @job_title = @member_lists.get_member_list_attribute_value(member.id,@job_title_field.id).get_value_by_locale(I18n.locale)
|
||||||
if @job_title != 'NoData' and !@job_title.blank?
|
if @job_title != 'NoData' and !@job_title.blank?
|
||||||
%>
|
%>
|
||||||
<li><b class="o-members-label">
|
<li><b class="o-members-label">
|
||||||
<%= @member_lists.get_member_list_attribute_field_name("teacher","job_title") %></b>
|
<%= @job_title_field.title %></b>
|
||||||
<%= @job_title %>
|
<%= @job_title %>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -55,12 +61,10 @@
|
|||||||
|
|
||||||
<% elsif @item.frontend_style == 'Two' or @item.frontend_style.blank? %>
|
<% elsif @item.frontend_style == 'Two' or @item.frontend_style.blank? %>
|
||||||
|
|
||||||
<section>
|
|
||||||
|
|
||||||
<div class="side"></div>
|
|
||||||
<div class="main">
|
|
||||||
<div class="o-members view-columns">
|
<div class="o-members view-columns">
|
||||||
|
|
||||||
|
<%# @member_lists = @member_lists.where(:role_category_ids => @mcs) if !@mcs.blank? %>
|
||||||
|
|
||||||
<% @member_status.each do |ms| %>
|
<% @member_status.each do |ms| %>
|
||||||
|
|
||||||
<% if @member_lists.where(:role_status_ids=>ms.id).count > 0 %>
|
<% if @member_lists.where(:role_status_ids=>ms.id).count > 0 %>
|
||||||
@@ -74,10 +78,10 @@
|
|||||||
<div class="o-members-pic"><%= show_avatar(member) %></div>
|
<div class="o-members-pic"><%= show_avatar(member) %></div>
|
||||||
<ul class="o-members-info">
|
<ul class="o-members-info">
|
||||||
<li><b class="o-members-label"><%= t("users.name")%></b><%= link_to member.name, panel_member_front_end_member_list_path(member.id), {:class => "o-members-link"} %></li>
|
<li><b class="o-members-label"><%= t("users.name")%></b><%= link_to member.name, panel_member_front_end_member_list_path(member.id), {:class => "o-members-link"} %></li>
|
||||||
<% @job_title = show_attribute_value(@member_lists.get_member_list_attribute_value(member.id,"teacher","job_title").get_value_by_locale(I18n.locale))
|
<% @job_title = @member_lists.get_member_list_attribute_value(member.id,@job_title_field.id).get_value_by_locale(I18n.locale)
|
||||||
if @job_title != 'NoData' and !@job_title.blank?
|
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>
|
<li><b class="o-members-label"><%= @job_title_field.title %></b><%= @job_title %></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<li><b class="o-members-label"><%= t("users.email")%></b> <%= member.email %></li>
|
<li><b class="o-members-label"><%= t("users.email")%></b> <%= member.email %></li>
|
||||||
<li><b class="o-members-label"><%= t("users.office_tel")%></b><%= member.office_tel %></li>
|
<li><b class="o-members-label"><%= t("users.office_tel")%></b><%= member.office_tel %></li>
|
||||||
@@ -98,5 +102,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<%#= stylesheet_link_tag "member/members" %>
|
<%= stylesheet_link_tag "member/members" %>
|
||||||
+1
-1
@@ -36,7 +36,7 @@
|
|||||||
<% end -%>
|
<% end -%>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
<%= render :partial=> "show_roles",:collection=>@member.roles.asc(:created_at) %>
|
<%= render :partial=> "show_roles",:collection=>@member.roles.where(:disabled=>false).asc(:created_at) %>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
+31
-1
@@ -8,6 +8,36 @@
|
|||||||
.o-members-category:first-child {
|
.o-members-category:first-child {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
.o-members-nav {
|
||||||
|
margin: 0 0 10px;
|
||||||
|
padding: 0;
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
.o-members-nav:after {
|
||||||
|
content: "";
|
||||||
|
clear: both;
|
||||||
|
display: block;
|
||||||
|
height: 0;
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
.o-members-nav li {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
.o-members-nav li + li {
|
||||||
|
margin-left: 8px;
|
||||||
|
}
|
||||||
|
.o-members-nav li a {
|
||||||
|
display: inline-block;
|
||||||
|
line-height: 23px;
|
||||||
|
padding: 5px 8px;
|
||||||
|
height: 23px;
|
||||||
|
background-color: #ccc;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
.o-members-nav li.active a {
|
||||||
|
color: #FFF;
|
||||||
|
background-color: #0088CE;
|
||||||
|
}
|
||||||
.o-members-list {
|
.o-members-list {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@@ -107,4 +137,4 @@
|
|||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
}
|
}
|
||||||
+15
-7
@@ -27,17 +27,25 @@ class Panel::MemberStaff::FrontEnd::MemberStaffListsController < OrbitWidgetCont
|
|||||||
@member_role = Role.where(:_id => @role_id)
|
@member_role = Role.where(:_id => @role_id)
|
||||||
|
|
||||||
@member_subroles = SubRole.where(:role_id => @role_id, :disabled => false)
|
@member_subroles = SubRole.where(:role_id => @role_id, :disabled => false)
|
||||||
|
|
||||||
|
@member_list_categorys = RoleCategory.can_display.any_in(:_id => params[:tag_id]).asc("key")
|
||||||
|
|
||||||
if !params[:category_id].blank?
|
@member_status = RoleStatus.can_display.any_in(:_id => params[:category_id]).asc("key")
|
||||||
@member_status = RoleStatus.can_display.any_in(:_id => params[:category_id]).asc("key")
|
|
||||||
|
|
||||||
@member_lists = User.where(:role_ids => @role_id)
|
@mlcs = @member_list_categorys.map{|category| category.id.to_s }
|
||||||
|
|
||||||
|
@mcs = params[:mcid].blank? ? @mlcs.first : params[:mcid]
|
||||||
|
|
||||||
|
if !@member_list_categorys.blank? or !@member_status.blank?
|
||||||
|
|
||||||
|
if !@mcs.blank? and @mlcs.include?(@mcs)
|
||||||
|
@member_lists = User.where(:role_ids => @role_id,:role_category_ids => @mcs).asc(:position)
|
||||||
|
else
|
||||||
|
@member_lists = User.where(:role_ids => @role_id).asc(:position)
|
||||||
|
end
|
||||||
else
|
else
|
||||||
@member_status = RoleStatus.can_display.where(:role_id => @role_id).asc("key")
|
# @member_lists = User.where(:role_ids => @role_id)
|
||||||
|
@member_lists = ''
|
||||||
@member_lists = User.where(:role_ids => @role_id)
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
+93
-28
@@ -1,29 +1,61 @@
|
|||||||
<% # encoding: utf-8 %>
|
<% # encoding: utf-8 %>
|
||||||
|
|
||||||
|
<% if !@member_lists.blank? %>
|
||||||
|
|
||||||
|
<% @job_title_field = @member_lists.get_member_list_attribute_field("staff","job_title") %>
|
||||||
|
<% @job_business_field = @member_lists.get_member_list_attribute_field("staff","business") %>
|
||||||
|
|
||||||
<% if @item.frontend_style == 'Single' %>
|
<% if @item.frontend_style == 'Single' or @item.frontend_style == 'Two' %>
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
|
|
||||||
<div class="side"></div>
|
<div class="side"></div>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
|
|
||||||
|
<% if !@member_list_categorys.blank? %>
|
||||||
|
<ul class="o-members-nav">
|
||||||
|
<% @member_list_categorys.each do |mc| %>
|
||||||
|
<li class="<%= (params[:mcid] == mc.id.to_s or @mcs.to_s == mc.id.to_s) ? 'active' : '' %>"><a href="?&mcid=<%= mc.id %>"><%= mc.title %></a></li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<% if @item.frontend_style == 'Single' %>
|
||||||
|
|
||||||
<div class="o-members">
|
<div class="o-members">
|
||||||
|
|
||||||
<% @member_status.each do |ms| %>
|
<% @member_status.each do |ms| %>
|
||||||
|
|
||||||
|
<% if @member_lists.where(:role_status_ids=>ms.id).count > 0 %>
|
||||||
|
|
||||||
<h3 class="o-members-category h3"><%= ms.title %></h3>
|
<h3 class="o-members-category h3"><%= ms.title %></h3>
|
||||||
<ul class="o-members-list">
|
<ul class="o-members-list">
|
||||||
|
|
||||||
<% @member_lists.get_role_member_data_by_sort(ms.id).each do |member| %>
|
<% @member_lists.where(:role_status_ids=>ms.id).each do |member| %>
|
||||||
|
|
||||||
<li class="odd">
|
<li class="odd">
|
||||||
<div class="o-members-pic"><%= show_avatar(member) %></div>
|
<div class="o-members-pic"><%= show_avatar(member) %></div>
|
||||||
<ul class="o-members-info">
|
<ul class="o-members-info">
|
||||||
<li><b class="o-members-label"><%= @member_lists.get_member_list_attribute_field_name("staff","job_title") %></b><%= show_attribute_value(@member_lists.get_member_list_attribute_value(member.id,"staff","job_title").get_value_by_locale(I18n.locale)) %></li>
|
<% @job_title = @member_lists.get_member_list_attribute_value(member.id,@job_title_field.id).get_value_by_locale(I18n.locale)
|
||||||
|
if @job_title != 'NoData' and !@job_title.blank?
|
||||||
|
%>
|
||||||
|
<li><b class="o-members-label">
|
||||||
|
<%= @job_title_field.title %></b>
|
||||||
|
<%= @job_title %>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
<li><b class="o-members-label"><%= t("users.name")%></b><%= link_to member.name, panel_member_front_end_member_list_path(member.id), {:class => "o-members-link"} %></li>
|
<li><b class="o-members-label"><%= t("users.name")%></b><%= link_to member.name, panel_member_front_end_member_list_path(member.id), {:class => "o-members-link"} %></li>
|
||||||
<li><b class="o-members-label"><%= t("users.office_tel")%></b><%= member.office_tel %></li>
|
<li><b class="o-members-label"><%= t("users.office_tel")%></b><%= member.office_tel %></li>
|
||||||
<li><b class="o-members-label"><%= t("users.email")%></b><%= member.email %></li>
|
<li><b class="o-members-label"><%= t("users.email")%></b><%= member.email %></li>
|
||||||
<li><b class="o-members-label"><%= @member_lists.get_member_list_attribute_field_name("staff","business") %></b><%= nl2br(@member_lists.get_member_list_attribute_value(member.id,"staff","business").get_value_by_locale(I18n.locale)) %></li>
|
|
||||||
<li><b class="o-members-label"><%= @member_lists.get_member_list_attribute_field_name("staff","agent") %></b><%= @member_lists.get_member_list_attribute_value(member.id,"staff","agent").get_value_by_locale(I18n.locale) %></li>
|
<% @job_business = @member_lists.get_member_list_attribute_value(member.id,@job_business_field.id).get_value_by_locale(I18n.locale)
|
||||||
|
if @job_business != 'NoData' and !@job_business.blank?
|
||||||
|
%>
|
||||||
|
<li><b class="o-members-label">
|
||||||
|
<%= @job_business_field.title %></b>
|
||||||
|
<%= @job_business %>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
@@ -33,34 +65,47 @@
|
|||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
<% end %>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<% elsif @item.frontend_style == 'Two' %>
|
<% elsif @item.frontend_style == 'Two' %>
|
||||||
|
|
||||||
<section>
|
|
||||||
|
|
||||||
<div class="side"></div>
|
|
||||||
<div class="main">
|
|
||||||
<div class="o-members view-columns">
|
<div class="o-members view-columns">
|
||||||
|
|
||||||
<% @member_status.each do |ms| %>
|
<% @member_status.each do |ms| %>
|
||||||
|
|
||||||
|
<% if @member_lists.where(:role_status_ids=>ms.id).count > 0 %>
|
||||||
|
|
||||||
<h3 class="o-members-category h3"><%= ms.title %></h3>
|
<h3 class="o-members-category h3"><%= ms.title %></h3>
|
||||||
<ul class="o-members-list">
|
<ul class="o-members-list">
|
||||||
|
|
||||||
<% @member_lists.get_role_member_data_by_sort(ms.id).each_with_index do |member, i| %>
|
<% @member_lists.where(:role_status_ids=>ms.id).each_with_index do |member, i| %>
|
||||||
|
|
||||||
<li <%= ( (i + 1) % 2 != 0 ) ? "class=odd" : '' %>>
|
<li <%= ( (i + 1) % 2 != 0 ) ? "class=odd" : '' %>>
|
||||||
<div class="o-members-pic"><%= show_avatar(member) %></div>
|
<div class="o-members-pic"><%= show_avatar(member) %></div>
|
||||||
<ul class="o-members-info">
|
<ul class="o-members-info">
|
||||||
<li><b class="o-members-label"><%= @member_lists.get_member_list_attribute_field_name("staff","job_title") %></b><%= show_attribute_value(@member_lists.get_member_list_attribute_value(member.id,"staff","job_title").get_value_by_locale(I18n.locale)) %></li>
|
<% @job_title = @member_lists.get_member_list_attribute_value(member.id,@job_title_field.id).get_value_by_locale(I18n.locale)
|
||||||
|
if @job_title != 'NoData' and !@job_title.blank?
|
||||||
|
%>
|
||||||
|
<li><b class="o-members-label">
|
||||||
|
<%= @job_title_field.title %></b>
|
||||||
|
<%= @job_title %>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
<li><b class="o-members-label"><%= t("users.name")%></b><%= link_to member.name, panel_member_front_end_member_list_path(member.id), {:class => "o-members-link"} %></li>
|
<li><b class="o-members-label"><%= t("users.name")%></b><%= link_to member.name, panel_member_front_end_member_list_path(member.id), {:class => "o-members-link"} %></li>
|
||||||
<li><b class="o-members-label"><%= t("users.office_tel")%></b><%= member.office_tel %></li>
|
<li><b class="o-members-label"><%= t("users.office_tel")%></b><%= member.office_tel %></li>
|
||||||
<li><b class="o-members-label"><%= t("users.email")%></b><%= member.email %></li>
|
<li><b class="o-members-label"><%= t("users.email")%></b><%= member.email %></li>
|
||||||
<li><b class="o-members-label"><%= @member_lists.get_member_list_attribute_field_name("staff","business") %></b><%= nl2br(@member_lists.get_member_list_attribute_value(member.id,"staff","business").get_value_by_locale(I18n.locale)) %></li>
|
|
||||||
<li><b class="o-members-label"><%= @member_lists.get_member_list_attribute_field_name("staff","agent") %></b><%= @member_lists.get_member_list_attribute_value(member.id,"staff","agent").get_value_by_locale(I18n.locale) %></li>
|
|
||||||
|
<% @job_business = @member_lists.get_member_list_attribute_value(member.id,@job_business_field.id).get_value_by_locale(I18n.locale)
|
||||||
|
if @job_business != 'NoData' and !@job_business.blank?
|
||||||
|
%>
|
||||||
|
<li><b class="o-members-label">
|
||||||
|
<%= @job_business_field.title %></b>
|
||||||
|
<%= @job_business %>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
@@ -70,47 +115,64 @@
|
|||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
<% end %>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<% end %>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<% elsif @item.frontend_style == 'List' %>
|
<% elsif @item.frontend_style == 'List' %>
|
||||||
|
|
||||||
|
<% if !@member_list_categorys.blank? %>
|
||||||
|
<ul class="o-members-nav">
|
||||||
|
<% @member_list_categorys.each do |mc| %>
|
||||||
|
<li class="<%= (params[:mcid] == mc.id.to_s or @mcs.to_s == mc.id.to_s) ? 'active' : '' %>"><a href="?&mcid=<%= mc.id %>"><%= mc.title %></a></li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<div class="o-members view-ntu-lists">
|
<div class="o-members view-ntu-lists">
|
||||||
|
|
||||||
<% @member_status.each do |ms| %>
|
<% @member_status.each do |ms| %>
|
||||||
|
|
||||||
|
<% if @member_lists.where(:role_status_ids=>ms.id).count > 0 %>
|
||||||
|
|
||||||
<h3 class="o-members-category h3"><%= ms.title %></h3>
|
<h3 class="o-members-category h3"><%= ms.title %></h3>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td><span class="job_title"><%= @member_lists.get_member_list_attribute_field_name("staff","job_title") %></span></td>
|
<td><span class="job_title"><%= @job_title_field.title %></span></td>
|
||||||
<td><span class="name"><%= t("users.name")%></span></td>
|
<td><span class="name"><%= t("users.name")%></span></td>
|
||||||
<td><span class="tel"><%= t("users.office_tel")%></span></td>
|
<td><span class="tel"><%= t("users.office_tel")%></span></td>
|
||||||
<td><span class="business"><%= @member_lists.get_member_list_attribute_field_name("staff","business") %></span></td>
|
<td><span class="business"><%= @job_business_field.title %></span></td>
|
||||||
<td><span class="agent"><%= @member_lists.get_member_list_attribute_field_name("staff","agent") %></span></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
||||||
<% @member_lists.get_role_member_data_by_sort(ms.id).each_with_index do |member, i| %>
|
<% @member_lists.where(:role_status_ids=>ms.id).each_with_index do |member, i| %>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<span class="job_title">
|
<span class="job_title">
|
||||||
<%= show_attribute_value(@member_lists.get_member_list_attribute_value(member.id,"staff","job_title").get_value_by_locale(I18n.locale)) rescue '' %>
|
<% @job_title = @member_lists.get_member_list_attribute_value(member.id,@job_title_field.id).get_value_by_locale(I18n.locale)
|
||||||
|
if @job_title != 'NoData' and !@job_title.blank?
|
||||||
|
%>
|
||||||
|
<%= @job_title %>
|
||||||
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td><span class="name"><%= link_to member.name, "mailto:#{member.email}" %></span></td>
|
<td><span class="name"><%= link_to member.name, "mailto:#{member.email}" %></span></td>
|
||||||
<td><span class="tel"><%= member.office_tel %></span></td>
|
<td><span class="tel"><%= member.office_tel %></span></td>
|
||||||
<td>
|
<td>
|
||||||
<span class="business">
|
<span class="business">
|
||||||
<%= nl2br(@member_lists.get_member_list_attribute_value(member.id,"staff","business").get_value_by_locale(I18n.locale)) rescue '' %>
|
<% @job_business = @member_lists.get_member_list_attribute_value(member.id,@job_business_field.id).get_value_by_locale(I18n.locale)
|
||||||
</span>
|
if @job_business != 'NoData' and !@job_business.blank?
|
||||||
</td>
|
%>
|
||||||
<td>
|
<%= @job_business %>
|
||||||
<span class="agent">
|
<% end %>
|
||||||
<%= @member_lists.get_member_list_attribute_value(member.id,"staff","agent").get_value_by_locale(I18n.locale) rescue '' %>
|
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -121,9 +183,12 @@
|
|||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
<% end %>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<%= stylesheet_link_tag "member_staff/members" %>
|
<%= stylesheet_link_tag "member_staff/members" %>
|
||||||
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
quick_edit_link type: 'edit',
|
quick_edit_link type: 'edit',
|
||||||
link: 'edit_panel_page_content_back_end_page_context_path'
|
link: 'edit_panel_page_content_back_end_page_context_path'
|
||||||
quick_edit_link type: 'authorization',
|
quick_edit_link type: 'authorization',
|
||||||
link: "admin_authorizations_path(@module_app.key, 'page_context', object.id)"
|
link: "admin_authorizations_path(@module_app.key, 'page_context_authorization', object.id)"
|
||||||
field type: 'associated',
|
field type: 'associated',
|
||||||
db_field: 'page',
|
db_field: 'page',
|
||||||
model_field: 'path',
|
model_field: 'path',
|
||||||
|
|||||||
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
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ class WritingBook
|
|||||||
title << self.publisher if self.publisher.present?
|
title << self.publisher if self.publisher.present?
|
||||||
title << self.pages if self.pages.present?
|
title << self.pages if self.pages.present?
|
||||||
# title << "(#{self.journal_level_types.collect{|x| x.title}.join(', ')})"
|
# title << "(#{self.journal_level_types.collect{|x| x.title}.join(', ')})"
|
||||||
title.join(', ')
|
title.join(', ')
|
||||||
end
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|||||||
+5
@@ -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
|
||||||
|
|||||||
+1
-1
@@ -90,7 +90,7 @@ class WritingConference
|
|||||||
title << self.location if self.location.present?
|
title << self.location if self.location.present?
|
||||||
title << "#{period_start_date}-#{period_end_date}" if (self.period_start_date.present? && self.period_end_date.present?)
|
title << "#{period_start_date}-#{period_end_date}" if (self.period_start_date.present? && self.period_end_date.present?)
|
||||||
# title << "(#{self.conference_paper_types.collect{|x| x.title}.join(', ')})"
|
# title << "(#{self.conference_paper_types.collect{|x| x.title}.join(', ')})"
|
||||||
title.join(', ')
|
title.join(', ')
|
||||||
end
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|||||||
+5
@@ -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
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ class WritingJournal
|
|||||||
title << "Volume No: "+self.vol_no if (self.vol_no.present? && self.vol_no != "0")
|
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 << "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 << "To Page: "+self.form_to_end if (self.form_to_end.present? && self.form_to_end != "0")
|
||||||
title.join(', ')
|
title.join(', ')
|
||||||
end
|
end
|
||||||
|
|
||||||
def new_writing_journal_files=(var)
|
def new_writing_journal_files=(var)
|
||||||
|
|||||||
+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>
|
||||||
|
|||||||
Reference in new issue
Block a user