From b00ed0213ef8755131f9ca4d32534b93da9fa540 Mon Sep 17 00:00:00 2001 From: BoHung Chiu Date: Fri, 14 Jul 2023 18:12:06 +0800 Subject: [PATCH] Fix bug. --- .../journal_papers/_writing_journal.html.erb | 79 +++++++++++++++---- app/views/admin/journal_papers/index.html.erb | 49 +----------- app/views/admin/journal_papers/index.js.erb | 4 +- 3 files changed, 66 insertions(+), 66 deletions(-) diff --git a/app/views/admin/journal_papers/_writing_journal.html.erb b/app/views/admin/journal_papers/_writing_journal.html.erb index 7d75350..a0ea509 100644 --- a/app/views/admin/journal_papers/_writing_journal.html.erb +++ b/app/views/admin/journal_papers/_writing_journal.html.erb @@ -1,19 +1,64 @@ -<% @writing_journals.each do |writing_journal| %> - - <%= writing_journal.year %> - - - - <%= "#{Nokogiri::HTML(writing_journal.create_link).text}" %> - - -
- + + + + + + + + + + <% @writing_journals.each do |writing_journal| %> + + + + + + <% end %> + +
<%= t('personal_journal.year') %><%= t('module_name.journal_paper') %><%= t("personal_plugins.author") %>
<%= writing_journal.year %> + + + <%= "#{Nokogiri::HTML(writing_journal.create_link).text}" %> + + +
+ +
+
<%= get_member_show(writing_journal).html_safe %>
+ +
+
+
+ + +
- - <%= get_member_show(writing_journal).html_safe %> - + <%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t(:new_), new_admin_journal_paper_path, :class => 'btn btn-primary' %> + <%= link_to content_tag(:i, nil, :class => 'icon-cog icon-white') + t('setting'), admin_writing_journal_setting_path, :class => 'btn btn-primary pull-right' %> +
+ +
+<% if params[:error] == "1" %> + <% end %> \ No newline at end of file diff --git a/app/views/admin/journal_papers/index.html.erb b/app/views/admin/journal_papers/index.html.erb index 7572e16..47bdb15 100644 --- a/app/views/admin/journal_papers/index.html.erb +++ b/app/views/admin/journal_papers/index.html.erb @@ -5,49 +5,6 @@ function MergeUrl(){ } <%= render_filter nil, "tbody_writing_journals" %> - - - - - - - - - - <%= render 'writing_journal' %> - -
<%= t('personal_journal.year') %><%= t('module_name.journal_paper') %><%= t("personal_plugins.author") %>
- -
-
-
- - - -
- <%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t(:new_), new_admin_journal_paper_path, :class => 'btn btn-primary' %> - <%= link_to content_tag(:i, nil, :class => 'icon-cog icon-white') + t('setting'), admin_writing_journal_setting_path, :class => 'btn btn-primary pull-right' %> -
- -
-<% if params[:error] == "1" %> - -<% end %> \ No newline at end of file + + <%= render 'writing_journal' %> + \ No newline at end of file diff --git a/app/views/admin/journal_papers/index.js.erb b/app/views/admin/journal_papers/index.js.erb index 6218673..bd124e8 100644 --- a/app/views/admin/journal_papers/index.js.erb +++ b/app/views/admin/journal_papers/index.js.erb @@ -1,3 +1 @@ -$("#sort_headers").html("<%= j render 'sort_headers' %>"); -$("#tbody_writing_journals").html("<%= j render :partial => 'writing_journal', :collection => @writing_journals %>"); -$("#writing_journal_pagination").html("<%= j paginate @writing_journals, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil} %>"); \ No newline at end of file +$("#index_table").html("<%= j render :partial => 'writing_journal', :collection => @writing_journals %>"); \ No newline at end of file