Merge branch 'various_bugs' into nccu_master
Conflicts: Gemfile.lock app/assets/javascripts/ajax_form.js.erb app/assets/stylesheets/style.css.erb app/controllers/application_controller.rb app/controllers/sessions_controller.rb app/helpers/admin/web_link_helper.rb app/views/admin/attributes/_attribute_field.html.erb app/views/admin/designs/_form.html.erb app/views/admin/pages/_form.html.erb app/views/admin/sites/_side_bar.html.erb app/views/layouts/_orbit_bar.html.erb app/views/layouts/_side_bar.html.erb config/locales/en.yml config/locales/zh_tw.yml config/mongoid.yml vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb vendor/built_in_modules/announcement/app/controllers/panel/announcement/front_end/bulletins_controller.rb vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_bulletin.html.erb vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_filter.html.erb vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/index.html.erb vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/_index.html.erb vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_filter.html.erb vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_filter_status.html.erb vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_news_bulletin.html.erb vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/index.html.erb vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_links/index.html.erb
This commit is contained in:
commit
65ac6980c4
2087 files changed
+80434
-3692
No files matched your search
@@ -0,0 +1,148 @@
|
||||
class Desktopapp::DesktopApp < Sinatra::Base
|
||||
|
||||
#set :views, settings.root+'/desktop/'
|
||||
|
||||
get "/desktop/desktop" do
|
||||
erb :desktop
|
||||
end
|
||||
|
||||
get "/desktop/app_manager" do
|
||||
erb :app_manager
|
||||
end
|
||||
|
||||
get "/desktop/sections" do
|
||||
erb :sections
|
||||
end
|
||||
|
||||
get "/desktop/settings" do
|
||||
erb :settings
|
||||
end
|
||||
|
||||
post "/desktop/save_desktop_settings" do
|
||||
@desktop = Desktop.find(params["desktopid"])
|
||||
@savewhat = params["save"]
|
||||
case @savewhat
|
||||
when "theme"
|
||||
@desktop.update_attributes(:theme => params["theme"])
|
||||
@desktop.update_attributes(:wallpaper => nil)
|
||||
when "desktopnames"
|
||||
@sections = @desktop.sections
|
||||
x = 0;
|
||||
@sections.each do |section|
|
||||
@desktopnewnames = params["desktopnms"]
|
||||
section.update_attributes(:name => @desktopnewnames[x] )
|
||||
x = x+1
|
||||
end
|
||||
when "appnewsection"
|
||||
@section = Section.find(params["newsectionid"])
|
||||
@groups = @section.groups
|
||||
@app = Tile.find(params["appid"])
|
||||
@groups.each do |group|
|
||||
@tiles = group.tiles.where(:data_category.all => ["app"])
|
||||
if @tiles.length < 12
|
||||
@app.update_attributes(:group_id => group.id)
|
||||
break
|
||||
end
|
||||
end
|
||||
when "customtheme"
|
||||
@desktop.update_attributes(:theme => "custom")
|
||||
@desktop.update_attributes(:customtheme => params['theme'])
|
||||
when "wallpaper"
|
||||
@desktop.update_attributes(:wallpaper => params["wallpapernm"])
|
||||
end
|
||||
a = Array.new
|
||||
a << {"success"=>"true"}
|
||||
a.to_json
|
||||
end
|
||||
|
||||
get "/desktop/get_desktop_settings" do
|
||||
@desktop = Desktop.find(params["desktopid"])
|
||||
@getwhat = params["get"]
|
||||
case @getwhat
|
||||
when "desktop"
|
||||
@desktop.to_json
|
||||
when "sectionnames"
|
||||
secnames = Array.new
|
||||
@sections = @desktop.sections
|
||||
@sections.each do |section|
|
||||
secnames << section.name
|
||||
end
|
||||
secnames.to_json
|
||||
when "theme"
|
||||
@theme = @desktop.theme
|
||||
@theme.to_json
|
||||
end
|
||||
end
|
||||
|
||||
get "/desktop/getgroups" do
|
||||
@section = Section.find(params["sectionid"])
|
||||
@groups = @section.groups
|
||||
a = Array.new
|
||||
@groups.each do |group|
|
||||
a << group.tiles
|
||||
end
|
||||
a.to_json
|
||||
end
|
||||
|
||||
get "/desktop/getsectionlist" do
|
||||
@desktop = Desktop.find(params["desktopid"])
|
||||
@sections = @desktop.sections
|
||||
@sections.to_json
|
||||
end
|
||||
|
||||
get "/desktop/settingthemes" do
|
||||
@themes = DesktopTheme.all
|
||||
erb :'settings/themes'
|
||||
end
|
||||
|
||||
get "/desktop/settingsections" do
|
||||
erb :'settings/sections'
|
||||
end
|
||||
|
||||
get "/desktop/getapplist" do
|
||||
@desktop = Desktop.find(params["desktopid"])
|
||||
@sections = @desktop.sections
|
||||
a = Array.new
|
||||
@sections.each do |section|
|
||||
@groups = section.groups
|
||||
@groups.each do |group|
|
||||
@tiles = group.tiles.where(:data_category.all => ["app"])
|
||||
a << @tiles
|
||||
end
|
||||
end
|
||||
a.to_json
|
||||
end
|
||||
|
||||
post "/desktop/newpositions" do
|
||||
@newpositions = params["newpos"]
|
||||
@section = Section.find(params["sectionid"])
|
||||
@groupids = params["groupids"]
|
||||
@groups = @section.groups
|
||||
z = 0
|
||||
@newpositions.each do |grp|
|
||||
x = 1
|
||||
grp.each do |tileid|
|
||||
if x != 1
|
||||
y = 1
|
||||
tileid.each do |id|
|
||||
@tile = Tile.find(id)
|
||||
@tile.update_attributes({:position => y})
|
||||
if @tile.group_id != @groupids[z]
|
||||
@tile.update_attributes({:group_id => @groupids[z]})
|
||||
end
|
||||
y = y + 1
|
||||
end
|
||||
z = z + 1
|
||||
end
|
||||
x = x + 1
|
||||
end
|
||||
end
|
||||
b = Array.new
|
||||
b << {"success"=>"true"}
|
||||
b.to_json
|
||||
end
|
||||
|
||||
get "/desktop/settingconnection" do
|
||||
erb :'settings/connections'
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,96 @@
|
||||
class Desktopapp::DesktopAppAppstore < Sinatra::Base
|
||||
|
||||
get '/desktop_appstore/appstore' do
|
||||
erb :appstore
|
||||
end
|
||||
|
||||
get '/desktop_appstore/widgets' do
|
||||
erb :'appstore/widgets'
|
||||
end
|
||||
|
||||
get '/desktop_appstore/getuserwidgets' do
|
||||
# @widgets = current_user.desktop.desktop_widgets
|
||||
# @groups = Array.new
|
||||
# @sections = current_user.desktop.sections
|
||||
|
||||
# @sections.each do |section|
|
||||
# @groups << section.groups
|
||||
# end
|
||||
|
||||
# @widgets.each do |widget|
|
||||
# @count = 0;
|
||||
# @sectionids = Array.new
|
||||
# @groups.each do |group|
|
||||
# group.each do |grp|
|
||||
# @widge = 0
|
||||
# @gid = widget.id.to_s
|
||||
# @widge = grp.tiles.where(:data_content.all => [@gid]).count
|
||||
# @count = @count + @widge
|
||||
# if @widge > 0
|
||||
# @sectionids << grp.section_id
|
||||
# end
|
||||
# end
|
||||
# end
|
||||
# if @count > 0
|
||||
# widget.status = "Installed"
|
||||
# widget.section = @sectionids
|
||||
# else
|
||||
# widget.status = "Downloaded"
|
||||
# end
|
||||
# end
|
||||
# @widgets.to_json
|
||||
current_user.to_json
|
||||
end
|
||||
|
||||
get '/desktop_appstore/widgets_settings' do
|
||||
what = params["what"]
|
||||
@widgetid = params["widget"]
|
||||
@sectionid = params["section"]
|
||||
@msg = Array.new
|
||||
case what
|
||||
when "remove"
|
||||
@section = Section.find(@sectionid)
|
||||
@groups = @section.groups
|
||||
@groups.each do |group|
|
||||
@tile = group.tiles.where(:data_content.all => [@widgetid])
|
||||
if @tile.count > 0
|
||||
@thistile = @tile
|
||||
end
|
||||
end
|
||||
@t = Tile.find(@thistile.first.id)
|
||||
@t.delete
|
||||
@msg << {"success"=>true}
|
||||
when "add"
|
||||
@widget = current_user.desktop.desktop_widgets.find(@widgetid)
|
||||
@section = Section.find(@sectionid)
|
||||
@groups = @section.groups
|
||||
@totalwidgets = 0
|
||||
@groups.each do |group|
|
||||
@tile = group.tiles.where(:data_content.all => [@widgetid]).count
|
||||
if @tile > 0
|
||||
@msg << {"success"=>false,"error"=>"Duplicate widget"}
|
||||
else
|
||||
no_of_widgets = group.tiles.where(:data_category.all => ["widget"]).count
|
||||
@totalwidgets = @totalwidgets + no_of_widgets
|
||||
end
|
||||
end
|
||||
if @totalwidgets >= 12
|
||||
@msg << {"success"=>false,"error"=>"Section full"}
|
||||
else
|
||||
wshape = @widget.shape
|
||||
wdata_content = @widgetid
|
||||
wdata_category = "widget"
|
||||
wname = @widget.name
|
||||
if @groups.first.tiles.where(:data_category.all => ["widget"]).count >= 6
|
||||
groupid = @groups.last.id
|
||||
else
|
||||
groupid = @groups.first.id
|
||||
end
|
||||
Tile.create(data_category: wdata_category,data_content: wdata_content, group_id: groupid, position: 10, title: wname, shape: wshape)
|
||||
@msg << {"success"=>true}
|
||||
end
|
||||
end
|
||||
@msg.to_json
|
||||
end
|
||||
|
||||
end
|
||||
@@ -0,0 +1,25 @@
|
||||
class Desktopapp::DesktopAppPublications < Sinatra::Base
|
||||
|
||||
get "/desktop/journal_p" do
|
||||
erb :journal_p
|
||||
end
|
||||
|
||||
get "/desktop/journal_p_list" do
|
||||
erb :'journal_pages/list'
|
||||
end
|
||||
|
||||
get '/desktop/journal_p_add' do
|
||||
erb :'journal_pages/add'
|
||||
end
|
||||
|
||||
get '/desktop_publications/getjournals' do
|
||||
@journals = Journal.all
|
||||
data = Array.new
|
||||
@journals.each do |journal|
|
||||
@papers = journal.papers.all
|
||||
data << {"title" => journal.title, "papers" => @papers}
|
||||
end
|
||||
data.to_json
|
||||
end
|
||||
|
||||
end
|
||||
@@ -0,0 +1,61 @@
|
||||
class Desktopapp::Otheraccounts < Sinatra::Base
|
||||
require 'open-uri'
|
||||
require 'rexml/document'
|
||||
require 'net/http'
|
||||
require 'net/https'
|
||||
# require 'twitter'
|
||||
include REXML
|
||||
|
||||
|
||||
get '/desktop/save_account_info' do
|
||||
@dowhat = params['dowhat']
|
||||
@email = params['email']
|
||||
@password = params['password']
|
||||
@account = params['account']
|
||||
case @dowhat
|
||||
when "new"
|
||||
OtherAccount.create(user_id: current_user.id, email: @email, encrypted_password: @password, type: @account)
|
||||
when "edit"
|
||||
@otheraccount = OtherAccount.where(:type.all => [@account],:user_id.all => [current_user.id]) rescue nil
|
||||
@otheraccount.first.update_attributes(:email => @email, :encrypted_password => @password)
|
||||
when "delete"
|
||||
@otheraccount = OtherAccount.where(:type.all => [@account], :user_id.all => [current_user.id]) rescue nil
|
||||
@otheraccount.destroy_all
|
||||
end
|
||||
a = Array.new
|
||||
a << {"success"=>"true"}
|
||||
a.to_json
|
||||
end
|
||||
|
||||
get '/desktop/forgmail' do
|
||||
@gmailaccount = OtherAccount.where(:type.all => ["gmail"],:user_id.all => [current_user.id]) rescue nil
|
||||
|
||||
# if @gmailaccount.first != nil
|
||||
# @decrypted_password = @gmailaccount.first.encrypted_password.decrypt
|
||||
# @email = @gmailaccount.first.email
|
||||
# url = URI.parse("https://mail.google.com/mail/feed/atom")
|
||||
# #url = URI.parse("https://www.google.com/m8/feeds/contacts/default/full")
|
||||
# req = Net::HTTP::Get.new(url.path)
|
||||
# req.basic_auth @email, @decrypted_password
|
||||
# req.content_type = 'text/xml'
|
||||
|
||||
# http = Net::HTTP.new(url.host, url.port)
|
||||
# http.use_ssl = true
|
||||
# response = http.start { |http| http.request(req) }
|
||||
|
||||
# root = Document.new(response.read_body).root
|
||||
# root
|
||||
# else
|
||||
# msg = "<HEAD><ERROR>true</ERROR><ERRORMSG>Account setting problem.</ERRORMSG></HEAD>"
|
||||
# # respond_to do |m|
|
||||
# # m.xml {render :xml=>msg}
|
||||
# # end
|
||||
# msg.to_xml
|
||||
# end
|
||||
end
|
||||
|
||||
get '/desktop/getaccounts' do
|
||||
@accounts = OtherAccount.where(:user_id.all => [current_user.id]).without(:encrypted_password)
|
||||
@accounts.to_json
|
||||
end
|
||||
end
|
||||
Executable
+36
@@ -0,0 +1,36 @@
|
||||
<div id='app_manager'>
|
||||
<div id="content">
|
||||
<div id="header" class="hh3">
|
||||
<div class="dtitle thmtxth w2 hh3 hp">Apps Manager</div>
|
||||
<a href="" class="hfn w1 hh2 hp"><span class="tile thmc1 op06"></span><span class="thmtxt">Date</span></a>
|
||||
<a href="ascending" class="hfn w1 hh2 hp" id="alphabet_sort_btn" ><span class="tile thmc2 op03"></span><span class="thmtxt">Alphabet [A-Z]</span></a>
|
||||
<div id="search_app" class="hfn w2 hh2 hp thmc3">
|
||||
<input type="text" class="ini_input form" value="Search" id="searchbox" />
|
||||
<input type="submit" class="ini_input submit thmc1" value="Submit"/>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="search_result">
|
||||
|
||||
</div>
|
||||
<div id="holder">
|
||||
<div class="tinycanvas">
|
||||
<div class="scrollbar sb_h"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div>
|
||||
<div class="viewport">
|
||||
<div id="group_wrapper" class="overview">
|
||||
|
||||
<div class="group g_sep op03" id='seperator' style="height: 516px;display:none;"></div>
|
||||
<div class="group_search" id="app_list">
|
||||
<!--<div class="element w1 h1 hp vp thmc2" data-category="desktop">
|
||||
<span class="tile thmc2"></span>
|
||||
<a href="" class="appicon"><img src="" alt=""></a>
|
||||
<h1 class="appname thmtxt">O-Music</h1>
|
||||
</div>-->
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,12 @@
|
||||
<div id="app_frame" class="thmc2">
|
||||
<div id="content">
|
||||
<div id="header" class="hh3">
|
||||
<div class="dtitle w2 hh3 hp"><span class="thmtxth">Appname</span></div>
|
||||
<span class="icon-remove hh3 hp thmtxt"></span>
|
||||
</div>
|
||||
<div id="holder">
|
||||
<!-- app content -->
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,26 @@
|
||||
<div id="apps_store">
|
||||
<div id="content">
|
||||
<div id="header" class="hh3">
|
||||
<div class="dtitle w2 hh3 hp">
|
||||
<span class="thmtxth">App Store</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id="holder">
|
||||
|
||||
<div id="panel_l" class="ph">
|
||||
<div class="s_menu sm_v">
|
||||
<ul id='setting_left_nav'>
|
||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Online Store</a></li>
|
||||
<li><a href="widgets" class="admtxt hh2 w2 hp" onclick='return false;'>Widgets</a></li>
|
||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Apps</a></li>
|
||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Registeration</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="panel_r" class="ph pw admbg hp">
|
||||
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,11 @@
|
||||
<div class="s_title hh3">Your Widgets</div>
|
||||
<div class="tinycanvas hp">
|
||||
<div class="scrollbar sb_h vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div>
|
||||
<div class="viewport">
|
||||
<div class="overview vp">
|
||||
<div class="overview" id="widget_list">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Executable
+30
@@ -0,0 +1,30 @@
|
||||
<div id="desktop">
|
||||
<div id="content">
|
||||
<div id="header" class="hh3">
|
||||
<div class="dtitle w2 hh3 hp sdm">
|
||||
<div class="thmtxth sdm_t" id="section_heading">Loading...</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul id="section_list">
|
||||
<!-- <li><a class="admtxt hp w2 hh2" href="">Campus</a></li>
|
||||
<li><a class="admtxt hp w2 hh2" href="">Research</a></li>
|
||||
<li><a class="admtxt hp w2 hh2" href="">Social</a></li>
|
||||
<li><a class="admtxt hp w2 hh2" href="">Private</a></li> -->
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="holder">
|
||||
<div class="tinycanvas">
|
||||
<div class="scrollbar sb_h"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div>
|
||||
<div class="viewport">
|
||||
<div id="group_wrapper" class="overview">
|
||||
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
Executable
+100
@@ -0,0 +1,100 @@
|
||||
<div id="side">
|
||||
<div id="rwidget" class="wh3 thmc4">
|
||||
<ul class="docklist">
|
||||
<li class="d_cate"><a href="desktop" class="widget_fn wh3 hh3" id='d_desktop' onclick="return false;"><span class="widget_icon"><img src="" alt="Home" id="home_icon" width="30" height="30"/></span></a>
|
||||
<ul class="dock_child hh3 thmc4" style="width: 180px;">
|
||||
<li class="dock_item"><a href="app_manager" class="widget_fn wh3 hh3" id="d_app_manager" onclick="return false;"><span class="widget_icon"><img src="" alt="App Manager" id="app_manager_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a href="sections" class="widget_fn wh3 hh3" id="d_sections" onclick="return false;"><span class="widget_icon"><img src="" alt="All Sections" id="sections_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a href="settings" class="widget_fn wh3 hh3" id="d_settings" onclick="return false;"><span class="widget_icon"><img src="" alt="Settings" id="settings_icon" width="30" height="30"/></span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="d_cate"><a href="" class="widget_fn wh3 hh3" id='d_publication' onclick="return false;"><span class="widget_icon"><img src="" alt="Publication" id="publication_icon" width="30" height="30"/></span></a>
|
||||
<ul class="dock_child hh3 thmc4" style="width: 180px;">
|
||||
<li class="dock_item"><a href="journal_p" class="widget_fn wh3 hh3" id='d_journal_p' onclick="return false;"><span class="widget_icon"><img src="" alt="Journal Papers" id="journal_p_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a href="seminar_p" class="widget_fn wh3 hh3" id='d_seminar_p' onclick="return false;"><span class="widget_icon"><img src="" alt="Seminar Papers" id="seminar_p_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a href="books" class="widget_fn wh3 hh3" id='d_books' onclick="return false;"><span class="widget_icon"><img src="" alt="Books" id="books_icon" width="30" height="30"/></span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="d_cate"><a href="" class="widget_fn wh3 hh3" id='d_research' onclick="return false;"><span class="widget_icon"><img src="" alt="Research" id="research_icon" width="30" height="30"/></span></a>
|
||||
<ul class="dock_child hh3 thmc4" style="width: 240px;">
|
||||
<li class="dock_item"><a href="research_d" class="widget_fn wh3 hh3" id='d_research_d' onclick="return false;"><span class="widget_icon"><img src="" alt="Research Domain" id="research_d_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a href="research_p" class="widget_fn wh3 hh3" id='d_research_p' onclick="return false;"><span class="widget_icon"><img src="" alt="Research Project" id="research_p_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a href="patents" class="widget_fn wh3 hh3" id='d_patents' onclick="return false;"><span class="widget_icon"><img src="" alt="Patents" id="patents_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a href="labs" class="widget_fn wh3 hh3" id='d_labs' onclick="return false;"><span class="widget_icon"><img src="" alt="Labs" id="labs_icon" width="30" height="30"/></span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="d_cate"><a href="" class="widget_fn wh3 hh3" id='d_experience' onclick="return false;"><span class="widget_icon"><img src="" alt="Experience" id="experience_icon" width="30" height="30"/></span></a>
|
||||
<ul class="dock_child hh3 thmc4" style="width: 300px;">
|
||||
<li class="dock_item"><a href="working" class="widget_fn wh3 hh3" id='d_working' onclick="return false;"><span class="widget_icon"><img src="" alt="Working" id="working_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a href="education" class="widget_fn wh3 hh3" id='d_education' onclick="return false;"><span class="widget_icon"><img src="" alt="Education" id="education_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a href="honors" class="widget_fn wh3 hh3" id='d_honors' onclick="return false;"><span class="widget_icon"><img src="" alt="Honors" id="honors_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a href="activities" class="widget_fn wh3 hh3" id='d_activities' onclick="return false;"><span class="widget_icon"><img src="" alt="Activities" id="activities_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a href="clubs" class="widget_fn wh3 hh3" id='d_clubs' onclick="return false;"><span class="widget_icon"><img src="" alt="Clubs" id="clubs_icon" width="30" height="30"/></span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="d_cate"><a href="" class="widget_fn wh3 hh3" id='d_landt' onclick="return false;"><span class="widget_icon"><img src="" alt="Learning & Teaching" id="landt_icon" width="30" height="30"/></span></a>
|
||||
<ul class="dock_child hh3 thmc4" style="width: 180px;">
|
||||
<li class="dock_item"><a href="courses" class="widget_fn wh3 hh3" id='d_courses' onclick="return false;"><span class="widget_icon"><img src="" alt="Courses" id="courses_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a href="homework" class="widget_fn wh3 hh3" id='d_homework' onclick="return false;"><span class="widget_icon"><img src="" alt="Homework" id="homework_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a href="certification" class="widget_fn wh3 hh3" id='d_certification' onclick="return false;"><span class="widget_icon"><img src="" alt="Certification" id="certification_icon" width="30" height="30"/></span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="d_cate"><a href="" class="widget_fn wh3 hh3" id='d_personal' onclick="return false;"><span class="widget_icon"><img src="" alt="Personal" id="personal_icon" width="30" height="30"/></span></a>
|
||||
<ul class="dock_child hh3 thmc4" style="width: 300px;">
|
||||
<li class="dock_item"><a href="mypage" class="widget_fn wh3 hh3" id='d_mypage' onclick="return false;"><span class="widget_icon"><img src="" alt="myPage" id="mypage_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a href="blog" class="widget_fn wh3 hh3" id='d_blog' onclick="return false;"><span class="widget_icon"><img src="" alt="Blog" id="blog_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a href="album" class="widget_fn wh3 hh3" id='d_album' onclick="return false;"><span class="widget_icon"><img src="" alt="Album" id="album_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a href="calendar" class="widget_fn wh3 hh3" id='d_calendar' onclick="return false;"><span class="widget_icon"><img src="" alt="Calendar" id="calendar_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a href="files" class="widget_fn wh3 hh3" id='d_files' onclick="return false;"><span class="widget_icon"><img src="" alt="Files" id="files_icon" width="30" height="30"/></span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="d_cate"><a href="" class="widget_fn wh3 hh3" id='d_orbit' onclick="return false;"><span class="widget_icon"><img src="" alt="Orbit" id="orbit_icon" width="30" height="30"/></span></a>
|
||||
<ul class="dock_child hh3 thmc4" style="width: 60px;">
|
||||
<li class="dock_item"><a href="connection" class="widget_fn wh3 hh3" id='d_connection' onclick="return false;"><span class="widget_icon"><img src="" alt="Academia Connection" id="connection_icon" width="30" height="30"/></span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="d_cate"><a href="appstore" class="widget_fn wh3 hh3" id='d_appstore' onclick="return false;"><span class="widget_icon"><img src="" alt="AppStore" id="appstore_icon" width="30" height="30"/></span></a></li>
|
||||
</ul>
|
||||
<div class="fn_des hh3 admbg admtxt"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="container">
|
||||
|
||||
<div id='ajax_container'>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!--<div id="orbitbar"></div>-->
|
||||
|
||||
<img src="" id="thmbackground" />
|
||||
<div id="bgover" ></div>
|
||||
<div id="orbitnote" style="display:none;">
|
||||
<div class="note_holder">
|
||||
<div class="note_type"><img id='note_img' alt=""/></div>
|
||||
<div class="note_message">Check the Notifications section for more information.</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="orbitdiag" style="display: none;">
|
||||
<div class="tile op07"></div>
|
||||
<div class="diag_holder">
|
||||
<div class="diag_holder_inner">
|
||||
<div class="diag_message"></div>
|
||||
<div class="diag_action">
|
||||
<a href="" id="diag_confirm" class="diag_btn admbg admtxt w1 hh2 hp" onclick="return false;"></a>
|
||||
<a href="" id="diag_cancel" class="diag_btn admbg admtxt w1 hh2 hp" onclick="return false;"></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
orbitDesktop.prototype.themefolder = "desktop_themes";
|
||||
orbitDesktop.prototype.notifyImgPath = "/assets/";
|
||||
orbitDesktop.prototype.desktopId = "<%= @desktop.id %>";
|
||||
orbitDesktop.prototype.sectionId = "<%= @section.id %>";
|
||||
orbitDesktop.prototype.currentLanguage = "<%= I18n.locale %>";
|
||||
orbitDesktop.prototype.currentUsername = "<%= @currentusername %>";
|
||||
//uselessfunction();
|
||||
var od = new orbitDesktop("#ajax_container");
|
||||
o.notify("Welcome "+o.currentUsername+"!!","alert",3);
|
||||
</script>
|
||||
@@ -0,0 +1,33 @@
|
||||
<div id="journal_p">
|
||||
<div id="content">
|
||||
<div id="header" class="hh3">
|
||||
<div class="dtitle w2 hh3 hp">
|
||||
<span class="thmtxth">Journal Papers</span>
|
||||
</div>
|
||||
<div id="search_app" class="hfn w2 hh2 hp thmc3">
|
||||
<input type="text" class="ini_input form" value="Search" id="searchbox" />
|
||||
<input type="submit" class="ini_input submit thmc1" value="Submit"/>
|
||||
</div>
|
||||
</div>
|
||||
<div id="holder">
|
||||
<div id="panel_l" class="ph">
|
||||
<div class="s_menu sm_v">
|
||||
<ul id='setting_left_nav'>
|
||||
<li><a href="list" class="hh2 w2 hp active thmc1 thmtxt" onclick='return false;'>List</a></li>
|
||||
<li><a href="addpaper" class="admtxt hh2 w2 hp" onclick='return false;'>Add/Edit</a></li>
|
||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Journals</a></li>
|
||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Co-Authors</a></li>
|
||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Tags & Keywords</a></li>
|
||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Analysis</a></li>
|
||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Import</a></li>
|
||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Export</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="panel_r" class="ph pw admbg hp">
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,109 @@
|
||||
<div class="toolbar hh2">
|
||||
<div class="fn_g hp">
|
||||
<button class="fn_btn hh2 thmc2 thmtxt">Save</button>
|
||||
<button class="fn_btn hh2 admbg2">Cancel</button>
|
||||
</div>
|
||||
<div class="hh2 hp sdm">
|
||||
<div class="sdm_t hh2">Entry Year</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh2 admtxt" href="">2012</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="">2011</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="">2010</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="">2009</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="">2008</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh2 hp sdm">
|
||||
<div class="sdm_t hh2">Language</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh2 admtxt" href="">English</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="">Chinese</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh2 hp sdm">
|
||||
<div class="sdm_t hh2">Share</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh2 admtxt" href="">Full</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="">Abstract</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="">Friends</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="">Private</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="">Group</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh2 hp sdm">
|
||||
<div class="sdm_t hh2"><span class="icon-question-sign"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="paper_add" class="tinycanvas vp">
|
||||
<div class="scrollbar sb_h vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div>
|
||||
<div class="viewport">
|
||||
<div class="overview">
|
||||
<div class="s_grid_con s_form">
|
||||
<ul>
|
||||
<li class="s_grid_row"><textarea class="s_grid_6 s_grid" name="" id="">Paper Title</textarea></li>
|
||||
<li class="s_grid_row"><input class="s_grid_6 s_grid" type="text" value="Journal Title"><span class="icon-plus input_append"></span></li>
|
||||
<li class="s_grid_row">
|
||||
<div class="check_box_g">
|
||||
<label for="">Journal Level</label>
|
||||
<ul>
|
||||
<li><input type="checkbox"><label for="">SCI</label></li>
|
||||
<li><input type="checkbox"><label for="">SCIE</label></li>
|
||||
<li><input type="checkbox"><label for="">SSCI</label></li>
|
||||
<li><input type="checkbox"><label for="">AH & HCI</label></li>
|
||||
<li><input type="checkbox"><label for="">EI</label></li>
|
||||
<li><input type="checkbox"><label for="">CSCI</label></li>
|
||||
<li><input type="checkbox"><label for="">CSSCI</label></li>
|
||||
<li><input type="checkbox"><label for="">TSCI</label></li>
|
||||
<li><input type="checkbox"><label for="">TSSCI</label></li>
|
||||
<li><input type="checkbox"><label for="">THCI</label></li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<li class="s_grid_row"><label class="s_grid_2 s_grid" for="">ISSN(ISBN)</label><input type="text" class="s_grid_4 s_grid" value="829872987"></li>
|
||||
<li class="s_grid_row"><label class="s_grid_2 s_grid" for="">ISI No.</label><input type="text" class="s_grid_4 s_grid" value="829872987"></li>
|
||||
<li class="s_grid_row"><label class="s_grid_2 s_grid" for="">Volume No.</label><input type="text" class="s_grid_4 s_grid" value="829872987"></li>
|
||||
<li class="s_grid_row"><label class="s_grid_2 s_grid" for="">Issue No.</label><input type="text" class="s_grid_4 s_grid" value="829872987"></li>
|
||||
<li class="s_grid_row"><label class="s_grid_2 s_grid" for="">Pages</label></li>
|
||||
<li class="s_grid_row"><label class="s_grid_2 s_grid" for="">Reference URL</label><input class="s_grid_4 s_grid" type="text" value="www.sample.com"></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="s_grid_con s_form">
|
||||
<ul>
|
||||
<li class="s_grid_row"><textarea class="s_grid s_grid_6" name="" id="">Author</textarea><span class="icon-plus input_append"></span></li>
|
||||
<li class="s_grid_row">
|
||||
<select name="" id="" class="s_grid s_grid_4">
|
||||
<option value="">Author Type</option>
|
||||
<option value="">First Author</option>
|
||||
<option value="">Corresponding Author</option>
|
||||
<option value="">Second Author</option>
|
||||
<option value="">Third Author</option>
|
||||
<option value="">Fourth Author</option>
|
||||
</select>
|
||||
<select name="" id="" class="s_grid s_grid_2">
|
||||
<option value="">Status</option>
|
||||
<option value="">Published</option>
|
||||
<option value="">Pending</option>
|
||||
<option value="">Writing</option>
|
||||
</select>
|
||||
</li>
|
||||
<li class="s_grid_row"><label class="s_grid s_grid_2" for="">Date of Publication</label><input class="s_grid s_grid_4" type="text" value="2012 / 05 / 01"></li>
|
||||
<li class="s_grid_row"><textarea name="" id="" rows="10" class="s_grid s_grid_6"></textarea></li>
|
||||
<li class="s_grid_row"><input class="s_grid s_grid_6" type="text" value="Associated Project"><span class="icon-plus input_append"></span></li>
|
||||
<li class="s_grid_row"><label class="s_grid s_grid_2" for="">Abstract</label><input type="file"></li>
|
||||
<li class="s_grid_row"><label class="s_grid s_grid_2" for="">Full Text</label><input type="file"></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="s_grid_con s_form">
|
||||
<ul>
|
||||
<li class="s_grid_row"><textarea name="" id="" rows="26" class="s_grid s_grid_6">Abstract</textarea></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,75 @@
|
||||
<div class="toolbar hh2">
|
||||
<div class="hh2 hp sdm">
|
||||
<div class="sdm_t hh2"><span class="icon-check"></span></div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul id="journal_selection_options">
|
||||
<li><a class="hp hh2 admtxt" href="all">All</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="none">None</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh2 hp sdm">
|
||||
<div class="sdm_t hh2">More</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh2 admtxt" href="">Delete</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="">Tag</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh2 hp sdm">
|
||||
<div class="sdm_t hh2">Tag</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh2 admtxt" href="">All</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="">Starred</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="">MIT</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh2 hp sdm">
|
||||
<div class="sdm_t hh2">Status</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh2 admtxt" href="">All</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="">Published</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="">Pending</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh2 hp sdm">
|
||||
<div class="sdm_t hh2">View</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul id="journal_view_selection">
|
||||
<li><a class="hp hh2 admtxt" href="journal">Journal</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="title">Title</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="file">File</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="keywords">Keywords</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="abstract">Abstract</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh2 hp sdm">
|
||||
<div class="sdm_t hh2">Share</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh2 admtxt" href="">Full</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="">Abstract</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="">Friends</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="">Private</a></li>
|
||||
<li><a class="hp hh2 admtxt" href="">Group</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh2 hp sdm">
|
||||
<div class="sdm_t hh2"><span class="icon-question-sign"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="paper_list" class="tinycanvas vp">
|
||||
<div class="scrollbar sb_h vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div>
|
||||
<div class="viewport">
|
||||
<div class="overview">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,178 @@
|
||||
<div id="sections">
|
||||
<div id="content">
|
||||
<div id="header" class="hh3">
|
||||
<div class="dtitle w2 hh3 hp">
|
||||
<span class="thmtxth">All Sections</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id="holder">
|
||||
<div class="tinycanvas">
|
||||
<div class="scrollbar sb_h"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div>
|
||||
<div class="viewport">
|
||||
<div id="group_wrapper" class="overview">
|
||||
<!-- <div class="group">
|
||||
<div class="section_label" >
|
||||
<ul>
|
||||
<li class="element w1 h1 hp vp thmtxt"><span class="tile thmc1"></span><span class="thmtxt">section 1</span></li>
|
||||
<li class="element w1 h1 hp vp thmtxt " style="display: none;" data-category="section2"><span class="tile thmc2 op06"></span><span class="thmtxt">section 2</span></li>
|
||||
<li class="element w1 h1 hp vp thmtxt " style="display: none;" data-category="section3"><span class="tile thmc2 op06"></span><span class="thmtxt">section 3</span></li>
|
||||
<li class="element w1 h1 hp vp thmtxt " style="display: none;" data-category="section4"><span class="tile thmc2 op06"></span><span class="thmtxt">section 4</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
<ul class="grp" id="section1">
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div class="group">
|
||||
<div class="section_label" >
|
||||
<ul>
|
||||
<li class="element w1 h1 hp vp thmtxt"><span class="tile thmc1"></span><span class="thmtxt">section 2</span></li>
|
||||
<li class="element w1 h1 hp vp thmtxt " style="display: none;" data-category="section1"><span class="tile thmc2 op06"></span><span class="thmtxt">section 1</span></li>
|
||||
<li class="element w1 h1 hp vp thmtxt " style="display: none;" data-category="section3"><span class="tile thmc2 op06"></span><span class="thmtxt">section 3</span></li>
|
||||
<li class="element w1 h1 hp vp thmtxt " style="display: none;" data-category="section4"><span class="tile thmc2 op06"></span><span class="thmtxt">section 4</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
<ul class="grp" id="section2">
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
<li class="element w1 hh2 hp vp" data-category="abc">
|
||||
<h1 class="appname thmtxth">Garage Band</h1>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>-->
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,27 @@
|
||||
<div id="settings">
|
||||
<div id="content">
|
||||
<div id="header" class="hh3">
|
||||
<div class="dtitle w2 hh3 hp">
|
||||
<span class="thmtxth">Settings</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id="holder">
|
||||
|
||||
<div id="panel_l" class="ph">
|
||||
<div class="s_menu sm_v">
|
||||
<ul id='setting_left_nav'>
|
||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Overview</a></li>
|
||||
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Account</a></li>
|
||||
<li><a href="sections" class="admtxt hh2 w2 hp" onclick='return false;'>Sections</a></li>
|
||||
<li><a href="themes" class="admtxt hh2 w2 hp" onclick='return false;'>Theme</a></li>
|
||||
<li><a href="connection" class="admtxt hh2 w2 hp" onclick='return false;'>Connection</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="panel_r" class="ph pw admbg hp">
|
||||
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,44 @@
|
||||
<div class="tinycanvas hp">
|
||||
<div class="scrollbar sb_h vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div>
|
||||
<div class="viewport">
|
||||
<div id="connection_setting" class="overview vp">
|
||||
<ul class="s_form w2 hp" id="facebook_connection">
|
||||
<li><span class="c_status">No Connection</span></li>
|
||||
<li><img src="assets/connection/facebook.png" alt="" class="c_icon"><h1 class="c_name">Facebook</h1></li>
|
||||
<li><label for="">Account</label><input type="text"></li>
|
||||
<li><label for="">Password</label><input type="password"></li>
|
||||
<li>
|
||||
<div class="s_action">
|
||||
<a href="facebook" class="setting_btn thmc1 thmtxt hp" onclick="return false;" for="new">Connect</a>
|
||||
<a href="facebook" class="setting_btn thmc1 thmtxt hp" onclick="return false;" for="delete" style="display:none;">Remove</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="s_form w2 hp" id="twitter_connection">
|
||||
<li><span class="c_status">No Connection</span></li>
|
||||
<li><img src="assets/connection/twitter.png" alt="" class="c_icon"><h1 class="c_name">Twitter</h1></li>
|
||||
<li><label for="">Account</label><input type="text"></li>
|
||||
<li><label for="">Password</label><input type="password"></li>
|
||||
<li>
|
||||
<div class="s_action">
|
||||
<a href="twitter" class="setting_btn thmc1 thmtxt hp" onclick="return false;" for="new">Connect</a>
|
||||
<a href="twitter" class="setting_btn thmc1 thmtxt hp" onclick="return false;" for="delete" style="display:none;">Remove</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="s_form w2 hp" id="gmail_connection">
|
||||
<li><span class="c_status">No Connection</span></li>
|
||||
<li><img src="assets/connection/gmail.png" alt="" class="c_icon"><h1 class="c_name">Gmail</h1></li>
|
||||
<li><label for="">Account</label><input type="text"></li>
|
||||
<li><label for="">Password</label><input type="password"></li>
|
||||
<li>
|
||||
<div class="s_action">
|
||||
<a href="gmail" class="setting_btn thmc1 thmtxt hp" onclick="return false;" for="new">Connect</a>
|
||||
<a href="gmail" class="setting_btn thmc1 thmtxt hp" onclick="return false;" for="delete" style="display:none;">Remove</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- <div style="z-index:999;position:relative;"><button onclick="o.tempFunc()">Twitter</button> -->
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,18 @@
|
||||
<div class="tinycanvas vp">
|
||||
<div class="scrollbar sb_v hp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div>
|
||||
<div class="viewport">
|
||||
<div class="overview">
|
||||
<div class="s_title hh3">Section Names</div>
|
||||
<ul class="s_form" id="desktop_names">
|
||||
<li><label for="s_name1">Section 1</label><input id="s_name1" type="text" value=""></li>
|
||||
<li><label for="s_name2">Section 2</label><input id="s_name2" type="text" value=""></li>
|
||||
<li><label for="s_name3">Section 3</label><input id="s_name3" type="text" value=""></li>
|
||||
<li><label for="s_name4">Section 4</label><input id="s_name4" type="text" value=""></li>
|
||||
</ul>
|
||||
<div class="s_subtitle">sample desciption</div>
|
||||
<div class="s_action">
|
||||
<a href="" id="name_save_btn" class="setting_btn thmc1 thmtxt w1 hh2 hp" onclick='return false;'>Confirm</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,86 @@
|
||||
<div class="s_tab stb_h">
|
||||
<ul>
|
||||
<li><a href="#st1" class="hh2 hp thmtxt thmc2">Select Theme</a></li>
|
||||
<li><a href="#st2" class="hh2 hp admtxt admbg">Custom Theme</a></li>
|
||||
<li><a href="#st3" class="hh2 hp admtxt admbg">Wallpaper</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tinycanvas vp">
|
||||
<div class="scrollbar sb_v vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div>
|
||||
<div class="viewport">
|
||||
<div class="overview">
|
||||
<div id="st1" class="st_c">
|
||||
<div class="theme_list ssl">
|
||||
<% @themes.each do |theme| %>
|
||||
<div id="<%= theme.id %>" class="ssl_item"><div class="theme_thumb"><img src="assets/sample_theme.jpg" alt="" width="120" height="96"></div><span class="theme_name ssl_des"><%= theme.name %></span></div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="st2" class="st_c">
|
||||
<div class="s_title hh3">Preview</div>
|
||||
<div class="theme_preview vp thmbgc" style="background-color: #000;" id="theme_preview_area">
|
||||
<div class="thmtxth hh2 hp" style="margin-left:108px;">Theme Text1</div>
|
||||
<div class="theme_plate">
|
||||
<div class="thmc4 h1 wh3"></div>
|
||||
<div class="thmc1 h1 w1"><div class="thmtxt hp">Theme Text2</div></div>
|
||||
<div class="g_sep h1 op07"></div>
|
||||
<div class="thmc2 h1 w1"><div class="thmtxt hp">Theme Text</div></div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<table id="color_input" cellpadding="0" cellspacing="0" border="0" width="528" >
|
||||
<tr>
|
||||
<th class="s_title hh3" width="190px">Theme Color</th>
|
||||
<th class="s_title hh3">Line Color</th>
|
||||
<th class="s_title hh3" width="120px">Text Color</th>
|
||||
<th class="s_title hh3" width="120px">Background Color</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="hidden" class="color-picker black" value="" for="thmc4">
|
||||
<input type="hidden" class="color-picker black" value="" for="thmc1">
|
||||
<input type="hidden" class="color-picker black" value="" for="thmc2">
|
||||
</td>
|
||||
<td>
|
||||
<input type="hidden" class="color-picker black" value="" for="g_sep">
|
||||
</td>
|
||||
<td>
|
||||
<input type="hidden" class="color-picker black" value="" for="thmtxth">
|
||||
<input type="hidden" class="color-picker black" value="" for="thmtxt">
|
||||
</td>
|
||||
<td>
|
||||
<input type="hidden" class="color-picker black" value="" for="background">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="s_action">
|
||||
<a href="" id="theme_submit" class="setting_btn thmc1 thmtxt w1 hh2 hp" onclick="return false;">Confirm</a>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="st3" class="st_c">
|
||||
<div class="stock_wallpaper ssl">
|
||||
<div class="sb1 ssl_item"><img src="assets/stockBackground/thumb/1.jpg" alt="1.jpg"></div>
|
||||
<div class="sb2 ssl_item"><img src="assets/stockBackground/thumb/2.jpg" alt="2.jpg"></div>
|
||||
<div class="sb3 ssl_item"><img src="assets/stockBackground/thumb/3.jpg" alt="3.jpg"></div>
|
||||
<div class="sb4 ssl_item"><img src="assets/stockBackground/thumb/4.jpg" alt="4.jpg"></div>
|
||||
<div class="sb5 ssl_item"><img src="assets/stockBackground/thumb/5.jpg" alt="5.jpg"></div>
|
||||
<div class="sb6 ssl_item"><img src="assets/stockBackground/thumb/6.jpg" alt="6.jpg"></div>
|
||||
<div class="sb7 ssl_item"><img src="assets/stockBackground/thumb/7.jpg" alt="7.jpg"></div>
|
||||
<div class="sb8 ssl_item"><img src="assets/stockBackground/thumb/8.jpg" alt="8.jpg"></div>
|
||||
<div class="sb9 ssl_item"><img src="assets/stockBackground/thumb/9.jpg" alt="9.jpg"></div>
|
||||
<div class="sb10 ssl_item"><img src="assets/stockBackground/thumb/10.jpg" alt="10.jpg"></div>
|
||||
<div class="sb11 ssl_item"><img src="assets/stockBackground/thumb/11.jpg" alt="11.jpg"></div>
|
||||
<div class="sb12 ssl_item"><img src="assets/stockBackground/thumb/12.jpg" alt="12.jpg"></div>
|
||||
</div>
|
||||
<!-- <div class="s_action">
|
||||
<div href="" class="setting_btn thmc1 thmtxt w1 hh2 hp" onclick="o.tempFunc();return false;">Confirm</a>
|
||||
</div> -->
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,12 @@
|
||||
require "orbit_app/summary"
|
||||
require "orbit_app/dsl"
|
||||
require "orbit_app/module/backend_side_bar"
|
||||
require "orbit_app/plugin/summary"
|
||||
require "orbit_app/plugin/registration"
|
||||
require "orbit_app/module/summary"
|
||||
require "orbit_app/module/registration"
|
||||
|
||||
module OrbitApp
|
||||
extend DSL
|
||||
|
||||
end
|
||||
@@ -0,0 +1,26 @@
|
||||
module OrbitApp
|
||||
module DSL
|
||||
def registration(name,type ={:type=> "ModuleApp"} ,&block)
|
||||
if type[:type] == "ModuleApp"
|
||||
Module::Registration.new(name,&block)
|
||||
elsif type[:type] == "PersonalPlugin"
|
||||
Plugin::Registration.new(name,&block)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
# def backend_side_bar(name,&block)
|
||||
# Module::BackendSideBar.new(name,&block)
|
||||
# end
|
||||
|
||||
# def plugin_summary(name,&block)
|
||||
# # Plugin::PluginSummary.new(name,&block)
|
||||
# end
|
||||
|
||||
# def module_summary(name,&block)
|
||||
# Module::Summary.new(name,&block)
|
||||
# end
|
||||
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,17 @@
|
||||
module OrbitApp
|
||||
module Module
|
||||
class BackendSideBar
|
||||
attr_reader :name
|
||||
|
||||
def initialize(name, &block)
|
||||
@name = name
|
||||
block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given?
|
||||
end
|
||||
|
||||
# def personal_plugin(*args)
|
||||
# binding.pry
|
||||
# end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,54 @@
|
||||
module OrbitApp
|
||||
module Module
|
||||
module Registration
|
||||
Version = "0.1"
|
||||
|
||||
module ClassMethods
|
||||
@@registrations = []
|
||||
|
||||
def new( name ,&block)
|
||||
@@registrations << DataSheet.new(name,&block)
|
||||
end
|
||||
|
||||
def find_by_key(key)
|
||||
@@registrations.each{|t|
|
||||
return t if t.name == key
|
||||
}
|
||||
return nil
|
||||
end
|
||||
|
||||
def all
|
||||
return @@registrations
|
||||
end
|
||||
end
|
||||
|
||||
extend ClassMethods
|
||||
def self.included( other )
|
||||
other.extend( ClassMethods )
|
||||
end
|
||||
|
||||
class DataSheet
|
||||
attr_reader :name
|
||||
attr_reader :base_path
|
||||
|
||||
def initialize(name, &block)
|
||||
@name = name
|
||||
block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given?
|
||||
end
|
||||
|
||||
def plugin
|
||||
|
||||
end
|
||||
|
||||
def personal_plugin(params)
|
||||
# TODO 這裡要看是一些檔案是不是都有
|
||||
Plugin::Registration.new_from_module_app(@name,@base_path,params)
|
||||
end
|
||||
|
||||
def base_url(var)
|
||||
@base_path = var
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,20 @@
|
||||
#encoding: utf-8
|
||||
require "orbit_app/summary"
|
||||
|
||||
module OrbitApp
|
||||
module Module
|
||||
module Summary
|
||||
include OrbitApp::Summary
|
||||
|
||||
class Item
|
||||
def initialize()
|
||||
@top = {:label => "全部內容有",:value=> "2071"}
|
||||
@items = [{:label => "新聞",:value=> "20"}]
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,58 @@
|
||||
module OrbitApp
|
||||
module Plugin
|
||||
module Registration
|
||||
Version = "0.1"
|
||||
|
||||
module ClassMethods
|
||||
@@registrations = []
|
||||
|
||||
def new( name ,&block)
|
||||
@@registrations << DataSheet.new(name,&block)
|
||||
end
|
||||
|
||||
def new_from_module_app(name,base_path,arg)
|
||||
@@registrations << DataSheet.new(name,arg,:base_path=>base_path)
|
||||
end
|
||||
|
||||
def find_by_key(key)
|
||||
@@registrations.each{|t|
|
||||
return t if t.name == key
|
||||
}
|
||||
return nil
|
||||
end
|
||||
|
||||
def all
|
||||
return @@registrations
|
||||
end
|
||||
end
|
||||
|
||||
extend ClassMethods
|
||||
def self.included( other )
|
||||
other.extend( ClassMethods )
|
||||
end
|
||||
|
||||
class DataSheet
|
||||
attr_reader :name
|
||||
attr_reader :base_path
|
||||
|
||||
|
||||
def initialize(name,partial=nil,*args ,&block)
|
||||
@base_path = args[0][:base_path]
|
||||
@name = name
|
||||
@partial_path = ''
|
||||
|
||||
unless partial.nil?
|
||||
@partial_path = partial[:path]
|
||||
end
|
||||
|
||||
block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given?
|
||||
end
|
||||
|
||||
def profile_partial_path
|
||||
return @partial_path
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,11 @@
|
||||
require "orbit_app/summary"
|
||||
|
||||
module OrbitApp
|
||||
module Plugin
|
||||
module Summary
|
||||
# include OrbitApp::Summary
|
||||
include OrbitApp::Summary
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,46 @@
|
||||
module OrbitApp
|
||||
module Summary
|
||||
Version = "0.1"
|
||||
|
||||
module ClassMethods
|
||||
@@summaries = []
|
||||
|
||||
def new( name ,&block)
|
||||
@@summaries << Item.new(name,&block)
|
||||
binding.pry
|
||||
end
|
||||
|
||||
def all
|
||||
return @@summaries
|
||||
end
|
||||
end
|
||||
|
||||
extend ClassMethods
|
||||
def self.included( other )
|
||||
other.extend( ClassMethods )
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# def initialize( k )
|
||||
# @@summaries += 1
|
||||
# binding.pry
|
||||
# end
|
||||
|
||||
|
||||
class Item
|
||||
@name =""
|
||||
def initialize(name = "test",&block)
|
||||
@name = name
|
||||
block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given?
|
||||
end
|
||||
|
||||
def get_name
|
||||
return @name
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
@@ -148,19 +148,18 @@ module OrbitCoreLib
|
||||
module PermissionUnility
|
||||
private
|
||||
def check_permission(type = :use)
|
||||
setup_vars
|
||||
permission_grant = current_user.admin?? true : false
|
||||
permission_grant = current_or_guest_user.admin?? true : false
|
||||
module_app = @module_app.nil?? find_module_app_by_token(params[:token]) : @module_app
|
||||
unless permission_grant
|
||||
permission_grant = case type
|
||||
when :use
|
||||
users_ary = module_app.app_auth.auth_users rescue nil
|
||||
users_ary = [] if users_ary.nil?
|
||||
(users_ary.include?(current_user) || module_app.is_manager?(current_user) || module_app.is_sub_manager?(current_user))
|
||||
(users_ary.include?(current_or_guest_user) || module_app.is_manager?(current_or_guest_user) || module_app.is_sub_manager?(current_or_guest_user))
|
||||
when :manager
|
||||
module_app.is_manager?(current_user)
|
||||
module_app.is_manager?(current_or_guest_user)
|
||||
when :sub_manager
|
||||
module_app.is_manager?(current_user) || module_app.is_sub_manager?(current_user)
|
||||
module_app.is_manager?(current_or_guest_user) || module_app.is_sub_manager?(current_or_guest_user)
|
||||
end
|
||||
end
|
||||
permission_grant
|
||||
|
||||
@@ -189,6 +189,7 @@ module ParserCommon
|
||||
if (content["main"] == "true" && !page.module_app.nil?)
|
||||
ret << "<div id='appfrontend' class='dymanic_load' path='/panel/#{page.module_app.key}/front_end/#{page.app_frontend_url}"
|
||||
ret << "/#{params[:id]}" if params[:id] && !params[:id].eql?(page.id.to_s)
|
||||
ret << "/#{params[:controller_action]}" if params[:controller_action] && params[:id]
|
||||
ret << "?inner=true&page_id=#{page.id}&category_id=#{category}&tag_id=#{tag}&preview=#{params[:preview]}&page_main=#{params[:page_main]}&search_query=#{params[:search_query]}&name=#{params[:name]}"
|
||||
ret << "'></div>"
|
||||
else
|
||||
@@ -205,7 +206,7 @@ module ParserCommon
|
||||
ret << part.content rescue ''
|
||||
when 'module_widget'
|
||||
url = "/panel/#{part.module_app.key}/widget/#{part.widget_path}?inner=true"
|
||||
options = "&category_id=#{!part[:category].blank? ? part[:category].blank? : category}&tag_id=#{!part[:tag].blank? ? part[:tag] : tag}&page=#{params[:page]}&search_query=#{params[:search_query]}&part_title=#{Rack::Utils.escape(part_title).gsub("+", "%20") rescue nil}"
|
||||
options = "&category_id=#{!part[:category].blank? ? part[:category].blank? : category}&tag_id=#{!part[:tag].blank? ? part[:tag] : tag}&page=#{params[:page]}&search_query=#{params[:search_query]}&part_title=#{Rack::Utils.escape(part_title).gsub("+", "%20") rescue nil}&part_id=#{part.id}"
|
||||
ret << "<div class='dymanic_load widget' path='#{url + options}'></div>"
|
||||
when 'public_r_tag'
|
||||
ret << "<r:#{part.public_r_tag} id='#{part.public_r_tag_object_id}'/>"
|
||||
|
||||
@@ -22,7 +22,7 @@ module ParserLayout
|
||||
|
||||
body.css('.page_image').each do |page_image|
|
||||
image = design.images.where( file: File.basename(page_image['src']))[0]
|
||||
image.update_attributes(:name => File.basename(page_image['src']), :html_id => page_image['id'], :html_class => page_image['class']) if image
|
||||
image.update_attributes(:html_id => page_image['id'], :html_class => page_image['class'], :in_html => true) if image
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -0,0 +1,333 @@
|
||||
# encoding: utf-8
|
||||
|
||||
namespace :build_new_member do
|
||||
task :set_gender => :environment do
|
||||
af = AttributeField.first({conditions:{key: "gender"}})
|
||||
af.markup_value = {"1"=>{"en"=>"Male", "zh_tw"=>"男性"}, "2"=>{"en"=>"Female", "zh_tw"=>"女性"}, "3"=>{"en"=>"Other", "zh_tw"=>"其他"}, "3"=>{"en"=>"Not public", "zh_tw"=>"不公開"}}
|
||||
af.markup = "select"
|
||||
af.locale = true
|
||||
af.save
|
||||
end
|
||||
|
||||
task :setup_status_options => :environment do
|
||||
data_set = {
|
||||
:teacher=>{:status=>{:markup=>"select",:markup_value=>{"1"=>{"en"=>"Fulltime", "zh_tw"=>"全職"}, "2"=>{"en"=>"Adjunct", "zh_tw"=>"兼職"}, "3"=>{"en"=>"Co Hiring", "zh_tw"=>"合聘"}, "3"=>{"en"=>"Distinguished", "zh_tw"=>"特聘"}}}},
|
||||
:student=>{:status=>{:markup=>"select",:markup_value=>{"1"=>{"en"=>"Studying", "zh_tw"=>"在學"}, "2"=>{"en"=>"Drop-out", "zh_tw"=>"休學"}, "3"=>{"en"=>"Alumi", "zh_tw"=>"校友"}, "3"=>{"en"=>"Suspended", "zh_tw"=>"未完成"}}}},
|
||||
:staff=>{:staff=>{:markup=>"select",:markup_value=>nil}}
|
||||
}
|
||||
data_set.each do |key,data|
|
||||
role = Role.first({conditions:{key: key}})
|
||||
role.sub_roles.each do |sr|
|
||||
sr.attribute_fields.each do |af|
|
||||
if af.key == "status"
|
||||
# binding.pry
|
||||
af.markup = data[:status][:markup]
|
||||
af.markup_value = data[:status][:markup_value]
|
||||
af.save
|
||||
# binding.pry
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
task :sub_role_tags_generate => :environment do
|
||||
SubRoleTag.destroy_all
|
||||
role_keys = %w{teacher staff student}
|
||||
role_keys.each do |role_key|
|
||||
role = Role.first({conditions:{key: role_key}})
|
||||
puts "Starting with Role with key: #{role_key}"
|
||||
role.sub_roles.each do |sr|
|
||||
puts "Role : #{role_key} => #{sr.title}"
|
||||
for i in 1..7
|
||||
sr.tags.build(:en => "Students-#{sr.title_translations['en']}_#{i}" , :zh_tw => "在校學生-#{sr.title_translations['zh_tw']}_#{i}" , :key => "#{role_key}_#{sr.title_translations['en'].parameterize}_#{i}" )
|
||||
end
|
||||
sr.save
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
task :fields_for_teacher => :environment do
|
||||
sub_role_attribute_fields_template = [
|
||||
{key: 'status', markup: "text_field", locale: true, list_options: nil, built_in: true, disabled: false, locale_title_translations: {"zh_tw"=>"狀態", "en"=>"Status"}, neutral_title: nil },
|
||||
{key: 'other_position', markup: "text_field", locale: true, list_options: nil, built_in: true, disabled: false, locale_title_translations: {"zh_tw"=>"其他職位", "en"=>"Other Position"}, neutral_title: nil },
|
||||
{key: 'research_domain', markup: "text_field", locale: true, list_options: nil, built_in: true, disabled: false, locale_title_translations: {"zh_tw"=>"研究領域", "en"=>"Research Domain"}, neutral_title: nil },
|
||||
{key: 'teaching_domain', markup: "text_field", locale: true, list_options: nil, built_in: true, disabled: false, locale_title_translations: {"zh_tw"=>"授課領域", "en"=>"Teaching Domain"}, neutral_title: nil }
|
||||
]
|
||||
role = Role.first({conditions:{key: 'teacher'}})
|
||||
role.sub_roles.each{|sb|
|
||||
sb.attribute_fields.destroy_all
|
||||
sub_role_attribute_fields_template.each{|att_f|
|
||||
sb.attribute_fields.build att_f
|
||||
}
|
||||
sb.save
|
||||
}
|
||||
end
|
||||
|
||||
task :fields_for_student => :environment do
|
||||
sub_role_attribute_fields_template = [
|
||||
{key: 'status', markup: "text_field", locale: true, list_options: nil, built_in: true, disabled: false, locale_title_translations: {"zh_tw"=>"狀態", "en"=>"Status"}, neutral_title: nil },
|
||||
{key: 'entrance_year', markup: "text_field", locale: true, list_options: nil, built_in: true, disabled: false, locale_title_translations: {"zh_tw"=>"入學年", "en"=>"Entrance Year"}, neutral_title: nil },
|
||||
{key: 'graduation_date', markup: "text_field", locale: true, list_options: nil, built_in: true, disabled: false, locale_title_translations: {"zh_tw"=>"屆別", "en"=>"Graduation Date"}, neutral_title: nil },
|
||||
{key: 'actual_graduation', markup: "text_field", locale: true, list_options: nil, built_in: true, disabled: false, locale_title_translations: {"zh_tw"=>"實際畢業年", "en"=>"Actual Graduation"}, neutral_title: nil }
|
||||
]
|
||||
role = Role.first({conditions:{key: 'student'}})
|
||||
role.sub_roles.each{|sb|
|
||||
sb.attribute_fields.destroy_all
|
||||
sub_role_attribute_fields_template.each{|att_f|
|
||||
sb.attribute_fields.build att_f
|
||||
}
|
||||
sb.save
|
||||
}
|
||||
end
|
||||
|
||||
task :fields_for_staff => :environment do
|
||||
sub_role_attribute_fields_template = [
|
||||
{key: 'status', markup: "text_field", locale: true, list_options: nil, built_in: true, disabled: false, locale_title_translations: {"zh_tw"=>"狀態", "en"=>"Status"}, neutral_title: nil },
|
||||
{key: 'responsibilities', markup: "text_field", locale: true, list_options: nil, built_in: true, disabled: false, locale_title_translations: {"zh_tw"=>"負責業務", "en"=>"Responsibilities"}, neutral_title: nil }
|
||||
]
|
||||
role = Role.first({conditions:{key: 'staff'}})
|
||||
role = Role.create!({key: "staff", built_in: true, disabled: false, title_translations: {"en"=>"Staff", "zh_tw"=>"行政人員"}}) if role.nil?
|
||||
role.sub_roles.each{|sb|
|
||||
sb.attribute_fields.destroy_all
|
||||
sub_role_attribute_fields_template.each{|att_f|
|
||||
sb.attribute_fields.build att_f
|
||||
}
|
||||
sb.save
|
||||
}
|
||||
end
|
||||
|
||||
task :matt_data => :environment do
|
||||
b = User.first({conditions:{email: 'matt@rulingcom.com'}})
|
||||
b.attribute_values.destroy_all
|
||||
|
||||
data = [{:key=> 'last_name',:en=>'Fu',:zh_tw=>'傅'},
|
||||
{:key=> 'first_name',:en=>'Matt',:zh_tw=>'儒淵'},
|
||||
{:key=> 'nick_name',:en=> 'Matt K.',:zh_tw=> 'Matt K.'},
|
||||
{:key=> 'addr',:en=>'Earth',:zh_tw=>'302新竹縣竹北市嘉豐南路二段101號'},
|
||||
{:key=> 'phone',:en=>'035508881',:zh_tw=>'035508881'},
|
||||
{:key=> 'gender',:en=>'Male',:zh_tw=>'男'},
|
||||
{:key=> 'birthday',:en=>'1986',:zh_tw=>'1986'},
|
||||
{:key=> 'email',:en=>'matt@rulingcom.com',:zh_tw=>'matt@rulingcom.com'}]
|
||||
|
||||
data_hash = Hash[data.map{|t| [t[:key],t] }]
|
||||
Info.first.attribute_fields.each do |profile_field|
|
||||
b.attribute_values.build(data_hash.fetch(profile_field.key).merge({:attribute_field_id=>profile_field.id}))
|
||||
end
|
||||
|
||||
#==================================================================
|
||||
b.roles = []
|
||||
b.roles << Role.first({conditions:{key: 'teacher'}})
|
||||
b.roles << Role.first({conditions:{key: 'student'}})
|
||||
#==================================================================
|
||||
b.sub_roles = []
|
||||
sr_1 = b.roles.first.sub_roles.last
|
||||
sr_2 = b.roles.last.sub_roles.last
|
||||
b.sub_roles << sr_1 #use teacher data
|
||||
b.sub_roles << sr_2 #use student data
|
||||
#==================================================================
|
||||
# to get field for fast fill up: sr_2.attribute_fields.map{|t| Hash[t.key,nil]}
|
||||
{"status"=>"兼職","research_domain"=>"神經網絡","teaching_domain"=>"平行運算"}.each do |key, value|
|
||||
field = sr_1.attribute_fields.where({key: key}).first
|
||||
b.attribute_values.build({key=>value}.merge({:key=>field.key,:attribute_field_id=>field.id}))
|
||||
end
|
||||
|
||||
{"status"=>"在學中","entrance_year"=>2010}.each do |key, value|
|
||||
field = sr_2.attribute_fields.where({key: key}).first
|
||||
b.attribute_values.build({key=>value}.merge({:key=>field.key,:attribute_field_id=>field.id}))
|
||||
end
|
||||
|
||||
# b.attribute_values.build :key=> 'last_name',:en=>'Fu',:zh_tw=>'傅'
|
||||
# b.attribute_values.build :key=> 'first_name',:en=>'Matt',:zh_tw=>'儒淵'
|
||||
# b.attribute_values.build :key=> 'nick_name',:en=> 'Matt K.',:zh_tw=> 'Matt K.'
|
||||
# b.attribute_values.build :key=> 'addr',:en=>'Earth',:zh_tw=>'302新竹縣竹北市嘉豐南路二段101號'
|
||||
# b.attribute_values.build :key=> 'phone',:en=>'035508881',:zh_tw=>'035508881'
|
||||
# b.attribute_values.build :key=> 'gender',:en=>'Male',:zh_tw=>'男'
|
||||
# b.attribute_values.build :key=> 'birthday',:en=>'1986',:zh_tw=>'1986'
|
||||
# b.attribute_values.build :key=> 'email',:en=>'matt@rulingcom.com',:zh_tw=>'matt@rulingcom.com'
|
||||
b.save
|
||||
end
|
||||
|
||||
task :chris_data => :environment do
|
||||
b = User.first({conditions:{email: 'chris@rulingcom.com'}})
|
||||
b.attribute_values.destroy_all
|
||||
b.attribute_values.build :key=> 'last_name',:en=>'Vilayphiou',:zh_tw=>'林'
|
||||
b.attribute_values.build :key=> 'first_name',:en=>'Christophe',:zh_tw=>'順發'
|
||||
b.attribute_values.build :key=> 'nick_name',:en=> 'Chris',:zh_tw=> 'Chris'
|
||||
b.attribute_values.build :key=> 'addr',:en=>'asdsaddasdasd',:zh_tw=>'302新竹縣竹北市嘉豐南路二段101號'
|
||||
b.attribute_values.build :key=> 'phone',:en=>'035508881',:zh_tw=>'035508881'
|
||||
b.attribute_values.build :key=> 'gender',:en=>'Male',:zh_tw=>'男'
|
||||
b.attribute_values.build :key=> 'birthday',:en=>'1990',:zh_tw=>'1990'
|
||||
b.attribute_values.build :key=> 'email',:en=>'chris@rulingcom.com',:zh_tw=>'chris@rulingcom.com'
|
||||
b.save
|
||||
end
|
||||
|
||||
task :module_app => :environment do
|
||||
ModuleApp.create!(:key=>"new_member",
|
||||
:title=>"new_member",
|
||||
:version=> "0.1",
|
||||
:organization => "Rulingcom",
|
||||
:author => "RD dep",
|
||||
:intro => "New interface for member menagement",
|
||||
:enable_frontend => true)
|
||||
end
|
||||
|
||||
task :sub_role => :environment do
|
||||
teacher_role = Role.first({conditions:{key: 'teacher'}})
|
||||
teacher_role.sub_roles.destroy_all
|
||||
teacher_sub_roles ={
|
||||
:professor => {"zh_tw"=>"教授", "en"=>"Professor"},
|
||||
:lecturer => {"zh_tw"=>"講師", "en"=>"Lecturer"},
|
||||
:associate_professor => {"zh_tw"=>"副教授", "en"=>"Associate Professor"},
|
||||
:assistant_professor => {"zh_tw"=>"助理教授", "en"=>"Assistant Professor"}
|
||||
}
|
||||
|
||||
teacher_sub_roles.each do |key,title|
|
||||
teacher_role.sub_roles.build :key=>key,:title_translations=>title,:built_in=>true
|
||||
puts "=SubRole key:#{key}\t Title:#{title}"
|
||||
end
|
||||
teacher_role.save
|
||||
p "==Finished building sub_roles for Teachers"
|
||||
|
||||
student_role = Role.first({conditions:{key: 'student'}})
|
||||
student_role.sub_roles.destroy_all
|
||||
student_sub_roles ={
|
||||
:ph_d => {"zh_tw"=>"博士班", "en"=>"Ph.D"},
|
||||
:master => {"zh_tw"=>"碩士班", "en"=>"Master"},
|
||||
:bachelor => {"zh_tw"=>"學士班", "en"=>"Bachelor"},
|
||||
}
|
||||
|
||||
student_sub_roles.each do |key,title|
|
||||
student_role.sub_roles.build :key=>key,:title_translations=>title,:built_in=>true
|
||||
puts "=SubRole key:#{key}\t Title:#{title}"
|
||||
end
|
||||
student_role.save
|
||||
p "==Finished building sub_roles for Students"
|
||||
|
||||
staff_role = Role.first({conditions:{key: 'staff'}})
|
||||
staff_role.sub_roles.destroy_all
|
||||
staff_sub_roles ={
|
||||
:general => {"zh_tw"=>"一般", "en"=>"General"}
|
||||
}
|
||||
|
||||
staff_sub_roles.each do |key,title|
|
||||
staff_role.sub_roles.build :key=>key,:title_translations=>title,:built_in=>true
|
||||
puts "=SubRole key:#{key}\t Title:#{title}"
|
||||
end
|
||||
staff_role.save
|
||||
p "==Finished building sub_roles for Staff"
|
||||
|
||||
staff_role = Role.first({conditions:{key: 'staff'}})
|
||||
staff_role.sub_roles.destroy_all
|
||||
staff_sub_roles ={
|
||||
:general => {"zh_tw"=>"一般", "en"=>"General"}
|
||||
}
|
||||
|
||||
staff_sub_roles.each do |key,title|
|
||||
staff_role.sub_roles.build :key=>key,:title_translations=>title,:built_in=>true
|
||||
puts "=SubRole key:#{key}\t Title:#{title}"
|
||||
end
|
||||
staff_role.save
|
||||
p "==Finished building sub_roles for Staff"
|
||||
|
||||
end
|
||||
|
||||
|
||||
# task :status => :environment do
|
||||
# teacher_role = Role.first({conditions:{key: 'teacher'}})
|
||||
# teacher_role.statuses.destroy_all
|
||||
# teacher_status ={
|
||||
# :fulltime => {"en"=>"Full Time", "zh_tw"=>"全職"},
|
||||
# :adjunct => {"en"=>"Adjunct", "zh_tw"=>"兼職"},
|
||||
# :co_hiring => {"en"=>"Co Hiring", "zh_tw"=>"合聘"},
|
||||
# :distinguished => {"en"=>"Distinguished", "zh_tw"=>"特聘"}
|
||||
# }
|
||||
# teacher_status.each do |key,title|
|
||||
# teacher_role.statuses.build :key=>key,:title_translations=>title
|
||||
# puts "=Status key:#{key}\t Title:#{title}"
|
||||
# end
|
||||
# teacher_role.save
|
||||
|
||||
# p "==Finished building status for Teachers"
|
||||
|
||||
# student_role = Role.first({conditions:{key: 'student'}})
|
||||
# student_status.statuses.destroy_all
|
||||
# student_status ={
|
||||
# :studying => {"en"=>"Studying", "zh_tw"=>"在學"},
|
||||
# :drop_out => {"en"=>"Drop-out", "zh_tw"=>"休學"},
|
||||
# :alumi => {"en"=>"Alumi", "zh_tw"=>"校友"},
|
||||
# :suspended => {"en"=>"Suspended", "zh_tw"=>"未完成"}
|
||||
# }
|
||||
# student_status.each do |key,title|
|
||||
# student_role.statuses.build :key=>key,:title_translations=>title
|
||||
# puts "=Status key:#{key}\t Title:#{title}"
|
||||
# end
|
||||
# student_role.save
|
||||
|
||||
# p "==Finished building status for Students"
|
||||
|
||||
# end
|
||||
task :build_sub_role_for_staff_1023 => :environment do
|
||||
role = Role.first(conditions: {key: 'staff'})
|
||||
staff_sub_roles ={
|
||||
:secretary => {"en"=>"Secretary", "zh_tw"=>"秘書"},
|
||||
:assistant => {"en"=>"Assistant", "zh_tw"=>"行政助理"},
|
||||
:research_assistant => {"en"=>"Research Assistant", "zh_tw"=>"研究助理"},
|
||||
:ta => {"en"=>"TA", "zh_tw"=>"助教"},
|
||||
:technical_specialist => {"en"=>"Technical Specialist", "zh_tw"=>"技士"}
|
||||
}
|
||||
staff_sub_roles.each do |key,item|
|
||||
role.sub_roles.build(:key=>key,:title_translations=> item)
|
||||
end
|
||||
role.save
|
||||
end
|
||||
|
||||
task :build_staff_attribute_field_1023 => :environment do
|
||||
sub_role_attribute_fields_template = [
|
||||
{key: 'status', markup: "select", locale: true, list_options: nil, built_in: true, disabled: false, locale_title_translations: {"zh_tw"=>"狀態", "en"=>"Status"}, neutral_title: nil },
|
||||
{key: 'responsibilities', markup: "text_field", locale: true, list_options: nil, built_in: true, disabled: false, locale_title_translations: {"zh_tw"=>"負責業務", "en"=>"Responsibilities"}, neutral_title: nil }
|
||||
]
|
||||
role = Role.first({conditions:{key: 'staff'}})
|
||||
role.sub_roles.each{|sb|
|
||||
sb.attribute_fields.destroy_all
|
||||
sub_role_attribute_fields_template.each{|att_f|
|
||||
sb.attribute_fields.build att_f
|
||||
}
|
||||
sb.save
|
||||
}
|
||||
role.save
|
||||
end
|
||||
|
||||
task :build_status_1023 => :environment do
|
||||
student_status ={
|
||||
:studying => {"en"=>"Studying", "zh_tw"=>"在學"},
|
||||
:drop_out => {"en"=>"Drop-out", "zh_tw"=>"休學"},
|
||||
:alumi => {"en"=>"Alumi", "zh_tw"=>"校友"},
|
||||
:suspended => {"en"=>"Suspended", "zh_tw"=>"未完成"}
|
||||
}
|
||||
|
||||
role = Role.first(conditions: {key: 'student'})
|
||||
student_status.each do |key,item|
|
||||
role.statuses.build(:key=>key.to_s,:title_translations=>item)
|
||||
end
|
||||
role.save
|
||||
|
||||
teacher_status ={
|
||||
:fulltime => {"en"=>"Full Time", "zh_tw"=>"全職"},
|
||||
:adjunct => {"en"=>"Adjunct", "zh_tw"=>"兼職"},
|
||||
:co_hiring => {"en"=>"Co Hiring", "zh_tw"=>"合聘"},
|
||||
:distinguished => {"en"=>"Distinguished", "zh_tw"=>"特聘"}
|
||||
}
|
||||
role = Role.first(conditions: {key: 'teacher'})
|
||||
teacher_status.each do |key,item|
|
||||
role.statuses.build(:key=>key.to_s,:title_translations=>item)
|
||||
end
|
||||
role.save
|
||||
|
||||
end
|
||||
|
||||
task :clean_up_attribute_value_for_deleted_fields => :environment do
|
||||
AttributeValue.all.reject{|t| !AttributeField.find(t.attribute_field_id).nil? rescue false }.each{|t| t.delete}
|
||||
end
|
||||
end
|
||||
@@ -96,4 +96,8 @@ namespace :data_migration do
|
||||
app.save!
|
||||
end
|
||||
|
||||
task :rename_attribute_field => :environment do
|
||||
AttributeField.collection.update({},{'$rename' => {'title' => 'locale_title'}}, multi: true, safe: true)
|
||||
end
|
||||
|
||||
end
|
||||
+2
-2
@@ -71,7 +71,7 @@ namespace :dev do
|
||||
|
||||
design = Design.new(:title => "Fraisier", :author => "Paul", :intro => "Strawberry cake")
|
||||
|
||||
design.build_default_css(:file => File.open("#{Rails.root}/lib/fraisier/default.css"))
|
||||
design.build_css_default(:file => File.open("#{Rails.root}/lib/fraisier/default.css"))
|
||||
|
||||
# image = design.images.build(:file => File.open("#{Rails.root}/lib/fraisier/img/buttons.gif"))
|
||||
#
|
||||
@@ -89,7 +89,7 @@ namespace :dev do
|
||||
|
||||
design_1 = Design.new(:title => "Bob", :author => "Me", :intro => "Moran")
|
||||
|
||||
design_1.build_default_css(:file => File.open("#{Rails.root}/lib/fraisier/default.css"))
|
||||
design_1.build_css_default(:file => File.open("#{Rails.root}/lib/fraisier/default.css"))
|
||||
|
||||
# image = design.images.build(:file => File.open("#{Rails.root}/lib/fraisier/img/buttons.gif"))
|
||||
#
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace :pages do
|
||||
|
||||
design = Design.new(:title => "Fraisier", :author => "Paul", :intro => "Strawberry cake")
|
||||
|
||||
design.build_default_css(:file => File.open("#{Rails.root}/lib/fraisier/default.css"))
|
||||
design.build_css_default(:file => File.open("#{Rails.root}/lib/fraisier/default.css"))
|
||||
|
||||
# image = design.images.build(:file => File.open("#{Rails.root}/lib/fraisier/img/buttons.gif"))
|
||||
#
|
||||
@@ -37,7 +37,7 @@ namespace :pages do
|
||||
|
||||
design_1 = Design.new(:title => "Bob", :author => "Me", :intro => "Moran")
|
||||
|
||||
design_1.build_default_css(:file => File.open("#{Rails.root}/lib/fraisier/default.css"))
|
||||
design_1.build_css_default(:file => File.open("#{Rails.root}/lib/fraisier/default.css"))
|
||||
|
||||
# image = design.images.build(:file => File.open("#{Rails.root}/lib/fraisier/img/buttons.gif"))
|
||||
#
|
||||
|
||||
Reference in new issue
Block a user