updated
This commit is contained in:
commit
ca64cba9ad
|
@ -1,8 +1,11 @@
|
||||||
class Panel::PersonalConference::Desktop::ConferenceCoAuthorRelationsController < ApplicationController
|
class Panel::PersonalConference::Desktop::ConferenceCoAuthorRelationsController < ApplicationController
|
||||||
def index
|
def index
|
||||||
|
page = params[:page]
|
||||||
|
page ||= 1
|
||||||
@conference_co_author_relations = ConferenceCoAuthorRelation.all
|
@conference_co_author_relations = ConferenceCoAuthorRelation.all
|
||||||
new
|
new
|
||||||
|
|
||||||
|
@conference_co_author_relations = @conference_co_author_relations.page(page).per(5)
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html {render layout: false }
|
format.html {render layout: false }
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
class Panel::PersonalConference::Desktop::ConferenceCoAuthorsController < ApplicationController
|
class Panel::PersonalConference::Desktop::ConferenceCoAuthorsController < ApplicationController
|
||||||
def index
|
def index
|
||||||
nils, not_nils = ConferenceCoAuthor.where(name_id: current_user.id)\
|
page = params[:page]
|
||||||
.asc(:co_author).partition{|p| p.email.nil?}
|
page ||= 1
|
||||||
@conference_co_authors = not_nils + nils
|
@conference_co_authors = ConferenceCoAuthor.where(name_id: current_user.id).asc(:co_author)
|
||||||
@conference_co_author_relations = ConferenceCoAuthorRelation.all
|
@conference_co_author_relations = ConferenceCoAuthorRelation.all
|
||||||
|
|
||||||
|
@conference_co_authors = @conference_co_authors.page(page).per(5)
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html { render :layout => false}
|
format.html { render :layout => false}
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,6 +2,8 @@ class Panel::PersonalConference::Desktop::ConferencePagesController < Applicatio
|
||||||
def index
|
def index
|
||||||
@view_by = params[:view]
|
@view_by = params[:view]
|
||||||
@writing_conferences = WritingConference.where(create_user_id: current_user.id)
|
@writing_conferences = WritingConference.where(create_user_id: current_user.id)
|
||||||
|
page = params[:page]
|
||||||
|
page ||= 1
|
||||||
|
|
||||||
if @view_by.nil?
|
if @view_by.nil?
|
||||||
@writing_conferences = @writing_conferences.asc(:paper_title)
|
@writing_conferences = @writing_conferences.asc(:paper_title)
|
||||||
|
@ -11,6 +13,8 @@ class Panel::PersonalConference::Desktop::ConferencePagesController < Applicatio
|
||||||
|
|
||||||
@level_types = ConferencePaperType.all
|
@level_types = ConferencePaperType.all
|
||||||
|
|
||||||
|
@writing_conferences = @writing_conferences.page(page).per(5)
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html { render :layout => false}
|
format.html { render :layout => false}
|
||||||
end
|
end
|
||||||
|
@ -84,9 +88,13 @@ class Panel::PersonalConference::Desktop::ConferencePagesController < Applicatio
|
||||||
end
|
end
|
||||||
|
|
||||||
def conference_type
|
def conference_type
|
||||||
|
page = params[:page]
|
||||||
|
page ||= 1
|
||||||
|
|
||||||
conference_types = ConferencePaperType.all
|
conference_types = ConferencePaperType.all
|
||||||
all_conference_lists = WritingConference.where(create_user_id: current_user.id)
|
all_conference_lists = WritingConference.where(create_user_id: current_user.id)
|
||||||
all_conference_lists = all_conference_lists.asc(:conference_title)
|
all_conference_lists = all_conference_lists.asc(:conference_title)
|
||||||
|
all_conference_lists = all_conference_lists.page(page).per(5)
|
||||||
all_conference_lists = all_conference_lists.map do |j|
|
all_conference_lists = all_conference_lists.map do |j|
|
||||||
[ j.conference_title,
|
[ j.conference_title,
|
||||||
j.conference_paper_type_ids.map do |type|
|
j.conference_paper_type_ids.map do |type|
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
class Panel::PersonalJournal::Desktop::JournalCoAuthorRelationsController < ApplicationController
|
class Panel::PersonalJournal::Desktop::JournalCoAuthorRelationsController < ApplicationController
|
||||||
def index
|
def index
|
||||||
|
page = params[:page]
|
||||||
|
page ||= 1
|
||||||
@journal_co_author_relations = JournalCoAuthorRelation.all
|
@journal_co_author_relations = JournalCoAuthorRelation.all
|
||||||
new
|
new
|
||||||
|
|
||||||
|
@journal_co_author_relations = @journal_co_author_relations.page(page).per(5)
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html {render layout: false }
|
format.html {render layout: false }
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
class Panel::PersonalJournal::Desktop::JournalCoAuthorsController < ApplicationController
|
class Panel::PersonalJournal::Desktop::JournalCoAuthorsController < ApplicationController
|
||||||
def index
|
def index
|
||||||
nils, not_nils = JournalCoAuthor.where(name_id: current_user.id)\
|
page = params[:page]
|
||||||
.asc(:co_author).partition{|p| p.email.nil?}
|
page ||= 1
|
||||||
@journal_co_authors = not_nils + nils
|
@journal_co_authors = JournalCoAuthor.where(name_id: current_user.id).asc(:co_author)
|
||||||
@journal_co_author_relations = JournalCoAuthorRelation.all
|
@journal_co_author_relations = JournalCoAuthorRelation.all
|
||||||
|
|
||||||
|
@journal_co_authors = @journal_co_authors.page(page).per(5)
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html { render :layout => false}
|
format.html { render :layout => false}
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,6 +3,8 @@ class Panel::PersonalJournal::Desktop::JournalPagesController < ApplicationContr
|
||||||
@writing_journals = WritingJournal.where(create_user_id: current_user.id)
|
@writing_journals = WritingJournal.where(create_user_id: current_user.id)
|
||||||
@level_types = JournalLevelType.all
|
@level_types = JournalLevelType.all
|
||||||
@view_by = params[:view]
|
@view_by = params[:view]
|
||||||
|
page = params[:page]
|
||||||
|
page ||= 1
|
||||||
|
|
||||||
if @view_by.nil?
|
if @view_by.nil?
|
||||||
@writing_journals = @writing_journals.asc(:paper_title)
|
@writing_journals = @writing_journals.asc(:paper_title)
|
||||||
|
@ -12,6 +14,8 @@ class Panel::PersonalJournal::Desktop::JournalPagesController < ApplicationContr
|
||||||
|
|
||||||
@level_types = ConferencePaperType.all
|
@level_types = ConferencePaperType.all
|
||||||
|
|
||||||
|
@writing_journals = @writing_journals.page(page).per(5)
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html { render :layout => false}
|
format.html { render :layout => false}
|
||||||
end
|
end
|
||||||
|
@ -85,9 +89,13 @@ class Panel::PersonalJournal::Desktop::JournalPagesController < ApplicationContr
|
||||||
end
|
end
|
||||||
|
|
||||||
def journal_type
|
def journal_type
|
||||||
|
page = params[:page]
|
||||||
|
page ||= 1
|
||||||
|
|
||||||
level_types = JournalLevelType.all
|
level_types = JournalLevelType.all
|
||||||
all_journal_lists = WritingJournal.where(create_user_id: current_user.id)
|
all_journal_lists = WritingJournal.where(create_user_id: current_user.id)
|
||||||
all_journal_lists = all_journal_lists.asc(:journal_title)
|
all_journal_lists = all_journal_lists.asc(:journal_title)
|
||||||
|
all_journal_lists = all_journal_lists.page(page).per(5)
|
||||||
all_journal_lists = all_journal_lists.map do |j|
|
all_journal_lists = all_journal_lists.map do |j|
|
||||||
[ j.journal_title,
|
[ j.journal_title,
|
||||||
j.journal_level_type_ids.map do |type|
|
j.journal_level_type_ids.map do |type|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<div class="toolbar hh1">
|
<div class="toolbar hh1">
|
||||||
<div class="fn_g hp">
|
<div class="fn_g hp">
|
||||||
|
|
||||||
<%= f.submit "Save", name: "commit", value: "Save", class: "fn_btn ini_input hp hh1 thmc2 thmtxt" %>
|
<%= f.submit t("save"), name: "commit", class: "fn_btn ini_input hp hh1 thmc2 thmtxt" %>
|
||||||
<% if not @writing_journal.new_record? %>
|
<% if not @writing_journal.new_record? %>
|
||||||
<%= submit_tag "Cancel", :type => "button", "ajax-remote" => "get", :href => panel_personal_journal_desktop_journal_pages_path, class: "ini_input hp hh1 thmadm thmtxt" %>
|
<%= submit_tag t("cancel"), :type => "button", "ajax-remote" => "get", :href => panel_personal_journal_desktop_journal_pages_path, class: "ini_input hp hh1 thmadm thmtxt" %>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
@ -190,9 +190,7 @@
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<div id='add_plugin_file' class="info_input plugin_files_block s_action">
|
<div id='add_plugin_file' class="info_input plugin_files_block s_action">
|
||||||
<%= hidden_field_tag 'plugin_file_field_count', @writing_journal.writing_journal_files.count %>
|
<%= hidden_field_tag 'plugin_file_field_count', @writing_journal.writing_journal_files.count %>
|
||||||
|
|
||||||
<a class="add setting_btn thmc1 thmtxt w1 hh1 hp" href="#"><i class="icon-plus icon-white"></i> add</a>
|
<a class="add setting_btn thmc1 thmtxt w1 hh1 hp" href="#"><i class="icon-plus icon-white"></i> add</a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
Loading…
Reference in New Issue