2014-01-15 10:49:46 +00:00
|
|
|
|
<% content_for :page_specific_css do %>
|
|
|
|
|
<%= stylesheet_link_tag "lib/list-check" %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% content_for :page_specific_javascript do %>
|
|
|
|
|
<%= javascript_include_tag "lib/list-check" %>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
<%
|
|
|
|
|
@filter = params[:filter]
|
|
|
|
|
new_filter = params[:new_filter]
|
|
|
|
|
|
|
|
|
|
if @filter && params[:clear]
|
|
|
|
|
@filter.delete(params[:type])
|
|
|
|
|
elsif @filter && new_filter
|
|
|
|
|
if @filter.has_key?(new_filter[:type]) && @filter[new_filter[:type]].include?(new_filter[:id].to_s)
|
|
|
|
|
@filter[new_filter[:type]].delete(new_filter[:id].to_s)
|
|
|
|
|
elsif @filter.has_key?(new_filter[:type])
|
|
|
|
|
@filter[new_filter[:type]] << new_filter[:id].to_s
|
|
|
|
|
else
|
|
|
|
|
@filter.merge!({new_filter[:type] => [new_filter[:id].to_s]})
|
|
|
|
|
end
|
|
|
|
|
elsif new_filter
|
|
|
|
|
@filter = {new_filter[:type] => [new_filter[:id].to_s]}
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if @user && is_admin?
|
|
|
|
|
@writing_conferences = WritingConference.where(:create_user_id => @user.id).desc(:year).page(params[:page]).per(10)
|
|
|
|
|
else
|
|
|
|
|
@writing_conferences = WritingConference.where(is_hidden: false, :create_user_id => @user.id).desc(:year).page(params[:page]).per(10)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
%>
|
|
|
|
|
|
|
|
|
|
<% if is_admin? %>
|
|
|
|
|
<div class="list-active">
|
|
|
|
|
<div class="btn-group">
|
|
|
|
|
<%= link_to('Hide', '#', :class => "btn btn-mini list-active-btn disabled", "data-check-action" => "list-be-hide", :rel => data_share_panel_personal_conference_back_end_writing_conferences_path(:user_id => params[:id], :disable => 'true') ) %>
|
|
|
|
|
<%= link_to('Show', '#', :class => "btn btn-mini list-active-btn disabled", "data-check-action" => "list-be-show", :rel => data_share_panel_personal_conference_back_end_writing_conferences_path(:user_id => params[:id], :disable => 'false') ) %>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<% end -%>
|
|
|
|
|
|
2014-03-20 07:53:58 +00:00
|
|
|
|
<table class="table table-condensed table-striped main-list">
|
2014-01-15 10:49:46 +00:00
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<% if is_admin? %>
|
2014-02-10 09:11:34 +00:00
|
|
|
|
<th><input type="checkbox" /></th>
|
2014-01-15 10:49:46 +00:00
|
|
|
|
<% end -%>
|
|
|
|
|
<th class="span1"><%= t('personal_conference.year') %></th>
|
|
|
|
|
<th><%= t('module_name.personal_conference') %></th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
|
|
|
|
|
<% @writing_conferences.each do |writing_conference| %>
|
|
|
|
|
|
2014-03-20 07:53:58 +00:00
|
|
|
|
<tr id="<%= dom_id writing_conference %>" class="<%= writing_conference.is_hidden ? "checkHide" : "" %>">
|
2014-01-15 10:49:46 +00:00
|
|
|
|
<% if is_admin? %>
|
|
|
|
|
<td>
|
|
|
|
|
<%= check_box_tag 'to_change[]', writing_conference.id.to_s, false, :class => "list-check" %>
|
|
|
|
|
</td>
|
|
|
|
|
<% end -%>
|
|
|
|
|
<td><%= writing_conference.year %></td>
|
|
|
|
|
<td>
|
|
|
|
|
<%= link_to writing_conference.create_link, panel_personal_conference_front_end_writing_conference_path(writing_conference) %>
|
2014-03-20 07:53:58 +00:00
|
|
|
|
<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>
|
2014-01-15 10:49:46 +00:00
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<% if is_admin? %>
|
|
|
|
|
<div class="bottomnav clearfix">
|
|
|
|
|
<div class="action pull-right">
|
|
|
|
|
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('personal_plugins.edit_brief_intro'), panel_personal_conference_back_end_personal_conference_intros_path(:user_id => @user.id), :class => 'btn btn-primary' %>
|
|
|
|
|
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('announcement.add_new'), new_panel_personal_conference_back_end_writing_conference_path(:user_id => @user.id), :class => 'btn btn-primary' %>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="pagination pagination-centered">
|
|
|
|
|
<%= paginate @writing_conferences, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
<div id="dialog" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="Delete item" aria-hidden="true">
|
|
|
|
|
<div class="modal-header">
|
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
|
|
|
<h3><%= t(:sure?) %></h3>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-footer">
|
|
|
|
|
<button class="btn" data-dismiss="modal" aria-hidden="true"><%= t(:close) %></button>
|
|
|
|
|
<button class="delete-item btn btn-danger"><%= t(:submit) %></button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|