This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
orbit-4-1/vendor/built_in_modules/personal_patent/app/views/panel/personal_patent/plugin/_profile.html.erb

96 lines
3.6 KiB
Plaintext
Raw Normal View History

<% 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 %>
2012-10-08 08:20:21 +00:00
<%
@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_patents = WritingPatent.where(:create_user_id => @user.id).desc(:publish_date).page(params[:page]).per(10)
2012-10-15 07:30:48 +00:00
else
@writing_patents = WritingPatent.where(is_hidden: false, :create_user_id => @user.id).desc(:publish_date).page(params[:page]).per(10)
2012-10-15 07:30:48 +00:00
end
2012-10-08 08:20:21 +00:00
%>
<% 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_patent_back_end_writing_patents_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_patent_back_end_writing_patents_path(:user_id => params[:id], :disable => 'false') ) %>
</div>
</div>
<% end -%>
2013-08-09 07:07:05 +00:00
<table class="table table-condensed table-striped">
<thead>
<tr>
<% if is_admin? %>
2014-02-10 07:18:47 +00:00
<th><input type="checkbox" /></th>
<% end -%>
<th class="span2"><%= t('personal_patent.publication_date') %></th>
<th><%= t('personal_patent.patent_title') %></th>
2012-10-08 08:20:21 +00:00
</tr>
2013-08-09 07:07:05 +00:00
</thead>
<tbody>
2012-10-08 08:20:21 +00:00
<% @writing_patents.each do |writing_patent| %>
<tr class="<%= writing_patent.is_hidden ? "checkHide" : "" %>">
<% if is_admin? %>
<td>
<%= check_box_tag 'to_change[]', writing_patent.id.to_s, false, :class => "list-check" %>
</td>
<% end -%>
2013-08-09 07:07:05 +00:00
<td><%= writing_patent.publish_date.strftime("%Y.%m") %></td>
<td>
2012-10-08 08:20:21 +00:00
<%= link_to writing_patent.patent_title, panel_personal_patent_front_end_writing_patent_path(writing_patent) %>
2013-08-09 07:07:05 +00:00
</td>
</tr>
2012-10-08 08:20:21 +00:00
<% end %>
2012-11-02 10:28:23 +00:00
2013-08-09 07:07:05 +00:00
</tbody>
</table>
2012-11-02 10:28:23 +00:00
<% if is_admin? %>
2013-08-09 07:07:05 +00:00
<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_patent_back_end_personal_patent_intros_path(:user_id => @user.id), :class => 'btn btn-primary' %>
2013-08-09 07:07:05 +00:00
<%= link_to content_tag(:i, nil, :class => 'icon-plus') + t('announcement.add_new'), new_panel_personal_patent_back_end_writing_patent_path(:user_id => @user.id), :class => 'btn btn-primary' %>
</div>
<div class="pagination pagination-centered">
<%= paginate @writing_patents, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>
2012-10-08 08:20:21 +00:00
</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>
2013-08-09 07:07:05 +00:00
</div>