Compare commits
3 Commits
Author | SHA1 | Date |
---|---|---|
spen | daa29fdac6 | |
spen | 316d72d4a5 | |
Manson Wang | 9ef2a45f00 |
|
@ -42,7 +42,10 @@ orbitDesktop.prototype.initializeConferencePapers = function(target,url,cache){
|
||||||
this.initializeConferencePapers.cancelpaper = function(){
|
this.initializeConferencePapers.cancelpaper = function(){
|
||||||
o.highlight_sub_menu_item(0);
|
o.highlight_sub_menu_item(0);
|
||||||
}
|
}
|
||||||
|
this.initializeConferencePapers.syncComplete = function(){
|
||||||
|
o.notify("Sync Complete","success");
|
||||||
|
o.sub_menu_item($("div[content-type=menu] a").eq(0));
|
||||||
|
}
|
||||||
var uploadFiles = function(){
|
var uploadFiles = function(){
|
||||||
$('#add_plugin_file a.add').click(function(){
|
$('#add_plugin_file a.add').click(function(){
|
||||||
var new_id = $(this).prev().attr('value');
|
var new_id = $(this).prev().attr('value');
|
||||||
|
|
|
@ -226,7 +226,13 @@ class Panel::PersonalConference::BackEnd::WritingConferencesController < OrbitBa
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
if @writing_conference.update_attributes(params[:writing_conference])
|
if @writing_conference.update_attributes(params[:writing_conference])
|
||||||
|
|
||||||
|
if params[:writing_conference][:user_id]
|
||||||
|
format.html { redirect_to(admin_users_new_interface_url(:id=>params[:writing_conference][:user_id],:show_plugin_profile=>'WritingConference')) }
|
||||||
|
else
|
||||||
format.html { redirect_to(panel_personal_conference_back_end_writing_conferences_url) }
|
format.html { redirect_to(panel_personal_conference_back_end_writing_conferences_url) }
|
||||||
|
end
|
||||||
|
|
||||||
# format.js { render 'toggle_enable' }
|
# format.js { render 'toggle_enable' }
|
||||||
format.xml { head :ok }
|
format.xml { head :ok }
|
||||||
else
|
else
|
||||||
|
@ -246,7 +252,13 @@ class Panel::PersonalConference::BackEnd::WritingConferencesController < OrbitBa
|
||||||
@writing_conference.destroy
|
@writing_conference.destroy
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
|
|
||||||
|
if params[:user_id]
|
||||||
|
format.html { redirect_to(admin_users_new_interface_url(:id=>params[:user_id],:show_plugin_profile=>'WritingConference')) }
|
||||||
|
else
|
||||||
format.html { redirect_to(panel_personal_conference_back_end_writing_conferences_url) }
|
format.html { redirect_to(panel_personal_conference_back_end_writing_conferences_url) }
|
||||||
|
end
|
||||||
|
|
||||||
# format.xml { head :ok }
|
# format.xml { head :ok }
|
||||||
format.js
|
format.js
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,7 +4,7 @@ class Panel::PersonalConference::Desktop::ConferencePagesController < Applicatio
|
||||||
@writing_conferences = WritingConference.where(create_user_id: current_user.id)
|
@writing_conferences = WritingConference.where(create_user_id: current_user.id)
|
||||||
page = params[:page]
|
page = params[:page]
|
||||||
page ||= 1
|
page ||= 1
|
||||||
|
@userid = current_user.id
|
||||||
if @view_by.nil?
|
if @view_by.nil?
|
||||||
@writing_conferences = @writing_conferences.asc(:paper_title)
|
@writing_conferences = @writing_conferences.asc(:paper_title)
|
||||||
else
|
else
|
||||||
|
|
|
@ -85,16 +85,10 @@ class WritingConference
|
||||||
|
|
||||||
def create_link
|
def create_link
|
||||||
title = []
|
title = []
|
||||||
|
|
||||||
title << self.authors if self.authors.present?
|
title << self.authors if self.authors.present?
|
||||||
|
|
||||||
if !self.publication_date.nil?
|
|
||||||
pd = self.publication_date.strftime("%Y-%m-%d").split('-')
|
|
||||||
title << pd[0]
|
|
||||||
end
|
|
||||||
|
|
||||||
title << self.paper_title if self.paper_title.present?
|
title << self.paper_title if self.paper_title.present?
|
||||||
title << self.conference_title if self.conference_title.present?
|
title << self.conference_title if self.conference_title.present?
|
||||||
|
title << self.sponsor if self.sponsor.present?
|
||||||
title << self.location if self.location.present?
|
title << self.location if self.location.present?
|
||||||
title << "#{period_start_date}-#{period_end_date}" if (self.period_start_date.present? && self.period_end_date.present?)
|
title << "#{period_start_date}-#{period_end_date}" if (self.period_start_date.present? && self.period_end_date.present?)
|
||||||
# title << "(#{self.conference_paper_types.collect{|x| x.title}.join(', ')})"
|
# title << "(#{self.conference_paper_types.collect{|x| x.title}.join(', ')})"
|
||||||
|
|
|
@ -58,6 +58,10 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="hh1 hp sdm">
|
||||||
|
<div class="sdm_t hh1"><a href="<%= admin_import_data_sync_conference_data_path(:user_id => @userid) %>" class="icons-cycle" ajax-remote="get" response-type="json" callback-method="syncComplete" > Sync Conference Papers</a></div>
|
||||||
|
</div>
|
||||||
<div class="hh1 hp sdm">
|
<div class="hh1 hp sdm">
|
||||||
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
<div class="sdm_t hh1"><span class="icon-question-sign"></span></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th class="grid1"><%= t('personal_conference.year') %></th>
|
<th class="grid1"><%= t('personal_conference.year') %></th>
|
||||||
<th class="grid8"><%= t('module_name.personal_conference') %></th>
|
<th class="grid8"><%= t('module_name.personal_conference') %></th>
|
||||||
<th class="grid3"><%= t('personal_conference.authors') %></th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -35,7 +34,6 @@
|
||||||
<td>
|
<td>
|
||||||
<%= link_to writing_conference.create_link, panel_personal_conference_front_end_writing_conference_path(writing_conference) %>
|
<%= link_to writing_conference.create_link, panel_personal_conference_front_end_writing_conference_path(writing_conference) %>
|
||||||
</td>
|
</td>
|
||||||
<td><%= User.find(writing_conference.create_user_id).name rescue '' %></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<% # encoding: utf-8 %>
|
<% # encoding: utf-8 %>
|
||||||
|
|
||||||
|
<div class="writing_detail">
|
||||||
<table>
|
<table>
|
||||||
<caption> <%= t("module_name.personal_conference") %> </caption>
|
<caption> <%= t("module_name.personal_conference") %> </caption>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -55,7 +56,9 @@
|
||||||
<tr><th><%= t("personal_conference.url")%></th><td><%= link_to t(:url), @writing_conference.url, {:target => '_blank', :title => @writing_conference.url} if !@writing_conference.url.blank? %></td></tr>
|
<tr><th><%= t("personal_conference.url")%></th><td><%= link_to t(:url), @writing_conference.url, {:target => '_blank', :title => @writing_conference.url} if !@writing_conference.url.blank? %></td></tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<tr><th><%= t("personal_conference.authors")%></th><td><%= "#{User.from_id(@writing_conference.create_user_id).name rescue ''},#{@personal_conference.authors rescue ''}"%></td></tr>
|
<% if !@writing_conference.authors.blank? %>
|
||||||
|
<tr><th><%= t("personal_conference.authors")%></th><td><%= "#{@writing_conference.authors rescue ''}"%></td></tr>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<% if @writing_conference.writing_conference_files.size > 0 %>
|
<% if @writing_conference.writing_conference_files.size > 0 %>
|
||||||
<tr><th><%= t("personal_conference.file")%></th>
|
<tr><th><%= t("personal_conference.file")%></th>
|
||||||
|
@ -73,3 +76,4 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
</div>
|
</div>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
<table class="table table-condensed table-striped">
|
<table class="table table-condensed table-striped main-list">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<% if is_admin? %>
|
<% if is_admin? %>
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
|
|
||||||
<% @writing_conferences.each do |writing_conference| %>
|
<% @writing_conferences.each do |writing_conference| %>
|
||||||
|
|
||||||
<tr class="<%= writing_conference.is_hidden ? "checkHide" : "" %>">
|
<tr id="<%= dom_id writing_conference %>" class="<%= writing_conference.is_hidden ? "checkHide" : "" %>">
|
||||||
<% if is_admin? %>
|
<% if is_admin? %>
|
||||||
<td>
|
<td>
|
||||||
<%= check_box_tag 'to_change[]', writing_conference.id.to_s, false, :class => "list-check" %>
|
<%= check_box_tag 'to_change[]', writing_conference.id.to_s, false, :class => "list-check" %>
|
||||||
|
@ -64,6 +64,14 @@
|
||||||
<td><%= writing_conference.year %></td>
|
<td><%= writing_conference.year %></td>
|
||||||
<td>
|
<td>
|
||||||
<%= link_to writing_conference.create_link, panel_personal_conference_front_end_writing_conference_path(writing_conference) %>
|
<%= link_to writing_conference.create_link, panel_personal_conference_front_end_writing_conference_path(writing_conference) %>
|
||||||
|
<div class="quick-edit">
|
||||||
|
<ul class="nav nav-pills hide">
|
||||||
|
<%if at_least_module_manager || writing_conference.writing_conference_category.cur_user_is_sub_manager_of(:edit)%>
|
||||||
|
<li><%= link_to t('edit'), edit_panel_personal_conference_back_end_writing_conference_path(writing_conference,:user_id => @user.id) %></li>
|
||||||
|
<li><%= link_to t(:delete_), panel_personal_conference_back_end_writing_conference_path(writing_conference,:user_id => @user.id), :confirm => t('sure?'), :method => :delete, :remote => true %></li>
|
||||||
|
<% end -%>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
@ -75,6 +83,7 @@
|
||||||
<% if is_admin? %>
|
<% if is_admin? %>
|
||||||
<div class="bottomnav clearfix">
|
<div class="bottomnav clearfix">
|
||||||
<div class="action pull-right">
|
<div class="action pull-right">
|
||||||
|
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.sync_data'), admin_import_data_sync_conference_data_path(:user_id => @user.id), :class => 'btn btn-primary' %>
|
||||||
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.edit_brief_intro'), panel_personal_conference_back_end_personal_conference_intros_path(:user_id => @user.id), :class => 'btn btn-primary' %>
|
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.edit_brief_intro'), panel_personal_conference_back_end_personal_conference_intros_path(:user_id => @user.id), :class => 'btn btn-primary' %>
|
||||||
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('announcement.add_new'), new_panel_personal_conference_back_end_writing_conference_path(:user_id => @user.id), :class => 'btn btn-primary' %>
|
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('announcement.add_new'), new_panel_personal_conference_back_end_writing_conference_path(:user_id => @user.id), :class => 'btn btn-primary' %>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue