diff --git a/app/controllers/project_packages_controller.rb b/app/controllers/project_packages_controller.rb new file mode 100644 index 00000000..cdedea9e --- /dev/null +++ b/app/controllers/project_packages_controller.rb @@ -0,0 +1,29 @@ +# encoding=utf-8 +# For react +class ProjectPackagesController < ApplicationController + before_filter :require_login, :except => [:index] + + include ApplicationHelper + + def show + render_react + end + + def new + render_react + end + + def index + render_react + end + + def edit + render_react + end + + private + def render_react + render file: 'public/react/build/index.html', :layout => false + end + +end diff --git a/config/routes.rb b/config/routes.rb index bfdabd5c..762096f0 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -57,6 +57,8 @@ RedmineApp::Application.routes.draw do ## oauth相关 get :publish_success, on: :collection end + resources :project_packages, only: [:index, :show, :new, :edit] + resources :ec_course_evaluations do member do match 'import_score', :via => [:post]