forked from saurabh/personal-journal
add backend search feature
This commit is contained in:
parent
a0e5539620
commit
5d14333c33
|
@ -47,7 +47,14 @@ class Admin::JournalPapersController < OrbitMemberController
|
|||
end
|
||||
end
|
||||
def index
|
||||
@writing_journals = JournalPaper.sort_year_date.page(params[:page]).per(10)
|
||||
@writing_journals = JournalPaper.sort_year_date
|
||||
if params[:keywords]
|
||||
@writing_journals = search_data(@writing_journals,[:slug_title])
|
||||
end
|
||||
@writing_journals = @writing_journals.page(params[:page]).per(10)
|
||||
if request.xhr?
|
||||
render :partial => "writing_journal"
|
||||
end
|
||||
end
|
||||
|
||||
def new
|
||||
|
|
|
@ -4,6 +4,7 @@ function MergeUrl(){
|
|||
location.href = '<%= merge_admin_journal_papers_path %>'
|
||||
}
|
||||
</script>
|
||||
<%= render_filter nil, "tbody_writing_journals" %>
|
||||
<table class="table main-list">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
Loading…
Reference in New Issue