add admin index

This commit is contained in:
EricTYL 2020-02-04 17:35:19 +08:00
parent 1e2b121738
commit 92fd4d7202
4 changed files with 55 additions and 0 deletions

View File

@ -0,0 +1,19 @@
class Admin::ActivitiesController < OrbitMemberController
layout "member_plugin"
#include Admin::PersonalActivitiesHelper
#before_action :set_writing_conference, only: [:show, :edit , :update, :destroy]
#before_action :set_plugin
#before_action :get_settings,:only => [:new, :edit, :setting]
#before_action :need_access_right
#before_action :allow_admin_only, :only => [:index, :setting]
def index
@activities = Activity.all.page(params[:page]).per(10)
respond_to do |format|
format.html
format.xml { render :xml => @activities }
end
end
end

View File

@ -0,0 +1,8 @@
<% @activities.each do |activity| %>
<tr id="<%= %>" class="with_action">
<td class="span1"><%= activity.member_profile.name %></td>
<td class="span1"><%= activity.year %></td>
<td class="span5"><%= activity.activity_name %></td>
<td class="span1"><%= activity.activity_organizer %></td>
</tr>
<% end %>

View File

@ -0,0 +1,20 @@
<script src="https://kit.fontawesome.com/1fa49cfdc9.js" crossorigin="anonymous"></script>
<table class="table main-list">
<thead>
<tr>
<th class="span1"><%= t("personal_activity.participant") %></th>
<th class="span1"><%= t("personal_activity.year") %></th>
<th class="span5"><%= t("personal_plugins.activity_name") %></th>
<th class="span1"><%= t("personal_plugins.activity_organizer") %></th>
</tr>
</thead>
<tbody id="tbody_activity" class="sort-holder">
<%= render 'activity' %>
</tbody>
</table>
<div class="bottomnav clearfix">
<div class="pagination pagination-centered">
<%= content_tag :div, paginate(@activities), class: "pagination pagination-centered" %>
</div>
</div>

View File

@ -2,3 +2,11 @@ en:
module_name:
activity: "Activity"
personal_activity: "Activity"
personal_activity:
participant: "Participant"
year: "Year"
activity_name: "Activity Name"
activity_organizer: "Organizer"
activity_area: "Area"
activity_start_date: "Start Date"
activity_end_date: "End Date"