diff --git a/app/controllers/admin/activities_controller.rb b/app/controllers/admin/activities_controller.rb new file mode 100644 index 0000000..def7116 --- /dev/null +++ b/app/controllers/admin/activities_controller.rb @@ -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 diff --git a/app/views/admin/activities/_activity.html.erb b/app/views/admin/activities/_activity.html.erb new file mode 100644 index 0000000..f232192 --- /dev/null +++ b/app/views/admin/activities/_activity.html.erb @@ -0,0 +1,8 @@ +<% @activities.each do |activity| %> + + <%= activity.member_profile.name %> + <%= activity.year %> + <%= activity.activity_name %> + <%= activity.activity_organizer %> + +<% end %> diff --git a/app/views/admin/activities/index.html.erb b/app/views/admin/activities/index.html.erb new file mode 100644 index 0000000..d70b9f6 --- /dev/null +++ b/app/views/admin/activities/index.html.erb @@ -0,0 +1,20 @@ + + + + + + + + + + + + <%= render 'activity' %> + +
<%= t("personal_activity.participant") %><%= t("personal_activity.year") %><%= t("personal_plugins.activity_name") %><%= t("personal_plugins.activity_organizer") %>
+ +
+ +
diff --git a/config/locales/en.yml b/config/locales/en.yml index 1009e2a..1eec395 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -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"