new plugins added for desktop
This commit is contained in:
parent
42615f02ea
commit
c2f223b82c
|
@ -22,3 +22,4 @@ uploads/**/*
|
|||
.sass-cache/*
|
||||
*.supported
|
||||
mongoid.yml
|
||||
*.
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
require 'mime/types'
|
||||
|
||||
class DesktopPublicationsController< ApplicationController
|
||||
def books
|
||||
render "desktop/books", :layout => false
|
||||
end
|
||||
|
||||
def books_list
|
||||
render "desktop/books/list", :layout => false
|
||||
end
|
||||
|
||||
def books_add
|
||||
render "desktop/books/add", :layout => false
|
||||
end
|
||||
end
|
|
@ -1,26 +0,0 @@
|
|||
class DesktopResearchController< ApplicationController
|
||||
|
||||
def research_d
|
||||
render "desktop/research_d", :layout=>false
|
||||
end
|
||||
def research_d_list
|
||||
render "desktop/research_domain/list", :layout=>false
|
||||
end
|
||||
|
||||
def research_d_add
|
||||
render "desktop/research_domain/add", :layout=>false
|
||||
end
|
||||
|
||||
def research_p
|
||||
render "desktop/research_p", :layout=>false
|
||||
end
|
||||
def research_p_list
|
||||
render "desktop/research_project/list", :layout=>false
|
||||
end
|
||||
|
||||
def research_p_add
|
||||
render "desktop/research_project/add", :layout=>false
|
||||
end
|
||||
|
||||
|
||||
end
|
|
@ -1,87 +0,0 @@
|
|||
<div class="toolbar hh1">
|
||||
<div class="fn_g hp">
|
||||
<button class="fn_btn hh1 thmc2 thmtxt">Save</button>
|
||||
<button class="fn_btn hh1 admbg2">Cancel</button>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Year</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">2012</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">2011</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">2010</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">2009</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">2008</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">2007</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">2006</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">2005</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">2004</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">2003</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">2002</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">2001</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Language</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">English</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Chinese</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><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"><input type="radio" name="" value="Books" />Books
|
||||
<input type="radio" name="" value="Chapter" /> Chapter</li>
|
||||
<li class="s_grid_row"><textarea class="s_grid_6 s_grid" name="" id="">Book Title</textarea></li>
|
||||
<li class="s_grid_row"><textarea class="s_grid_6 s_grid" name="" id="" rows="10">Chapters and sections</textarea></li>
|
||||
<li class="s_grid_row"><input class="s_grid s_grid_1" type="text" value="page"> ~ <input class="s_grid s_grid_1" type="text" value="page"><input class="s_grid s_grid_2" type="text" value="Publisher"></li>
|
||||
<li class="s_grid_row"><input class="s_grid s_grid_2" type="text" value="Location"><input class="s_grid s_grid_2" type="text" value="Chief editor"></li>
|
||||
<li class="s_grid_row"><input class="s_grid s_grid_3" type="text" value="ISSN"></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"><input class="s_grid s_grid_6" type="text" value="Tags"><span class="icon-plus input_append"></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>
|
|
@ -1,72 +0,0 @@
|
|||
<div class="toolbar hh1">
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><span class="icon-check"></span></div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul id="journal_selection_options">
|
||||
<li><a class="hp hh1 admtxt" href="all">All</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="none">None</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">More</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">Delete</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Tag</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Tag</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">All</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Starred</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">MIT</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Status</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">All</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Published</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Pending</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">View</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul id="journal_view_selection">
|
||||
<li><a class="hp hh1 admtxt" href="journal">Journal</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="title">Title</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="file">File</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="keywords">Keywords</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="abstract">Abstract</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Share</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">Full</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Group</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="overview" content-layout="datalist" base-width="300">
|
||||
|
||||
</div>
|
||||
|
|
@ -1,75 +0,0 @@
|
|||
<div class="toolbar hh1">
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><span class="icon-check"></span></div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul id="journal_selection_options">
|
||||
<li><a class="hp hh1 admtxt" href="all">All</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="none">None</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">More</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">Delete</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Tag</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Tag</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">All</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Starred</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">MIT</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Status</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">All</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Published</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Pending</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">View</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul id="journal_view_selection">
|
||||
<li><a class="hp hh1 admtxt" href="journal">Journal</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="title">Title</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="file">File</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="keywords">Keywords</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="abstract">Abstract</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Share</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">Full</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Group</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><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>
|
|
@ -15,23 +15,23 @@
|
|||
|
||||
<li class="dock_item"><a callback-method='initializeConferencePapers' href="<%= panel_personal_conference_desktop_conference_window_path %>" class="widget_fn wh2 hh2" id='d_conference_p' custom-load="conference" onclick="return false;"><span class="widget_icon"><img src="" alt="Conference Papers" id="conference_p_icon" width="30" height="30"/></span></a></li>
|
||||
|
||||
<li class="dock_item"><a callback-method='initializeBooks' href="<%= desktop_publications_books_path %>" class="widget_fn wh2 hh2" id='d_books' onclick="return false;"><span class="widget_icon"><img src="" alt="Books" id="books_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a callback-method='initializePersonalBook' href="<%= panel_personal_book_desktop_books_window_path %>" class="widget_fn wh2 hh2" 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 callback-method='' href="" class="widget_fn wh2 hh2" 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 hh2 thmc4" style="width: 240px;">
|
||||
<li class="dock_item"><a callback-method='initializeResearchDomain' href="<%= desktop_research_research_d_path %>" class="widget_fn wh2 hh2" 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 callback-method='initializeResearchProject' href="<%= desktop_research_research_p_path %>" class="widget_fn wh2 hh2" 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 callback-method='' href="" class="widget_fn wh2 hh2" 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 callback-method='' href="labs" class="widget_fn wh2 hh2" id='d_labs' onclick="return false;"><span class="widget_icon"><img src="" alt="Labs" id="labs_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a callback-method='initializePersonalResearch' href="<%= panel_personal_research_desktop_research_window_path %>" class="widget_fn wh2 hh2" 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 callback-method='initializePersonalProject' href="<%= panel_personal_project_desktop_project_window_path %>" class="widget_fn wh2 hh2" 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 callback-method='initializePersonalPatent' href="<%= panel_personal_patent_desktop_patent_window_path %>" class="widget_fn wh2 hh2" 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 callback-method='initializePersonalLab' href="<%= panel_personal_lab_desktop_lab_window_path %>" class="widget_fn wh2 hh2" 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 callback-method='' href="" class="widget_fn wh2 hh2" 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 hh2 thmc4" style="width: 300px;">
|
||||
<li class="dock_item"><a callback-method='' href="working" class="widget_fn wh2 hh2" id='d_working' onclick="return false;"><span class="widget_icon"><img src="" alt="Working" id="working_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a callback-method='' href="education" class="widget_fn wh2 hh2" id='d_education' onclick="return false;"><span class="widget_icon"><img src="" alt="Education" id="education_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a callback-method='' href="honors" class="widget_fn wh2 hh2" id='d_honors' onclick="return false;"><span class="widget_icon"><img src="" alt="Honors" id="honors_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a callback-method='initializePersonalExperience' href="<%= panel_personal_experience_desktop_experience_window_path %>" class="widget_fn wh2 hh2" id='d_working' onclick="return false;"><span class="widget_icon"><img src="" alt="Working" id="working_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a callback-method='initializePersonalDiploma' href="<%= panel_personal_diploma_desktop_diploma_window_path %>" class="widget_fn wh2 hh2" id='d_education' onclick="return false;"><span class="widget_icon"><img src="" alt="Education" id="education_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a callback-method='initializePersonalHonor' href="<%= panel_personal_honor_desktop_honor_window_path %>" class="widget_fn wh2 hh2" id='d_honors' onclick="return false;"><span class="widget_icon"><img src="" alt="Honors" id="honors_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a callback-method='' href="activities" class="widget_fn wh2 hh2" id='d_activities' onclick="return false;"><span class="widget_icon"><img src="" alt="Activities" id="activities_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a callback-method='' href="clubs" class="widget_fn wh2 hh2" id='d_clubs' onclick="return false;"><span class="widget_icon"><img src="" alt="Clubs" id="clubs_icon" width="30" height="30"/></span></a></li>
|
||||
</ul>
|
||||
|
|
|
@ -1,107 +0,0 @@
|
|||
<div class="toolbar hh1">
|
||||
<div class="fn_g hp">
|
||||
<button class="fn_btn hh1 thmc2 thmtxt">Save</button>
|
||||
<button class="fn_btn hh1 admbg2">Cancel</button>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Year</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">2012</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">2011</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">2010</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">2009</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">2008</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">2007</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">2006</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">2005</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">2004</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">2003</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">2002</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">2001</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Language</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">English</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Chinese</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><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="">Conference Title</textarea></li>
|
||||
<li class="s_grid_row">
|
||||
<label>Paper type</label><input type="radio" name="" value="Books" />Oral<input type="radio" name="" value="Chapter" />Poster</li>
|
||||
<li class="s_grid_row"><label>Conference time</label></li>
|
||||
|
||||
<li class="s_grid_row"><select name="" id="" class="s_grid s_grid_1">
|
||||
<option value=""></option>
|
||||
</select>
|
||||
<label class="s_grid s_grid_1">Year</label>
|
||||
<select name="" id="" class="s_grid s_grid_1">
|
||||
<option value=""></option>
|
||||
</select>
|
||||
<label class="s_grid s_grid_1">Month</label>
|
||||
<select name="" id="" class="s_grid s_grid_1">
|
||||
<option value=""></option>
|
||||
</select>
|
||||
<label class="s_grid s_grid_1">Day</label>
|
||||
</li>
|
||||
|
||||
<li class="s_grid_row"><input class="s_grid s_grid_2" type="text" value="Location"><input class="s_grid s_grid_2" type="text" value="Sponsor"></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"><input class="s_grid s_grid_6" type="text" value="Tags"><span class="icon-plus input_append"></li>
|
||||
<li class="s_grid_row"><input class="s_grid s_grid_6" type="text" value="Keywords"><span class="icon-plus input_append"></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="20" class="s_grid s_grid_6">Abstract</textarea></li>
|
||||
<li class="s_grid_row"><textarea name="" id="" rows="6" class="s_grid s_grid_6">Note</textarea></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,75 +0,0 @@
|
|||
<div class="toolbar hh1">
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><span class="icon-check"></span></div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul id="journal_selection_options">
|
||||
<li><a class="hp hh1 admtxt" href="all">All</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="none">None</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">More</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">Delete</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Tag</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Tag</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">All</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Starred</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">MIT</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Status</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">All</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Published</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Pending</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">View</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul id="journal_view_selection">
|
||||
<li><a class="hp hh1 admtxt" href="journal">Journal</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="title">Title</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="file">File</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="keywords">Keywords</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="abstract">Abstract</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Share</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">Full</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Group</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><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>
|
|
@ -1,107 +0,0 @@
|
|||
<div class="toolbar hh1">
|
||||
<div class="fn_g hp">
|
||||
<button class="fn_btn hh1 thmc2 thmtxt">Save</button>
|
||||
<button class="fn_btn hh1 admbg2">Cancel</button>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Year</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">2012</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">2011</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">2010</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">2009</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">2008</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">2007</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">2006</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">2005</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">2004</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">2003</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">2002</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">2001</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Language</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">English</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Chinese</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><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="">Conference Title</textarea></li>
|
||||
<li class="s_grid_row">
|
||||
<label>Paper type</label><input type="radio" name="" value="Books" />Oral<input type="radio" name="" value="Chapter" />Poster</li>
|
||||
<li class="s_grid_row"><label>Conference time</label></li>
|
||||
|
||||
<li class="s_grid_row"><select name="" id="" class="s_grid s_grid_1">
|
||||
<option value=""></option>
|
||||
</select>
|
||||
<label class="s_grid s_grid_1">Year</label>
|
||||
<select name="" id="" class="s_grid s_grid_1">
|
||||
<option value=""></option>
|
||||
</select>
|
||||
<label class="s_grid s_grid_1">Month</label>
|
||||
<select name="" id="" class="s_grid s_grid_1">
|
||||
<option value=""></option>
|
||||
</select>
|
||||
<label class="s_grid s_grid_1">Day</label>
|
||||
</li>
|
||||
|
||||
<li class="s_grid_row"><input class="s_grid s_grid_2" type="text" value="Location"><input class="s_grid s_grid_2" type="text" value="Sponsor"></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"><input class="s_grid s_grid_6" type="text" value="Tags"><span class="icon-plus input_append"></li>
|
||||
<li class="s_grid_row"><input class="s_grid s_grid_6" type="text" value="Keywords"><span class="icon-plus input_append"></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="20" class="s_grid s_grid_6">Abstract</textarea></li>
|
||||
<li class="s_grid_row"><textarea name="" id="" rows="6" class="s_grid s_grid_6">Note</textarea></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,75 +0,0 @@
|
|||
<div class="toolbar hh1">
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><span class="icon-check"></span></div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul id="journal_selection_options">
|
||||
<li><a class="hp hh1 admtxt" href="all">All</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="none">None</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">More</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">Delete</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Tag</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Tag</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">All</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Starred</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">MIT</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Status</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">All</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Published</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Pending</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">View</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul id="journal_view_selection">
|
||||
<li><a class="hp hh1 admtxt" href="journal">Journal</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="title">Title</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="file">File</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="keywords">Keywords</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="abstract">Abstract</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Share</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">Full</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Group</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><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>
|
|
@ -268,21 +268,7 @@ Orbit::Application.routes.draw do
|
|||
match '/desktop/widget_layout' => 'desktop#widget_layout'
|
||||
match '/desktop/temp_func/'=>'desktop#temp_func'
|
||||
|
||||
# namespace :desktop_publications do
|
||||
match 'desktop_publications/books' => 'desktop_publications#books'
|
||||
match 'desktop_publications/books_list'=>'desktop_publications#books_list'
|
||||
match 'desktop_publications/books_add'=>'desktop_publications#books_add'
|
||||
|
||||
# namespace :desktop_research do
|
||||
match 'desktop_research/research_d' => 'desktop_research#research_d'
|
||||
match 'desktop_research/research_d_list/' => 'desktop_research#research_d_list'
|
||||
match 'desktop_research/research_d_add' => 'desktop_research#research_d_add'
|
||||
|
||||
match 'desktop_research/research_p' => 'desktop_research#research_p'
|
||||
match 'desktop_research/research_p_list/' => 'desktop_research#research_p_list'
|
||||
match 'desktop_research/research_p_add' => 'desktop_research#research_p_add'
|
||||
# end
|
||||
|
||||
match '/twitter/'=>'otheraccounts#twitter'
|
||||
match '/forgmail/'=>'otheraccounts#gmail'
|
||||
match '/otheraccounts/getaccounts'=>'otheraccounts#getaccounts'
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
// The tab key will cycle through the settings when first created
|
||||
// Visit http://wbond.net/sublime_packages/sftp/settings for help
|
||||
|
||||
// sftp, ftp or ftps
|
||||
"type": "sftp",
|
||||
|
||||
"save_before_upload": true,
|
||||
"upload_on_save": false,
|
||||
"sync_down_on_open": false,
|
||||
"sync_skip_deletes": false,
|
||||
"confirm_downloads": false,
|
||||
"confirm_sync": true,
|
||||
"confirm_overwrite_newer": false,
|
||||
|
||||
"host": "tp.rulingcom.com",
|
||||
"user": "rulingcom",
|
||||
"password": "bjo4xjp6",
|
||||
//"port": "22",
|
||||
|
||||
"remote_path": "/home/rulingcom/design_demo_site/orbit_d5",
|
||||
"ignore_regexes": [
|
||||
"\\.sublime-(project|workspace)", "sftp-config(-alt\\d?)?\\.json",
|
||||
"sftp-settings\\.json", "/venv/", "\\.svn", "\\.hg", "\\.git",
|
||||
"\\.bzr", "_darcs", "CVS", "\\.DS_Store", "Thumbs\\.db", "desktop\\.ini"
|
||||
],
|
||||
//"file_permissions": "664",
|
||||
//"dir_permissions": "775",
|
||||
|
||||
//"extra_list_connections": 0,
|
||||
|
||||
"connect_timeout": 30,
|
||||
//"keepalive": 120,
|
||||
//"ftp_passive_mode": true,
|
||||
//"ssh_key_file": "~/.ssh/id_rsa",
|
||||
//"sftp_flags": ["-F", "/path/to/ssh_config"],
|
||||
|
||||
//"preserve_modification_times": false,
|
||||
//"remote_time_offset_in_hours": 0,
|
||||
//"remote_encoding": "utf-8",
|
||||
//"remote_locale": "C",
|
||||
}
|
158
vendor/built_in_modules/personal_book/app/assets/javascripts/personal_book/desktop/personal_books.js
vendored
Normal file
158
vendor/built_in_modules/personal_book/app/assets/javascripts/personal_book/desktop/personal_books.js
vendored
Normal file
|
@ -0,0 +1,158 @@
|
|||
orbitDesktop.prototype.initializePersonalBook = function(target,url,cache){ // this init journal papers
|
||||
this.initializePersonalBook.formCallback = function(data){
|
||||
if(data.success){
|
||||
o.notify(data.msg,"success");
|
||||
o.sub_menu_item($("div[content-type=menu] a").eq(0));
|
||||
}else{
|
||||
o.notify(data.msg,"alert");
|
||||
}
|
||||
}
|
||||
|
||||
this.initializePersonalBook.list = function(){ // to open list part in journal papers page
|
||||
var journalData;
|
||||
var bindHandlers = function(){ // to bind handlers for list page
|
||||
|
||||
}
|
||||
bindHandlers();
|
||||
|
||||
var bindSecondaryHandlers = function(){
|
||||
$("#journal_p div#paper_list a.icon-check-empty").click(function(){
|
||||
if($(this).hasClass("icon-check-empty")){
|
||||
$(this).switchClass("icon-check-empty","icon-check",0);
|
||||
} else if($(this) .hasClass("icon-check")) {
|
||||
$(this).switchClass("icon-check","icon-check-empty",0);
|
||||
} else if($(this).hasClass("icon-star")){
|
||||
$(this).removeClass("icon-star").addClass("icon-star-empty");
|
||||
} else if($(this).hasClass("icon-star-empty")){
|
||||
$(this).removeClass("icon-star-empty").addClass("icon-star");
|
||||
}
|
||||
return false;
|
||||
})
|
||||
}
|
||||
}
|
||||
this.initializePersonalBook.bookDelete = function(data,dom){
|
||||
var parent = dom.parent().parent();
|
||||
if(data.success){
|
||||
parent.hide("slide",function(){parent.remove();});
|
||||
o.notify(data.msg,"success");
|
||||
}
|
||||
}
|
||||
|
||||
this.initializePersonalBook.cancelbook = function(){
|
||||
o.highlight_sub_menu_item(0);
|
||||
}
|
||||
|
||||
this.initializePersonalBook.editbook = function(){
|
||||
o.highlight_sub_menu_item(1);
|
||||
var uploadFiles = function(){
|
||||
$('#add_plugin_file a.add').click(function(){
|
||||
var new_id = $(this).prev().attr('value');
|
||||
var old_id = new RegExp("new_writing_journal_files", "g");
|
||||
$(this).prev().attr('value', parseInt(new_id) + 1);
|
||||
var x = get_html(old_id,new_id);
|
||||
var newfield = $(x);
|
||||
$(this).parents('table').append(newfield);
|
||||
newfield.find('.action a.delete').click(function(){
|
||||
newfield.remove();
|
||||
});
|
||||
return false;
|
||||
});
|
||||
$('.action a.remove_existing_record').click(function(){
|
||||
$(this).next('.should_destroy').attr('value', 1);
|
||||
$("tr#add_plugin_file_" + $(this).prev().attr('value')).hide();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
var preData = function(){
|
||||
$("#writing_journal_author_tokens").select2('data', JSON.parse($("#writing_journal_author_tokens").attr('data-pre')));
|
||||
}
|
||||
uploadFiles();
|
||||
// preData();
|
||||
}
|
||||
|
||||
this.initializePersonalBook.addbook = function(){ // to open add pages in journal papers page
|
||||
var uploadFiles = function(){
|
||||
$('#add_plugin_file a.add').click(function(){
|
||||
var new_id = $(this).prev().attr('value');
|
||||
var old_id = new RegExp("new_writing_journal_files", "g");
|
||||
$(this).prev().attr('value', parseInt(new_id) + 1);
|
||||
var x = get_html(old_id,new_id);
|
||||
var newfield = $(x);
|
||||
$(this).parents('table').append(newfield);
|
||||
newfield.find('.action a.delete').click(function(){
|
||||
newfield.remove();
|
||||
});
|
||||
return false;
|
||||
});
|
||||
$('.action a.remove_existing_record').click(function(){
|
||||
$(this).next('.should_destroy').attr('value', 1);
|
||||
$("tr#add_plugin_file_" + $(this).prev().attr('value')).hide();
|
||||
});
|
||||
}
|
||||
|
||||
// console.log("hi");
|
||||
var bindHandlers = function(){
|
||||
|
||||
|
||||
}
|
||||
bindHandlers();
|
||||
uploadFiles();
|
||||
|
||||
}
|
||||
|
||||
|
||||
this.initializePersonalBook.coAuthorformCallback = function(data){
|
||||
if(data.success){
|
||||
o.notify(data.msg,"success");
|
||||
o.sub_menu_item($("div[content-type=menu] a").eq(3));
|
||||
}else{
|
||||
o.notify(data.msg,"alert");
|
||||
}
|
||||
}
|
||||
this.initializePersonalBook.coauthor = function(){ // to open add pages in coauthor page
|
||||
var bindHandlers = function(){ // to bind handlers for add page
|
||||
|
||||
}
|
||||
bindHandlers();
|
||||
}
|
||||
this.initializePersonalBook.coauthorRelationForm = function(data){
|
||||
if(data.success){
|
||||
o.notify(data.msg,"success");
|
||||
$("#co_author_relation_table").html(data.newvalue);
|
||||
}else{
|
||||
o.notify(data.msg,"alert");
|
||||
}
|
||||
}
|
||||
this.initializePersonalBook.coauthorRelationEditForm = function(data){
|
||||
if(data.success){
|
||||
o.notify(data.msg,"success");
|
||||
var x = o.layout_data.generate_layout_html(data.newvalue);
|
||||
$("div[container=true] div.overview").html(x.markup);
|
||||
}else{
|
||||
o.notify(data.msg,"alert");
|
||||
}
|
||||
}
|
||||
this.initializePersonalBook.allnone = function(d,o){
|
||||
switch(o.attr("href")){
|
||||
case "all":
|
||||
$("div.overview a.icon-check-empty").removeClass("icon-check-empty").addClass("icon-check");
|
||||
break;
|
||||
case "none":
|
||||
$("div.overview a.icon-check").removeClass("icon-check").addClass("icon-check-empty");
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.initializePersonalBook.allnone = function(d,o){
|
||||
switch(o.attr("href")){
|
||||
case "all":
|
||||
$("div.overview a.icon-check-empty").removeClass("icon-check-empty").addClass("icon-check");
|
||||
break;
|
||||
case "none":
|
||||
$("div.overview a.icon-check").removeClass("icon-check").addClass("icon-check-empty");
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
1
vendor/built_in_modules/personal_book/app/assets/javascripts/personal_book/personal_book.js
vendored
Normal file
1
vendor/built_in_modules/personal_book/app/assets/javascripts/personal_book/personal_book.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
//= require_tree ./personal_book/desktop
|
|
@ -0,0 +1,73 @@
|
|||
class Panel::PersonalBook::Desktop::PersonalBooksController < ApplicationController
|
||||
|
||||
def index
|
||||
@writing_books = WritingBook.where(create_user_id: current_user.id)
|
||||
@view_by = params[:view]
|
||||
page = params[:page]
|
||||
page ||= 1
|
||||
|
||||
@per_column = 5
|
||||
|
||||
case @view_by
|
||||
when "abstract"
|
||||
@per_column = 1
|
||||
when "file"
|
||||
@per_column = 2
|
||||
end
|
||||
|
||||
if @view_by.nil?
|
||||
@view_by = " "
|
||||
@writing_books = @writing_books.asc(:paper_title)
|
||||
else
|
||||
@writing_books = @writing_books.asc(@view_by).asc(:paper_title)
|
||||
end
|
||||
@writing_books = @writing_books.page(page).per(50)
|
||||
respond_to do |format|
|
||||
format.html { render :layout => false}
|
||||
end
|
||||
end
|
||||
|
||||
def new
|
||||
@personal_book = WritingBook.new
|
||||
@author_types = BookAuthorType.all
|
||||
render :layout => false
|
||||
end
|
||||
|
||||
def create
|
||||
params[:writing_book][:create_user_id] = current_user.id
|
||||
@personal_book = WritingBook.new(params[:writing_book])
|
||||
if @personal_book.save
|
||||
render json: {success: true, msg: t('create_success')}.to_json
|
||||
else
|
||||
error_msg = @personal_book.errors.full_messages.join("<br />")
|
||||
render json: {success: false, msg: error_msg}.to_json
|
||||
end
|
||||
end
|
||||
|
||||
def edit
|
||||
@personal_book = WritingBook.find(params[:id])
|
||||
@author_types = BookAuthorType.all
|
||||
render :layout => false
|
||||
end
|
||||
|
||||
def update
|
||||
params[:writing_book][:create_user_id] = current_user.id
|
||||
@personal_book = WritingBook.new(params[:writing_book])
|
||||
if @personal_book.update_attributes(params[:writing_book])
|
||||
render json: {success: true, msg: t('create_success')}.to_json
|
||||
else
|
||||
error_msg = @personal_book.errors.full_messages.join("<br />")
|
||||
render json: {success: false, msg: error_msg}.to_json
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
@personal_book = WritingBook.find(params[:id])
|
||||
@personal_book.destroy
|
||||
render :json => {success: true, msg: t('delete_success')}
|
||||
end
|
||||
|
||||
def books_window
|
||||
render :layout => false
|
||||
end
|
||||
end
|
|
@ -0,0 +1,96 @@
|
|||
module Panel::PersonalBook::Desktop::PersonalBooksHelper
|
||||
def publication_record publication, view
|
||||
content_tag :li,
|
||||
"item" => "true",
|
||||
:class => "list_t_item" do
|
||||
marker + \
|
||||
content(publication, view) + \
|
||||
edit_or_delete(publication)
|
||||
end
|
||||
end
|
||||
|
||||
def marker
|
||||
content_tag :div,
|
||||
:class => "list_item_action" do
|
||||
content_tag(:a, "",:href=>"",
|
||||
:class => "icon-check-empty",
|
||||
"toggle-onclick"=>"icon-check-empty icon-check",
|
||||
"ajax-remote"=>"false") + \
|
||||
content_tag(:a, "",:href=>"",
|
||||
:class => "icon-star-empty",
|
||||
"toggle-onclick"=>"icon-star-empty icon-star",
|
||||
"ajax-remote"=>"false")
|
||||
end
|
||||
end
|
||||
|
||||
def content publication, view
|
||||
case view
|
||||
when "conference_title"
|
||||
des = content_tag(:div, publication.book_title,
|
||||
:class => "list_t_des")
|
||||
when "keywords"
|
||||
des = content_tag(:div, publication.keywords,
|
||||
:class => "list_t_des")
|
||||
when "abstract"
|
||||
des = content_tag(:div, publication.abstract,
|
||||
:class => "list_t_des")
|
||||
when "file"
|
||||
des = content_tag(:div, link_publication_file(publication),
|
||||
:class => "list_t_des")
|
||||
else
|
||||
end
|
||||
|
||||
content_tag(:div, publication.paper_title,
|
||||
:class => "list_t_title") + des
|
||||
|
||||
end
|
||||
|
||||
def edit_or_delete publication
|
||||
content_tag :div,
|
||||
:class => "list_item_function" do
|
||||
content_tag(:a, t("edit"),
|
||||
:class => "journal_paper_edit admbg2 admtxt",
|
||||
:href => edit_panel_personal_book_desktop_personal_book_path(publication),
|
||||
"callback-method" => "editbook",
|
||||
"ajax-remote" => "get") + \
|
||||
content_tag(:a, t(:delete_),
|
||||
"ajax-remote" => "delete",
|
||||
"confirm-message" => t("sure?"),
|
||||
"callback-method" => "bookDelete",
|
||||
:class => "journal_paper_delete admbg2 admtxt",
|
||||
:href => panel_personal_book_desktop_personal_book_path(publication))
|
||||
end
|
||||
end
|
||||
|
||||
def link_publication_file publication
|
||||
publication.writing_book_files.map{|file|
|
||||
link_to(image_tag(check_file_type(file.file.url)) + \
|
||||
content_tag(:span, file.title, :class => "filetitle"),
|
||||
file.file.url,
|
||||
:class => "file",
|
||||
"target" => "_blank")
|
||||
}.inject(:+)
|
||||
end
|
||||
|
||||
def check_file_type file
|
||||
if not file.nil?
|
||||
file_type = MIME::Types.type_for(file).first.to_s.split("/")[1]
|
||||
file_type = "/assets/ft-icons/#{file_type}/#{file_type}-48_32.png"
|
||||
else
|
||||
file_type = ""
|
||||
end
|
||||
end
|
||||
|
||||
def generate_authors_name ids
|
||||
author_name = ids.map{|m|
|
||||
if m == "0"
|
||||
#{:id => 0, :text => current_user.name, :email => current_user.email }
|
||||
{:id => 0, :text => current_user.name }
|
||||
else
|
||||
#{:id => m, :text => ConferenceCoAuthor.find(m).co_author, :email => ConferenceCoAuthor.find(m).email}
|
||||
{:id => m, :text => ConferenceCoAuthor.find(m).co_author}
|
||||
end
|
||||
}
|
||||
author_name.to_json
|
||||
end
|
||||
end
|
|
@ -0,0 +1,164 @@
|
|||
<div class="toolbar hh1">
|
||||
<div class="fn_g hp">
|
||||
|
||||
<%= f.submit t("save"), name: "commit", class: "fn_btn ini_input hp hh1 thmc2 thmtxt" %>
|
||||
<% if not @personal_book.new_record? %>
|
||||
<%= submit_tag t("cancel"), :type => "button", "callback-method"=>"cancelbook", "ajax-remote" => "get", :href => panel_personal_book_desktop_personal_books_path, class: "fn_btn ini_input hp hh1 admbg2 admtxt" %>
|
||||
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Share</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">Full</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Group</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overview" content-layout="column" base-width="420">
|
||||
<div column="true">
|
||||
<div class="s_form">
|
||||
<ul>
|
||||
<li class="s_grid_row">
|
||||
<%= f.fields_for :paper_title_translations do |f| %>
|
||||
<%= f.text_area locale,
|
||||
class: "s_grid_12 s_grid s_grid_h_3",
|
||||
size: "20x4",
|
||||
placeholder: t("personal_book.paper_title"),
|
||||
value: (@personal_book.paper_title_translations[locale.to_s] rescue nil) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= f.fields_for :book_title_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
size: "20",
|
||||
placeholder: t("personal_book.book_title"),
|
||||
class: "s_grid_12 s_grid",
|
||||
value: (@personal_book.book_title_translations[locale.to_s] rescue nil) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", t("personal_book.book_paper_type"), class: "s_grid_4 s_grid") %>
|
||||
<%= f.select :book_paper_type_id, BookPaperType.all.collect {|t| [ t.title, t.id ]}, {:class => "s_grid s_grid_8"} %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", t("personal_book.author_type"), class: "s_grid_4 s_grid") %>
|
||||
<% @author_types.each do |author_type| %>
|
||||
<%= content_tag :label,:class => "s_grid_4 s_grid" do -%>
|
||||
<%= check_box_tag 'writing_book[book_author_type_ids][]', author_type.id, @personal_book.book_author_type_ids.include?(author_type.id)%>
|
||||
<%= author_type.title %>
|
||||
<%= hidden_field_tag 'writing_book[book_author_type_ids][]', '' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= f.fields_for :extracted_chapters_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
size: "20",
|
||||
placeholder: t("personal_book.extracted_chapters"),
|
||||
class: "s_grid_12 s_grid",
|
||||
value: (@personal_book.extracted_chapters_translations[locale.to_s] rescue nil) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= f.fields_for :publishers_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
size: "20",
|
||||
placeholder: t("personal_book.publishers"),
|
||||
class: "s_grid_12 s_grid",
|
||||
value: (@personal_book.publishers_translations[locale.to_s] rescue nil) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<!-- <li class="s_grid_row">
|
||||
<%#= f.text_area :author_tokens,
|
||||
class: "s_grid_12 s_grid",
|
||||
size: "20x2",
|
||||
placeholder: t("personal_journal.authors"),
|
||||
"autocomplete" => "/panel/personal_journal/desktop/journal_pages/new.json",
|
||||
"autocomplete-format" => "--:[text,email]",
|
||||
"data-pre" => generate_authors_name(@personal_book.journal_co_author_ids) %>
|
||||
|
||||
</li> -->
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", t("personal_book.publication_date"), class: "s_grid_4 s_grid") %>
|
||||
<%= f.date_select :publish_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year] }, {:class => 's_grid_4 s_grid'} %>
|
||||
<%= f.date_select :publish_date, {:use_month_numbers => true, :order => [:month, :day] }, {:class => 's_grid_2 s_grid'} %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", t("personal_book.url"), class: "s_grid_4 s_grid") %><%= f.text_field :url, size: "20", class: "s_grid_8 s_grid"%>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div column="true">
|
||||
<div class="s_form">
|
||||
<ul>
|
||||
<li class="s_grid_row">
|
||||
<%= f.text_area :keywords, size: "20x3", placeholder: t("personal_book.keywords"), class: "s_grid_12 s_grid_h_2 s_grid"%>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", t("personal_book.pages"), class: "s_grid_4 s_grid") %><%= f.text_field :pages, size: "20", class: "s_grid_8 s_grid"%>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= f.label :language, t("personal_book.language"), :class => "s_grid s_grid_4" %>
|
||||
<%= f.select :language, WritingBook::LANGUAGE_TYPES,{} ,{:class => "s_grid s_grid_8"} %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", t("personal_book.isbn"), class: "s_grid_4 s_grid") %><%= f.text_field :isbn, size: "20", class: "s_grid_8 s_grid"%>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= f.text_area :note, size: "20x3", placeholder: t("personal_book.note"), class: "s_grid_12 s_grid s_grid_h_5"%>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div column="true">
|
||||
<div class="s_form">
|
||||
<ul>
|
||||
<li class="s_grid_row">
|
||||
<table class="s_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="s_grid_2"><%= t("personal_book.file")%></th>
|
||||
<th class="s_grid_4"><%= t("personal_book.file_name")%></th>
|
||||
<th class="s_grid_4"><%= t("personal_book.description") %></th>
|
||||
<th class="s_grid_2"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<div id='add_plugin_file' class="info_input plugin_files_block s_action">
|
||||
<%= hidden_field_tag 'plugin_file_field_count', @personal_book.writing_book_files.count %>
|
||||
<a class="add setting_btn thmc1 thmtxt w1 hh1 hp" href="#"><i class="icon-plus icon-white"></i> add</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<% @personal_book.writing_book_files.each_with_index do |writing_book_file, i| %>
|
||||
<%= f.fields_for :writing_book_files, writing_book_file do |f| %>
|
||||
<%= render :partial => 'form_file', :object => writing_book_file, :locals => {:f => f, :i => i} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var get_html = function(old_id,new_id){
|
||||
return ("<%= escape_javascript(add_attribute 'form_file', f, :writing_book_files) %>").replace(old_id, new_id);
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,33 @@
|
|||
<tr id="<%= "plugin_file_#{form_file.id}" if !form_file.new_record? %>" class="list_item">
|
||||
<td>
|
||||
<div>
|
||||
<% if form_file.new_record? %>
|
||||
<%= f.file_field :file, class: "s_grid_2" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<%= f.text_field :title, :class => 's_grid_4' %>
|
||||
</td>
|
||||
<td>
|
||||
<%= f.fields_for :file_title_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
class: 's_grid_4',
|
||||
value: (form_file.file_title_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<span class="action">
|
||||
<% if form_file.new_record? %>
|
||||
<a class="delete"><i class="icon-remove"></i></a>
|
||||
<% else %>
|
||||
<%= f.hidden_field :id %>
|
||||
<a class="remove_existing_record"><i class="icon-remove"></i></a>
|
||||
<%= f.hidden_field :should_destroy, :value => nil, :class => 'should_destroy' %>
|
||||
<% end %>
|
||||
<%= form_file.file.file ? ( link_to '', form_file.file.url, {:class => 'icon-eye-open', :target => '_blank', :title => t(:view)} ) : '' %>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
@ -1,8 +1,10 @@
|
|||
<div id="research_d">
|
||||
<%= stylesheet_link_tag "/assets/personal_book/desktop/personal_book" %>
|
||||
<%= javascript_include_tag "personal_book/desktop/personal_books" %>
|
||||
<div id="books">
|
||||
<div id="content">
|
||||
<div id="header" class="hh2">
|
||||
<div class="dtitle w2 hh2 hp">
|
||||
<span class="thmtxth">Research Domain</span>
|
||||
<span class="thmtxth">Books</span>
|
||||
</div>
|
||||
<div id="search_app" class="hfn w2 hh1 hp thmc3">
|
||||
<input type="text" class="ini_input form" value="Search" id="searchbox" />
|
||||
|
@ -13,14 +15,14 @@
|
|||
<div id="panel_l" class="ph">
|
||||
<div class="s_menu sm_v" content-type="menu">
|
||||
<ul id='setting_left_nav'>
|
||||
<li><a href="<%= desktop_research_research_d_list_path %>" callback-method="list" class="hh1 w2 hp active thmc1 thmtxt" onclick='return false;'>List</a></li>
|
||||
<li><a href="<%= desktop_research_research_d_add_path %>" callback-method="add_this" class="admtxt hh1 w2 hp" onclick='return false;'>Add/Edit</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Domains</a></li>
|
||||
<li><a href="<%= panel_personal_book_desktop_personal_books_path %>" callback-method="list" class="hh1 w2 hp active thmc1 thmtxt" load="true" onclick='return false;'>List</a></li>
|
||||
<li><a href="<%= new_panel_personal_book_desktop_personal_book_path %>" callback-method="addbook" class="admtxt hh1 w2 hp" onclick='return false;'>Add/Edit</a></li>
|
||||
<!-- <li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Books</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Co-Authors</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Tags & Keywords</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Tags & Keywords</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Analysis</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Import</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Export</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Export</a></li> -->
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,3 @@
|
|||
<%= form_for @personal_book, html: { multipart: true, "form-type"=>"ajax_form", "callback-method"=>"formCallback"}, url: panel_personal_book_desktop_personal_books_path(@personal_book) do |f| %>
|
||||
<%= render partial: 'form', locals: {:f => f} %>
|
||||
<%end%>
|
|
@ -0,0 +1,84 @@
|
|||
<div class="toolbar hh1">
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><span class="icon-check"></span></div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul id="journal_selection_options">
|
||||
<li><a class="hp hh1 admtxt" href="all" ajax-remote="false" callback-method="allnone">All</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="none" ajax-remote="false" callback-method="allnone">None</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">More</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">Delete</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Tag</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Tag</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">All</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Starred</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">MIT</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Status</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">All</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Published</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Pending</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">View</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul id="journal_view_selection">
|
||||
<li><%= link_to "Journal", panel_personal_book_desktop_personal_books_path + "?view=book_title", :class => "hp hh1 admtxt", "ajax-remote" => "get" %></li>
|
||||
<li><%= link_to "Title", panel_personal_book_desktop_personal_books_path + "?view=paper_title", :class => "hp hh1 admtxt", "ajax-remote" => "get" %></li>
|
||||
<li><%= link_to "File", panel_personal_book_desktop_personal_books_path + "?view=file", :class => "hp hh1 admtxt", "ajax-remote" => "get" %></li>
|
||||
<li><%= link_to "Keywords", panel_personal_book_desktop_personal_books_path + "?view=keywords", :class => "hp hh1 admtxt", "ajax-remote" => "get" %></li>
|
||||
<li><%= link_to "Abstract", panel_personal_book_desktop_personal_books_path + "?view=abstract", :class => "hp hh1 admtxt", "ajax-remote" => "get" %></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Share</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">Full</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Group</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1" id='ns'>New Share</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt remote_url" href="<%= panel_personal_book_desktop_personal_books_path %>">Full</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Group</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overview" page-name="journal_p_list" content-layout="datalist" base-width="300" per-column="<%= @per_column.to_s %>" pagination-var="view=<%= @view_by %>&page" >
|
||||
<% @writing_books.each do |w| %>
|
||||
<%= publication_record w, @view_by%>
|
||||
<% end %>
|
||||
</div>
|
|
@ -0,0 +1,3 @@
|
|||
<%= form_for @personal_book, html: { multipart: true, "form-type"=>"ajax_form", "callback-method"=>"formCallback"}, url: panel_personal_book_desktop_personal_books_path do |f| %>
|
||||
<%= render partial: 'form', locals: {:f => f} %>
|
||||
<%end%>
|
|
@ -1,4 +1,51 @@
|
|||
en:
|
||||
|
||||
module_name:
|
||||
personal_book: Book
|
||||
personal_book: Book
|
||||
personal_book:
|
||||
paper_title : "Paper Title"
|
||||
book_title : "Book Title"
|
||||
extracted_chapters : "Extracted Chapters"
|
||||
publishers : "Publishers"
|
||||
authors : "Authors"
|
||||
tags : "Tags"
|
||||
year : "Year"
|
||||
language : "Language"
|
||||
isbn : "ISSN(ISBN)"
|
||||
vol_no : "Vol.No"
|
||||
issue_no : "Issue.No"
|
||||
form_to_start : "From"
|
||||
form_to_end : "To"
|
||||
total_pages : "Total Pages"
|
||||
keywords : "Keywords"
|
||||
abstract : "Abstract"
|
||||
publication_date : "Date of Publication"
|
||||
url : "Reference URL"
|
||||
note : "Note"
|
||||
level_type : "Level Type"
|
||||
author_type : "Author Type"
|
||||
from : "From"
|
||||
to : "To"
|
||||
file : "File"
|
||||
file_name : "File name"
|
||||
description : "File Description"
|
||||
pages : "Pages"
|
||||
book_paper_type : "Book Paper Type"
|
||||
|
||||
create_success : "Successfully Create"
|
||||
update_success : "Successfully Update"
|
||||
delete_success : "Successfully Delete"
|
||||
add: "Add"
|
||||
back: "Back"
|
||||
delete: "Delete"
|
||||
edit: "Edit"
|
||||
nothing: "Nothing"
|
||||
show: "Show"
|
||||
sure?: "Are you sure?"
|
||||
update: "Update"
|
||||
yes_: "Yes"
|
||||
no_: "No"
|
||||
cancel : "Cancel"
|
||||
save: "save"
|
||||
hintText: "Type in a search term"
|
||||
noResultsText: "No results"
|
||||
searchingText: "Searching…"
|
||||
|
|
|
@ -1,4 +1,51 @@
|
|||
zh_tw:
|
||||
|
||||
module_name:
|
||||
personal_book: 專書
|
||||
personal_book: 期刊著作
|
||||
personal_book:
|
||||
paper_title : "論文名稱"
|
||||
book_title : "期刊名稱"
|
||||
extracted_chapters : "Extracted Chapters"
|
||||
publishers : "Publishers"
|
||||
authors : "作者"
|
||||
tags : "領域"
|
||||
year : "年度"
|
||||
language : "語言"
|
||||
isbn : "ISSN(ISBN)"
|
||||
vol_no : "卷數"
|
||||
issue_no : "期數"
|
||||
form_to_start : "起"
|
||||
form_to_end : "訖"
|
||||
total_pages : "總頁數"
|
||||
keywords : "關鍵字"
|
||||
abstract : "摘要"
|
||||
publication_date : "發表日期"
|
||||
url : "參考連結"
|
||||
note : "記事"
|
||||
level_type : "期刊類別"
|
||||
author_type : "作者類別"
|
||||
from : "起"
|
||||
to : "訖"
|
||||
file : "檔案"
|
||||
file_name : "檔案名稱"
|
||||
description : "描述"
|
||||
pages : "Pages"
|
||||
book_paper_type : "Book Paper Type"
|
||||
|
||||
create_success : "新增完成!!"
|
||||
update_success : "更新完成!!"
|
||||
delete_success : "刪除成功!!"
|
||||
add: "新增"
|
||||
back: "返回"
|
||||
delete: "刪除"
|
||||
edit: "編輯"
|
||||
nothing: "無"
|
||||
show: "顯示"
|
||||
sure?: "您肯定嗎?"
|
||||
update: "更新"
|
||||
yes_: "是"
|
||||
no_: "否"
|
||||
cancel : "取消"
|
||||
save: "儲存"
|
||||
hintText: "請輸入搜尋關鍵字"
|
||||
noResultsText: "沒有相關的比對結果"
|
||||
searchingText: "搜尋中…"
|
||||
|
|
|
@ -2,6 +2,10 @@ Rails.application.routes.draw do
|
|||
|
||||
namespace :panel do
|
||||
namespace :personal_book do
|
||||
namespace :desktop do
|
||||
match 'books_window' => "personal_books#books_window"
|
||||
resources :personal_books
|
||||
end
|
||||
namespace :back_end do
|
||||
|
||||
match 'writing_book_setting' => "writing_books#writing_book_setting" ,:as => :writing_book_setting
|
||||
|
@ -33,6 +37,7 @@ Rails.application.routes.draw do
|
|||
match "reload_writing_books" => "writing_books#reload_writing_books"
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
match "/appfront/*path" => redirect("/panel/*path")
|
||||
|
||||
|
|
|
@ -0,0 +1,158 @@
|
|||
orbitDesktop.prototype.initializePersonalDiploma = function(target,url,cache){ // this init journal papers
|
||||
this.initializePersonalDiploma.formCallback = function(data){
|
||||
if(data.success){
|
||||
o.notify(data.msg,"success");
|
||||
o.sub_menu_item($("div[content-type=menu] a").eq(0));
|
||||
}else{
|
||||
o.notify(data.msg,"alert");
|
||||
}
|
||||
}
|
||||
|
||||
this.initializePersonalDiploma.list = function(){ // to open list part in journal papers page
|
||||
var journalData;
|
||||
var bindHandlers = function(){ // to bind handlers for list page
|
||||
|
||||
}
|
||||
bindHandlers();
|
||||
|
||||
var bindSecondaryHandlers = function(){
|
||||
$("#journal_p div#paper_list a.icon-check-empty").click(function(){
|
||||
if($(this).hasClass("icon-check-empty")){
|
||||
$(this).switchClass("icon-check-empty","icon-check",0);
|
||||
} else if($(this) .hasClass("icon-check")) {
|
||||
$(this).switchClass("icon-check","icon-check-empty",0);
|
||||
} else if($(this).hasClass("icon-star")){
|
||||
$(this).removeClass("icon-star").addClass("icon-star-empty");
|
||||
} else if($(this).hasClass("icon-star-empty")){
|
||||
$(this).removeClass("icon-star-empty").addClass("icon-star");
|
||||
}
|
||||
return false;
|
||||
})
|
||||
}
|
||||
}
|
||||
this.initializePersonalDiploma.diplomaDelete = function(data,dom){
|
||||
var parent = dom.parent().parent();
|
||||
if(data.success){
|
||||
parent.hide("slide",function(){parent.remove();});
|
||||
o.notify(data.msg,"success");
|
||||
}
|
||||
}
|
||||
|
||||
this.initializePersonalDiploma.canceldiploma = function(){
|
||||
o.highlight_sub_menu_item(0);
|
||||
}
|
||||
|
||||
this.initializePersonalDiploma.editdiploma = function(){
|
||||
o.highlight_sub_menu_item(1);
|
||||
var uploadFiles = function(){
|
||||
$('#add_plugin_file a.add').click(function(){
|
||||
var new_id = $(this).prev().attr('value');
|
||||
var old_id = new RegExp("new_writing_journal_files", "g");
|
||||
$(this).prev().attr('value', parseInt(new_id) + 1);
|
||||
var x = get_html(old_id,new_id);
|
||||
var newfield = $(x);
|
||||
$(this).parents('table').append(newfield);
|
||||
newfield.find('.action a.delete').click(function(){
|
||||
newfield.remove();
|
||||
});
|
||||
return false;
|
||||
});
|
||||
$('.action a.remove_existing_record').click(function(){
|
||||
$(this).next('.should_destroy').attr('value', 1);
|
||||
$("tr#add_plugin_file_" + $(this).prev().attr('value')).hide();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
var preData = function(){
|
||||
$("#writing_journal_author_tokens").select2('data', JSON.parse($("#writing_journal_author_tokens").attr('data-pre')));
|
||||
}
|
||||
uploadFiles();
|
||||
// preData();
|
||||
}
|
||||
|
||||
this.initializePersonalDiploma.adddiploma = function(){ // to open add pages in journal papers page
|
||||
var uploadFiles = function(){
|
||||
$('#add_plugin_file a.add').click(function(){
|
||||
var new_id = $(this).prev().attr('value');
|
||||
var old_id = new RegExp("new_writing_journal_files", "g");
|
||||
$(this).prev().attr('value', parseInt(new_id) + 1);
|
||||
var x = get_html(old_id,new_id);
|
||||
var newfield = $(x);
|
||||
$(this).parents('table').append(newfield);
|
||||
newfield.find('.action a.delete').click(function(){
|
||||
newfield.remove();
|
||||
});
|
||||
return false;
|
||||
});
|
||||
$('.action a.remove_existing_record').click(function(){
|
||||
$(this).next('.should_destroy').attr('value', 1);
|
||||
$("tr#add_plugin_file_" + $(this).prev().attr('value')).hide();
|
||||
});
|
||||
}
|
||||
|
||||
// console.log("hi");
|
||||
var bindHandlers = function(){
|
||||
|
||||
|
||||
}
|
||||
bindHandlers();
|
||||
uploadFiles();
|
||||
|
||||
}
|
||||
|
||||
|
||||
this.initializePersonalDiploma.coAuthorformCallback = function(data){
|
||||
if(data.success){
|
||||
o.notify(data.msg,"success");
|
||||
o.sub_menu_item($("div[content-type=menu] a").eq(3));
|
||||
}else{
|
||||
o.notify(data.msg,"alert");
|
||||
}
|
||||
}
|
||||
this.initializePersonalDiploma.coauthor = function(){ // to open add pages in coauthor page
|
||||
var bindHandlers = function(){ // to bind handlers for add page
|
||||
|
||||
}
|
||||
bindHandlers();
|
||||
}
|
||||
this.initializePersonalDiploma.coauthorRelationForm = function(data){
|
||||
if(data.success){
|
||||
o.notify(data.msg,"success");
|
||||
$("#co_author_relation_table").html(data.newvalue);
|
||||
}else{
|
||||
o.notify(data.msg,"alert");
|
||||
}
|
||||
}
|
||||
this.initializePersonalDiploma.coauthorRelationEditForm = function(data){
|
||||
if(data.success){
|
||||
o.notify(data.msg,"success");
|
||||
var x = o.layout_data.generate_layout_html(data.newvalue);
|
||||
$("div[container=true] div.overview").html(x.markup);
|
||||
}else{
|
||||
o.notify(data.msg,"alert");
|
||||
}
|
||||
}
|
||||
this.initializePersonalDiploma.allnone = function(d,o){
|
||||
switch(o.attr("href")){
|
||||
case "all":
|
||||
$("div.overview a.icon-check-empty").removeClass("icon-check-empty").addClass("icon-check");
|
||||
break;
|
||||
case "none":
|
||||
$("div.overview a.icon-check").removeClass("icon-check").addClass("icon-check-empty");
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.initializePersonalDiploma.allnone = function(d,o){
|
||||
switch(o.attr("href")){
|
||||
case "all":
|
||||
$("div.overview a.icon-check-empty").removeClass("icon-check-empty").addClass("icon-check");
|
||||
break;
|
||||
case "none":
|
||||
$("div.overview a.icon-check").removeClass("icon-check").addClass("icon-check-empty");
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -0,0 +1,115 @@
|
|||
/* Books */
|
||||
[page-name="books_list"] .list_t_item .inner {
|
||||
padding-left: 30px; }
|
||||
[page-name="books_list"] .list_item_action {
|
||||
font-size: 12px;
|
||||
float: left;
|
||||
margin-left: -30px; }
|
||||
[page-name="books_list"] .list_item_action a {
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
margin: 1px 1px 6px 1px; }
|
||||
[page-name="books_list"] .list_item_action .icon-star-empty {
|
||||
color: #999;
|
||||
font-size: 20px; }
|
||||
[page-name="books_list"] .list_item_action .icon-star {
|
||||
color: #faa732;
|
||||
font-size: 20px; }
|
||||
[page-name="books_list"] .list_item_action .icon-check-empty {
|
||||
color: #999;
|
||||
font-size: 20px; }
|
||||
[page-name="books_list"] .list_item_action .icon-check {
|
||||
color: #333;
|
||||
font-size: 20px; }
|
||||
[page-name="books_list"] .file_view .list_t_des {
|
||||
overflow: hidden; }
|
||||
[page-name="books_list"] .file_view .file {
|
||||
float: left;
|
||||
width: 120px;
|
||||
height: 50px;
|
||||
padding: 6px;
|
||||
margin: 1px;
|
||||
position: relative;
|
||||
-webkit-box-sizing: border-box;
|
||||
/* webkit */
|
||||
-khtml-box-sizing: border-box;
|
||||
/* konqueror */
|
||||
-moz-box-sizing: border-box;
|
||||
/* firefox */
|
||||
-ms-box-sizing: border-box;
|
||||
/* ie */
|
||||
box-sizing: border-box;
|
||||
/* css3 */ }
|
||||
[page-name="books_list"] .file_view .file:hover {
|
||||
background-color: #f7f7f7; }
|
||||
[page-name="books_list"] .file_view .file img {
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
position: absolute;
|
||||
left: 6px;
|
||||
top: 6px; }
|
||||
[page-name="books_list"] .file_view .file .filetitle {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 38px;
|
||||
padding-left: 40px;
|
||||
overflow: hidden;
|
||||
-webkit-box-sizing: border-box;
|
||||
/* webkit */
|
||||
-khtml-box-sizing: border-box;
|
||||
/* konqueror */
|
||||
-moz-box-sizing: border-box;
|
||||
/* firefox */
|
||||
-ms-box-sizing: border-box;
|
||||
/* ie */
|
||||
box-sizing: border-box;
|
||||
/* css3 */ }
|
||||
|
||||
/* Books Books list */
|
||||
[page-name="books_books"] .datalist_item .inner {
|
||||
padding-left: 30px; }
|
||||
[page-name="books_books"] .list_item_action {
|
||||
font-size: 12px;
|
||||
float: left;
|
||||
margin-left: -30px; }
|
||||
[page-name="books_books"] .list_item_action i {
|
||||
color: #999;
|
||||
font-size: 20px;
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
margin: 1px 1px 6px 1px; }
|
||||
[page-name="books_books"] .list_t_desc {
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
color: #999; }
|
||||
|
||||
/* Books Co-Author */
|
||||
[page-name="books_coauthor"] .list_t_item {
|
||||
height: 110px; }
|
||||
[page-name="books_coauthor"] .list_item_function a {
|
||||
display: inline-block;
|
||||
padding: 4px;
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: 11px;
|
||||
-webkit-text-size-adjust: none; }
|
||||
[page-name="books_coauthor"] .info {
|
||||
font-family: Arial, sans-serif; }
|
||||
[page-name="books_coauthor"] .info li {
|
||||
margin-bottom: 8px;
|
||||
color: #999; }
|
||||
[page-name="books_coauthor"] .info .name {
|
||||
font-size: 18px;
|
||||
line-height: 24px;
|
||||
color: #333; }
|
||||
|
||||
/* Books Co-Author Relationship*/
|
||||
[page-name="books_coauthor_relation"] .edit_co_author_relation {
|
||||
/*margin-left: -10px;*/ }
|
||||
[page-name="books_coauthor_relation"] .form_space {
|
||||
margin-bottom: 10px;
|
||||
font-size: 18px;
|
||||
font-family: Arial, sans-serif; }
|
|
@ -0,0 +1,123 @@
|
|||
@import "desktop-helper";
|
||||
|
||||
/* Books */
|
||||
[page-name="books_list"] {
|
||||
.list_t_item .inner { padding-left: 30px; }
|
||||
.list_item_action {
|
||||
font-size: 12px;
|
||||
float: left;
|
||||
margin-left: -30px;
|
||||
|
||||
a {
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
margin: 1px 1px 6px 1px;
|
||||
}
|
||||
.icon-star-empty { color: #999; font-size: 20px; }
|
||||
.icon-star { color: #faa732; font-size: 20px; }
|
||||
.icon-check-empty { color: #999; font-size: 20px; }
|
||||
.icon-check { color: #333; font-size: 20px; }
|
||||
}
|
||||
|
||||
.file_view {
|
||||
.list_t_des {
|
||||
overflow: hidden;
|
||||
}
|
||||
.file {
|
||||
float: left;
|
||||
width: 120px;
|
||||
height: 50px;
|
||||
padding: 6px;
|
||||
margin: 1px;
|
||||
position: relative;
|
||||
@include box-sizing;
|
||||
|
||||
&:hover {
|
||||
background-color: lighten($gray, 10%);
|
||||
}
|
||||
img {
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
position: absolute;
|
||||
left: 6px;
|
||||
top: 6px;
|
||||
}
|
||||
.filetitle {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 38px;
|
||||
padding-left: 40px;
|
||||
overflow: hidden;
|
||||
@include box-sizing;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Books Books list */
|
||||
[page-name="books_books"] {
|
||||
|
||||
.datalist_item .inner {
|
||||
padding-left: 30px;
|
||||
}
|
||||
.list_item_action {
|
||||
font-size: 12px;
|
||||
float: left;
|
||||
margin-left: -30px;
|
||||
}
|
||||
.list_item_action i {
|
||||
color: #999;
|
||||
font-size: 20px;
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
margin: 1px 1px 6px 1px;
|
||||
}
|
||||
.list_t_desc {
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
|
||||
/* Books Co-Author */
|
||||
[page-name="books_coauthor"] {
|
||||
.list_t_item {
|
||||
height: 110px;
|
||||
}
|
||||
.list_item_function {}
|
||||
.list_item_function a {
|
||||
display: inline-block;
|
||||
padding: 4px;
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: 11px;
|
||||
-webkit-text-size-adjust: none;
|
||||
}
|
||||
.info {
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
.info li {
|
||||
margin-bottom: 8px;
|
||||
color: #999;
|
||||
}
|
||||
.info .name {
|
||||
font-size: 18px;
|
||||
line-height: 24px;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
|
||||
/* Books Co-Author Relationship*/
|
||||
[page-name="books_coauthor_relation"]{
|
||||
.edit_co_author_relation {
|
||||
/*margin-left: -10px;*/
|
||||
}
|
||||
.form_space {
|
||||
margin-bottom: 10px;
|
||||
font-size: 18px;
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
class Panel::PersonalDiploma::Desktop::PersonalDiplomasController < ApplicationController
|
||||
|
||||
def index
|
||||
@diplomas = Diploma.where(create_user_id: current_user.id)
|
||||
respond_to do |format|
|
||||
format.html { render :layout => false}
|
||||
end
|
||||
end
|
||||
|
||||
def new
|
||||
@diploma = Diploma.new
|
||||
render :layout => false
|
||||
end
|
||||
|
||||
def create
|
||||
params[:diploma][:create_user_id] = current_user.id
|
||||
@diploma = Diploma.new(params[:diploma])
|
||||
if @diploma.save
|
||||
render json: {success: true, msg: t('create_success')}.to_json
|
||||
else
|
||||
error_msg = @diploma.errors.full_messages.join("<br />")
|
||||
render json: {success: false, msg: error_msg}.to_json
|
||||
end
|
||||
end
|
||||
|
||||
def edit
|
||||
@diploma = Diploma.find(params[:id])
|
||||
render :layout => false
|
||||
end
|
||||
|
||||
def update
|
||||
params[:diploma][:create_user_id] = current_user.id
|
||||
@diploma = Diploma.new(params[:diploma])
|
||||
if @diploma.update_attributes(params[:diploma])
|
||||
render json: {success: true, msg: t('create_success')}.to_json
|
||||
else
|
||||
error_msg = @diploma.errors.full_messages.join("<br />")
|
||||
render json: {success: false, msg: error_msg}.to_json
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
@diploma = Diploma.find(params[:id])
|
||||
@diploma.destroy
|
||||
render :json => {success: true, msg: t('delete_success')}
|
||||
end
|
||||
|
||||
def diploma_window
|
||||
render :layout => false
|
||||
end
|
||||
end
|
|
@ -0,0 +1,96 @@
|
|||
module Panel::PersonalDiploma::Desktop::PersonalDiplomasHelper
|
||||
def publication_record publication, view
|
||||
content_tag :li,
|
||||
"item" => "true",
|
||||
:class => "list_t_item" do
|
||||
marker + \
|
||||
content(publication, view) + \
|
||||
edit_or_delete(publication)
|
||||
end
|
||||
end
|
||||
|
||||
def marker
|
||||
content_tag :div,
|
||||
:class => "list_item_action" do
|
||||
content_tag(:a, "",:href=>"",
|
||||
:class => "icon-check-empty",
|
||||
"toggle-onclick"=>"icon-check-empty icon-check",
|
||||
"ajax-remote"=>"false") + \
|
||||
content_tag(:a, "",:href=>"",
|
||||
:class => "icon-star-empty",
|
||||
"toggle-onclick"=>"icon-star-empty icon-star",
|
||||
"ajax-remote"=>"false")
|
||||
end
|
||||
end
|
||||
|
||||
def content publication, view
|
||||
case view
|
||||
when "diploma_title"
|
||||
des = content_tag(:div, publication.diploma_title,
|
||||
:class => "list_t_des")
|
||||
when "keywords"
|
||||
des = content_tag(:div, publication.keywords,
|
||||
:class => "list_t_des")
|
||||
when "abstract"
|
||||
des = content_tag(:div, publication.abstract,
|
||||
:class => "list_t_des")
|
||||
when "file"
|
||||
des = content_tag(:div, link_publication_file(publication),
|
||||
:class => "list_t_des")
|
||||
else
|
||||
end
|
||||
|
||||
content_tag(:div, publication.school_name,
|
||||
:class => "list_t_title") + des
|
||||
|
||||
end
|
||||
|
||||
def edit_or_delete publication
|
||||
content_tag :div,
|
||||
:class => "list_item_function" do
|
||||
content_tag(:a, t("edit"),
|
||||
:class => "journal_paper_edit admbg2 admtxt",
|
||||
:href => edit_panel_personal_diploma_desktop_personal_diploma_path(publication),
|
||||
"callback-method" => "editdiploma",
|
||||
"ajax-remote" => "get") + \
|
||||
content_tag(:a, t(:delete_),
|
||||
"ajax-remote" => "delete",
|
||||
"confirm-message" => t("sure?"),
|
||||
"callback-method" => "diplomaDelete",
|
||||
:class => "journal_paper_delete admbg2 admtxt",
|
||||
:href => panel_personal_diploma_desktop_personal_diploma_path(publication))
|
||||
end
|
||||
end
|
||||
|
||||
def link_publication_file publication
|
||||
publication.writing_conference_files.map{|file|
|
||||
link_to(image_tag(check_file_type(file.file.url)) + \
|
||||
content_tag(:span, file.title, :class => "filetitle"),
|
||||
file.file.url,
|
||||
:class => "file",
|
||||
"target" => "_blank")
|
||||
}.inject(:+)
|
||||
end
|
||||
|
||||
def check_file_type file
|
||||
if not file.nil?
|
||||
file_type = MIME::Types.type_for(file).first.to_s.split("/")[1]
|
||||
file_type = "/assets/ft-icons/#{file_type}/#{file_type}-48_32.png"
|
||||
else
|
||||
file_type = ""
|
||||
end
|
||||
end
|
||||
|
||||
def generate_authors_name ids
|
||||
author_name = ids.map{|m|
|
||||
if m == "0"
|
||||
#{:id => 0, :text => current_user.name, :email => current_user.email }
|
||||
{:id => 0, :text => current_user.name }
|
||||
else
|
||||
#{:id => m, :text => ConferenceCoAuthor.find(m).co_author, :email => ConferenceCoAuthor.find(m).email}
|
||||
{:id => m, :text => ConferenceCoAuthor.find(m).co_author}
|
||||
end
|
||||
}
|
||||
author_name.to_json
|
||||
end
|
||||
end
|
|
@ -0,0 +1,98 @@
|
|||
<div class="toolbar hh1">
|
||||
<div class="fn_g hp">
|
||||
|
||||
<%= f.submit t("save"), name: "commit", class: "fn_btn ini_input hp hh1 thmc2 thmtxt" %>
|
||||
<% if not @diploma.new_record? %>
|
||||
<%= submit_tag t("cancel"), :type => "button", "callback-method"=>"canceldiploma", "ajax-remote" => "get", :href => panel_personal_diploma_desktop_personal_diplomas_path, class: "fn_btn ini_input hp hh1 admbg2 admtxt" %>
|
||||
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Share</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">Full</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Group</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overview" content-layout="column" base-width="420">
|
||||
<div column="true">
|
||||
<div class="s_form">
|
||||
<ul>
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", t("personal_diploma.start_date"), class: "s_grid_4 s_grid") %>
|
||||
<%= f.date_select :start_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year] }, {:class => 's_grid_4 s_grid'} %>
|
||||
<%= f.date_select :start_date, {:use_month_numbers => true, :order => [:month, :day] }, {:class => 's_grid_2 s_grid'} %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", t("personal_diploma.end_date"), class: "s_grid_4 s_grid") %>
|
||||
<%= f.date_select :end_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year] }, {:class => 's_grid_4 s_grid'} %>
|
||||
<%= f.date_select :end_date, {:use_month_numbers => true, :order => [:month, :day] }, {:class => 's_grid_2 s_grid'} %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= f.fields_for :school_name_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
size: "20",
|
||||
placeholder: t("personal_diploma.school_name"),
|
||||
class: "s_grid_12 s_grid",
|
||||
value: (@diploma.school_name_translations[locale.to_s] rescue nil) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= f.fields_for :country_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
size: "20",
|
||||
placeholder: t("personal_diploma.country"),
|
||||
class: "s_grid_12 s_grid",
|
||||
value: (@diploma.country_translations[locale.to_s] rescue nil) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= f.fields_for :department_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
size: "20",
|
||||
placeholder: t("personal_diploma.department"),
|
||||
class: "s_grid_12 s_grid",
|
||||
value: (@diploma.department_translations[locale.to_s] rescue nil) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= f.fields_for :degree_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
size: "20",
|
||||
placeholder: t("personal_diploma.degree"),
|
||||
class: "s_grid_12 s_grid",
|
||||
value: (@diploma.degree_translations[locale.to_s] rescue nil) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", t("personal_diploma.url"), class: "s_grid_4 s_grid") %><%= f.text_field :url, size: "20", class: "s_grid_8 s_grid"%>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= f.text_area :keywords, size: "20x3", placeholder: t("personal_diploma.keywords"), class: "s_grid_12 s_grid_h_2 s_grid"%>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= f.label :language, t("personal_diploma.language"), :class => "s_grid s_grid_4" %>
|
||||
<%= f.select :language, Diploma::LANGUAGE_TYPES,{} ,{:class => "s_grid s_grid_8"} %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div column="true">
|
||||
<div class="s_form">
|
||||
<ul>
|
||||
<li class="s_grid_row">
|
||||
<%= f.text_area :note, size: "20x3", placeholder: t("personal_diploma.note"), class: "s_grid_12 s_grid s_grid_h_5"%>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,35 @@
|
|||
<%= stylesheet_link_tag "/assets/personal_diploma/personal_diploma" %>
|
||||
<%= javascript_include_tag "personal_diploma/desktop/personal_diploma" %>
|
||||
<div id="diploma">
|
||||
<div id="content">
|
||||
<div id="header" class="hh2">
|
||||
<div class="dtitle w2 hh2 hp">
|
||||
<span class="thmtxth">Education</span>
|
||||
</div>
|
||||
<div id="search_app" class="hfn w2 hh1 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" content-type="menu">
|
||||
<ul id='setting_left_nav'>
|
||||
<li><a href="<%= panel_personal_diploma_desktop_personal_diplomas_path %>" callback-method="list" class="hh1 w2 hp active thmc1 thmtxt" load="true" onclick='return false;'>List</a></li>
|
||||
<li><a href="<%= new_panel_personal_diploma_desktop_personal_diploma_path %>" callback-method="adddiploma" class="admtxt hh1 w2 hp" onclick='return false;'>Add/Edit</a></li>
|
||||
<!-- <li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Books</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Co-Authors</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Tags & Keywords</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Analysis</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Import</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Export</a></li> -->
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="panel_r" container="true" class="ph pw admbg hp">
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,3 @@
|
|||
<%= form_for @diploma, html: { multipart: true, "form-type"=>"ajax_form", "callback-method"=>"formCallback"}, url: panel_personal_diploma_desktop_personal_diplomas_path(@diploma) do |f| %>
|
||||
<%= render partial: 'form', locals: {:f => f} %>
|
||||
<%end%>
|
|
@ -0,0 +1,84 @@
|
|||
<div class="toolbar hh1">
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><span class="icon-check"></span></div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul id="journal_selection_options">
|
||||
<li><a class="hp hh1 admtxt" href="all" ajax-remote="false" callback-method="allnone">All</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="none" ajax-remote="false" callback-method="allnone">None</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">More</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">Delete</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Tag</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Tag</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">All</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Starred</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">MIT</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Status</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">All</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Published</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Pending</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">View</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul id="journal_view_selection">
|
||||
<li><%= link_to "Journal", panel_personal_diploma_desktop_personal_diplomas_path + "?view=diploma_title", :class => "hp hh1 admtxt", "ajax-remote" => "get" %></li>
|
||||
<li><%= link_to "Title", panel_personal_diploma_desktop_personal_diplomas_path + "?view=paper_title", :class => "hp hh1 admtxt", "ajax-remote" => "get" %></li>
|
||||
<li><%= link_to "File", panel_personal_diploma_desktop_personal_diplomas_path + "?view=file", :class => "hp hh1 admtxt", "ajax-remote" => "get" %></li>
|
||||
<li><%= link_to "Keywords", panel_personal_diploma_desktop_personal_diplomas_path + "?view=keywords", :class => "hp hh1 admtxt", "ajax-remote" => "get" %></li>
|
||||
<li><%= link_to "Abstract", panel_personal_diploma_desktop_personal_diplomas_path + "?view=abstract", :class => "hp hh1 admtxt", "ajax-remote" => "get" %></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Share</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">Full</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Group</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1" id='ns'>New Share</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt remote_url" href="<%= panel_personal_diploma_desktop_personal_diplomas_path %>">Full</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Group</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overview" page-name="journal_p_list" content-layout="datalist" base-width="300" per-column="<%= @per_column.to_s %>" pagination-var="view=<%= @view_by %>&page" >
|
||||
<% @diplomas.each do |w| %>
|
||||
<%= publication_record w, @view_by%>
|
||||
<% end %>
|
||||
</div>
|
|
@ -0,0 +1,3 @@
|
|||
<%= form_for @diploma, html: { multipart: true, "form-type"=>"ajax_form", "callback-method"=>"formCallback"}, url: panel_personal_diploma_desktop_personal_diplomas_path do |f| %>
|
||||
<%= render partial: 'form', locals: {:f => f} %>
|
||||
<%end%>
|
|
@ -1,4 +1,55 @@
|
|||
en:
|
||||
|
||||
module_name:
|
||||
personal_diploma: Diploma
|
||||
personal_diploma: Diploma
|
||||
personal_diploma:
|
||||
paper_title : "Paper Title"
|
||||
book_title : "Book Title"
|
||||
extracted_chapters : "Extracted Chapters"
|
||||
publishers : "Publishers"
|
||||
authors : "Authors"
|
||||
tags : "Tags"
|
||||
year : "Year"
|
||||
language : "Language"
|
||||
isbn : "ISSN(ISBN)"
|
||||
vol_no : "Vol.No"
|
||||
issue_no : "Issue.No"
|
||||
form_to_start : "From"
|
||||
form_to_end : "To"
|
||||
total_pages : "Total Pages"
|
||||
keywords : "Keywords"
|
||||
abstract : "Abstract"
|
||||
publication_date : "Date of Publication"
|
||||
url : "Reference URL"
|
||||
note : "Note"
|
||||
level_type : "Level Type"
|
||||
author_type : "Author Type"
|
||||
from : "From"
|
||||
to : "To"
|
||||
file : "File"
|
||||
file_name : "File name"
|
||||
description : "File Description"
|
||||
pages : "Pages"
|
||||
book_paper_type : "Book Paper Type"
|
||||
school_name : "School Name"
|
||||
country : "Country"
|
||||
department : "Department"
|
||||
degree : "Degree"
|
||||
|
||||
create_success : "Successfully Create"
|
||||
update_success : "Successfully Update"
|
||||
delete_success : "Successfully Delete"
|
||||
add: "Add"
|
||||
back: "Back"
|
||||
delete: "Delete"
|
||||
edit: "Edit"
|
||||
nothing: "Nothing"
|
||||
show: "Show"
|
||||
sure?: "Are you sure?"
|
||||
update: "Update"
|
||||
yes_: "Yes"
|
||||
no_: "No"
|
||||
cancel : "Cancel"
|
||||
save: "save"
|
||||
hintText: "Type in a search term"
|
||||
noResultsText: "No results"
|
||||
searchingText: "Searching…"
|
||||
|
|
|
@ -1,4 +1,55 @@
|
|||
zh_tw:
|
||||
|
||||
module_name:
|
||||
personal_diploma: 學歷
|
||||
personal_diploma: 期刊著作
|
||||
personal_diploma:
|
||||
paper_title : "論文名稱"
|
||||
book_title : "期刊名稱"
|
||||
extracted_chapters : "Extracted Chapters"
|
||||
publishers : "Publishers"
|
||||
authors : "作者"
|
||||
tags : "領域"
|
||||
year : "年度"
|
||||
language : "語言"
|
||||
isbn : "ISSN(ISBN)"
|
||||
vol_no : "卷數"
|
||||
issue_no : "期數"
|
||||
form_to_start : "起"
|
||||
form_to_end : "訖"
|
||||
total_pages : "總頁數"
|
||||
keywords : "關鍵字"
|
||||
abstract : "摘要"
|
||||
publication_date : "發表日期"
|
||||
url : "參考連結"
|
||||
note : "記事"
|
||||
level_type : "期刊類別"
|
||||
author_type : "作者類別"
|
||||
from : "起"
|
||||
to : "訖"
|
||||
file : "檔案"
|
||||
file_name : "檔案名稱"
|
||||
description : "描述"
|
||||
pages : "Pages"
|
||||
book_paper_type : "Book Paper Type"
|
||||
school_name : "School Name"
|
||||
country : "Country"
|
||||
department : "Department"
|
||||
degree : "Degree"
|
||||
|
||||
create_success : "新增完成!!"
|
||||
update_success : "更新完成!!"
|
||||
delete_success : "刪除成功!!"
|
||||
add: "新增"
|
||||
back: "返回"
|
||||
delete: "刪除"
|
||||
edit: "編輯"
|
||||
nothing: "無"
|
||||
show: "顯示"
|
||||
sure?: "您肯定嗎?"
|
||||
update: "更新"
|
||||
yes_: "是"
|
||||
no_: "否"
|
||||
cancel : "取消"
|
||||
save: "儲存"
|
||||
hintText: "請輸入搜尋關鍵字"
|
||||
noResultsText: "沒有相關的比對結果"
|
||||
searchingText: "搜尋中…"
|
||||
|
|
|
@ -2,6 +2,10 @@ Rails.application.routes.draw do
|
|||
|
||||
namespace :panel do
|
||||
namespace :personal_diploma do
|
||||
namespace :desktop do
|
||||
match "diploma_window" => "personal_diplomas#diploma_window"
|
||||
resources :personal_diplomas
|
||||
end
|
||||
namespace :back_end do
|
||||
|
||||
match 'diploma_setting' => "diplomas#diploma_setting" ,:as => :diploma_setting
|
||||
|
|
|
@ -0,0 +1,158 @@
|
|||
orbitDesktop.prototype.initializePersonalExperience = function(target,url,cache){ // this init journal papers
|
||||
this.initializePersonalExperience.formCallback = function(data){
|
||||
if(data.success){
|
||||
o.notify(data.msg,"success");
|
||||
o.sub_menu_item($("div[content-type=menu] a").eq(0));
|
||||
}else{
|
||||
o.notify(data.msg,"alert");
|
||||
}
|
||||
}
|
||||
|
||||
this.initializePersonalExperience.list = function(){ // to open list part in journal papers page
|
||||
var journalData;
|
||||
var bindHandlers = function(){ // to bind handlers for list page
|
||||
|
||||
}
|
||||
bindHandlers();
|
||||
|
||||
var bindSecondaryHandlers = function(){
|
||||
$("#journal_p div#paper_list a.icon-check-empty").click(function(){
|
||||
if($(this).hasClass("icon-check-empty")){
|
||||
$(this).switchClass("icon-check-empty","icon-check",0);
|
||||
} else if($(this) .hasClass("icon-check")) {
|
||||
$(this).switchClass("icon-check","icon-check-empty",0);
|
||||
} else if($(this).hasClass("icon-star")){
|
||||
$(this).removeClass("icon-star").addClass("icon-star-empty");
|
||||
} else if($(this).hasClass("icon-star-empty")){
|
||||
$(this).removeClass("icon-star-empty").addClass("icon-star");
|
||||
}
|
||||
return false;
|
||||
})
|
||||
}
|
||||
}
|
||||
this.initializePersonalExperience.experienceDelete = function(data,dom){
|
||||
var parent = dom.parent().parent();
|
||||
if(data.success){
|
||||
parent.hide("slide",function(){parent.remove();});
|
||||
o.notify(data.msg,"success");
|
||||
}
|
||||
}
|
||||
|
||||
this.initializePersonalExperience.cancelexperience = function(){
|
||||
o.highlight_sub_menu_item(0);
|
||||
}
|
||||
|
||||
this.initializePersonalExperience.editexperience = function(){
|
||||
o.highlight_sub_menu_item(1);
|
||||
var uploadFiles = function(){
|
||||
$('#add_plugin_file a.add').click(function(){
|
||||
var new_id = $(this).prev().attr('value');
|
||||
var old_id = new RegExp("new_writing_journal_files", "g");
|
||||
$(this).prev().attr('value', parseInt(new_id) + 1);
|
||||
var x = get_html(old_id,new_id);
|
||||
var newfield = $(x);
|
||||
$(this).parents('table').append(newfield);
|
||||
newfield.find('.action a.delete').click(function(){
|
||||
newfield.remove();
|
||||
});
|
||||
return false;
|
||||
});
|
||||
$('.action a.remove_existing_record').click(function(){
|
||||
$(this).next('.should_destroy').attr('value', 1);
|
||||
$("tr#add_plugin_file_" + $(this).prev().attr('value')).hide();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
var preData = function(){
|
||||
$("#writing_journal_author_tokens").select2('data', JSON.parse($("#writing_journal_author_tokens").attr('data-pre')));
|
||||
}
|
||||
uploadFiles();
|
||||
// preData();
|
||||
}
|
||||
|
||||
this.initializePersonalExperience.addexperience = function(){ // to open add pages in journal papers page
|
||||
var uploadFiles = function(){
|
||||
$('#add_plugin_file a.add').click(function(){
|
||||
var new_id = $(this).prev().attr('value');
|
||||
var old_id = new RegExp("new_writing_journal_files", "g");
|
||||
$(this).prev().attr('value', parseInt(new_id) + 1);
|
||||
var x = get_html(old_id,new_id);
|
||||
var newfield = $(x);
|
||||
$(this).parents('table').append(newfield);
|
||||
newfield.find('.action a.delete').click(function(){
|
||||
newfield.remove();
|
||||
});
|
||||
return false;
|
||||
});
|
||||
$('.action a.remove_existing_record').click(function(){
|
||||
$(this).next('.should_destroy').attr('value', 1);
|
||||
$("tr#add_plugin_file_" + $(this).prev().attr('value')).hide();
|
||||
});
|
||||
}
|
||||
|
||||
// console.log("hi");
|
||||
var bindHandlers = function(){
|
||||
|
||||
|
||||
}
|
||||
bindHandlers();
|
||||
uploadFiles();
|
||||
|
||||
}
|
||||
|
||||
|
||||
this.initializePersonalExperience.coAuthorformCallback = function(data){
|
||||
if(data.success){
|
||||
o.notify(data.msg,"success");
|
||||
o.sub_menu_item($("div[content-type=menu] a").eq(3));
|
||||
}else{
|
||||
o.notify(data.msg,"alert");
|
||||
}
|
||||
}
|
||||
this.initializePersonalExperience.coauthor = function(){ // to open add pages in coauthor page
|
||||
var bindHandlers = function(){ // to bind handlers for add page
|
||||
|
||||
}
|
||||
bindHandlers();
|
||||
}
|
||||
this.initializePersonalExperience.coauthorRelationForm = function(data){
|
||||
if(data.success){
|
||||
o.notify(data.msg,"success");
|
||||
$("#co_author_relation_table").html(data.newvalue);
|
||||
}else{
|
||||
o.notify(data.msg,"alert");
|
||||
}
|
||||
}
|
||||
this.initializePersonalExperience.coauthorRelationEditForm = function(data){
|
||||
if(data.success){
|
||||
o.notify(data.msg,"success");
|
||||
var x = o.layout_data.generate_layout_html(data.newvalue);
|
||||
$("div[container=true] div.overview").html(x.markup);
|
||||
}else{
|
||||
o.notify(data.msg,"alert");
|
||||
}
|
||||
}
|
||||
this.initializePersonalExperience.allnone = function(d,o){
|
||||
switch(o.attr("href")){
|
||||
case "all":
|
||||
$("div.overview a.icon-check-empty").removeClass("icon-check-empty").addClass("icon-check");
|
||||
break;
|
||||
case "none":
|
||||
$("div.overview a.icon-check").removeClass("icon-check").addClass("icon-check-empty");
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.initializePersonalExperience.allnone = function(d,o){
|
||||
switch(o.attr("href")){
|
||||
case "all":
|
||||
$("div.overview a.icon-check-empty").removeClass("icon-check-empty").addClass("icon-check");
|
||||
break;
|
||||
case "none":
|
||||
$("div.overview a.icon-check").removeClass("icon-check").addClass("icon-check-empty");
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -0,0 +1,115 @@
|
|||
/* Books */
|
||||
[page-name="books_list"] .list_t_item .inner {
|
||||
padding-left: 30px; }
|
||||
[page-name="books_list"] .list_item_action {
|
||||
font-size: 12px;
|
||||
float: left;
|
||||
margin-left: -30px; }
|
||||
[page-name="books_list"] .list_item_action a {
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
margin: 1px 1px 6px 1px; }
|
||||
[page-name="books_list"] .list_item_action .icon-star-empty {
|
||||
color: #999;
|
||||
font-size: 20px; }
|
||||
[page-name="books_list"] .list_item_action .icon-star {
|
||||
color: #faa732;
|
||||
font-size: 20px; }
|
||||
[page-name="books_list"] .list_item_action .icon-check-empty {
|
||||
color: #999;
|
||||
font-size: 20px; }
|
||||
[page-name="books_list"] .list_item_action .icon-check {
|
||||
color: #333;
|
||||
font-size: 20px; }
|
||||
[page-name="books_list"] .file_view .list_t_des {
|
||||
overflow: hidden; }
|
||||
[page-name="books_list"] .file_view .file {
|
||||
float: left;
|
||||
width: 120px;
|
||||
height: 50px;
|
||||
padding: 6px;
|
||||
margin: 1px;
|
||||
position: relative;
|
||||
-webkit-box-sizing: border-box;
|
||||
/* webkit */
|
||||
-khtml-box-sizing: border-box;
|
||||
/* konqueror */
|
||||
-moz-box-sizing: border-box;
|
||||
/* firefox */
|
||||
-ms-box-sizing: border-box;
|
||||
/* ie */
|
||||
box-sizing: border-box;
|
||||
/* css3 */ }
|
||||
[page-name="books_list"] .file_view .file:hover {
|
||||
background-color: #f7f7f7; }
|
||||
[page-name="books_list"] .file_view .file img {
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
position: absolute;
|
||||
left: 6px;
|
||||
top: 6px; }
|
||||
[page-name="books_list"] .file_view .file .filetitle {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 38px;
|
||||
padding-left: 40px;
|
||||
overflow: hidden;
|
||||
-webkit-box-sizing: border-box;
|
||||
/* webkit */
|
||||
-khtml-box-sizing: border-box;
|
||||
/* konqueror */
|
||||
-moz-box-sizing: border-box;
|
||||
/* firefox */
|
||||
-ms-box-sizing: border-box;
|
||||
/* ie */
|
||||
box-sizing: border-box;
|
||||
/* css3 */ }
|
||||
|
||||
/* Books Books list */
|
||||
[page-name="books_books"] .datalist_item .inner {
|
||||
padding-left: 30px; }
|
||||
[page-name="books_books"] .list_item_action {
|
||||
font-size: 12px;
|
||||
float: left;
|
||||
margin-left: -30px; }
|
||||
[page-name="books_books"] .list_item_action i {
|
||||
color: #999;
|
||||
font-size: 20px;
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
margin: 1px 1px 6px 1px; }
|
||||
[page-name="books_books"] .list_t_desc {
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
color: #999; }
|
||||
|
||||
/* Books Co-Author */
|
||||
[page-name="books_coauthor"] .list_t_item {
|
||||
height: 110px; }
|
||||
[page-name="books_coauthor"] .list_item_function a {
|
||||
display: inline-block;
|
||||
padding: 4px;
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: 11px;
|
||||
-webkit-text-size-adjust: none; }
|
||||
[page-name="books_coauthor"] .info {
|
||||
font-family: Arial, sans-serif; }
|
||||
[page-name="books_coauthor"] .info li {
|
||||
margin-bottom: 8px;
|
||||
color: #999; }
|
||||
[page-name="books_coauthor"] .info .name {
|
||||
font-size: 18px;
|
||||
line-height: 24px;
|
||||
color: #333; }
|
||||
|
||||
/* Books Co-Author Relationship*/
|
||||
[page-name="books_coauthor_relation"] .edit_co_author_relation {
|
||||
/*margin-left: -10px;*/ }
|
||||
[page-name="books_coauthor_relation"] .form_space {
|
||||
margin-bottom: 10px;
|
||||
font-size: 18px;
|
||||
font-family: Arial, sans-serif; }
|
|
@ -0,0 +1,123 @@
|
|||
@import "desktop-helper";
|
||||
|
||||
/* Books */
|
||||
[page-name="books_list"] {
|
||||
.list_t_item .inner { padding-left: 30px; }
|
||||
.list_item_action {
|
||||
font-size: 12px;
|
||||
float: left;
|
||||
margin-left: -30px;
|
||||
|
||||
a {
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
margin: 1px 1px 6px 1px;
|
||||
}
|
||||
.icon-star-empty { color: #999; font-size: 20px; }
|
||||
.icon-star { color: #faa732; font-size: 20px; }
|
||||
.icon-check-empty { color: #999; font-size: 20px; }
|
||||
.icon-check { color: #333; font-size: 20px; }
|
||||
}
|
||||
|
||||
.file_view {
|
||||
.list_t_des {
|
||||
overflow: hidden;
|
||||
}
|
||||
.file {
|
||||
float: left;
|
||||
width: 120px;
|
||||
height: 50px;
|
||||
padding: 6px;
|
||||
margin: 1px;
|
||||
position: relative;
|
||||
@include box-sizing;
|
||||
|
||||
&:hover {
|
||||
background-color: lighten($gray, 10%);
|
||||
}
|
||||
img {
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
position: absolute;
|
||||
left: 6px;
|
||||
top: 6px;
|
||||
}
|
||||
.filetitle {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 38px;
|
||||
padding-left: 40px;
|
||||
overflow: hidden;
|
||||
@include box-sizing;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Books Books list */
|
||||
[page-name="books_books"] {
|
||||
|
||||
.datalist_item .inner {
|
||||
padding-left: 30px;
|
||||
}
|
||||
.list_item_action {
|
||||
font-size: 12px;
|
||||
float: left;
|
||||
margin-left: -30px;
|
||||
}
|
||||
.list_item_action i {
|
||||
color: #999;
|
||||
font-size: 20px;
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
margin: 1px 1px 6px 1px;
|
||||
}
|
||||
.list_t_desc {
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
|
||||
/* Books Co-Author */
|
||||
[page-name="books_coauthor"] {
|
||||
.list_t_item {
|
||||
height: 110px;
|
||||
}
|
||||
.list_item_function {}
|
||||
.list_item_function a {
|
||||
display: inline-block;
|
||||
padding: 4px;
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: 11px;
|
||||
-webkit-text-size-adjust: none;
|
||||
}
|
||||
.info {
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
.info li {
|
||||
margin-bottom: 8px;
|
||||
color: #999;
|
||||
}
|
||||
.info .name {
|
||||
font-size: 18px;
|
||||
line-height: 24px;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
|
||||
/* Books Co-Author Relationship*/
|
||||
[page-name="books_coauthor_relation"]{
|
||||
.edit_co_author_relation {
|
||||
/*margin-left: -10px;*/
|
||||
}
|
||||
.form_space {
|
||||
margin-bottom: 10px;
|
||||
font-size: 18px;
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
class Panel::PersonalExperience::Desktop::PersonalExperiencesController < ApplicationController
|
||||
|
||||
def index
|
||||
@experiences = Experience.where(create_user_id: current_user.id)
|
||||
@view_by = params[:view]
|
||||
page = params[:page]
|
||||
page ||= 1
|
||||
|
||||
@per_column = 5
|
||||
|
||||
case @view_by
|
||||
when "abstract"
|
||||
@per_column = 1
|
||||
when "file"
|
||||
@per_column = 2
|
||||
end
|
||||
|
||||
if @view_by.nil?
|
||||
@view_by = " "
|
||||
@experiences = @experiences.asc(:organizationt_title)
|
||||
else
|
||||
@experiences = @experiences.asc(@view_by).asc(:organizationt_title)
|
||||
end
|
||||
@experiences = @experiences.page(page).per(50)
|
||||
respond_to do |format|
|
||||
format.html { render :layout => false}
|
||||
end
|
||||
end
|
||||
|
||||
def new
|
||||
@experience = Experience.new
|
||||
# @author_types = BookAuthorType.all
|
||||
render :layout => false
|
||||
end
|
||||
|
||||
def create
|
||||
params[:experience][:create_user_id] = current_user.id
|
||||
@experience = Experience.new(params[:experience])
|
||||
if @experience.save
|
||||
render json: {success: true, msg: t('create_success')}.to_json
|
||||
else
|
||||
error_msg = @experience.errors.full_messages.join("<br />")
|
||||
render json: {success: false, msg: error_msg}.to_json
|
||||
end
|
||||
end
|
||||
|
||||
def edit
|
||||
@experience = Experience.find(params[:id])
|
||||
render :layout => false
|
||||
end
|
||||
|
||||
def update
|
||||
params[:experience][:create_user_id] = current_user.id
|
||||
@experience = Experience.new(params[:experience])
|
||||
if @experience.update_attributes(params[:writing_book])
|
||||
render json: {success: true, msg: t('create_success')}.to_json
|
||||
else
|
||||
error_msg = @experience.errors.full_messages.join("<br />")
|
||||
render json: {success: false, msg: error_msg}.to_json
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
@experience = Experience.find(params[:id])
|
||||
@experience.destroy
|
||||
render :json => {success: true, msg: t('delete_success')}
|
||||
end
|
||||
|
||||
def experience_window
|
||||
render :layout => false
|
||||
end
|
||||
end
|
|
@ -0,0 +1,96 @@
|
|||
module Panel::PersonalExperience::Desktop::PersonalExperiencesHelper
|
||||
def publication_record publication, view
|
||||
content_tag :li,
|
||||
"item" => "true",
|
||||
:class => "list_t_item" do
|
||||
marker + \
|
||||
content(publication, view) + \
|
||||
edit_or_delete(publication)
|
||||
end
|
||||
end
|
||||
|
||||
def marker
|
||||
content_tag :div,
|
||||
:class => "list_item_action" do
|
||||
content_tag(:a, "",:href=>"",
|
||||
:class => "icon-check-empty",
|
||||
"toggle-onclick"=>"icon-check-empty icon-check",
|
||||
"ajax-remote"=>"false") + \
|
||||
content_tag(:a, "",:href=>"",
|
||||
:class => "icon-star-empty",
|
||||
"toggle-onclick"=>"icon-star-empty icon-star",
|
||||
"ajax-remote"=>"false")
|
||||
end
|
||||
end
|
||||
|
||||
def content publication, view
|
||||
case view
|
||||
when "organizationt_title"
|
||||
des = content_tag(:div, publication.organizationt_title,
|
||||
:class => "list_t_des")
|
||||
when "job_title"
|
||||
des = content_tag(:div, publication.job_title,
|
||||
:class => "list_t_des")
|
||||
when "department"
|
||||
des = content_tag(:div, publication.department,
|
||||
:class => "list_t_des")
|
||||
when "file"
|
||||
des = content_tag(:div, link_publication_file(publication),
|
||||
:class => "list_t_des")
|
||||
else
|
||||
end
|
||||
|
||||
content_tag(:div, publication.organizationt_title,
|
||||
:class => "list_t_title") + des
|
||||
|
||||
end
|
||||
|
||||
def edit_or_delete publication
|
||||
content_tag :div,
|
||||
:class => "list_item_function" do
|
||||
content_tag(:a, t("edit"),
|
||||
:class => "journal_paper_edit admbg2 admtxt",
|
||||
:href => edit_panel_personal_experience_desktop_personal_experience_path(publication),
|
||||
"callback-method" => "editexperience",
|
||||
"ajax-remote" => "get") + \
|
||||
content_tag(:a, t(:delete_),
|
||||
"ajax-remote" => "delete",
|
||||
"confirm-message" => t("sure?"),
|
||||
"callback-method" => "experienceDelete",
|
||||
:class => "journal_paper_delete admbg2 admtxt",
|
||||
:href => panel_personal_experience_desktop_personal_experience_path(publication))
|
||||
end
|
||||
end
|
||||
|
||||
def link_publication_file publication
|
||||
publication.writing_conference_files.map{|file|
|
||||
link_to(image_tag(check_file_type(file.file.url)) + \
|
||||
content_tag(:span, file.title, :class => "filetitle"),
|
||||
file.file.url,
|
||||
:class => "file",
|
||||
"target" => "_blank")
|
||||
}.inject(:+)
|
||||
end
|
||||
|
||||
def check_file_type file
|
||||
if not file.nil?
|
||||
file_type = MIME::Types.type_for(file).first.to_s.split("/")[1]
|
||||
file_type = "/assets/ft-icons/#{file_type}/#{file_type}-48_32.png"
|
||||
else
|
||||
file_type = ""
|
||||
end
|
||||
end
|
||||
|
||||
def generate_authors_name ids
|
||||
author_name = ids.map{|m|
|
||||
if m == "0"
|
||||
#{:id => 0, :text => current_user.name, :email => current_user.email }
|
||||
{:id => 0, :text => current_user.name }
|
||||
else
|
||||
#{:id => m, :text => ConferenceCoAuthor.find(m).co_author, :email => ConferenceCoAuthor.find(m).email}
|
||||
{:id => m, :text => ConferenceCoAuthor.find(m).co_author}
|
||||
end
|
||||
}
|
||||
author_name.to_json
|
||||
end
|
||||
end
|
|
@ -0,0 +1,93 @@
|
|||
<div class="toolbar hh1">
|
||||
<div class="fn_g hp">
|
||||
|
||||
<%= f.submit t("save"), name: "commit", class: "fn_btn ini_input hp hh1 thmc2 thmtxt" %>
|
||||
<% if not @experience.new_record? %>
|
||||
<%= submit_tag t("cancel"), :type => "button", "callback-method"=>"cancelexperience", "ajax-remote" => "get", :href => panel_personal_experience_desktop_personal_experiences_path, class: "fn_btn ini_input hp hh1 admbg2 admtxt" %>
|
||||
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Share</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">Full</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Group</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overview" content-layout="column" base-width="420">
|
||||
<div column="true">
|
||||
<div class="s_form">
|
||||
<ul>
|
||||
<li class="s_grid_row">
|
||||
<%= f.fields_for :organizationt_title_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
size: "20",
|
||||
placeholder: t("personal_experience.organizationt_title"),
|
||||
class: "s_grid_12 s_grid",
|
||||
value: (@experience.organizationt_title_translations[locale.to_s] rescue nil) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= f.fields_for :department_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
size: "20",
|
||||
placeholder: t("personal_experience.department"),
|
||||
class: "s_grid_12 s_grid",
|
||||
value: (@experience.department_translations[locale.to_s] rescue nil) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= f.fields_for :job_title_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
size: "20",
|
||||
placeholder: t("personal_experience.job_title"),
|
||||
class: "s_grid_12 s_grid",
|
||||
value: (@experience.job_title_translations[locale.to_s] rescue nil) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", t("personal_experience.experience_category"), class: "s_grid_4 s_grid") %>
|
||||
<%= f.select :experience_category_id, ExperienceCategory.all.collect {|t| [ t.title, t.id ]}, {:class => "s_grid s_grid_8"} %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", t("personal_experience.start_date"), class: "s_grid_4 s_grid") %>
|
||||
<%= f.date_select :start_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year] }, {:class => 's_grid_4 s_grid'} %>
|
||||
<%= f.date_select :start_date, {:use_month_numbers => true, :order => [:month, :day] }, {:class => 's_grid_2 s_grid'} %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", t("personal_experience.end_date"), class: "s_grid_4 s_grid") %>
|
||||
<%= f.date_select :end_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year] }, {:class => 's_grid_4 s_grid'} %>
|
||||
<%= f.date_select :end_date, {:use_month_numbers => true, :order => [:month, :day] }, {:class => 's_grid_2 s_grid'} %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", t("personal_experience.url"), class: "s_grid_4 s_grid") %><%= f.text_field :url, size: "20", class: "s_grid_8 s_grid"%>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= f.text_area :keywords, size: "20x3", placeholder: t("personal_experience.keywords"), class: "s_grid_12 s_grid_h_2 s_grid"%>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= f.label :language, t("personal_experience.language"), :class => "s_grid s_grid_4" %>
|
||||
<%= f.select :language, Experience::LANGUAGE_TYPES,{} ,{:class => "s_grid s_grid_8"} %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div column="true">
|
||||
<div class="s_form">
|
||||
<ul>
|
||||
<li class="s_grid_row">
|
||||
<%= f.text_area :note, size: "20x3", placeholder: t("personal_experience.note"), value: @experience.note , class: "s_grid_12 s_grid s_grid_h_3"%>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,3 @@
|
|||
<%= form_for @experience, html: { multipart: true, "form-type"=>"ajax_form", "callback-method"=>"formCallback"}, url: panel_personal_experience_desktop_personal_experiences_path(@personal_book) do |f| %>
|
||||
<%= render partial: 'form', locals: {:f => f} %>
|
||||
<%end%>
|
|
@ -0,0 +1,35 @@
|
|||
<%= stylesheet_link_tag "/assets/personal_experience/desktop/personal_experience" %>
|
||||
<%= javascript_include_tag "personal_experience/desktop/personal_experiences" %>
|
||||
<div id="working">
|
||||
<div id="content">
|
||||
<div id="header" class="hh2">
|
||||
<div class="dtitle w2 hh2 hp">
|
||||
<span class="thmtxth">Experience/Working</span>
|
||||
</div>
|
||||
<div id="search_app" class="hfn w2 hh1 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" content-type="menu">
|
||||
<ul id='setting_left_nav'>
|
||||
<li><a href="<%= panel_personal_experience_desktop_personal_experiences_path %>" callback-method="list" class="hh1 w2 hp active thmc1 thmtxt" load="true" onclick='return false;'>List</a></li>
|
||||
<li><a href="<%= new_panel_personal_experience_desktop_personal_experience_path %>" callback-method="addexperience" class="admtxt hh1 w2 hp" onclick='return false;'>Add/Edit</a></li>
|
||||
<!-- <li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Books</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Co-Authors</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Tags & Keywords</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Analysis</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Import</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Export</a></li> -->
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="panel_r" container="true" class="ph pw admbg hp">
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,84 @@
|
|||
<div class="toolbar hh1">
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><span class="icon-check"></span></div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul id="journal_selection_options">
|
||||
<li><a class="hp hh1 admtxt" href="all" ajax-remote="false" callback-method="allnone">All</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="none" ajax-remote="false" callback-method="allnone">None</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">More</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">Delete</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Tag</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Tag</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">All</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Starred</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">MIT</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Status</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">All</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Published</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Pending</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">View</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul id="journal_view_selection">
|
||||
<li><%= link_to "Journal", panel_personal_experience_desktop_personal_experiences_path + "?view=organizationt_title", :class => "hp hh1 admtxt", "ajax-remote" => "get" %></li>
|
||||
<li><%= link_to "Title", panel_personal_experience_desktop_personal_experiences_path + "?view=paper_title", :class => "hp hh1 admtxt", "ajax-remote" => "get" %></li>
|
||||
<li><%= link_to "File", panel_personal_experience_desktop_personal_experiences_path + "?view=job_title", :class => "hp hh1 admtxt", "ajax-remote" => "get" %></li>
|
||||
<li><%= link_to "Keywords", panel_personal_experience_desktop_personal_experiences_path + "?view=department", :class => "hp hh1 admtxt", "ajax-remote" => "get" %></li>
|
||||
<li><%= link_to "Abstract", panel_personal_experience_desktop_personal_experiences_path + "?view=file", :class => "hp hh1 admtxt", "ajax-remote" => "get" %></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Share</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">Full</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Group</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1" id='ns'>New Share</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt remote_url" href="<%= panel_personal_experience_desktop_personal_experiences_path %>">Full</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Group</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overview" page-name="journal_p_list" content-layout="datalist" base-width="300" per-column="<%= @per_column.to_s %>" pagination-var="view=<%= @view_by %>&page" >
|
||||
<% @experiences.each do |w| %>
|
||||
<%= publication_record w, @view_by%>
|
||||
<% end %>
|
||||
</div>
|
|
@ -0,0 +1,3 @@
|
|||
<%= form_for @experience, html: { multipart: true, "form-type"=>"ajax_form", "callback-method"=>"formCallback"}, url: panel_personal_experience_desktop_personal_experiences_path do |f| %>
|
||||
<%= render partial: 'form', locals: {:f => f} %>
|
||||
<%end%>
|
|
@ -1,4 +1,55 @@
|
|||
en:
|
||||
|
||||
module_name:
|
||||
personal_experience: Experience
|
||||
personal_experience: Book
|
||||
personal_experience:
|
||||
department : "Department"
|
||||
experience_category : "Experience Category"
|
||||
organizationt_title : "Organization Title"
|
||||
paper_title : "Paper Title"
|
||||
book_title : "Book Title"
|
||||
job_title : "Job Title"
|
||||
extracted_chapters : "Extracted Chapters"
|
||||
publishers : "Publishers"
|
||||
authors : "Authors"
|
||||
tags : "Tags"
|
||||
year : "Year"
|
||||
language : "Language"
|
||||
isbn : "ISSN(ISBN)"
|
||||
vol_no : "Vol.No"
|
||||
issue_no : "Issue.No"
|
||||
form_to_start : "From"
|
||||
form_to_end : "To"
|
||||
total_pages : "Total Pages"
|
||||
keywords : "Keywords"
|
||||
abstract : "Abstract"
|
||||
publication_date : "Date of Publication"
|
||||
url : "Reference URL"
|
||||
note : "Note"
|
||||
level_type : "Level Type"
|
||||
author_type : "Author Type"
|
||||
from : "From"
|
||||
to : "To"
|
||||
file : "File"
|
||||
file_name : "File name"
|
||||
description : "File Description"
|
||||
pages : "Pages"
|
||||
book_paper_type : "Book Paper Type"
|
||||
|
||||
create_success : "Successfully Create"
|
||||
update_success : "Successfully Update"
|
||||
delete_success : "Successfully Delete"
|
||||
add: "Add"
|
||||
back: "Back"
|
||||
delete: "Delete"
|
||||
edit: "Edit"
|
||||
nothing: "Nothing"
|
||||
show: "Show"
|
||||
sure?: "Are you sure?"
|
||||
update: "Update"
|
||||
yes_: "Yes"
|
||||
no_: "No"
|
||||
cancel : "Cancel"
|
||||
save: "save"
|
||||
hintText: "Type in a search term"
|
||||
noResultsText: "No results"
|
||||
searchingText: "Searching…"
|
||||
|
|
|
@ -1,5 +1,54 @@
|
|||
zh_tw:
|
||||
|
||||
module_name:
|
||||
personal_experience: 經歷
|
||||
|
||||
personal_experience: 期刊著作
|
||||
personal_experience:
|
||||
department : "Department"
|
||||
organizationt_title : "Organization Title"
|
||||
paper_title : "論文名稱"
|
||||
book_title : "期刊名稱"
|
||||
job_title : "Job Title"
|
||||
extracted_chapters : "Extracted Chapters"
|
||||
publishers : "Publishers"
|
||||
authors : "作者"
|
||||
tags : "領域"
|
||||
year : "年度"
|
||||
language : "語言"
|
||||
isbn : "ISSN(ISBN)"
|
||||
vol_no : "卷數"
|
||||
issue_no : "期數"
|
||||
form_to_start : "起"
|
||||
form_to_end : "訖"
|
||||
total_pages : "總頁數"
|
||||
keywords : "關鍵字"
|
||||
abstract : "摘要"
|
||||
publication_date : "發表日期"
|
||||
url : "參考連結"
|
||||
note : "記事"
|
||||
level_type : "期刊類別"
|
||||
author_type : "作者類別"
|
||||
from : "起"
|
||||
to : "訖"
|
||||
file : "檔案"
|
||||
file_name : "檔案名稱"
|
||||
description : "描述"
|
||||
pages : "Pages"
|
||||
book_paper_type : "Book Paper Type"
|
||||
|
||||
create_success : "新增完成!!"
|
||||
update_success : "更新完成!!"
|
||||
delete_success : "刪除成功!!"
|
||||
add: "新增"
|
||||
back: "返回"
|
||||
delete: "刪除"
|
||||
edit: "編輯"
|
||||
nothing: "無"
|
||||
show: "顯示"
|
||||
sure?: "您肯定嗎?"
|
||||
update: "更新"
|
||||
yes_: "是"
|
||||
no_: "否"
|
||||
cancel : "取消"
|
||||
save: "儲存"
|
||||
hintText: "請輸入搜尋關鍵字"
|
||||
noResultsText: "沒有相關的比對結果"
|
||||
searchingText: "搜尋中…"
|
||||
|
|
|
@ -2,6 +2,10 @@ Rails.application.routes.draw do
|
|||
|
||||
namespace :panel do
|
||||
namespace :personal_experience do
|
||||
namespace :desktop do
|
||||
match "experience_window" => "personal_experiences#experience_window"
|
||||
resources :personal_experiences
|
||||
end
|
||||
namespace :back_end do
|
||||
|
||||
match 'experience_setting' => "experiences#experience_setting" ,:as => :experience_setting
|
||||
|
|
|
@ -0,0 +1,158 @@
|
|||
orbitDesktop.prototype.initializePersonalHonor = function(target,url,cache){ // this init journal papers
|
||||
this.initializePersonalHonor.formCallback = function(data){
|
||||
if(data.success){
|
||||
o.notify(data.msg,"success");
|
||||
o.sub_menu_item($("div[content-type=menu] a").eq(0));
|
||||
}else{
|
||||
o.notify(data.msg,"alert");
|
||||
}
|
||||
}
|
||||
|
||||
this.initializePersonalHonor.list = function(){ // to open list part in journal papers page
|
||||
var journalData;
|
||||
var bindHandlers = function(){ // to bind handlers for list page
|
||||
|
||||
}
|
||||
bindHandlers();
|
||||
|
||||
var bindSecondaryHandlers = function(){
|
||||
$("#journal_p div#paper_list a.icon-check-empty").click(function(){
|
||||
if($(this).hasClass("icon-check-empty")){
|
||||
$(this).switchClass("icon-check-empty","icon-check",0);
|
||||
} else if($(this) .hasClass("icon-check")) {
|
||||
$(this).switchClass("icon-check","icon-check-empty",0);
|
||||
} else if($(this).hasClass("icon-star")){
|
||||
$(this).removeClass("icon-star").addClass("icon-star-empty");
|
||||
} else if($(this).hasClass("icon-star-empty")){
|
||||
$(this).removeClass("icon-star-empty").addClass("icon-star");
|
||||
}
|
||||
return false;
|
||||
})
|
||||
}
|
||||
}
|
||||
this.initializePersonalHonor.honorDelete = function(data,dom){
|
||||
var parent = dom.parent().parent();
|
||||
if(data.success){
|
||||
parent.hide("slide",function(){parent.remove();});
|
||||
o.notify(data.msg,"success");
|
||||
}
|
||||
}
|
||||
|
||||
this.initializePersonalHonor.cancelhonor = function(){
|
||||
o.highlight_sub_menu_item(0);
|
||||
}
|
||||
|
||||
this.initializePersonalHonor.edithonor = function(){
|
||||
o.highlight_sub_menu_item(1);
|
||||
var uploadFiles = function(){
|
||||
$('#add_plugin_file a.add').click(function(){
|
||||
var new_id = $(this).prev().attr('value');
|
||||
var old_id = new RegExp("new_writing_journal_files", "g");
|
||||
$(this).prev().attr('value', parseInt(new_id) + 1);
|
||||
var x = get_html(old_id,new_id);
|
||||
var newfield = $(x);
|
||||
$(this).parents('table').append(newfield);
|
||||
newfield.find('.action a.delete').click(function(){
|
||||
newfield.remove();
|
||||
});
|
||||
return false;
|
||||
});
|
||||
$('.action a.remove_existing_record').click(function(){
|
||||
$(this).next('.should_destroy').attr('value', 1);
|
||||
$("tr#add_plugin_file_" + $(this).prev().attr('value')).hide();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
var preData = function(){
|
||||
$("#writing_journal_author_tokens").select2('data', JSON.parse($("#writing_journal_author_tokens").attr('data-pre')));
|
||||
}
|
||||
uploadFiles();
|
||||
// preData();
|
||||
}
|
||||
|
||||
this.initializePersonalHonor.addhonor = function(){ // to open add pages in journal papers page
|
||||
var uploadFiles = function(){
|
||||
$('#add_plugin_file a.add').click(function(){
|
||||
var new_id = $(this).prev().attr('value');
|
||||
var old_id = new RegExp("new_writing_journal_files", "g");
|
||||
$(this).prev().attr('value', parseInt(new_id) + 1);
|
||||
var x = get_html(old_id,new_id);
|
||||
var newfield = $(x);
|
||||
$(this).parents('table').append(newfield);
|
||||
newfield.find('.action a.delete').click(function(){
|
||||
newfield.remove();
|
||||
});
|
||||
return false;
|
||||
});
|
||||
$('.action a.remove_existing_record').click(function(){
|
||||
$(this).next('.should_destroy').attr('value', 1);
|
||||
$("tr#add_plugin_file_" + $(this).prev().attr('value')).hide();
|
||||
});
|
||||
}
|
||||
|
||||
// console.log("hi");
|
||||
var bindHandlers = function(){
|
||||
|
||||
|
||||
}
|
||||
bindHandlers();
|
||||
uploadFiles();
|
||||
|
||||
}
|
||||
|
||||
|
||||
this.initializePersonalHonor.coAuthorformCallback = function(data){
|
||||
if(data.success){
|
||||
o.notify(data.msg,"success");
|
||||
o.sub_menu_item($("div[content-type=menu] a").eq(3));
|
||||
}else{
|
||||
o.notify(data.msg,"alert");
|
||||
}
|
||||
}
|
||||
this.initializePersonalHonor.coauthor = function(){ // to open add pages in coauthor page
|
||||
var bindHandlers = function(){ // to bind handlers for add page
|
||||
|
||||
}
|
||||
bindHandlers();
|
||||
}
|
||||
this.initializePersonalHonor.coauthorRelationForm = function(data){
|
||||
if(data.success){
|
||||
o.notify(data.msg,"success");
|
||||
$("#co_author_relation_table").html(data.newvalue);
|
||||
}else{
|
||||
o.notify(data.msg,"alert");
|
||||
}
|
||||
}
|
||||
this.initializePersonalHonor.coauthorRelationEditForm = function(data){
|
||||
if(data.success){
|
||||
o.notify(data.msg,"success");
|
||||
var x = o.layout_data.generate_layout_html(data.newvalue);
|
||||
$("div[container=true] div.overview").html(x.markup);
|
||||
}else{
|
||||
o.notify(data.msg,"alert");
|
||||
}
|
||||
}
|
||||
this.initializePersonalHonor.allnone = function(d,o){
|
||||
switch(o.attr("href")){
|
||||
case "all":
|
||||
$("div.overview a.icon-check-empty").removeClass("icon-check-empty").addClass("icon-check");
|
||||
break;
|
||||
case "none":
|
||||
$("div.overview a.icon-check").removeClass("icon-check").addClass("icon-check-empty");
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.initializePersonalHonor.allnone = function(d,o){
|
||||
switch(o.attr("href")){
|
||||
case "all":
|
||||
$("div.overview a.icon-check-empty").removeClass("icon-check-empty").addClass("icon-check");
|
||||
break;
|
||||
case "none":
|
||||
$("div.overview a.icon-check").removeClass("icon-check").addClass("icon-check-empty");
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -0,0 +1,115 @@
|
|||
/* Books */
|
||||
[page-name="books_list"] .list_t_item .inner {
|
||||
padding-left: 30px; }
|
||||
[page-name="books_list"] .list_item_action {
|
||||
font-size: 12px;
|
||||
float: left;
|
||||
margin-left: -30px; }
|
||||
[page-name="books_list"] .list_item_action a {
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
margin: 1px 1px 6px 1px; }
|
||||
[page-name="books_list"] .list_item_action .icon-star-empty {
|
||||
color: #999;
|
||||
font-size: 20px; }
|
||||
[page-name="books_list"] .list_item_action .icon-star {
|
||||
color: #faa732;
|
||||
font-size: 20px; }
|
||||
[page-name="books_list"] .list_item_action .icon-check-empty {
|
||||
color: #999;
|
||||
font-size: 20px; }
|
||||
[page-name="books_list"] .list_item_action .icon-check {
|
||||
color: #333;
|
||||
font-size: 20px; }
|
||||
[page-name="books_list"] .file_view .list_t_des {
|
||||
overflow: hidden; }
|
||||
[page-name="books_list"] .file_view .file {
|
||||
float: left;
|
||||
width: 120px;
|
||||
height: 50px;
|
||||
padding: 6px;
|
||||
margin: 1px;
|
||||
position: relative;
|
||||
-webkit-box-sizing: border-box;
|
||||
/* webkit */
|
||||
-khtml-box-sizing: border-box;
|
||||
/* konqueror */
|
||||
-moz-box-sizing: border-box;
|
||||
/* firefox */
|
||||
-ms-box-sizing: border-box;
|
||||
/* ie */
|
||||
box-sizing: border-box;
|
||||
/* css3 */ }
|
||||
[page-name="books_list"] .file_view .file:hover {
|
||||
background-color: #f7f7f7; }
|
||||
[page-name="books_list"] .file_view .file img {
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
position: absolute;
|
||||
left: 6px;
|
||||
top: 6px; }
|
||||
[page-name="books_list"] .file_view .file .filetitle {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 38px;
|
||||
padding-left: 40px;
|
||||
overflow: hidden;
|
||||
-webkit-box-sizing: border-box;
|
||||
/* webkit */
|
||||
-khtml-box-sizing: border-box;
|
||||
/* konqueror */
|
||||
-moz-box-sizing: border-box;
|
||||
/* firefox */
|
||||
-ms-box-sizing: border-box;
|
||||
/* ie */
|
||||
box-sizing: border-box;
|
||||
/* css3 */ }
|
||||
|
||||
/* Books Books list */
|
||||
[page-name="books_books"] .datalist_item .inner {
|
||||
padding-left: 30px; }
|
||||
[page-name="books_books"] .list_item_action {
|
||||
font-size: 12px;
|
||||
float: left;
|
||||
margin-left: -30px; }
|
||||
[page-name="books_books"] .list_item_action i {
|
||||
color: #999;
|
||||
font-size: 20px;
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
margin: 1px 1px 6px 1px; }
|
||||
[page-name="books_books"] .list_t_desc {
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
color: #999; }
|
||||
|
||||
/* Books Co-Author */
|
||||
[page-name="books_coauthor"] .list_t_item {
|
||||
height: 110px; }
|
||||
[page-name="books_coauthor"] .list_item_function a {
|
||||
display: inline-block;
|
||||
padding: 4px;
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: 11px;
|
||||
-webkit-text-size-adjust: none; }
|
||||
[page-name="books_coauthor"] .info {
|
||||
font-family: Arial, sans-serif; }
|
||||
[page-name="books_coauthor"] .info li {
|
||||
margin-bottom: 8px;
|
||||
color: #999; }
|
||||
[page-name="books_coauthor"] .info .name {
|
||||
font-size: 18px;
|
||||
line-height: 24px;
|
||||
color: #333; }
|
||||
|
||||
/* Books Co-Author Relationship*/
|
||||
[page-name="books_coauthor_relation"] .edit_co_author_relation {
|
||||
/*margin-left: -10px;*/ }
|
||||
[page-name="books_coauthor_relation"] .form_space {
|
||||
margin-bottom: 10px;
|
||||
font-size: 18px;
|
||||
font-family: Arial, sans-serif; }
|
|
@ -0,0 +1,123 @@
|
|||
@import "desktop-helper";
|
||||
|
||||
/* Books */
|
||||
[page-name="books_list"] {
|
||||
.list_t_item .inner { padding-left: 30px; }
|
||||
.list_item_action {
|
||||
font-size: 12px;
|
||||
float: left;
|
||||
margin-left: -30px;
|
||||
|
||||
a {
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
margin: 1px 1px 6px 1px;
|
||||
}
|
||||
.icon-star-empty { color: #999; font-size: 20px; }
|
||||
.icon-star { color: #faa732; font-size: 20px; }
|
||||
.icon-check-empty { color: #999; font-size: 20px; }
|
||||
.icon-check { color: #333; font-size: 20px; }
|
||||
}
|
||||
|
||||
.file_view {
|
||||
.list_t_des {
|
||||
overflow: hidden;
|
||||
}
|
||||
.file {
|
||||
float: left;
|
||||
width: 120px;
|
||||
height: 50px;
|
||||
padding: 6px;
|
||||
margin: 1px;
|
||||
position: relative;
|
||||
@include box-sizing;
|
||||
|
||||
&:hover {
|
||||
background-color: lighten($gray, 10%);
|
||||
}
|
||||
img {
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
position: absolute;
|
||||
left: 6px;
|
||||
top: 6px;
|
||||
}
|
||||
.filetitle {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 38px;
|
||||
padding-left: 40px;
|
||||
overflow: hidden;
|
||||
@include box-sizing;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Books Books list */
|
||||
[page-name="books_books"] {
|
||||
|
||||
.datalist_item .inner {
|
||||
padding-left: 30px;
|
||||
}
|
||||
.list_item_action {
|
||||
font-size: 12px;
|
||||
float: left;
|
||||
margin-left: -30px;
|
||||
}
|
||||
.list_item_action i {
|
||||
color: #999;
|
||||
font-size: 20px;
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
margin: 1px 1px 6px 1px;
|
||||
}
|
||||
.list_t_desc {
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
|
||||
/* Books Co-Author */
|
||||
[page-name="books_coauthor"] {
|
||||
.list_t_item {
|
||||
height: 110px;
|
||||
}
|
||||
.list_item_function {}
|
||||
.list_item_function a {
|
||||
display: inline-block;
|
||||
padding: 4px;
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: 11px;
|
||||
-webkit-text-size-adjust: none;
|
||||
}
|
||||
.info {
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
.info li {
|
||||
margin-bottom: 8px;
|
||||
color: #999;
|
||||
}
|
||||
.info .name {
|
||||
font-size: 18px;
|
||||
line-height: 24px;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
|
||||
/* Books Co-Author Relationship*/
|
||||
[page-name="books_coauthor_relation"]{
|
||||
.edit_co_author_relation {
|
||||
/*margin-left: -10px;*/
|
||||
}
|
||||
.form_space {
|
||||
margin-bottom: 10px;
|
||||
font-size: 18px;
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,71 @@
|
|||
class Panel::PersonalHonor::Desktop::PersonalHonorsController < ApplicationController
|
||||
|
||||
def index
|
||||
@honors = Honor.where(create_user_id: current_user.id)
|
||||
@view_by = params[:view]
|
||||
page = params[:page]
|
||||
page ||= 1
|
||||
|
||||
@per_column = 5
|
||||
|
||||
case @view_by
|
||||
when "abstract"
|
||||
@per_column = 1
|
||||
when "file"
|
||||
@per_column = 2
|
||||
end
|
||||
|
||||
if @view_by.nil?
|
||||
@view_by = " "
|
||||
@honors = @honors.asc(:paper_title)
|
||||
else
|
||||
@honors = @honors.asc(@view_by).asc(:paper_title)
|
||||
end
|
||||
@honors = @honors.page(page).per(50)
|
||||
respond_to do |format|
|
||||
format.html { render :layout => false}
|
||||
end
|
||||
end
|
||||
|
||||
def new
|
||||
@honor = Honor.new
|
||||
render :layout => false
|
||||
end
|
||||
|
||||
def create
|
||||
params[:honor][:create_user_id] = current_user.id
|
||||
@honor = Honor.new(params[:honor])
|
||||
if @honor.save
|
||||
render json: {success: true, msg: t('create_success')}.to_json
|
||||
else
|
||||
error_msg = @honor.errors.full_messages.join("<br />")
|
||||
render json: {success: false, msg: error_msg}.to_json
|
||||
end
|
||||
end
|
||||
|
||||
def edit
|
||||
@honor = Honor.find(params[:id])
|
||||
render :layout => false
|
||||
end
|
||||
|
||||
def update
|
||||
params[:honor][:create_user_id] = current_user.id
|
||||
@honor = Honor.new(params[:honor])
|
||||
if @honor.update_attributes(params[:honor])
|
||||
render json: {success: true, msg: t('create_success')}.to_json
|
||||
else
|
||||
error_msg = @honor.errors.full_messages.join("<br />")
|
||||
render json: {success: false, msg: error_msg}.to_json
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
@honor = Honor.find(params[:id])
|
||||
@honor.destroy
|
||||
render :json => {success: true, msg: t('delete_success')}
|
||||
end
|
||||
|
||||
def honors_window
|
||||
render :layout => false
|
||||
end
|
||||
end
|
|
@ -0,0 +1,87 @@
|
|||
module Panel::PersonalHonor::Desktop::PersonalHonorsHelper
|
||||
def publication_record publication, view
|
||||
content_tag :li,
|
||||
"item" => "true",
|
||||
:class => "list_t_item" do
|
||||
marker + \
|
||||
content(publication, view) + \
|
||||
edit_or_delete(publication)
|
||||
end
|
||||
end
|
||||
|
||||
def marker
|
||||
content_tag :div,
|
||||
:class => "list_item_action" do
|
||||
content_tag(:a, "",:href=>"",
|
||||
:class => "icon-check-empty",
|
||||
"toggle-onclick"=>"icon-check-empty icon-check",
|
||||
"ajax-remote"=>"false") + \
|
||||
content_tag(:a, "",:href=>"",
|
||||
:class => "icon-star-empty",
|
||||
"toggle-onclick"=>"icon-star-empty icon-star",
|
||||
"ajax-remote"=>"false")
|
||||
end
|
||||
end
|
||||
|
||||
def content publication, view
|
||||
case view
|
||||
when "award_name"
|
||||
des = content_tag(:div, publication.award_name,
|
||||
:class => "list_t_des")
|
||||
|
||||
end
|
||||
|
||||
content_tag(:div, publication.award_name,
|
||||
:class => "list_t_title") + des
|
||||
|
||||
end
|
||||
|
||||
def edit_or_delete publication
|
||||
content_tag :div,
|
||||
:class => "list_item_function" do
|
||||
content_tag(:a, t("edit"),
|
||||
:class => "journal_paper_edit admbg2 admtxt",
|
||||
:href => edit_panel_personal_honor_desktop_personal_honor_path(publication),
|
||||
"callback-method" => "edithonor",
|
||||
"ajax-remote" => "get") + \
|
||||
content_tag(:a, t(:delete_),
|
||||
"ajax-remote" => "delete",
|
||||
"confirm-message" => t("sure?"),
|
||||
"callback-method" => "honorDelete",
|
||||
:class => "journal_paper_delete admbg2 admtxt",
|
||||
:href => panel_personal_honor_desktop_personal_honor_path(publication))
|
||||
end
|
||||
end
|
||||
|
||||
def link_publication_file publication
|
||||
publication.writing_book_files.map{|file|
|
||||
link_to(image_tag(check_file_type(file.file.url)) + \
|
||||
content_tag(:span, file.title, :class => "filetitle"),
|
||||
file.file.url,
|
||||
:class => "file",
|
||||
"target" => "_blank")
|
||||
}.inject(:+)
|
||||
end
|
||||
|
||||
def check_file_type file
|
||||
if not file.nil?
|
||||
file_type = MIME::Types.type_for(file).first.to_s.split("/")[1]
|
||||
file_type = "/assets/ft-icons/#{file_type}/#{file_type}-48_32.png"
|
||||
else
|
||||
file_type = ""
|
||||
end
|
||||
end
|
||||
|
||||
def generate_authors_name ids
|
||||
author_name = ids.map{|m|
|
||||
if m == "0"
|
||||
#{:id => 0, :text => current_user.name, :email => current_user.email }
|
||||
{:id => 0, :text => current_user.name }
|
||||
else
|
||||
#{:id => m, :text => ConferenceCoAuthor.find(m).co_author, :email => ConferenceCoAuthor.find(m).email}
|
||||
{:id => m, :text => ConferenceCoAuthor.find(m).co_author}
|
||||
end
|
||||
}
|
||||
author_name.to_json
|
||||
end
|
||||
end
|
|
@ -0,0 +1,66 @@
|
|||
<div class="toolbar hh1">
|
||||
<div class="fn_g hp">
|
||||
|
||||
<%= f.submit t("save"), name: "commit", class: "fn_btn ini_input hp hh1 thmc2 thmtxt" %>
|
||||
<% if not @honor.new_record? %>
|
||||
<%= submit_tag t("cancel"), :type => "button", "callback-method"=>"cancelhonor", "ajax-remote" => "get", :href => panel_personal_honor_desktop_personal_honors_path, class: "fn_btn ini_input hp hh1 admbg2 admtxt" %>
|
||||
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Share</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">Full</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Group</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overview" content-layout="column" base-width="420">
|
||||
<div column="true">
|
||||
<div class="s_form">
|
||||
<ul>
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", t("personal_honor.award_name"), class: "s_grid_4 s_grid") %><%= f.text_field :award_name, size: "20", class: "s_grid_8 s_grid"%>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", t("personal_honor.awarding_unit"), class: "s_grid_4 s_grid") %><%= f.text_field :awarding_unit, size: "20", class: "s_grid_8 s_grid"%>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", t("personal_honor.year"), class: "s_grid_4 s_grid") %>
|
||||
<%= select_year((@honor.year ? @honor.year.to_i : DateTime.now.year), {:start_year => DateTime.now.year, :end_year => 1930}, {:name => 'honor[year]',:class => 's_grid_4 s_grid'} ) %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", t("personal_honor.honor_category"), class: "s_grid_4 s_grid") %>
|
||||
<%= f.select :honor_category_id, HonorCategory.all.collect {|t| [ t.title, t.id ]}, {:class => "s_grid s_grid_4"} %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", t("personal_honor.url"), class: "s_grid_4 s_grid") %><%= f.text_field :url, size: "20", class: "s_grid_8 s_grid"%>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= f.text_area :keywords, size: "20x3", placeholder: t("personal_honor.keywords"), class: "s_grid_12 s_grid_h_2 s_grid"%>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= f.label :language, t("personal_honor.language"), :class => "s_grid s_grid_4" %>
|
||||
<%= f.select :language, Honor::LANGUAGE_TYPES,{} ,{:class => "s_grid s_grid_8"} %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div column="true">
|
||||
<div class="s_form">
|
||||
<ul>
|
||||
<li class="s_grid_row">
|
||||
<%= f.text_area :note, size: "20x3", placeholder: t("personal_honor.note"), class: "s_grid_12 s_grid s_grid_h_5"%>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,3 @@
|
|||
<%= form_for @honor, html: { multipart: true, "form-type"=>"ajax_form", "callback-method"=>"formCallback"}, url: panel_personal_honor_desktop_personal_honors_path(@personal_book) do |f| %>
|
||||
<%= render partial: 'form', locals: {:f => f} %>
|
||||
<%end%>
|
|
@ -0,0 +1,35 @@
|
|||
<%= stylesheet_link_tag "/assets/personal_honor/desktop/personal_honor" %>
|
||||
<%= javascript_include_tag "personal_honor/desktop/personal_honors" %>
|
||||
<div id="honors">
|
||||
<div id="content">
|
||||
<div id="header" class="hh2">
|
||||
<div class="dtitle w2 hh2 hp">
|
||||
<span class="thmtxth">Honors</span>
|
||||
</div>
|
||||
<div id="search_app" class="hfn w2 hh1 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" content-type="menu">
|
||||
<ul id='setting_left_nav'>
|
||||
<li><a href="<%= panel_personal_honor_desktop_personal_honors_path %>" callback-method="list" class="hh1 w2 hp active thmc1 thmtxt" load="true" onclick='return false;'>List</a></li>
|
||||
<li><a href="<%= new_panel_personal_honor_desktop_personal_honor_path %>" callback-method="addhonor" class="admtxt hh1 w2 hp" onclick='return false;'>Add/Edit</a></li>
|
||||
<!-- <li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Books</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Co-Authors</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Tags & Keywords</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Analysis</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Import</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Export</a></li> -->
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="panel_r" container="true" class="ph pw admbg hp">
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,84 @@
|
|||
<div class="toolbar hh1">
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><span class="icon-check"></span></div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul id="journal_selection_options">
|
||||
<li><a class="hp hh1 admtxt" href="all" ajax-remote="false" callback-method="allnone">All</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="none" ajax-remote="false" callback-method="allnone">None</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">More</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">Delete</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Tag</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Tag</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">All</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Starred</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">MIT</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Status</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">All</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Published</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Pending</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">View</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul id="journal_view_selection">
|
||||
<li><%= link_to "Journal", panel_personal_honor_desktop_personal_honors_path + "?view=book_title", :class => "hp hh1 admtxt", "ajax-remote" => "get" %></li>
|
||||
<li><%= link_to "Title", panel_personal_honor_desktop_personal_honors_path + "?view=paper_title", :class => "hp hh1 admtxt", "ajax-remote" => "get" %></li>
|
||||
<li><%= link_to "File", panel_personal_honor_desktop_personal_honors_path + "?view=file", :class => "hp hh1 admtxt", "ajax-remote" => "get" %></li>
|
||||
<li><%= link_to "Keywords", panel_personal_honor_desktop_personal_honors_path + "?view=keywords", :class => "hp hh1 admtxt", "ajax-remote" => "get" %></li>
|
||||
<li><%= link_to "Abstract", panel_personal_honor_desktop_personal_honors_path + "?view=abstract", :class => "hp hh1 admtxt", "ajax-remote" => "get" %></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Share</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">Full</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Group</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1" id='ns'>New Share</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt remote_url" href="<%= panel_personal_honor_desktop_personal_honors_path %>">Full</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Group</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overview" page-name="journal_p_list" content-layout="datalist" base-width="300" per-column="<%= @per_column.to_s %>" pagination-var="view=<%= @view_by %>&page" >
|
||||
<% @honors.each do |w| %>
|
||||
<%= publication_record w, @view_by%>
|
||||
<% end %>
|
||||
</div>
|
|
@ -0,0 +1,3 @@
|
|||
<%= form_for @honor, html: { multipart: true, "form-type"=>"ajax_form", "callback-method"=>"formCallback"}, url: panel_personal_honor_desktop_personal_honors_path do |f| %>
|
||||
<%= render partial: 'form', locals: {:f => f} %>
|
||||
<%end%>
|
|
@ -1,4 +1,54 @@
|
|||
en:
|
||||
|
||||
module_name:
|
||||
personal_honor: Honor
|
||||
personal_honor: Book
|
||||
personal_honor:
|
||||
paper_title : "Paper Title"
|
||||
book_title : "Book Title"
|
||||
award_name : "Award Name"
|
||||
awarding_unit : "Awarding Unit"
|
||||
honor_category : "Honor Category"
|
||||
extracted_chapters : "Extracted Chapters"
|
||||
publishers : "Publishers"
|
||||
authors : "Authors"
|
||||
tags : "Tags"
|
||||
year : "Year"
|
||||
language : "Language"
|
||||
isbn : "ISSN(ISBN)"
|
||||
vol_no : "Vol.No"
|
||||
issue_no : "Issue.No"
|
||||
form_to_start : "From"
|
||||
form_to_end : "To"
|
||||
total_pages : "Total Pages"
|
||||
keywords : "Keywords"
|
||||
abstract : "Abstract"
|
||||
publication_date : "Date of Publication"
|
||||
url : "Reference URL"
|
||||
note : "Note"
|
||||
level_type : "Level Type"
|
||||
author_type : "Author Type"
|
||||
from : "From"
|
||||
to : "To"
|
||||
file : "File"
|
||||
file_name : "File name"
|
||||
description : "File Description"
|
||||
pages : "Pages"
|
||||
book_paper_type : "Book Paper Type"
|
||||
|
||||
create_success : "Successfully Create"
|
||||
update_success : "Successfully Update"
|
||||
delete_success : "Successfully Delete"
|
||||
add: "Add"
|
||||
back: "Back"
|
||||
delete: "Delete"
|
||||
edit: "Edit"
|
||||
nothing: "Nothing"
|
||||
show: "Show"
|
||||
sure?: "Are you sure?"
|
||||
update: "Update"
|
||||
yes_: "Yes"
|
||||
no_: "No"
|
||||
cancel : "Cancel"
|
||||
save: "save"
|
||||
hintText: "Type in a search term"
|
||||
noResultsText: "No results"
|
||||
searchingText: "Searching…"
|
||||
|
|
|
@ -1,4 +1,54 @@
|
|||
zh_tw:
|
||||
|
||||
module_name:
|
||||
personal_honor: 榮譽
|
||||
personal_honor: 期刊著作
|
||||
personal_honor:
|
||||
paper_title : "論文名稱"
|
||||
book_title : "期刊名稱"
|
||||
award_name : "Award Name"
|
||||
awarding_unit : "Awarding Unit"
|
||||
honor_category : "Honor Category"
|
||||
extracted_chapters : "Extracted Chapters"
|
||||
publishers : "Publishers"
|
||||
authors : "作者"
|
||||
tags : "領域"
|
||||
year : "年度"
|
||||
language : "語言"
|
||||
isbn : "ISSN(ISBN)"
|
||||
vol_no : "卷數"
|
||||
issue_no : "期數"
|
||||
form_to_start : "起"
|
||||
form_to_end : "訖"
|
||||
total_pages : "總頁數"
|
||||
keywords : "關鍵字"
|
||||
abstract : "摘要"
|
||||
publication_date : "發表日期"
|
||||
url : "參考連結"
|
||||
note : "記事"
|
||||
level_type : "期刊類別"
|
||||
author_type : "作者類別"
|
||||
from : "起"
|
||||
to : "訖"
|
||||
file : "檔案"
|
||||
file_name : "檔案名稱"
|
||||
description : "描述"
|
||||
pages : "Pages"
|
||||
book_paper_type : "Book Paper Type"
|
||||
|
||||
create_success : "新增完成!!"
|
||||
update_success : "更新完成!!"
|
||||
delete_success : "刪除成功!!"
|
||||
add: "新增"
|
||||
back: "返回"
|
||||
delete: "刪除"
|
||||
edit: "編輯"
|
||||
nothing: "無"
|
||||
show: "顯示"
|
||||
sure?: "您肯定嗎?"
|
||||
update: "更新"
|
||||
yes_: "是"
|
||||
no_: "否"
|
||||
cancel : "取消"
|
||||
save: "儲存"
|
||||
hintText: "請輸入搜尋關鍵字"
|
||||
noResultsText: "沒有相關的比對結果"
|
||||
searchingText: "搜尋中…"
|
||||
|
|
|
@ -2,6 +2,11 @@ Rails.application.routes.draw do
|
|||
|
||||
namespace :panel do
|
||||
namespace :personal_honor do
|
||||
namespace :desktop do
|
||||
match "honor_window" => "personal_honors#honors_window"
|
||||
resources :personal_honors
|
||||
end
|
||||
|
||||
namespace :back_end do
|
||||
|
||||
match 'honor_setting' => "honors#honor_setting" ,:as => :honor_setting
|
||||
|
|
158
vendor/built_in_modules/personal_lab/app/assets/javascripts/personal_lab/desktop/personal_lab.js
vendored
Normal file
158
vendor/built_in_modules/personal_lab/app/assets/javascripts/personal_lab/desktop/personal_lab.js
vendored
Normal file
|
@ -0,0 +1,158 @@
|
|||
orbitDesktop.prototype.initializePersonalLab = function(target,url,cache){ // this init journal papers
|
||||
this.initializePersonalLab.formCallback = function(data){
|
||||
if(data.success){
|
||||
o.notify(data.msg,"success");
|
||||
o.sub_menu_item($("div[content-type=menu] a").eq(0));
|
||||
}else{
|
||||
o.notify(data.msg,"alert");
|
||||
}
|
||||
}
|
||||
|
||||
this.initializePersonalLab.list = function(){ // to open list part in journal papers page
|
||||
var journalData;
|
||||
var bindHandlers = function(){ // to bind handlers for list page
|
||||
|
||||
}
|
||||
bindHandlers();
|
||||
|
||||
var bindSecondaryHandlers = function(){
|
||||
$("#journal_p div#paper_list a.icon-check-empty").click(function(){
|
||||
if($(this).hasClass("icon-check-empty")){
|
||||
$(this).switchClass("icon-check-empty","icon-check",0);
|
||||
} else if($(this) .hasClass("icon-check")) {
|
||||
$(this).switchClass("icon-check","icon-check-empty",0);
|
||||
} else if($(this).hasClass("icon-star")){
|
||||
$(this).removeClass("icon-star").addClass("icon-star-empty");
|
||||
} else if($(this).hasClass("icon-star-empty")){
|
||||
$(this).removeClass("icon-star-empty").addClass("icon-star");
|
||||
}
|
||||
return false;
|
||||
})
|
||||
}
|
||||
}
|
||||
this.initializePersonalLab.labDelete = function(data,dom){
|
||||
var parent = dom.parent().parent();
|
||||
if(data.success){
|
||||
parent.hide("slide",function(){parent.remove();});
|
||||
o.notify(data.msg,"success");
|
||||
}
|
||||
}
|
||||
|
||||
this.initializePersonalLab.cancellab = function(){
|
||||
o.highlight_sub_menu_item(0);
|
||||
}
|
||||
|
||||
this.initializePersonalLab.editlab = function(){
|
||||
o.highlight_sub_menu_item(1);
|
||||
var uploadFiles = function(){
|
||||
$('#add_plugin_file a.add').click(function(){
|
||||
var new_id = $(this).prev().attr('value');
|
||||
var old_id = new RegExp("new_writing_journal_files", "g");
|
||||
$(this).prev().attr('value', parseInt(new_id) + 1);
|
||||
var x = get_html(old_id,new_id);
|
||||
var newfield = $(x);
|
||||
$(this).parents('table').append(newfield);
|
||||
newfield.find('.action a.delete').click(function(){
|
||||
newfield.remove();
|
||||
});
|
||||
return false;
|
||||
});
|
||||
$('.action a.remove_existing_record').click(function(){
|
||||
$(this).next('.should_destroy').attr('value', 1);
|
||||
$("tr#add_plugin_file_" + $(this).prev().attr('value')).hide();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
var preData = function(){
|
||||
$("#writing_journal_author_tokens").select2('data', JSON.parse($("#writing_journal_author_tokens").attr('data-pre')));
|
||||
}
|
||||
uploadFiles();
|
||||
// preData();
|
||||
}
|
||||
|
||||
this.initializePersonalLab.addlab = function(){ // to open add pages in journal papers page
|
||||
var uploadFiles = function(){
|
||||
$('#add_plugin_file a.add').click(function(){
|
||||
var new_id = $(this).prev().attr('value');
|
||||
var old_id = new RegExp("new_writing_journal_files", "g");
|
||||
$(this).prev().attr('value', parseInt(new_id) + 1);
|
||||
var x = get_html(old_id,new_id);
|
||||
var newfield = $(x);
|
||||
$(this).parents('table').append(newfield);
|
||||
newfield.find('.action a.delete').click(function(){
|
||||
newfield.remove();
|
||||
});
|
||||
return false;
|
||||
});
|
||||
$('.action a.remove_existing_record').click(function(){
|
||||
$(this).next('.should_destroy').attr('value', 1);
|
||||
$("tr#add_plugin_file_" + $(this).prev().attr('value')).hide();
|
||||
});
|
||||
}
|
||||
|
||||
// console.log("hi");
|
||||
var bindHandlers = function(){
|
||||
|
||||
|
||||
}
|
||||
bindHandlers();
|
||||
uploadFiles();
|
||||
|
||||
}
|
||||
|
||||
|
||||
this.initializePersonalLab.coAuthorformCallback = function(data){
|
||||
if(data.success){
|
||||
o.notify(data.msg,"success");
|
||||
o.sub_menu_item($("div[content-type=menu] a").eq(3));
|
||||
}else{
|
||||
o.notify(data.msg,"alert");
|
||||
}
|
||||
}
|
||||
this.initializePersonalLab.coauthor = function(){ // to open add pages in coauthor page
|
||||
var bindHandlers = function(){ // to bind handlers for add page
|
||||
|
||||
}
|
||||
bindHandlers();
|
||||
}
|
||||
this.initializePersonalLab.coauthorRelationForm = function(data){
|
||||
if(data.success){
|
||||
o.notify(data.msg,"success");
|
||||
$("#co_author_relation_table").html(data.newvalue);
|
||||
}else{
|
||||
o.notify(data.msg,"alert");
|
||||
}
|
||||
}
|
||||
this.initializePersonalLab.coauthorRelationEditForm = function(data){
|
||||
if(data.success){
|
||||
o.notify(data.msg,"success");
|
||||
var x = o.layout_data.generate_layout_html(data.newvalue);
|
||||
$("div[container=true] div.overview").html(x.markup);
|
||||
}else{
|
||||
o.notify(data.msg,"alert");
|
||||
}
|
||||
}
|
||||
this.initializePersonalLab.allnone = function(d,o){
|
||||
switch(o.attr("href")){
|
||||
case "all":
|
||||
$("div.overview a.icon-check-empty").removeClass("icon-check-empty").addClass("icon-check");
|
||||
break;
|
||||
case "none":
|
||||
$("div.overview a.icon-check").removeClass("icon-check").addClass("icon-check-empty");
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.initializePersonalLab.allnone = function(d,o){
|
||||
switch(o.attr("href")){
|
||||
case "all":
|
||||
$("div.overview a.icon-check-empty").removeClass("icon-check-empty").addClass("icon-check");
|
||||
break;
|
||||
case "none":
|
||||
$("div.overview a.icon-check").removeClass("icon-check").addClass("icon-check-empty");
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
115
vendor/built_in_modules/personal_lab/app/assets/stylesheets/personal_lab/desktop/personal_lab.css
vendored
Normal file
115
vendor/built_in_modules/personal_lab/app/assets/stylesheets/personal_lab/desktop/personal_lab.css
vendored
Normal file
|
@ -0,0 +1,115 @@
|
|||
/* Books */
|
||||
[page-name="books_list"] .list_t_item .inner {
|
||||
padding-left: 30px; }
|
||||
[page-name="books_list"] .list_item_action {
|
||||
font-size: 12px;
|
||||
float: left;
|
||||
margin-left: -30px; }
|
||||
[page-name="books_list"] .list_item_action a {
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
margin: 1px 1px 6px 1px; }
|
||||
[page-name="books_list"] .list_item_action .icon-star-empty {
|
||||
color: #999;
|
||||
font-size: 20px; }
|
||||
[page-name="books_list"] .list_item_action .icon-star {
|
||||
color: #faa732;
|
||||
font-size: 20px; }
|
||||
[page-name="books_list"] .list_item_action .icon-check-empty {
|
||||
color: #999;
|
||||
font-size: 20px; }
|
||||
[page-name="books_list"] .list_item_action .icon-check {
|
||||
color: #333;
|
||||
font-size: 20px; }
|
||||
[page-name="books_list"] .file_view .list_t_des {
|
||||
overflow: hidden; }
|
||||
[page-name="books_list"] .file_view .file {
|
||||
float: left;
|
||||
width: 120px;
|
||||
height: 50px;
|
||||
padding: 6px;
|
||||
margin: 1px;
|
||||
position: relative;
|
||||
-webkit-box-sizing: border-box;
|
||||
/* webkit */
|
||||
-khtml-box-sizing: border-box;
|
||||
/* konqueror */
|
||||
-moz-box-sizing: border-box;
|
||||
/* firefox */
|
||||
-ms-box-sizing: border-box;
|
||||
/* ie */
|
||||
box-sizing: border-box;
|
||||
/* css3 */ }
|
||||
[page-name="books_list"] .file_view .file:hover {
|
||||
background-color: #f7f7f7; }
|
||||
[page-name="books_list"] .file_view .file img {
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
position: absolute;
|
||||
left: 6px;
|
||||
top: 6px; }
|
||||
[page-name="books_list"] .file_view .file .filetitle {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 38px;
|
||||
padding-left: 40px;
|
||||
overflow: hidden;
|
||||
-webkit-box-sizing: border-box;
|
||||
/* webkit */
|
||||
-khtml-box-sizing: border-box;
|
||||
/* konqueror */
|
||||
-moz-box-sizing: border-box;
|
||||
/* firefox */
|
||||
-ms-box-sizing: border-box;
|
||||
/* ie */
|
||||
box-sizing: border-box;
|
||||
/* css3 */ }
|
||||
|
||||
/* Books Books list */
|
||||
[page-name="books_books"] .datalist_item .inner {
|
||||
padding-left: 30px; }
|
||||
[page-name="books_books"] .list_item_action {
|
||||
font-size: 12px;
|
||||
float: left;
|
||||
margin-left: -30px; }
|
||||
[page-name="books_books"] .list_item_action i {
|
||||
color: #999;
|
||||
font-size: 20px;
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
margin: 1px 1px 6px 1px; }
|
||||
[page-name="books_books"] .list_t_desc {
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
color: #999; }
|
||||
|
||||
/* Books Co-Author */
|
||||
[page-name="books_coauthor"] .list_t_item {
|
||||
height: 110px; }
|
||||
[page-name="books_coauthor"] .list_item_function a {
|
||||
display: inline-block;
|
||||
padding: 4px;
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: 11px;
|
||||
-webkit-text-size-adjust: none; }
|
||||
[page-name="books_coauthor"] .info {
|
||||
font-family: Arial, sans-serif; }
|
||||
[page-name="books_coauthor"] .info li {
|
||||
margin-bottom: 8px;
|
||||
color: #999; }
|
||||
[page-name="books_coauthor"] .info .name {
|
||||
font-size: 18px;
|
||||
line-height: 24px;
|
||||
color: #333; }
|
||||
|
||||
/* Books Co-Author Relationship*/
|
||||
[page-name="books_coauthor_relation"] .edit_co_author_relation {
|
||||
/*margin-left: -10px;*/ }
|
||||
[page-name="books_coauthor_relation"] .form_space {
|
||||
margin-bottom: 10px;
|
||||
font-size: 18px;
|
||||
font-family: Arial, sans-serif; }
|
123
vendor/built_in_modules/personal_lab/app/assets/stylesheets/personal_lab/desktop/personal_lab.scss
vendored
Normal file
123
vendor/built_in_modules/personal_lab/app/assets/stylesheets/personal_lab/desktop/personal_lab.scss
vendored
Normal file
|
@ -0,0 +1,123 @@
|
|||
@import "desktop-helper";
|
||||
|
||||
/* Books */
|
||||
[page-name="books_list"] {
|
||||
.list_t_item .inner { padding-left: 30px; }
|
||||
.list_item_action {
|
||||
font-size: 12px;
|
||||
float: left;
|
||||
margin-left: -30px;
|
||||
|
||||
a {
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
margin: 1px 1px 6px 1px;
|
||||
}
|
||||
.icon-star-empty { color: #999; font-size: 20px; }
|
||||
.icon-star { color: #faa732; font-size: 20px; }
|
||||
.icon-check-empty { color: #999; font-size: 20px; }
|
||||
.icon-check { color: #333; font-size: 20px; }
|
||||
}
|
||||
|
||||
.file_view {
|
||||
.list_t_des {
|
||||
overflow: hidden;
|
||||
}
|
||||
.file {
|
||||
float: left;
|
||||
width: 120px;
|
||||
height: 50px;
|
||||
padding: 6px;
|
||||
margin: 1px;
|
||||
position: relative;
|
||||
@include box-sizing;
|
||||
|
||||
&:hover {
|
||||
background-color: lighten($gray, 10%);
|
||||
}
|
||||
img {
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
position: absolute;
|
||||
left: 6px;
|
||||
top: 6px;
|
||||
}
|
||||
.filetitle {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 38px;
|
||||
padding-left: 40px;
|
||||
overflow: hidden;
|
||||
@include box-sizing;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Books Books list */
|
||||
[page-name="books_books"] {
|
||||
|
||||
.datalist_item .inner {
|
||||
padding-left: 30px;
|
||||
}
|
||||
.list_item_action {
|
||||
font-size: 12px;
|
||||
float: left;
|
||||
margin-left: -30px;
|
||||
}
|
||||
.list_item_action i {
|
||||
color: #999;
|
||||
font-size: 20px;
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
margin: 1px 1px 6px 1px;
|
||||
}
|
||||
.list_t_desc {
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
|
||||
/* Books Co-Author */
|
||||
[page-name="books_coauthor"] {
|
||||
.list_t_item {
|
||||
height: 110px;
|
||||
}
|
||||
.list_item_function {}
|
||||
.list_item_function a {
|
||||
display: inline-block;
|
||||
padding: 4px;
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: 11px;
|
||||
-webkit-text-size-adjust: none;
|
||||
}
|
||||
.info {
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
.info li {
|
||||
margin-bottom: 8px;
|
||||
color: #999;
|
||||
}
|
||||
.info .name {
|
||||
font-size: 18px;
|
||||
line-height: 24px;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
|
||||
/* Books Co-Author Relationship*/
|
||||
[page-name="books_coauthor_relation"]{
|
||||
.edit_co_author_relation {
|
||||
/*margin-left: -10px;*/
|
||||
}
|
||||
.form_space {
|
||||
margin-bottom: 10px;
|
||||
font-size: 18px;
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,71 @@
|
|||
class Panel::PersonalLab::Desktop::PersonalLabsController < ApplicationController
|
||||
|
||||
def index
|
||||
@labs = Lab.where(create_user_id: current_user.id)
|
||||
@view_by = params[:view]
|
||||
page = params[:page]
|
||||
page ||= 1
|
||||
|
||||
@per_column = 5
|
||||
|
||||
case @view_by
|
||||
when "abstract"
|
||||
@per_column = 1
|
||||
when "file"
|
||||
@per_column = 2
|
||||
end
|
||||
|
||||
if @view_by.nil?
|
||||
@view_by = " "
|
||||
@labs = @labs.asc(:paper_title)
|
||||
else
|
||||
@labs = @labs.asc(@view_by).asc(:paper_title)
|
||||
end
|
||||
@labs = @labs.page(page).per(50)
|
||||
respond_to do |format|
|
||||
format.html { render :layout => false}
|
||||
end
|
||||
end
|
||||
|
||||
def new
|
||||
@lab = Lab.new
|
||||
render :layout => false
|
||||
end
|
||||
|
||||
def create
|
||||
params[:lab][:create_user_id] = current_user.id
|
||||
@lab = Lab.new(params[:lab])
|
||||
if @lab.save
|
||||
render json: {success: true, msg: t('create_success')}.to_json
|
||||
else
|
||||
error_msg = @lab.errors.full_messages.join("<br />")
|
||||
render json: {success: false, msg: error_msg}.to_json
|
||||
end
|
||||
end
|
||||
|
||||
def edit
|
||||
@lab = Lab.find(params[:id])
|
||||
render :layout => false
|
||||
end
|
||||
|
||||
def update
|
||||
params[:lab][:create_user_id] = current_user.id
|
||||
@lab = Lab.new(params[:lab])
|
||||
if @lab.update_attributes(params[:lab])
|
||||
render json: {success: true, msg: t('create_success')}.to_json
|
||||
else
|
||||
error_msg = @lab.errors.full_messages.join("<br />")
|
||||
render json: {success: false, msg: error_msg}.to_json
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
@lab = Lab.find(params[:id])
|
||||
@lab.destroy
|
||||
render :json => {success: true, msg: t('delete_success')}
|
||||
end
|
||||
|
||||
def lab_window
|
||||
render :layout => false
|
||||
end
|
||||
end
|
|
@ -0,0 +1,96 @@
|
|||
module Panel::PersonalLab::Desktop::PersonalLabsHelper
|
||||
def publication_record publication, view
|
||||
content_tag :li,
|
||||
"item" => "true",
|
||||
:class => "list_t_item" do
|
||||
marker + \
|
||||
content(publication, view) + \
|
||||
edit_or_delete(publication)
|
||||
end
|
||||
end
|
||||
|
||||
def marker
|
||||
content_tag :div,
|
||||
:class => "list_item_action" do
|
||||
content_tag(:a, "",:href=>"",
|
||||
:class => "icon-check-empty",
|
||||
"toggle-onclick"=>"icon-check-empty icon-check",
|
||||
"ajax-remote"=>"false") + \
|
||||
content_tag(:a, "",:href=>"",
|
||||
:class => "icon-star-empty",
|
||||
"toggle-onclick"=>"icon-star-empty icon-star",
|
||||
"ajax-remote"=>"false")
|
||||
end
|
||||
end
|
||||
|
||||
def content publication, view
|
||||
case view
|
||||
when "lab_title"
|
||||
des = content_tag(:div, publication.lab_title,
|
||||
:class => "list_t_des")
|
||||
when "keywords"
|
||||
des = content_tag(:div, publication.keywords,
|
||||
:class => "list_t_des")
|
||||
when "location"
|
||||
des = content_tag(:div, publication.location,
|
||||
:class => "list_t_des")
|
||||
when "file"
|
||||
des = content_tag(:div, link_publication_file(publication),
|
||||
:class => "list_t_des")
|
||||
else
|
||||
end
|
||||
|
||||
content_tag(:div, publication.lab_title,
|
||||
:class => "list_t_title") + des
|
||||
|
||||
end
|
||||
|
||||
def edit_or_delete publication
|
||||
content_tag :div,
|
||||
:class => "list_item_function" do
|
||||
content_tag(:a, t("edit"),
|
||||
:class => "journal_paper_edit admbg2 admtxt",
|
||||
:href => edit_panel_personal_lab_desktop_personal_lab_path(publication),
|
||||
"callback-method" => "editlab",
|
||||
"ajax-remote" => "get") + \
|
||||
content_tag(:a, t(:delete_),
|
||||
"ajax-remote" => "delete",
|
||||
"confirm-message" => t("sure?"),
|
||||
"callback-method" => "labDelete",
|
||||
:class => "journal_paper_delete admbg2 admtxt",
|
||||
:href => panel_personal_lab_desktop_personal_lab_path(publication))
|
||||
end
|
||||
end
|
||||
|
||||
def link_publication_file publication
|
||||
publication.lab_files.map{|file|
|
||||
link_to(image_tag(check_file_type(file.file.url)) + \
|
||||
content_tag(:span, file.title, :class => "filetitle"),
|
||||
file.file.url,
|
||||
:class => "file",
|
||||
"target" => "_blank")
|
||||
}.inject(:+)
|
||||
end
|
||||
|
||||
def check_file_type file
|
||||
if not file.nil?
|
||||
file_type = MIME::Types.type_for(file).first.to_s.split("/")[1]
|
||||
file_type = "/assets/ft-icons/#{file_type}/#{file_type}-48_32.png"
|
||||
else
|
||||
file_type = ""
|
||||
end
|
||||
end
|
||||
|
||||
def generate_authors_name ids
|
||||
author_name = ids.map{|m|
|
||||
if m == "0"
|
||||
#{:id => 0, :text => current_user.name, :email => current_user.email }
|
||||
{:id => 0, :text => current_user.name }
|
||||
else
|
||||
#{:id => m, :text => ConferenceCoAuthor.find(m).co_author, :email => ConferenceCoAuthor.find(m).email}
|
||||
{:id => m, :text => ConferenceCoAuthor.find(m).co_author}
|
||||
end
|
||||
}
|
||||
author_name.to_json
|
||||
end
|
||||
end
|
|
@ -0,0 +1,141 @@
|
|||
<div class="toolbar hh1">
|
||||
<div class="fn_g hp">
|
||||
|
||||
<%= f.submit t("save"), name: "commit", class: "fn_btn ini_input hp hh1 thmc2 thmtxt" %>
|
||||
<% if not @lab.new_record? %>
|
||||
<%= submit_tag t("cancel"), :type => "button", "callback-method"=>"cancellab", "ajax-remote" => "get", :href => panel_personal_lab_desktop_personal_labs_path, class: "fn_btn ini_input hp hh1 admbg2 admtxt" %>
|
||||
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Share</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">Full</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Group</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overview" content-layout="column" base-width="420">
|
||||
<div column="true">
|
||||
<div class="s_form">
|
||||
<ul>
|
||||
<li class="s_grid_row">
|
||||
<%= f.fields_for :lab_title_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
size: "20",
|
||||
placeholder: t("personal_lab.lab_title"),
|
||||
class: "s_grid_12 s_grid",
|
||||
value: (@lab.lab_title_translations[locale.to_s] rescue nil) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= f.fields_for :location_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
size: "20",
|
||||
placeholder: t("personal_lab.location"),
|
||||
class: "s_grid_12 s_grid",
|
||||
value: (@lab.location_translations[locale.to_s] rescue nil) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= f.fields_for :participating_professor_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
size: "20",
|
||||
placeholder: t("personal_lab.participating_professor"),
|
||||
class: "s_grid_12 s_grid",
|
||||
value: (@lab.participating_professor_translations[locale.to_s] rescue nil) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= f.fields_for :participating_student_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
size: "20",
|
||||
placeholder: t("personal_lab.participating_student"),
|
||||
class: "s_grid_12 s_grid",
|
||||
value: (@lab.participating_student_translations[locale.to_s] rescue nil) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", t("personal_lab.extension_no"), class: "s_grid_4 s_grid") %><%= f.text_field :extension_no, size: "20", class: "s_grid_8 s_grid"%>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", t("personal_lab.research_direction"), class: "s_grid_4 s_grid") %><%= f.text_field :research_direction, size: "20", class: "s_grid_8 s_grid"%>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", t("personal_lab.facility"), class: "s_grid_4 s_grid") %><%= f.text_field :facility, size: "20", class: "s_grid_8 s_grid"%>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", t("personal_project.year"), class: "s_grid_4 s_grid") %>
|
||||
<%= select_year((@lab.year ? @lab.year.to_i : DateTime.now.year), {:start_year => DateTime.now.year, :end_year => 1930}, {:name => 'lab[year]',:class => 's_grid_4 s_grid'} ) %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= f.text_area :keywords, size: "20x3", placeholder: t("personal_lab.keywords"), class: "s_grid_12 s_grid_h_2 s_grid"%>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div column="true">
|
||||
<div class="s_form">
|
||||
<ul>
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", t("personal_lab.url"), class: "s_grid_4 s_grid") %><%= f.text_field :url, size: "20", class: "s_grid_8 s_grid"%>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= f.label :language, t("personal_lab.language"), :class => "s_grid s_grid_4" %>
|
||||
<%= f.select :language, Lab::LANGUAGE_TYPES,{} ,{:class => "s_grid s_grid_8"} %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= f.text_area :note, size: "20x3", placeholder: t("personal_lab.note"), class: "s_grid_12 s_grid s_grid_h_5"%>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div column="true">
|
||||
<div class="s_form">
|
||||
<ul>
|
||||
<li class="s_grid_row">
|
||||
<table class="s_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="s_grid_2"><%= t("personal_lab.file")%></th>
|
||||
<th class="s_grid_4"><%= t("personal_lab.file_name")%></th>
|
||||
<th class="s_grid_4"><%= t("personal_lab.description") %></th>
|
||||
<th class="s_grid_2"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<div id='add_plugin_file' class="info_input plugin_files_block s_action">
|
||||
<%= hidden_field_tag 'plugin_file_field_count', @lab.lab_files.count %>
|
||||
<a class="add setting_btn thmc1 thmtxt w1 hh1 hp" href="#"><i class="icon-plus icon-white"></i> add</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<% @lab.lab_files.each_with_index do |lab_file, i| %>
|
||||
<%= f.fields_for :lab_files, lab_file do |f| %>
|
||||
<%= render :partial => 'form_file', :object => lab_file, :locals => {:f => f, :i => i} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var get_html = function(old_id,new_id){
|
||||
return ("<%= escape_javascript(add_attribute 'form_file', f, :lab_files) %>").replace(old_id, new_id);
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,33 @@
|
|||
<tr id="<%= "plugin_file_#{form_file.id}" if !form_file.new_record? %>" class="list_item">
|
||||
<td>
|
||||
<div>
|
||||
<% if form_file.new_record? %>
|
||||
<%= f.file_field :file, class: "s_grid_2" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<%= f.text_field :title, :class => 's_grid_4' %>
|
||||
</td>
|
||||
<td>
|
||||
<%= f.fields_for :file_title_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
class: 's_grid_4',
|
||||
value: (form_file.file_title_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<span class="action">
|
||||
<% if form_file.new_record? %>
|
||||
<a class="delete"><i class="icon-remove"></i></a>
|
||||
<% else %>
|
||||
<%= f.hidden_field :id %>
|
||||
<a class="remove_existing_record"><i class="icon-remove"></i></a>
|
||||
<%= f.hidden_field :should_destroy, :value => nil, :class => 'should_destroy' %>
|
||||
<% end %>
|
||||
<%= form_file.file.file ? ( link_to '', form_file.file.url, {:class => 'icon-eye-open', :target => '_blank', :title => t(:view)} ) : '' %>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
<%= form_for @lab, html: { multipart: true, "form-type"=>"ajax_form", "callback-method"=>"formCallback"}, url: panel_personal_lab_desktop_personal_labs_path(@lab) do |f| %>
|
||||
<%= render partial: 'form', locals: {:f => f} %>
|
||||
<%end%>
|
|
@ -0,0 +1,83 @@
|
|||
<div class="toolbar hh1">
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><span class="icon-check"></span></div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul id="journal_selection_options">
|
||||
<li><a class="hp hh1 admtxt" href="all" ajax-remote="false" callback-method="allnone">All</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="none" ajax-remote="false" callback-method="allnone">None</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">More</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">Delete</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Tag</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Tag</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">All</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Starred</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">MIT</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Status</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">All</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Published</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Pending</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">View</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul id="journal_view_selection">
|
||||
<li><%= link_to "Title", panel_personal_lab_desktop_personal_labs_path + "?view=lab_title", :class => "hp hh1 admtxt", "ajax-remote" => "get" %></li>
|
||||
<li><%= link_to "File", panel_personal_lab_desktop_personal_labs_path + "?view=file", :class => "hp hh1 admtxt", "ajax-remote" => "get" %></li>
|
||||
<li><%= link_to "Keywords", panel_personal_lab_desktop_personal_labs_path + "?view=keywords", :class => "hp hh1 admtxt", "ajax-remote" => "get" %></li>
|
||||
<li><%= link_to "Location", panel_personal_lab_desktop_personal_labs_path + "?view=location", :class => "hp hh1 admtxt", "ajax-remote" => "get" %></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Share</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">Full</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Group</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1" id='ns'>New Share</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt remote_url" href="<%= panel_personal_lab_desktop_personal_labs_path %>">Full</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Group</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overview" page-name="journal_p_list" content-layout="datalist" base-width="300" per-column="<%= @per_column.to_s %>" pagination-var="view=<%= @view_by %>&page" >
|
||||
<% @labs.each do |w| %>
|
||||
<%= publication_record w, @view_by%>
|
||||
<% end %>
|
||||
</div>
|
|
@ -1,8 +1,10 @@
|
|||
<div id="research_p">
|
||||
<%= stylesheet_link_tag "/assets/personal_lab/desktop/personal_lab" %>
|
||||
<%= javascript_include_tag "personal_lab/desktop/personal_lab" %>
|
||||
<div id="books">
|
||||
<div id="content">
|
||||
<div id="header" class="hh2">
|
||||
<div class="dtitle w2 hh2 hp">
|
||||
<span class="thmtxth">Research Projects</span>
|
||||
<span class="thmtxth">Books</span>
|
||||
</div>
|
||||
<div id="search_app" class="hfn w2 hh1 hp thmc3">
|
||||
<input type="text" class="ini_input form" value="Search" id="searchbox" />
|
||||
|
@ -13,14 +15,14 @@
|
|||
<div id="panel_l" class="ph">
|
||||
<div class="s_menu sm_v" content-type="menu">
|
||||
<ul id='setting_left_nav'>
|
||||
<li><a href="<%= desktop_publications_research_p_list_path %>" callback-method="list" class="hh1 w2 hp active thmc1 thmtxt" onclick='return false;'>List</a></li>
|
||||
<li><a href="<%= desktop_publications_research_p_add_path %>" callback-method="add_this" class="admtxt hh1 w2 hp" onclick='return false;'>Add/Edit</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Projects</a></li>
|
||||
<li><a href="<%= panel_personal_lab_desktop_personal_labs_path %>" callback-method="list" class="hh1 w2 hp active thmc1 thmtxt" load="true" onclick='return false;'>List</a></li>
|
||||
<li><a href="<%= new_panel_personal_lab_desktop_personal_lab_path %>" callback-method="addlab" class="admtxt hh1 w2 hp" onclick='return false;'>Add/Edit</a></li>
|
||||
<!-- <li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Books</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Co-Authors</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Tags & Keywords</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Tags & Keywords</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Analysis</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Import</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Export</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Export</a></li> -->
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,3 @@
|
|||
<%= form_for @lab, html: { multipart: true, "form-type"=>"ajax_form", "callback-method"=>"formCallback"}, url: panel_personal_lab_desktop_personal_labs_path do |f| %>
|
||||
<%= render partial: 'form', locals: {:f => f} %>
|
||||
<%end%>
|
|
@ -1,4 +1,57 @@
|
|||
en:
|
||||
|
||||
module_name:
|
||||
personal_lab: Lab
|
||||
personal_lab: Lab
|
||||
personal_lab:
|
||||
book_title : "Book Title"
|
||||
lab_title : "Lab Title"
|
||||
extracted_chapters : "Extracted Chapters"
|
||||
location : "Location"
|
||||
participating_professor : "Participating Professor"
|
||||
participating_student : "Participating Student"
|
||||
extension_no : "Extension Number"
|
||||
research_direction : "Research Direction"
|
||||
facility : "Facility"
|
||||
publishers : "Publishers"
|
||||
authors : "Authors"
|
||||
tags : "Tags"
|
||||
year : "Year"
|
||||
language : "Language"
|
||||
isbn : "ISSN(ISBN)"
|
||||
vol_no : "Vol.No"
|
||||
issue_no : "Issue.No"
|
||||
form_to_start : "From"
|
||||
form_to_end : "To"
|
||||
total_pages : "Total Pages"
|
||||
keywords : "Keywords"
|
||||
abstract : "Abstract"
|
||||
publication_date : "Date of Publication"
|
||||
url : "Reference URL"
|
||||
note : "Note"
|
||||
level_type : "Level Type"
|
||||
author_type : "Author Type"
|
||||
from : "From"
|
||||
to : "To"
|
||||
file : "File"
|
||||
file_name : "File name"
|
||||
description : "File Description"
|
||||
pages : "Pages"
|
||||
book_paper_type : "Book Paper Type"
|
||||
|
||||
create_success : "Successfully Create"
|
||||
update_success : "Successfully Update"
|
||||
delete_success : "Successfully Delete"
|
||||
add: "Add"
|
||||
back: "Back"
|
||||
delete: "Delete"
|
||||
edit: "Edit"
|
||||
nothing: "Nothing"
|
||||
show: "Show"
|
||||
sure?: "Are you sure?"
|
||||
update: "Update"
|
||||
yes_: "Yes"
|
||||
no_: "No"
|
||||
cancel : "Cancel"
|
||||
save: "save"
|
||||
hintText: "Type in a search term"
|
||||
noResultsText: "No results"
|
||||
searchingText: "Searching…"
|
||||
|
|
|
@ -1,4 +1,57 @@
|
|||
zh_tw:
|
||||
|
||||
module_name:
|
||||
personal_lab: 實驗室
|
||||
personal_lab: Lab
|
||||
personal_lab:
|
||||
book_title : "期刊名稱"
|
||||
lab_title : "Lab Title"
|
||||
extracted_chapters : "Extracted Chapters"
|
||||
participating_professor : "Participating Professor"
|
||||
participating_student : "Participating Student"
|
||||
research_direction : "Research Direction"
|
||||
facility : "Facility"
|
||||
extension_no : "Extension Number"
|
||||
location : "Location"
|
||||
publishers : "Publishers"
|
||||
authors : "作者"
|
||||
tags : "領域"
|
||||
year : "年度"
|
||||
language : "語言"
|
||||
isbn : "ISSN(ISBN)"
|
||||
vol_no : "卷數"
|
||||
issue_no : "期數"
|
||||
form_to_start : "起"
|
||||
form_to_end : "訖"
|
||||
total_pages : "總頁數"
|
||||
keywords : "關鍵字"
|
||||
abstract : "摘要"
|
||||
publication_date : "發表日期"
|
||||
url : "參考連結"
|
||||
note : "記事"
|
||||
level_type : "期刊類別"
|
||||
author_type : "作者類別"
|
||||
from : "起"
|
||||
to : "訖"
|
||||
file : "檔案"
|
||||
file_name : "檔案名稱"
|
||||
description : "描述"
|
||||
pages : "Pages"
|
||||
book_paper_type : "Book Paper Type"
|
||||
|
||||
create_success : "新增完成!!"
|
||||
update_success : "更新完成!!"
|
||||
delete_success : "刪除成功!!"
|
||||
add: "新增"
|
||||
back: "返回"
|
||||
delete: "刪除"
|
||||
edit: "編輯"
|
||||
nothing: "無"
|
||||
show: "顯示"
|
||||
sure?: "您肯定嗎?"
|
||||
update: "更新"
|
||||
yes_: "是"
|
||||
no_: "否"
|
||||
cancel : "取消"
|
||||
save: "儲存"
|
||||
hintText: "請輸入搜尋關鍵字"
|
||||
noResultsText: "沒有相關的比對結果"
|
||||
searchingText: "搜尋中…"
|
||||
|
|
|
@ -2,6 +2,10 @@ Rails.application.routes.draw do
|
|||
|
||||
namespace :panel do
|
||||
namespace :personal_lab do
|
||||
namespace :desktop do
|
||||
match "lab_window" => "personal_labs#lab_window"
|
||||
resources :personal_labs
|
||||
end
|
||||
namespace :back_end do
|
||||
|
||||
match 'lab_setting' => "labs#lab_setting" ,:as => :lab_setting
|
||||
|
|
|
@ -0,0 +1,158 @@
|
|||
orbitDesktop.prototype.initializePersonalPatent = function(target,url,cache){ // this init journal papers
|
||||
this.initializePersonalPatent.formCallback = function(data){
|
||||
if(data.success){
|
||||
o.notify(data.msg,"success");
|
||||
o.sub_menu_item($("div[content-type=menu] a").eq(0));
|
||||
}else{
|
||||
o.notify(data.msg,"alert");
|
||||
}
|
||||
}
|
||||
|
||||
this.initializePersonalPatent.list = function(){ // to open list part in journal papers page
|
||||
var journalData;
|
||||
var bindHandlers = function(){ // to bind handlers for list page
|
||||
|
||||
}
|
||||
bindHandlers();
|
||||
|
||||
var bindSecondaryHandlers = function(){
|
||||
$("#journal_p div#paper_list a.icon-check-empty").click(function(){
|
||||
if($(this).hasClass("icon-check-empty")){
|
||||
$(this).switchClass("icon-check-empty","icon-check",0);
|
||||
} else if($(this) .hasClass("icon-check")) {
|
||||
$(this).switchClass("icon-check","icon-check-empty",0);
|
||||
} else if($(this).hasClass("icon-star")){
|
||||
$(this).removeClass("icon-star").addClass("icon-star-empty");
|
||||
} else if($(this).hasClass("icon-star-empty")){
|
||||
$(this).removeClass("icon-star-empty").addClass("icon-star");
|
||||
}
|
||||
return false;
|
||||
})
|
||||
}
|
||||
}
|
||||
this.initializePersonalPatent.patentDelete = function(data,dom){
|
||||
var parent = dom.parent().parent();
|
||||
if(data.success){
|
||||
parent.hide("slide",function(){parent.remove();});
|
||||
o.notify(data.msg,"success");
|
||||
}
|
||||
}
|
||||
|
||||
this.initializePersonalPatent.cancelpatent = function(){
|
||||
o.highlight_sub_menu_item(0);
|
||||
}
|
||||
|
||||
this.initializePersonalPatent.editpatent = function(){
|
||||
o.highlight_sub_menu_item(1);
|
||||
var uploadFiles = function(){
|
||||
$('#add_plugin_file a.add').click(function(){
|
||||
var new_id = $(this).prev().attr('value');
|
||||
var old_id = new RegExp("new_writing_journal_files", "g");
|
||||
$(this).prev().attr('value', parseInt(new_id) + 1);
|
||||
var x = get_html(old_id,new_id);
|
||||
var newfield = $(x);
|
||||
$(this).parents('table').append(newfield);
|
||||
newfield.find('.action a.delete').click(function(){
|
||||
newfield.remove();
|
||||
});
|
||||
return false;
|
||||
});
|
||||
$('.action a.remove_existing_record').click(function(){
|
||||
$(this).next('.should_destroy').attr('value', 1);
|
||||
$("tr#add_plugin_file_" + $(this).prev().attr('value')).hide();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
var preData = function(){
|
||||
$("#writing_journal_author_tokens").select2('data', JSON.parse($("#writing_journal_author_tokens").attr('data-pre')));
|
||||
}
|
||||
uploadFiles();
|
||||
// preData();
|
||||
}
|
||||
|
||||
this.initializePersonalPatent.addpatent = function(){ // to open add pages in journal papers page
|
||||
var uploadFiles = function(){
|
||||
$('#add_plugin_file a.add').click(function(){
|
||||
var new_id = $(this).prev().attr('value');
|
||||
var old_id = new RegExp("new_writing_journal_files", "g");
|
||||
$(this).prev().attr('value', parseInt(new_id) + 1);
|
||||
var x = get_html(old_id,new_id);
|
||||
var newfield = $(x);
|
||||
$(this).parents('table').append(newfield);
|
||||
newfield.find('.action a.delete').click(function(){
|
||||
newfield.remove();
|
||||
});
|
||||
return false;
|
||||
});
|
||||
$('.action a.remove_existing_record').click(function(){
|
||||
$(this).next('.should_destroy').attr('value', 1);
|
||||
$("tr#add_plugin_file_" + $(this).prev().attr('value')).hide();
|
||||
});
|
||||
}
|
||||
|
||||
// console.log("hi");
|
||||
var bindHandlers = function(){
|
||||
|
||||
|
||||
}
|
||||
bindHandlers();
|
||||
uploadFiles();
|
||||
|
||||
}
|
||||
|
||||
|
||||
this.initializePersonalPatent.coAuthorformCallback = function(data){
|
||||
if(data.success){
|
||||
o.notify(data.msg,"success");
|
||||
o.sub_menu_item($("div[content-type=menu] a").eq(3));
|
||||
}else{
|
||||
o.notify(data.msg,"alert");
|
||||
}
|
||||
}
|
||||
this.initializePersonalPatent.coauthor = function(){ // to open add pages in coauthor page
|
||||
var bindHandlers = function(){ // to bind handlers for add page
|
||||
|
||||
}
|
||||
bindHandlers();
|
||||
}
|
||||
this.initializePersonalPatent.coauthorRelationForm = function(data){
|
||||
if(data.success){
|
||||
o.notify(data.msg,"success");
|
||||
$("#co_author_relation_table").html(data.newvalue);
|
||||
}else{
|
||||
o.notify(data.msg,"alert");
|
||||
}
|
||||
}
|
||||
this.initializePersonalPatent.coauthorRelationEditForm = function(data){
|
||||
if(data.success){
|
||||
o.notify(data.msg,"success");
|
||||
var x = o.layout_data.generate_layout_html(data.newvalue);
|
||||
$("div[container=true] div.overview").html(x.markup);
|
||||
}else{
|
||||
o.notify(data.msg,"alert");
|
||||
}
|
||||
}
|
||||
this.initializePersonalPatent.allnone = function(d,o){
|
||||
switch(o.attr("href")){
|
||||
case "all":
|
||||
$("div.overview a.icon-check-empty").removeClass("icon-check-empty").addClass("icon-check");
|
||||
break;
|
||||
case "none":
|
||||
$("div.overview a.icon-check").removeClass("icon-check").addClass("icon-check-empty");
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.initializePersonalPatent.allnone = function(d,o){
|
||||
switch(o.attr("href")){
|
||||
case "all":
|
||||
$("div.overview a.icon-check-empty").removeClass("icon-check-empty").addClass("icon-check");
|
||||
break;
|
||||
case "none":
|
||||
$("div.overview a.icon-check").removeClass("icon-check").addClass("icon-check-empty");
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -0,0 +1,115 @@
|
|||
/* Books */
|
||||
[page-name="books_list"] .list_t_item .inner {
|
||||
padding-left: 30px; }
|
||||
[page-name="books_list"] .list_item_action {
|
||||
font-size: 12px;
|
||||
float: left;
|
||||
margin-left: -30px; }
|
||||
[page-name="books_list"] .list_item_action a {
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
margin: 1px 1px 6px 1px; }
|
||||
[page-name="books_list"] .list_item_action .icon-star-empty {
|
||||
color: #999;
|
||||
font-size: 20px; }
|
||||
[page-name="books_list"] .list_item_action .icon-star {
|
||||
color: #faa732;
|
||||
font-size: 20px; }
|
||||
[page-name="books_list"] .list_item_action .icon-check-empty {
|
||||
color: #999;
|
||||
font-size: 20px; }
|
||||
[page-name="books_list"] .list_item_action .icon-check {
|
||||
color: #333;
|
||||
font-size: 20px; }
|
||||
[page-name="books_list"] .file_view .list_t_des {
|
||||
overflow: hidden; }
|
||||
[page-name="books_list"] .file_view .file {
|
||||
float: left;
|
||||
width: 120px;
|
||||
height: 50px;
|
||||
padding: 6px;
|
||||
margin: 1px;
|
||||
position: relative;
|
||||
-webkit-box-sizing: border-box;
|
||||
/* webkit */
|
||||
-khtml-box-sizing: border-box;
|
||||
/* konqueror */
|
||||
-moz-box-sizing: border-box;
|
||||
/* firefox */
|
||||
-ms-box-sizing: border-box;
|
||||
/* ie */
|
||||
box-sizing: border-box;
|
||||
/* css3 */ }
|
||||
[page-name="books_list"] .file_view .file:hover {
|
||||
background-color: #f7f7f7; }
|
||||
[page-name="books_list"] .file_view .file img {
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
position: absolute;
|
||||
left: 6px;
|
||||
top: 6px; }
|
||||
[page-name="books_list"] .file_view .file .filetitle {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 38px;
|
||||
padding-left: 40px;
|
||||
overflow: hidden;
|
||||
-webkit-box-sizing: border-box;
|
||||
/* webkit */
|
||||
-khtml-box-sizing: border-box;
|
||||
/* konqueror */
|
||||
-moz-box-sizing: border-box;
|
||||
/* firefox */
|
||||
-ms-box-sizing: border-box;
|
||||
/* ie */
|
||||
box-sizing: border-box;
|
||||
/* css3 */ }
|
||||
|
||||
/* Books Books list */
|
||||
[page-name="books_books"] .datalist_item .inner {
|
||||
padding-left: 30px; }
|
||||
[page-name="books_books"] .list_item_action {
|
||||
font-size: 12px;
|
||||
float: left;
|
||||
margin-left: -30px; }
|
||||
[page-name="books_books"] .list_item_action i {
|
||||
color: #999;
|
||||
font-size: 20px;
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
margin: 1px 1px 6px 1px; }
|
||||
[page-name="books_books"] .list_t_desc {
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
color: #999; }
|
||||
|
||||
/* Books Co-Author */
|
||||
[page-name="books_coauthor"] .list_t_item {
|
||||
height: 110px; }
|
||||
[page-name="books_coauthor"] .list_item_function a {
|
||||
display: inline-block;
|
||||
padding: 4px;
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: 11px;
|
||||
-webkit-text-size-adjust: none; }
|
||||
[page-name="books_coauthor"] .info {
|
||||
font-family: Arial, sans-serif; }
|
||||
[page-name="books_coauthor"] .info li {
|
||||
margin-bottom: 8px;
|
||||
color: #999; }
|
||||
[page-name="books_coauthor"] .info .name {
|
||||
font-size: 18px;
|
||||
line-height: 24px;
|
||||
color: #333; }
|
||||
|
||||
/* Books Co-Author Relationship*/
|
||||
[page-name="books_coauthor_relation"] .edit_co_author_relation {
|
||||
/*margin-left: -10px;*/ }
|
||||
[page-name="books_coauthor_relation"] .form_space {
|
||||
margin-bottom: 10px;
|
||||
font-size: 18px;
|
||||
font-family: Arial, sans-serif; }
|
|
@ -0,0 +1,123 @@
|
|||
@import "desktop-helper";
|
||||
|
||||
/* Books */
|
||||
[page-name="books_list"] {
|
||||
.list_t_item .inner { padding-left: 30px; }
|
||||
.list_item_action {
|
||||
font-size: 12px;
|
||||
float: left;
|
||||
margin-left: -30px;
|
||||
|
||||
a {
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
margin: 1px 1px 6px 1px;
|
||||
}
|
||||
.icon-star-empty { color: #999; font-size: 20px; }
|
||||
.icon-star { color: #faa732; font-size: 20px; }
|
||||
.icon-check-empty { color: #999; font-size: 20px; }
|
||||
.icon-check { color: #333; font-size: 20px; }
|
||||
}
|
||||
|
||||
.file_view {
|
||||
.list_t_des {
|
||||
overflow: hidden;
|
||||
}
|
||||
.file {
|
||||
float: left;
|
||||
width: 120px;
|
||||
height: 50px;
|
||||
padding: 6px;
|
||||
margin: 1px;
|
||||
position: relative;
|
||||
@include box-sizing;
|
||||
|
||||
&:hover {
|
||||
background-color: lighten($gray, 10%);
|
||||
}
|
||||
img {
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
position: absolute;
|
||||
left: 6px;
|
||||
top: 6px;
|
||||
}
|
||||
.filetitle {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 38px;
|
||||
padding-left: 40px;
|
||||
overflow: hidden;
|
||||
@include box-sizing;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Books Books list */
|
||||
[page-name="books_books"] {
|
||||
|
||||
.datalist_item .inner {
|
||||
padding-left: 30px;
|
||||
}
|
||||
.list_item_action {
|
||||
font-size: 12px;
|
||||
float: left;
|
||||
margin-left: -30px;
|
||||
}
|
||||
.list_item_action i {
|
||||
color: #999;
|
||||
font-size: 20px;
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
margin: 1px 1px 6px 1px;
|
||||
}
|
||||
.list_t_desc {
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
|
||||
/* Books Co-Author */
|
||||
[page-name="books_coauthor"] {
|
||||
.list_t_item {
|
||||
height: 110px;
|
||||
}
|
||||
.list_item_function {}
|
||||
.list_item_function a {
|
||||
display: inline-block;
|
||||
padding: 4px;
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: 11px;
|
||||
-webkit-text-size-adjust: none;
|
||||
}
|
||||
.info {
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
.info li {
|
||||
margin-bottom: 8px;
|
||||
color: #999;
|
||||
}
|
||||
.info .name {
|
||||
font-size: 18px;
|
||||
line-height: 24px;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
|
||||
/* Books Co-Author Relationship*/
|
||||
[page-name="books_coauthor_relation"]{
|
||||
.edit_co_author_relation {
|
||||
/*margin-left: -10px;*/
|
||||
}
|
||||
.form_space {
|
||||
margin-bottom: 10px;
|
||||
font-size: 18px;
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,71 @@
|
|||
class Panel::PersonalPatent::Desktop::PersonalPatentsController < ApplicationController
|
||||
|
||||
def index
|
||||
@patents = WritingPatent.where(create_user_id: current_user.id)
|
||||
@view_by = params[:view]
|
||||
page = params[:page]
|
||||
page ||= 1
|
||||
|
||||
@per_column = 5
|
||||
|
||||
case @view_by
|
||||
when "abstract"
|
||||
@per_column = 1
|
||||
when "file"
|
||||
@per_column = 2
|
||||
end
|
||||
|
||||
if @view_by.nil?
|
||||
@view_by = " "
|
||||
@patents = @patents.asc(:paper_title)
|
||||
else
|
||||
@patents = @patents.asc(@view_by).asc(:paper_title)
|
||||
end
|
||||
@patents = @patents.page(page).per(50)
|
||||
respond_to do |format|
|
||||
format.html { render :layout => false}
|
||||
end
|
||||
end
|
||||
|
||||
def new
|
||||
@patent = WritingPatent.new
|
||||
render :layout => false
|
||||
end
|
||||
|
||||
def create
|
||||
params[:writing_patent][:create_user_id] = current_user.id
|
||||
@patent = WritingPatent.new(params[:writing_patent])
|
||||
if @patent.save
|
||||
render json: {success: true, msg: t('create_success')}.to_json
|
||||
else
|
||||
error_msg = @patent.errors.full_messages.join("<br />")
|
||||
render json: {success: false, msg: error_msg}.to_json
|
||||
end
|
||||
end
|
||||
|
||||
def edit
|
||||
@patent = WritingPatent.find(params[:id])
|
||||
render :layout => false
|
||||
end
|
||||
|
||||
def update
|
||||
params[:writing_patent][:create_user_id] = current_user.id
|
||||
@patent = WritingPatent.new(params[:writing_patent])
|
||||
if @patent.update_attributes(params[:writing_patent])
|
||||
render json: {success: true, msg: t('create_success')}.to_json
|
||||
else
|
||||
error_msg = @patent.errors.full_messages.join("<br />")
|
||||
render json: {success: false, msg: error_msg}.to_json
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
@patent = WritingPatent.find(params[:id])
|
||||
@patent.destroy
|
||||
render :json => {success: true, msg: t('delete_success')}
|
||||
end
|
||||
|
||||
def patent_window
|
||||
render :layout => false
|
||||
end
|
||||
end
|
|
@ -0,0 +1,96 @@
|
|||
module Panel::PersonalPatent::Desktop::PersonalPatentsHelper
|
||||
def publication_record publication, view
|
||||
content_tag :li,
|
||||
"item" => "true",
|
||||
:class => "list_t_item" do
|
||||
marker + \
|
||||
content(publication, view) + \
|
||||
edit_or_delete(publication)
|
||||
end
|
||||
end
|
||||
|
||||
def marker
|
||||
content_tag :div,
|
||||
:class => "list_item_action" do
|
||||
content_tag(:a, "",:href=>"",
|
||||
:class => "icon-check-empty",
|
||||
"toggle-onclick"=>"icon-check-empty icon-check",
|
||||
"ajax-remote"=>"false") + \
|
||||
content_tag(:a, "",:href=>"",
|
||||
:class => "icon-star-empty",
|
||||
"toggle-onclick"=>"icon-star-empty icon-star",
|
||||
"ajax-remote"=>"false")
|
||||
end
|
||||
end
|
||||
|
||||
def content publication, view
|
||||
case view
|
||||
when "patent_title"
|
||||
des = content_tag(:div, publication.patent_title,
|
||||
:class => "list_t_des")
|
||||
when "keywords"
|
||||
des = content_tag(:div, publication.keywords,
|
||||
:class => "list_t_des")
|
||||
when "abstract"
|
||||
des = content_tag(:div, publication.abstract,
|
||||
:class => "list_t_des")
|
||||
when "file"
|
||||
des = content_tag(:div, link_publication_file(publication),
|
||||
:class => "list_t_des")
|
||||
else
|
||||
end
|
||||
|
||||
content_tag(:div, publication.patent_title,
|
||||
:class => "list_t_title") + des
|
||||
|
||||
end
|
||||
|
||||
def edit_or_delete publication
|
||||
content_tag :div,
|
||||
:class => "list_item_function" do
|
||||
content_tag(:a, t("edit"),
|
||||
:class => "journal_paper_edit admbg2 admtxt",
|
||||
:href => edit_panel_personal_patent_desktop_personal_patent_path(publication),
|
||||
"callback-method" => "editpatent",
|
||||
"ajax-remote" => "get") + \
|
||||
content_tag(:a, t(:delete_),
|
||||
"ajax-remote" => "delete",
|
||||
"confirm-message" => t("sure?"),
|
||||
"callback-method" => "patentDelete",
|
||||
:class => "journal_paper_delete admbg2 admtxt",
|
||||
:href => panel_personal_patent_desktop_personal_patent_path(publication))
|
||||
end
|
||||
end
|
||||
|
||||
def link_publication_file publication
|
||||
publication.writing_patent_files.map{|file|
|
||||
link_to(image_tag(check_file_type(file.file.url)) + \
|
||||
content_tag(:span, file.title, :class => "filetitle"),
|
||||
file.file.url,
|
||||
:class => "file",
|
||||
"target" => "_blank")
|
||||
}.inject(:+)
|
||||
end
|
||||
|
||||
def check_file_type file
|
||||
if not file.nil?
|
||||
file_type = MIME::Types.type_for(file).first.to_s.split("/")[1]
|
||||
file_type = "/assets/ft-icons/#{file_type}/#{file_type}-48_32.png"
|
||||
else
|
||||
file_type = ""
|
||||
end
|
||||
end
|
||||
|
||||
def generate_authors_name ids
|
||||
author_name = ids.map{|m|
|
||||
if m == "0"
|
||||
#{:id => 0, :text => current_user.name, :email => current_user.email }
|
||||
{:id => 0, :text => current_user.name }
|
||||
else
|
||||
#{:id => m, :text => ConferenceCoAuthor.find(m).co_author, :email => ConferenceCoAuthor.find(m).email}
|
||||
{:id => m, :text => ConferenceCoAuthor.find(m).co_author}
|
||||
end
|
||||
}
|
||||
author_name.to_json
|
||||
end
|
||||
end
|
|
@ -0,0 +1,120 @@
|
|||
<div class="toolbar hh1">
|
||||
<div class="fn_g hp">
|
||||
|
||||
<%= f.submit t("save"), name: "commit", class: "fn_btn ini_input hp hh1 thmc2 thmtxt" %>
|
||||
<% if not @patent.new_record? %>
|
||||
<%= submit_tag t("cancel"), :type => "button", "callback-method"=>"cancelpatent", "ajax-remote" => "get", :href => panel_personal_patent_desktop_personal_patents_path, class: "fn_btn ini_input hp hh1 admbg2 admtxt" %>
|
||||
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Share</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">Full</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Group</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overview" content-layout="column" base-width="420">
|
||||
<div column="true">
|
||||
<div class="s_form">
|
||||
<ul>
|
||||
<li class="s_grid_row">
|
||||
<%= f.fields_for :patent_title_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
size: "20",
|
||||
placeholder: t("personal_patent.patent_title"),
|
||||
class: "s_grid_12 s_grid",
|
||||
value: (@patent.patent_title_translations[locale.to_s] rescue nil) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", t("personal_patent.patent_no"), class: "s_grid_4 s_grid") %><%= f.text_field :patent_no, size: "20", class: "s_grid_8 s_grid"%>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", t("personal_patent.patent_country"), class: "s_grid_4 s_grid") %><%= f.text_field :patent_country, size: "20", class: "s_grid_8 s_grid"%>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", t("personal_patent.publication_date"), class: "s_grid_4 s_grid") %>
|
||||
<%= f.date_select :publish_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year] }, {:class => 's_grid_4 s_grid'} %>
|
||||
<%= f.date_select :publish_date, {:use_month_numbers => true, :order => [:month, :day] }, {:class => 's_grid_2 s_grid'} %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", t("personal_patent.patent_category"), class: "s_grid_4 s_grid") %>
|
||||
<%= f.select :writing_patent_category_id, WritingPatentCategory.all.collect {|t| [ t.title, t.id ]}, {:class => "s_grid s_grid_8"} %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", t("personal_project.year"), class: "s_grid_4 s_grid") %>
|
||||
<%= select_year((@patent.year ? @patent.year.to_i : DateTime.now.year), {:start_year => DateTime.now.year, :end_year => 1930}, {:name => 'writing_patent[year]',:class => 's_grid_4 s_grid'} ) %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", t("personal_patent.url"), class: "s_grid_4 s_grid") %><%= f.text_field :url, size: "20", class: "s_grid_8 s_grid"%>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= f.text_area :keywords, size: "20x3", placeholder: t("personal_patent.keywords"), class: "s_grid_12 s_grid_h_2 s_grid"%>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= f.label :language, t("personal_patent.language"), :class => "s_grid s_grid_4" %>
|
||||
<%= f.select :language, WritingPatent::LANGUAGE_TYPES,{} ,{:class => "s_grid s_grid_8"} %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div column="true">
|
||||
<div class="s_form">
|
||||
<ul>
|
||||
<li class="s_grid_row">
|
||||
<%= f.text_area :note, size: "20x3", placeholder: t("personal_patent.note"), class: "s_grid_12 s_grid s_grid_h_5"%>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div column="true">
|
||||
<div class="s_form">
|
||||
<ul>
|
||||
<li class="s_grid_row">
|
||||
<table class="s_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="s_grid_2"><%= t("personal_patent.file")%></th>
|
||||
<th class="s_grid_4"><%= t("personal_patent.file_name")%></th>
|
||||
<th class="s_grid_4"><%= t("personal_patent.description") %></th>
|
||||
<th class="s_grid_2"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<div id='add_plugin_file' class="info_input plugin_files_block s_action">
|
||||
<%= hidden_field_tag 'plugin_file_field_count', @patent.writing_patent_files.count %>
|
||||
<a class="add setting_btn thmc1 thmtxt w1 hh1 hp" href="#"><i class="icon-plus icon-white"></i> add</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<% @patent.writing_patent_files.each_with_index do |writing_patent_file, i| %>
|
||||
<%= f.fields_for :writing_patent_files, writing_patent_file do |f| %>
|
||||
<%= render :partial => 'form_file', :object => writing_patent_file, :locals => {:f => f, :i => i} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var get_html = function(old_id,new_id){
|
||||
return ("<%= escape_javascript(add_attribute 'form_file', f, :writing_patent_files) %>").replace(old_id, new_id);
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,33 @@
|
|||
<tr id="<%= "plugin_file_#{form_file.id}" if !form_file.new_record? %>" class="list_item">
|
||||
<td>
|
||||
<div>
|
||||
<% if form_file.new_record? %>
|
||||
<%= f.file_field :file, class: "s_grid_2" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<%= f.text_field :title, :class => 's_grid_4' %>
|
||||
</td>
|
||||
<td>
|
||||
<%= f.fields_for :file_title_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
class: 's_grid_4',
|
||||
value: (form_file.file_title_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<span class="action">
|
||||
<% if form_file.new_record? %>
|
||||
<a class="delete"><i class="icon-remove"></i></a>
|
||||
<% else %>
|
||||
<%= f.hidden_field :id %>
|
||||
<a class="remove_existing_record"><i class="icon-remove"></i></a>
|
||||
<%= f.hidden_field :should_destroy, :value => nil, :class => 'should_destroy' %>
|
||||
<% end %>
|
||||
<%= form_file.file.file ? ( link_to '', form_file.file.url, {:class => 'icon-eye-open', :target => '_blank', :title => t(:view)} ) : '' %>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
<%= form_for @patent, html: { multipart: true, "form-type"=>"ajax_form", "callback-method"=>"formCallback"}, url: panel_personal_patent_desktop_personal_patents_path(@patent) do |f| %>
|
||||
<%= render partial: 'form', locals: {:f => f} %>
|
||||
<%end%>
|
|
@ -0,0 +1,82 @@
|
|||
<div class="toolbar hh1">
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><span class="icon-check"></span></div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul id="journal_selection_options">
|
||||
<li><a class="hp hh1 admtxt" href="all" ajax-remote="false" callback-method="allnone">All</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="none" ajax-remote="false" callback-method="allnone">None</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">More</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">Delete</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Tag</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Tag</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">All</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Starred</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">MIT</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Status</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">All</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Published</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Pending</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">View</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul id="journal_view_selection">
|
||||
<li><%= link_to "Title", panel_personal_patent_desktop_personal_patents_path + "?view=patent_title", :class => "hp hh1 admtxt", "ajax-remote" => "get" %></li>
|
||||
<li><%= link_to "File", panel_personal_patent_desktop_personal_patents_path + "?view=file", :class => "hp hh1 admtxt", "ajax-remote" => "get" %></li>
|
||||
<li><%= link_to "Keywords", panel_personal_patent_desktop_personal_patents_path + "?view=keywords", :class => "hp hh1 admtxt", "ajax-remote" => "get" %></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Share</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">Full</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Group</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1" id='ns'>New Share</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt remote_url" href="<%= panel_personal_patent_desktop_personal_patents_path %>">Full</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Group</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overview" page-name="journal_p_list" content-layout="datalist" base-width="300" per-column="<%= @per_column.to_s %>" pagination-var="view=<%= @view_by %>&page" >
|
||||
<% @patents.each do |w| %>
|
||||
<%= publication_record w, @view_by%>
|
||||
<% end %>
|
||||
</div>
|
|
@ -0,0 +1,3 @@
|
|||
<%= form_for @patent, html: { multipart: true, "form-type"=>"ajax_form", "callback-method"=>"formCallback"}, url: panel_personal_patent_desktop_personal_patents_path do |f| %>
|
||||
<%= render partial: 'form', locals: {:f => f} %>
|
||||
<%end%>
|
|
@ -0,0 +1,35 @@
|
|||
<%= stylesheet_link_tag "/assets/personal_patent/desktop/personal_patent" %>
|
||||
<%= javascript_include_tag "personal_patent/desktop/personal_patent" %>
|
||||
<div id="patent">
|
||||
<div id="content">
|
||||
<div id="header" class="hh2">
|
||||
<div class="dtitle w2 hh2 hp">
|
||||
<span class="thmtxth">Patents</span>
|
||||
</div>
|
||||
<div id="search_app" class="hfn w2 hh1 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" content-type="menu">
|
||||
<ul id='setting_left_nav'>
|
||||
<li><a href="<%= panel_personal_patent_desktop_personal_patents_path %>" callback-method="list" class="hh1 w2 hp active thmc1 thmtxt" load="true" onclick='return false;'>List</a></li>
|
||||
<li><a href="<%= new_panel_personal_patent_desktop_personal_patent_path %>" callback-method="addpatent" class="admtxt hh1 w2 hp" onclick='return false;'>Add/Edit</a></li>
|
||||
<!-- <li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Books</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Co-Authors</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Tags & Keywords</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Analysis</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Import</a></li>
|
||||
<li><a href="" class="admtxt hh1 w2 hp" onclick='return false;'>Export</a></li> -->
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="panel_r" container="true" class="ph pw admbg hp">
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,4 +1,54 @@
|
|||
en:
|
||||
|
||||
module_name:
|
||||
personal_patent: Patent
|
||||
personal_patent: Patent
|
||||
personal_patent:
|
||||
patent_title : "Patent Title"
|
||||
book_title : "Book Title"
|
||||
extracted_chapters : "Extracted Chapters"
|
||||
patent_no : "Patent Number"
|
||||
patent_country : "Patent Country"
|
||||
patent_category : "Patent Category"
|
||||
publishers : "Publishers"
|
||||
authors : "Authors"
|
||||
tags : "Tags"
|
||||
year : "Year"
|
||||
language : "Language"
|
||||
isbn : "ISSN(ISBN)"
|
||||
vol_no : "Vol.No"
|
||||
issue_no : "Issue.No"
|
||||
form_to_start : "From"
|
||||
form_to_end : "To"
|
||||
total_pages : "Total Pages"
|
||||
keywords : "Keywords"
|
||||
abstract : "Abstract"
|
||||
publication_date : "Date of Publication"
|
||||
url : "Reference URL"
|
||||
note : "Note"
|
||||
level_type : "Level Type"
|
||||
author_type : "Author Type"
|
||||
from : "From"
|
||||
to : "To"
|
||||
file : "File"
|
||||
file_name : "File name"
|
||||
description : "File Description"
|
||||
pages : "Pages"
|
||||
book_paper_type : "Book Paper Type"
|
||||
|
||||
create_success : "Successfully Create"
|
||||
update_success : "Successfully Update"
|
||||
delete_success : "Successfully Delete"
|
||||
add: "Add"
|
||||
back: "Back"
|
||||
delete: "Delete"
|
||||
edit: "Edit"
|
||||
nothing: "Nothing"
|
||||
show: "Show"
|
||||
sure?: "Are you sure?"
|
||||
update: "Update"
|
||||
yes_: "Yes"
|
||||
no_: "No"
|
||||
cancel : "Cancel"
|
||||
save: "save"
|
||||
hintText: "Type in a search term"
|
||||
noResultsText: "No results"
|
||||
searchingText: "Searching…"
|
||||
|
|
|
@ -1,4 +1,54 @@
|
|||
zh_tw:
|
||||
|
||||
module_name:
|
||||
personal_patent: 專利
|
||||
personal_patent: Patent
|
||||
personal_patent:
|
||||
patent_title : "Patent Title"
|
||||
book_title : "期刊名稱"
|
||||
extracted_chapters : "Extracted Chapters"
|
||||
patent_no : "Patent Number"
|
||||
patent_country : "Patent Country"
|
||||
patent_category : "Patent Category"
|
||||
publishers : "Publishers"
|
||||
authors : "作者"
|
||||
tags : "領域"
|
||||
year : "年度"
|
||||
language : "語言"
|
||||
isbn : "ISSN(ISBN)"
|
||||
vol_no : "卷數"
|
||||
issue_no : "期數"
|
||||
form_to_start : "起"
|
||||
form_to_end : "訖"
|
||||
total_pages : "總頁數"
|
||||
keywords : "關鍵字"
|
||||
abstract : "摘要"
|
||||
publication_date : "發表日期"
|
||||
url : "參考連結"
|
||||
note : "記事"
|
||||
level_type : "期刊類別"
|
||||
author_type : "作者類別"
|
||||
from : "起"
|
||||
to : "訖"
|
||||
file : "檔案"
|
||||
file_name : "檔案名稱"
|
||||
description : "描述"
|
||||
pages : "Pages"
|
||||
book_paper_type : "Book Paper Type"
|
||||
|
||||
create_success : "新增完成!!"
|
||||
update_success : "更新完成!!"
|
||||
delete_success : "刪除成功!!"
|
||||
add: "新增"
|
||||
back: "返回"
|
||||
delete: "刪除"
|
||||
edit: "編輯"
|
||||
nothing: "無"
|
||||
show: "顯示"
|
||||
sure?: "您肯定嗎?"
|
||||
update: "更新"
|
||||
yes_: "是"
|
||||
no_: "否"
|
||||
cancel : "取消"
|
||||
save: "儲存"
|
||||
hintText: "請輸入搜尋關鍵字"
|
||||
noResultsText: "沒有相關的比對結果"
|
||||
searchingText: "搜尋中…"
|
||||
|
|
|
@ -2,6 +2,10 @@ Rails.application.routes.draw do
|
|||
|
||||
namespace :panel do
|
||||
namespace :personal_patent do
|
||||
namespace :desktop do
|
||||
match "patent_window" => "personal_patents#patent_window"
|
||||
resources :personal_patents
|
||||
end
|
||||
namespace :back_end do
|
||||
|
||||
match 'writing_patent_setting' => "writing_patents#writing_patent_setting" ,:as => :writing_patent_setting
|
||||
|
|
|
@ -0,0 +1,158 @@
|
|||
orbitDesktop.prototype.initializePersonalProject = function(target,url,cache){ // this init journal papers
|
||||
this.initializePersonalProject.formCallback = function(data){
|
||||
if(data.success){
|
||||
o.notify(data.msg,"success");
|
||||
o.sub_menu_item($("div[content-type=menu] a").eq(0));
|
||||
}else{
|
||||
o.notify(data.msg,"alert");
|
||||
}
|
||||
}
|
||||
|
||||
this.initializePersonalProject.list = function(){ // to open list part in journal papers page
|
||||
var journalData;
|
||||
var bindHandlers = function(){ // to bind handlers for list page
|
||||
|
||||
}
|
||||
bindHandlers();
|
||||
|
||||
var bindSecondaryHandlers = function(){
|
||||
$("#journal_p div#paper_list a.icon-check-empty").click(function(){
|
||||
if($(this).hasClass("icon-check-empty")){
|
||||
$(this).switchClass("icon-check-empty","icon-check",0);
|
||||
} else if($(this) .hasClass("icon-check")) {
|
||||
$(this).switchClass("icon-check","icon-check-empty",0);
|
||||
} else if($(this).hasClass("icon-star")){
|
||||
$(this).removeClass("icon-star").addClass("icon-star-empty");
|
||||
} else if($(this).hasClass("icon-star-empty")){
|
||||
$(this).removeClass("icon-star-empty").addClass("icon-star");
|
||||
}
|
||||
return false;
|
||||
})
|
||||
}
|
||||
}
|
||||
this.initializePersonalProject.projectDelete = function(data,dom){
|
||||
var parent = dom.parent().parent();
|
||||
if(data.success){
|
||||
parent.hide("slide",function(){parent.remove();});
|
||||
o.notify(data.msg,"success");
|
||||
}
|
||||
}
|
||||
|
||||
this.initializePersonalProject.cancelproject = function(){
|
||||
o.highlight_sub_menu_item(0);
|
||||
}
|
||||
|
||||
this.initializePersonalProject.editproject = function(){
|
||||
o.highlight_sub_menu_item(1);
|
||||
var uploadFiles = function(){
|
||||
$('#add_plugin_file a.add').click(function(){
|
||||
var new_id = $(this).prev().attr('value');
|
||||
var old_id = new RegExp("new_writing_journal_files", "g");
|
||||
$(this).prev().attr('value', parseInt(new_id) + 1);
|
||||
var x = get_html(old_id,new_id);
|
||||
var newfield = $(x);
|
||||
$(this).parents('table').append(newfield);
|
||||
newfield.find('.action a.delete').click(function(){
|
||||
newfield.remove();
|
||||
});
|
||||
return false;
|
||||
});
|
||||
$('.action a.remove_existing_record').click(function(){
|
||||
$(this).next('.should_destroy').attr('value', 1);
|
||||
$("tr#add_plugin_file_" + $(this).prev().attr('value')).hide();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
var preData = function(){
|
||||
$("#writing_journal_author_tokens").select2('data', JSON.parse($("#writing_journal_author_tokens").attr('data-pre')));
|
||||
}
|
||||
uploadFiles();
|
||||
// preData();
|
||||
}
|
||||
|
||||
this.initializePersonalProject.addproject = function(){ // to open add pages in journal papers page
|
||||
var uploadFiles = function(){
|
||||
$('#add_plugin_file a.add').click(function(){
|
||||
var new_id = $(this).prev().attr('value');
|
||||
var old_id = new RegExp("new_writing_journal_files", "g");
|
||||
$(this).prev().attr('value', parseInt(new_id) + 1);
|
||||
var x = get_html(old_id,new_id);
|
||||
var newfield = $(x);
|
||||
$(this).parents('table').append(newfield);
|
||||
newfield.find('.action a.delete').click(function(){
|
||||
newfield.remove();
|
||||
});
|
||||
return false;
|
||||
});
|
||||
$('.action a.remove_existing_record').click(function(){
|
||||
$(this).next('.should_destroy').attr('value', 1);
|
||||
$("tr#add_plugin_file_" + $(this).prev().attr('value')).hide();
|
||||
});
|
||||
}
|
||||
|
||||
// console.log("hi");
|
||||
var bindHandlers = function(){
|
||||
|
||||
|
||||
}
|
||||
bindHandlers();
|
||||
uploadFiles();
|
||||
|
||||
}
|
||||
|
||||
|
||||
this.initializePersonalProject.coAuthorformCallback = function(data){
|
||||
if(data.success){
|
||||
o.notify(data.msg,"success");
|
||||
o.sub_menu_item($("div[content-type=menu] a").eq(3));
|
||||
}else{
|
||||
o.notify(data.msg,"alert");
|
||||
}
|
||||
}
|
||||
this.initializePersonalProject.coauthor = function(){ // to open add pages in coauthor page
|
||||
var bindHandlers = function(){ // to bind handlers for add page
|
||||
|
||||
}
|
||||
bindHandlers();
|
||||
}
|
||||
this.initializePersonalProject.coauthorRelationForm = function(data){
|
||||
if(data.success){
|
||||
o.notify(data.msg,"success");
|
||||
$("#co_author_relation_table").html(data.newvalue);
|
||||
}else{
|
||||
o.notify(data.msg,"alert");
|
||||
}
|
||||
}
|
||||
this.initializePersonalProject.coauthorRelationEditForm = function(data){
|
||||
if(data.success){
|
||||
o.notify(data.msg,"success");
|
||||
var x = o.layout_data.generate_layout_html(data.newvalue);
|
||||
$("div[container=true] div.overview").html(x.markup);
|
||||
}else{
|
||||
o.notify(data.msg,"alert");
|
||||
}
|
||||
}
|
||||
this.initializePersonalProject.allnone = function(d,o){
|
||||
switch(o.attr("href")){
|
||||
case "all":
|
||||
$("div.overview a.icon-check-empty").removeClass("icon-check-empty").addClass("icon-check");
|
||||
break;
|
||||
case "none":
|
||||
$("div.overview a.icon-check").removeClass("icon-check").addClass("icon-check-empty");
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.initializePersonalProject.allnone = function(d,o){
|
||||
switch(o.attr("href")){
|
||||
case "all":
|
||||
$("div.overview a.icon-check-empty").removeClass("icon-check-empty").addClass("icon-check");
|
||||
break;
|
||||
case "none":
|
||||
$("div.overview a.icon-check").removeClass("icon-check").addClass("icon-check-empty");
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -0,0 +1,115 @@
|
|||
/* Books */
|
||||
[page-name="books_list"] .list_t_item .inner {
|
||||
padding-left: 30px; }
|
||||
[page-name="books_list"] .list_item_action {
|
||||
font-size: 12px;
|
||||
float: left;
|
||||
margin-left: -30px; }
|
||||
[page-name="books_list"] .list_item_action a {
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
margin: 1px 1px 6px 1px; }
|
||||
[page-name="books_list"] .list_item_action .icon-star-empty {
|
||||
color: #999;
|
||||
font-size: 20px; }
|
||||
[page-name="books_list"] .list_item_action .icon-star {
|
||||
color: #faa732;
|
||||
font-size: 20px; }
|
||||
[page-name="books_list"] .list_item_action .icon-check-empty {
|
||||
color: #999;
|
||||
font-size: 20px; }
|
||||
[page-name="books_list"] .list_item_action .icon-check {
|
||||
color: #333;
|
||||
font-size: 20px; }
|
||||
[page-name="books_list"] .file_view .list_t_des {
|
||||
overflow: hidden; }
|
||||
[page-name="books_list"] .file_view .file {
|
||||
float: left;
|
||||
width: 120px;
|
||||
height: 50px;
|
||||
padding: 6px;
|
||||
margin: 1px;
|
||||
position: relative;
|
||||
-webkit-box-sizing: border-box;
|
||||
/* webkit */
|
||||
-khtml-box-sizing: border-box;
|
||||
/* konqueror */
|
||||
-moz-box-sizing: border-box;
|
||||
/* firefox */
|
||||
-ms-box-sizing: border-box;
|
||||
/* ie */
|
||||
box-sizing: border-box;
|
||||
/* css3 */ }
|
||||
[page-name="books_list"] .file_view .file:hover {
|
||||
background-color: #f7f7f7; }
|
||||
[page-name="books_list"] .file_view .file img {
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
position: absolute;
|
||||
left: 6px;
|
||||
top: 6px; }
|
||||
[page-name="books_list"] .file_view .file .filetitle {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 38px;
|
||||
padding-left: 40px;
|
||||
overflow: hidden;
|
||||
-webkit-box-sizing: border-box;
|
||||
/* webkit */
|
||||
-khtml-box-sizing: border-box;
|
||||
/* konqueror */
|
||||
-moz-box-sizing: border-box;
|
||||
/* firefox */
|
||||
-ms-box-sizing: border-box;
|
||||
/* ie */
|
||||
box-sizing: border-box;
|
||||
/* css3 */ }
|
||||
|
||||
/* Books Books list */
|
||||
[page-name="books_books"] .datalist_item .inner {
|
||||
padding-left: 30px; }
|
||||
[page-name="books_books"] .list_item_action {
|
||||
font-size: 12px;
|
||||
float: left;
|
||||
margin-left: -30px; }
|
||||
[page-name="books_books"] .list_item_action i {
|
||||
color: #999;
|
||||
font-size: 20px;
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
margin: 1px 1px 6px 1px; }
|
||||
[page-name="books_books"] .list_t_desc {
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
color: #999; }
|
||||
|
||||
/* Books Co-Author */
|
||||
[page-name="books_coauthor"] .list_t_item {
|
||||
height: 110px; }
|
||||
[page-name="books_coauthor"] .list_item_function a {
|
||||
display: inline-block;
|
||||
padding: 4px;
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: 11px;
|
||||
-webkit-text-size-adjust: none; }
|
||||
[page-name="books_coauthor"] .info {
|
||||
font-family: Arial, sans-serif; }
|
||||
[page-name="books_coauthor"] .info li {
|
||||
margin-bottom: 8px;
|
||||
color: #999; }
|
||||
[page-name="books_coauthor"] .info .name {
|
||||
font-size: 18px;
|
||||
line-height: 24px;
|
||||
color: #333; }
|
||||
|
||||
/* Books Co-Author Relationship*/
|
||||
[page-name="books_coauthor_relation"] .edit_co_author_relation {
|
||||
/*margin-left: -10px;*/ }
|
||||
[page-name="books_coauthor_relation"] .form_space {
|
||||
margin-bottom: 10px;
|
||||
font-size: 18px;
|
||||
font-family: Arial, sans-serif; }
|
|
@ -0,0 +1,123 @@
|
|||
@import "desktop-helper";
|
||||
|
||||
/* Books */
|
||||
[page-name="books_list"] {
|
||||
.list_t_item .inner { padding-left: 30px; }
|
||||
.list_item_action {
|
||||
font-size: 12px;
|
||||
float: left;
|
||||
margin-left: -30px;
|
||||
|
||||
a {
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
margin: 1px 1px 6px 1px;
|
||||
}
|
||||
.icon-star-empty { color: #999; font-size: 20px; }
|
||||
.icon-star { color: #faa732; font-size: 20px; }
|
||||
.icon-check-empty { color: #999; font-size: 20px; }
|
||||
.icon-check { color: #333; font-size: 20px; }
|
||||
}
|
||||
|
||||
.file_view {
|
||||
.list_t_des {
|
||||
overflow: hidden;
|
||||
}
|
||||
.file {
|
||||
float: left;
|
||||
width: 120px;
|
||||
height: 50px;
|
||||
padding: 6px;
|
||||
margin: 1px;
|
||||
position: relative;
|
||||
@include box-sizing;
|
||||
|
||||
&:hover {
|
||||
background-color: lighten($gray, 10%);
|
||||
}
|
||||
img {
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
position: absolute;
|
||||
left: 6px;
|
||||
top: 6px;
|
||||
}
|
||||
.filetitle {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 38px;
|
||||
padding-left: 40px;
|
||||
overflow: hidden;
|
||||
@include box-sizing;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Books Books list */
|
||||
[page-name="books_books"] {
|
||||
|
||||
.datalist_item .inner {
|
||||
padding-left: 30px;
|
||||
}
|
||||
.list_item_action {
|
||||
font-size: 12px;
|
||||
float: left;
|
||||
margin-left: -30px;
|
||||
}
|
||||
.list_item_action i {
|
||||
color: #999;
|
||||
font-size: 20px;
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
margin: 1px 1px 6px 1px;
|
||||
}
|
||||
.list_t_desc {
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
|
||||
/* Books Co-Author */
|
||||
[page-name="books_coauthor"] {
|
||||
.list_t_item {
|
||||
height: 110px;
|
||||
}
|
||||
.list_item_function {}
|
||||
.list_item_function a {
|
||||
display: inline-block;
|
||||
padding: 4px;
|
||||
font-family: Arial, sans-serif;
|
||||
font-size: 11px;
|
||||
-webkit-text-size-adjust: none;
|
||||
}
|
||||
.info {
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
.info li {
|
||||
margin-bottom: 8px;
|
||||
color: #999;
|
||||
}
|
||||
.info .name {
|
||||
font-size: 18px;
|
||||
line-height: 24px;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
|
||||
/* Books Co-Author Relationship*/
|
||||
[page-name="books_coauthor_relation"]{
|
||||
.edit_co_author_relation {
|
||||
/*margin-left: -10px;*/
|
||||
}
|
||||
.form_space {
|
||||
margin-bottom: 10px;
|
||||
font-size: 18px;
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,71 @@
|
|||
class Panel::PersonalProject::Desktop::PersonalProjectsController < ApplicationController
|
||||
|
||||
def index
|
||||
@projects = Project.where(create_user_id: current_user.id)
|
||||
@view_by = params[:view]
|
||||
page = params[:page]
|
||||
page ||= 1
|
||||
|
||||
@per_column = 5
|
||||
|
||||
case @view_by
|
||||
when "abstract"
|
||||
@per_column = 1
|
||||
when "file"
|
||||
@per_column = 2
|
||||
end
|
||||
|
||||
if @view_by.nil?
|
||||
@view_by = " "
|
||||
@projects = @projects.asc(:paper_title)
|
||||
else
|
||||
@projects = @projects.asc(@view_by).asc(:paper_title)
|
||||
end
|
||||
@projects = @projects.page(page).per(50)
|
||||
respond_to do |format|
|
||||
format.html { render :layout => false}
|
||||
end
|
||||
end
|
||||
|
||||
def new
|
||||
@project = Project.new
|
||||
render :layout => false
|
||||
end
|
||||
|
||||
def create
|
||||
params[:project][:create_user_id] = current_user.id
|
||||
@project = Project.new(params[:project])
|
||||
if @project.save
|
||||
render json: {success: true, msg: t('create_success')}.to_json
|
||||
else
|
||||
error_msg = @project.errors.full_messages.join("<br />")
|
||||
render json: {success: false, msg: error_msg}.to_json
|
||||
end
|
||||
end
|
||||
|
||||
def edit
|
||||
@project = Project.find(params[:id])
|
||||
render :layout => false
|
||||
end
|
||||
|
||||
def update
|
||||
params[:project][:create_user_id] = current_user.id
|
||||
@project = Project.new(params[:project])
|
||||
if @project.update_attributes(params[:project])
|
||||
render json: {success: true, msg: t('create_success')}.to_json
|
||||
else
|
||||
error_msg = @project.errors.full_messages.join("<br />")
|
||||
render json: {success: false, msg: error_msg}.to_json
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
@personal_book = Project.find(params[:id])
|
||||
@personal_book.destroy
|
||||
render :json => {success: true, msg: t('delete_success')}
|
||||
end
|
||||
|
||||
def project_window
|
||||
render :layout => false
|
||||
end
|
||||
end
|
|
@ -0,0 +1,96 @@
|
|||
module Panel::PersonalProject::Desktop::PersonalProjectsHelper
|
||||
def publication_record publication, view
|
||||
content_tag :li,
|
||||
"item" => "true",
|
||||
:class => "list_t_item" do
|
||||
marker + \
|
||||
content(publication, view) + \
|
||||
edit_or_delete(publication)
|
||||
end
|
||||
end
|
||||
|
||||
def marker
|
||||
content_tag :div,
|
||||
:class => "list_item_action" do
|
||||
content_tag(:a, "",:href=>"",
|
||||
:class => "icon-check-empty",
|
||||
"toggle-onclick"=>"icon-check-empty icon-check",
|
||||
"ajax-remote"=>"false") + \
|
||||
content_tag(:a, "",:href=>"",
|
||||
:class => "icon-star-empty",
|
||||
"toggle-onclick"=>"icon-star-empty icon-star",
|
||||
"ajax-remote"=>"false")
|
||||
end
|
||||
end
|
||||
|
||||
def content publication, view
|
||||
case view
|
||||
when "project_title"
|
||||
des = content_tag(:div, publication.project_title,
|
||||
:class => "list_t_des")
|
||||
when "job_title"
|
||||
des = content_tag(:div, publication.job_title,
|
||||
:class => "list_t_des")
|
||||
when "keywords"
|
||||
des = content_tag(:div, publication.keywords,
|
||||
:class => "list_t_des")
|
||||
when "file"
|
||||
des = content_tag(:div, link_publication_file(publication),
|
||||
:class => "list_t_des")
|
||||
else
|
||||
end
|
||||
|
||||
content_tag(:div, publication.project_title,
|
||||
:class => "list_t_title") + des
|
||||
|
||||
end
|
||||
|
||||
def edit_or_delete publication
|
||||
content_tag :div,
|
||||
:class => "list_item_function" do
|
||||
content_tag(:a, t("edit"),
|
||||
:class => "journal_paper_edit admbg2 admtxt",
|
||||
:href => edit_panel_personal_project_desktop_personal_project_path(publication),
|
||||
"callback-method" => "editproject",
|
||||
"ajax-remote" => "get") + \
|
||||
content_tag(:a, t(:delete_),
|
||||
"ajax-remote" => "delete",
|
||||
"confirm-message" => t("sure?"),
|
||||
"callback-method" => "projectDelete",
|
||||
:class => "journal_paper_delete admbg2 admtxt",
|
||||
:href => panel_personal_project_desktop_personal_project_path(publication))
|
||||
end
|
||||
end
|
||||
|
||||
def link_publication_file publication
|
||||
publication.project_files.map{|file|
|
||||
link_to(image_tag(check_file_type(file.file.url)) + \
|
||||
content_tag(:span, file.title, :class => "filetitle"),
|
||||
file.file.url,
|
||||
:class => "file",
|
||||
"target" => "_blank")
|
||||
}.inject(:+)
|
||||
end
|
||||
|
||||
def check_file_type file
|
||||
if not file.nil?
|
||||
file_type = MIME::Types.type_for(file).first.to_s.split("/")[1]
|
||||
file_type = "/assets/ft-icons/#{file_type}/#{file_type}-48_32.png"
|
||||
else
|
||||
file_type = ""
|
||||
end
|
||||
end
|
||||
|
||||
def generate_authors_name ids
|
||||
author_name = ids.map{|m|
|
||||
if m == "0"
|
||||
#{:id => 0, :text => current_user.name, :email => current_user.email }
|
||||
{:id => 0, :text => current_user.name }
|
||||
else
|
||||
#{:id => m, :text => ConferenceCoAuthor.find(m).co_author, :email => ConferenceCoAuthor.find(m).email}
|
||||
{:id => m, :text => ConferenceCoAuthor.find(m).co_author}
|
||||
end
|
||||
}
|
||||
author_name.to_json
|
||||
end
|
||||
end
|
|
@ -0,0 +1,155 @@
|
|||
<div class="toolbar hh1">
|
||||
<div class="fn_g hp">
|
||||
|
||||
<%= f.submit t("save"), name: "commit", class: "fn_btn ini_input hp hh1 thmc2 thmtxt" %>
|
||||
<% if not @project.new_record? %>
|
||||
<%= submit_tag t("cancel"), :type => "button", "callback-method"=>"cancelproject", "ajax-remote" => "get", :href => panel_personal_project_desktop_personal_projects_path, class: "fn_btn ini_input hp hh1 admbg2 admtxt" %>
|
||||
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1">Share</div>
|
||||
<div class="admbg sdm_o">
|
||||
<ul>
|
||||
<li><a class="hp hh1 admtxt" href="">Full</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Abstract</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Friends</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Private</a></li>
|
||||
<li><a class="hp hh1 admtxt" href="">Group</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hh1 hp sdm">
|
||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overview" content-layout="column" base-width="420">
|
||||
<div column="true">
|
||||
<div class="s_form">
|
||||
<ul>
|
||||
<li class="s_grid_row">
|
||||
<%= f.fields_for :project_title_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
size: "20",
|
||||
placeholder: t("personal_project.project_title"),
|
||||
class: "s_grid_12 s_grid",
|
||||
value: (@project.project_title_translations[locale.to_s] rescue nil) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= f.fields_for :job_title_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
size: "20",
|
||||
placeholder: t("personal_project.job_title"),
|
||||
class: "s_grid_12 s_grid",
|
||||
value: (@project.job_title_translations[locale.to_s] rescue nil) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= f.fields_for :participator_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
size: "20",
|
||||
placeholder: t("personal_project.participator"),
|
||||
class: "s_grid_12 s_grid",
|
||||
value: (@project.participator_translations[locale.to_s] rescue nil) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= f.fields_for :unit_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
size: "20",
|
||||
placeholder: t("personal_project.unit"),
|
||||
class: "s_grid_12 s_grid",
|
||||
value: (@project.unit_translations[locale.to_s] rescue nil) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", t("personal_project.start_date"), class: "s_grid_4 s_grid") %>
|
||||
<%= f.date_select :period_start_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year] }, {:class => 's_grid_4 s_grid'} %>
|
||||
<%= f.date_select :period_start_date, {:use_month_numbers => true, :order => [:month, :day] }, {:class => 's_grid_2 s_grid'} %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", t("personal_project.end_date"), class: "s_grid_4 s_grid") %>
|
||||
<%= f.date_select :period_end_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year] }, {:class => 's_grid_4 s_grid'} %>
|
||||
<%= f.date_select :period_end_date, {:use_month_numbers => true, :order => [:month, :day] }, {:class => 's_grid_2 s_grid'} %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", t("personal_project.year"), class: "s_grid_4 s_grid") %>
|
||||
<%= select_year((@project.year ? @project.year.to_i : DateTime.now.year), {:start_year => DateTime.now.year, :end_year => 1930}, {:name => 'lab[year]',:class => 's_grid_4 s_grid'} ) %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", t("personal_project.project_category"), class: "s_grid_4 s_grid") %>
|
||||
<%= f.select :project_category_id, ProjectCategory.all.collect {|t| [ t.title, t.id ]}, {:class => "s_grid s_grid_8"} %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= label_tag("", t("personal_project.url"), class: "s_grid_4 s_grid") %><%= f.text_field :url, size: "20", class: "s_grid_8 s_grid"%>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div column="true">
|
||||
<div class="s_form">
|
||||
<ul>
|
||||
<li class="s_grid_row">
|
||||
<%= f.text_area :keywords, size: "20x3", placeholder: t("personal_project.keywords"), class: "s_grid_12 s_grid_h_2 s_grid"%>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= f.label :language, t("personal_project.language"), :class => "s_grid s_grid_4" %>
|
||||
<%= f.select :language, Project::LANGUAGE_TYPES,{} ,{:class => "s_grid s_grid_8"} %>
|
||||
</li>
|
||||
<li class="s_grid_row">
|
||||
<%= f.text_area :note, size: "20x3", placeholder: t("personal_project.note"), class: "s_grid_12 s_grid s_grid_h_7"%>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div column="true">
|
||||
<div class="s_form">
|
||||
<ul>
|
||||
<li class="s_grid_row">
|
||||
<%= f.text_area :abstract, size: "20x22", placeholder: t("personal_project.abstract"), class: "s_grid_12 s_grid s_grid_h_10"%>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div column="true">
|
||||
<div class="s_form">
|
||||
<ul>
|
||||
<li class="s_grid_row">
|
||||
<table class="s_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="s_grid_2"><%= t("personal_project.file")%></th>
|
||||
<th class="s_grid_4"><%= t("personal_project.file_name")%></th>
|
||||
<th class="s_grid_4"><%= t("personal_project.description") %></th>
|
||||
<th class="s_grid_2"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<div id='add_plugin_file' class="info_input plugin_files_block s_action">
|
||||
<%= hidden_field_tag 'plugin_file_field_count', @project.project_files.count %>
|
||||
<a class="add setting_btn thmc1 thmtxt w1 hh1 hp" href="#"><i class="icon-plus icon-white"></i> add</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<% @project.project_files.each_with_index do |project_file, i| %>
|
||||
<%= f.fields_for :project_files, project_file do |f| %>
|
||||
<%= render :partial => 'form_file', :object => project_file, :locals => {:f => f, :i => i} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var get_html = function(old_id,new_id){
|
||||
return ("<%= escape_javascript(add_attribute 'form_file', f, :project_files) %>").replace(old_id, new_id);
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,33 @@
|
|||
<tr id="<%= "plugin_file_#{form_file.id}" if !form_file.new_record? %>" class="list_item">
|
||||
<td>
|
||||
<div>
|
||||
<% if form_file.new_record? %>
|
||||
<%= f.file_field :file, class: "s_grid_2" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<%= f.text_field :title, :class => 's_grid_4' %>
|
||||
</td>
|
||||
<td>
|
||||
<%= f.fields_for :file_title_translations do |f| %>
|
||||
<%= f.text_field locale,
|
||||
class: 's_grid_4',
|
||||
value: (form_file.file_title_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<span class="action">
|
||||
<% if form_file.new_record? %>
|
||||
<a class="delete"><i class="icon-remove"></i></a>
|
||||
<% else %>
|
||||
<%= f.hidden_field :id %>
|
||||
<a class="remove_existing_record"><i class="icon-remove"></i></a>
|
||||
<%= f.hidden_field :should_destroy, :value => nil, :class => 'should_destroy' %>
|
||||
<% end %>
|
||||
<%= form_file.file.file ? ( link_to '', form_file.file.url, {:class => 'icon-eye-open', :target => '_blank', :title => t(:view)} ) : '' %>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue