add admin index
This commit is contained in:
parent
1e2b121738
commit
92fd4d7202
|
@ -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
|
|
@ -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 %>
|
|
@ -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>
|
|
@ -2,3 +2,11 @@ en:
|
||||||
module_name:
|
module_name:
|
||||||
activity: "Activity"
|
activity: "Activity"
|
||||||
personal_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"
|
||||||
|
|
Loading…
Reference in New Issue