Fixed Pagination Errors in member module
This commit is contained in:
parent
1e3cffee0a
commit
b487740035
|
@ -37,7 +37,8 @@ class Panel::PersonalBook::BackEnd::WritingBooksController < OrbitBackendControl
|
|||
# @writing_books = WritingBook.search(params[:category_id])
|
||||
#@writing_books = (params[:sort] || @filter) ? get_sorted_and_filtered_writing_books : WritingBook.all.page(params[:page]).per(10)
|
||||
|
||||
@writing_books = (params[:sort] || @filter) ? get_sorted_and_filtered("writing_book",:book_paper_type_id.in => @paper_type_ids) : get_viewable("writing_book",:book_paper_type_id.in => @paper_type_ids)
|
||||
@writing_books = (params[:sort] || @filter) ? get_sorted_and_filtered("writing_book",:book_paper_type_id.in => @paper_type_ids) : get_viewable("writing_book",:book_paper_type_id.in => @paper_type_ids)
|
||||
@books = @writing_books.page params[:page]
|
||||
|
||||
@tags = get_tags
|
||||
|
||||
|
|
|
@ -37,6 +37,8 @@ class WritingBook
|
|||
field :create_user_id, :type => BSON::ObjectId
|
||||
field :update_user_id, :type => BSON::ObjectId
|
||||
|
||||
paginates_per 10
|
||||
|
||||
has_many :writing_book_files, :autosave => true, :dependent => :destroy
|
||||
|
||||
accepts_nested_attributes_for :writing_book_files, :allow_destroy => true
|
||||
|
|
|
@ -28,6 +28,6 @@
|
|||
<%= link_to content_tag(:i, nil, :class => 'icon-cog icon-white') + t('setting'), panel_personal_book_back_end_writing_book_setting_path, :class => 'btn btn-primary pull-right' %>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_personal_book_back_end_writing_book_path, :class => 'btn btn-primary pull-right' %>
|
||||
<div id="writing_book_pagination" class="paginationFixed">
|
||||
<%= paginate @writing_books, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>
|
||||
<%= paginate @books, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -38,7 +38,7 @@ class Panel::PersonalConference::BackEnd::WritingConferencesController < OrbitBa
|
|||
#@writing_conferences = (params[:sort] || @filter) ? get_sorted_and_filtered_writing_conferences : WritingConference.all.page(params[:page]).per(10)
|
||||
|
||||
@writing_conferences = (params[:sort] || @filter) ? get_sorted_and_filtered("writing_conference",:conference_paper_type_id.in => @paper_type_ids) : get_viewable("writing_conference",:conference_paper_type_id.in => @paper_type_ids)
|
||||
|
||||
@conferences = @writing_conferences.page params[:page]
|
||||
|
||||
@tags = get_tags
|
||||
|
||||
|
|
|
@ -32,6 +32,8 @@ class WritingConference
|
|||
field :create_user_id, :type => BSON::ObjectId
|
||||
field :update_user_id, :type => BSON::ObjectId
|
||||
|
||||
paginates_per 10
|
||||
|
||||
has_many :writing_conference_files, :autosave => true, :dependent => :destroy
|
||||
accepts_nested_attributes_for :writing_conference_files, :allow_destroy => true
|
||||
|
||||
|
|
|
@ -28,6 +28,6 @@
|
|||
<%= link_to content_tag(:i, nil, :class => 'icon-cog icon-white') + t('setting'), panel_personal_conference_back_end_writing_conference_setting_path, :class => 'btn btn-primary pull-right' %>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_personal_conference_back_end_writing_conference_path, :class => 'btn btn-primary pull-right' %>
|
||||
<div id="writing_conference_pagination" class="paginationFixed">
|
||||
<%= paginate @writing_conferences, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>
|
||||
<%= paginate @conferences, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -27,6 +27,7 @@ class Panel::PersonalDiploma::BackEnd::DiplomasController < OrbitBackendControll
|
|||
|
||||
|
||||
@diplomas = (params[:sort] || @filter) ? get_sorted_and_filtered("diploma") : get_viewable("diploma")
|
||||
@diplomas_page = @diplomas.page params[:page]
|
||||
|
||||
@tags = get_tags
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ class Diploma
|
|||
field :create_user_id, :type => BSON::ObjectId
|
||||
field :update_user_id, :type => BSON::ObjectId
|
||||
|
||||
paginates_per 10
|
||||
|
||||
# before_save :clean_checkboxs
|
||||
|
||||
|
|
|
@ -28,6 +28,6 @@
|
|||
<%= link_to content_tag(:i, nil, :class => 'icon-cog icon-white') + t('setting'), panel_personal_diploma_back_end_diploma_setting_path, :class => 'btn btn-primary pull-right' %>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_personal_diploma_back_end_diploma_path, :class => 'btn btn-primary pull-right' %>
|
||||
<div id="diploma_pagination" class="paginationFixed">
|
||||
<%= paginate @diplomas, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>
|
||||
<%= paginate @diplomas_page, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -36,6 +36,7 @@ class Panel::PersonalExperience::BackEnd::ExperiencesController < OrbitBackendCo
|
|||
|
||||
|
||||
@experiences = (params[:sort] || @filter) ? get_sorted_and_filtered("experience",:experience_category_id.in => @experience_category_ids) : get_viewable("experience",:experience_category_id.in => @experience_category_ids)
|
||||
@experience_pages = @experiences.page params[:page]
|
||||
|
||||
@tags = get_tags
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@ class Experience
|
|||
field :create_user_id, :type => BSON::ObjectId
|
||||
field :update_user_id, :type => BSON::ObjectId
|
||||
|
||||
paginates_per 10
|
||||
|
||||
# before_save :clean_checkboxs
|
||||
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
<%= render_sort_bar(true, delete_panel_personal_experience_back_end_experiences_path(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]),
|
||||
['date', 'date', 'span1', 'experience.date'],
|
||||
['organizationt_title', 'organizationt_title','span3', 'experience.organizationt_title'],
|
||||
['department', 'department','span3', 'experience.department'],
|
||||
['job_title', 'job_title','span3', 'experience.job_title'],
|
||||
['create_modified', 'create_user_id','span1-3', 'experience.create_modified']).html_safe %>
|
|
@ -30,6 +30,6 @@
|
|||
<%= link_to content_tag(:i, nil, :class => 'icon-cog icon-white') + t('setting'), panel_personal_experience_back_end_experience_setting_path, :class => 'btn btn-primary pull-right' %>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_personal_experience_back_end_experience_path, :class => 'btn btn-primary pull-right' %>
|
||||
<div id="experience_pagination" class="paginationFixed">
|
||||
<%= paginate @experiences, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>
|
||||
<%= paginate @experience_pages, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -35,6 +35,7 @@ class Panel::PersonalHonor::BackEnd::HonorsController < OrbitBackendController
|
|||
|
||||
|
||||
@honors = (params[:sort] || @filter) ? get_sorted_and_filtered("honor",:honor_category_id.in => @honor_category_ids) : get_viewable("honor",:honor_category_id.in => @honor_category_ids)
|
||||
@honor_pages = @honors.page params[:page]
|
||||
|
||||
@tags = get_tags
|
||||
|
||||
|
|
|
@ -27,6 +27,8 @@ class Honor
|
|||
field :create_user_id, :type => BSON::ObjectId
|
||||
field :update_user_id, :type => BSON::ObjectId
|
||||
|
||||
paginates_per 10
|
||||
|
||||
# before_save :clean_checkboxs
|
||||
|
||||
validates_presence_of :award_name
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
<%= render_sort_bar(true, delete_panel_personal_honor_back_end_honors_path(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]),
|
||||
['year', 'year', 'span1', 'honor.year'],
|
||||
['award_name', 'award_name','span3', 'honor.award_name'],
|
||||
['awarding_unit', 'awarding_unit','span3', 'honor.awarding_unit'],
|
||||
['create_modified', 'create_user_id','span1-3', 'honor.create_modified']).html_safe %>
|
|
@ -28,6 +28,6 @@
|
|||
<div class="form-actions form-fixed pagination-right">
|
||||
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_personal_honor_back_end_honor_path, :class => 'btn btn-primary pull-right' %>
|
||||
<div id="honor_pagination" class="paginationFixed">
|
||||
<%= paginate @honors, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>
|
||||
<%= paginate @honor_pages, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -37,7 +37,8 @@ class Panel::PersonalJournal::BackEnd::WritingJournalsController < OrbitBackendC
|
|||
|
||||
# @writing_journals = WritingJournal.search(params[:category_id])
|
||||
#@writing_journals = (params[:sort] || @filter) ? get_sorted_and_filtered_writing_journals : WritingJournal.all.page(params[:page]).per(10)
|
||||
@writing_journals = (params[:sort] || @filter) ? get_sorted_and_filtered("writing_journal",:journal_paper_type_id.in => @paper_type_ids) : get_viewable("writing_journal",:journal_paper_type_id.in => @paper_type_ids)
|
||||
@writing_journals = (params[:sort] || @filter) ? get_sorted_and_filtered("writing_journal",:journal_paper_type_id.in => @paper_type_ids) : get_viewable("writing_journal",:journal_paper_type_id.in => @paper_type_ids)
|
||||
@writing_journal_pages = @writing_journals.page params[:page]
|
||||
|
||||
@tags = get_tags
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ class WritingJournal
|
|||
field :create_user_id, :type => BSON::ObjectId
|
||||
field :update_user_id, :type => BSON::ObjectId
|
||||
|
||||
paginates_per 10
|
||||
|
||||
accepts_nested_attributes_for :writing_journal_files, :allow_destroy => true
|
||||
after_save :save_writing_journal_files
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
<%= render_sort_bar(true, delete_panel_personal_journal_back_end_writing_journals_path(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]),
|
||||
['publication_date', 'publication_date', 'span1', 'writing_journal.publication_date'],
|
||||
['paper_title', 'paper_title','span3', 'writing_journal.paper_title'],
|
||||
['create_modified', 'create_user_id','span1-3', 'writing_journal.create_modified']).html_safe %>
|
||||
|
|
@ -28,6 +28,6 @@
|
|||
<%= link_to content_tag(:i, nil, :class => 'icon-cog icon-white') + t('setting'), panel_personal_journal_back_end_writing_journal_setting_path, :class => 'btn btn-primary pull-right' %>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_personal_journal_back_end_writing_journal_path, :class => 'btn btn-primary pull-right' %>
|
||||
<div id="writing_journal_pagination" class="paginationFixed">
|
||||
<%= paginate @writing_journals, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>
|
||||
<%= paginate @writing_journal_pages, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -35,6 +35,7 @@ class Panel::PersonalLab::BackEnd::LabsController < OrbitBackendController
|
|||
|
||||
|
||||
@labs = (params[:sort] || @filter) ? get_sorted_and_filtered("lab") : get_viewable("lab")
|
||||
@lab_pages = @labs.page params[:page]
|
||||
|
||||
@tags = get_tags
|
||||
|
||||
|
|
|
@ -30,6 +30,8 @@ class Lab
|
|||
field :create_user_id, :type => BSON::ObjectId
|
||||
field :update_user_id, :type => BSON::ObjectId
|
||||
|
||||
paginates_per 10
|
||||
|
||||
has_many :lab_files, :autosave => true, :dependent => :destroy
|
||||
|
||||
accepts_nested_attributes_for :lab_files, :allow_destroy => true
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
<%= render_sort_bar(true, delete_panel_personal_lab_back_end_labs_path(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]),
|
||||
['year', 'year', 'span1', 'lab.year'],
|
||||
['lab_title', 'lab_title','span3', 'lab.lab_title'],
|
||||
['location', 'location','span3', 'lab.location'],
|
||||
['create_modified', 'create_user_id','span1-3', 'lab.create_modified']).html_safe %>
|
|
@ -28,6 +28,6 @@
|
|||
<div class="form-actions form-fixed pagination-right">
|
||||
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_personal_lab_back_end_lab_path, :class => 'btn btn-primary pull-right' %>
|
||||
<div id="lab_pagination" class="paginationFixed">
|
||||
<%= paginate @labs, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>
|
||||
<%= paginate @lab_pages, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -35,6 +35,7 @@ class Panel::PersonalPatent::BackEnd::WritingPatentsController < OrbitBackendCon
|
|||
|
||||
|
||||
@writing_patents = (params[:sort] || @filter) ? get_sorted_and_filtered("writing_patent",:writing_patent_category_id.in => @writing_patent_category_ids) : get_viewable("writing_patent",:writing_patent_category_id.in => @writing_patent_category_ids)
|
||||
@writing_patent_pages = @writing_patents.page params[:page]
|
||||
|
||||
@tags = get_tags
|
||||
|
||||
|
|
|
@ -30,6 +30,8 @@ class WritingPatent
|
|||
field :create_user_id, :type => BSON::ObjectId
|
||||
field :update_user_id, :type => BSON::ObjectId
|
||||
|
||||
paginates_per 10
|
||||
|
||||
has_many :writing_patent_files, :autosave => true, :dependent => :destroy
|
||||
|
||||
accepts_nested_attributes_for :writing_patent_files, :allow_destroy => true
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
<%= render_sort_bar(true, delete_panel_personal_patent_back_end_writing_patents_path(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]),
|
||||
['publish_date', 'publish_date', 'span1', 'writing_patent.publish_date'],
|
||||
['patent_title', 'patent_title','span3', 'writing_patent.patent_title'],
|
||||
['patent_no', 'patent_no','span3', 'writing_patent.patent_no'],
|
||||
['patent_country', 'patent_country','span3', 'writing_patent.patent_country'],
|
||||
['authors', 'authors','span3', 'writing_patent.authors'],
|
||||
['url', 'url','span3', 'writing_patent.url'],
|
||||
['create_modified', 'create_user_id','span1-3', 'writing_patent.create_modified']).html_safe %>
|
|
@ -32,6 +32,6 @@
|
|||
<%= link_to content_tag(:i, nil, :class => 'icon-cog icon-white') + t('setting'), panel_personal_patent_back_end_writing_patent_setting_path, :class => 'btn btn-primary pull-right' %>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_personal_patent_back_end_writing_patent_path, :class => 'btn btn-primary pull-right' %>
|
||||
<div id="writing_patent_pagination" class="paginationFixed">
|
||||
<%= paginate @writing_patents, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>
|
||||
<%= paginate @writing_patent_pages, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -36,6 +36,7 @@ class Panel::PersonalProject::BackEnd::ProjectsController < OrbitBackendControll
|
|||
|
||||
|
||||
@projects = (params[:sort] || @filter) ? get_sorted_and_filtered("project",:project_category_id.in => @project_category_ids) : get_viewable("project",:project_category_id.in => @project_category_ids)
|
||||
@project_pages = @projects.page params[:page]
|
||||
|
||||
@tags = get_tags
|
||||
|
||||
|
|
|
@ -32,6 +32,8 @@ class Project
|
|||
field :create_user_id, :type => BSON::ObjectId
|
||||
field :update_user_id, :type => BSON::ObjectId
|
||||
|
||||
paginates_per 10
|
||||
|
||||
has_many :project_files, :autosave => true, :dependent => :destroy
|
||||
|
||||
accepts_nested_attributes_for :project_files, :allow_destroy => true
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
<%= render_sort_bar(true, delete_panel_personal_project_back_end_projects_path(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]),
|
||||
['period', 'period', 'span1', 'project.period'],
|
||||
['project_title', 'project_title','span3', 'project.project_title'],
|
||||
['participator', 'participator','span3', 'project.participator'],
|
||||
['job_title', 'job_title','span3', 'project.job_title'],
|
||||
['unit', 'unit','span3', 'project.unit'],
|
||||
['create_modified', 'create_user_id','span1-3', 'project.create_modified']).html_safe %>
|
|
@ -30,6 +30,6 @@
|
|||
<div class="form-actions form-fixed pagination-right">
|
||||
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('announcement.add_new'), new_panel_personal_project_back_end_project_path, :class => 'btn btn-primary pull-right' %>
|
||||
<div id="project_pagination" class="paginationFixed">
|
||||
<%= paginate @projects, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>
|
||||
<%= paginate @project_pages, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -27,6 +27,8 @@ class Research
|
|||
field :create_user_id, :type => BSON::ObjectId
|
||||
field :update_user_id, :type => BSON::ObjectId
|
||||
|
||||
paginates_per 10
|
||||
|
||||
has_many :research_files, :autosave => true, :dependent => :destroy
|
||||
|
||||
accepts_nested_attributes_for :research_files, :allow_destroy => true
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
<%= render_sort_bar(true, delete_panel_personal_research_back_end_researchs_path(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]),
|
||||
['publish_date', 'publish_date', 'span1', 'research.publish_date'],
|
||||
['research_title', 'research_title','span3', 'research.research_title'],
|
||||
['url', 'url','span3', 'research.url'],
|
||||
['create_modified', 'create_user_id','span1-3', 'research.create_modified']).html_safe %>
|
||||
|
Loading…
Reference in New Issue