pull requests框架搭建(路由控制器、views)
This commit is contained in:
parent
c7f2ab0415
commit
96b04f39b1
|
@ -0,0 +1,3 @@
|
|||
# Place all the behaviors and hooks related to the matching controller here.
|
||||
# All this logic will automatically be available in application.js.
|
||||
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
|
|
@ -0,0 +1,3 @@
|
|||
// Place all the styles related to the pull_rquests controller here.
|
||||
// They will automatically be included in application.css.
|
||||
// You can use Sass (SCSS) here: http://sass-lang.com/
|
|
@ -0,0 +1,18 @@
|
|||
class PullRquestsController < ApplicationController
|
||||
before_filter :find_project
|
||||
layout "base_projects"
|
||||
|
||||
def index
|
||||
|
||||
end
|
||||
|
||||
def new
|
||||
|
||||
end
|
||||
|
||||
def find_project
|
||||
@project = Project.find(params[:project_id])
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
render_404
|
||||
end
|
||||
end
|
|
@ -0,0 +1,2 @@
|
|||
module PullRquestsHelper
|
||||
end
|
|
@ -57,6 +57,15 @@
|
|||
</div>
|
||||
<% end %>
|
||||
<!-- more -->
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<div class="subNav">
|
||||
<%= link_to "Pull Requests", project_files_path(@project), :class => "f14 c_blue02" %>
|
||||
<% unless @project.project_score.attach_num == 0 %>
|
||||
<%= link_to "(#{@project.project_score.attach_num})", project_files_path(@project), :class => "subnav_num c_orange",:id=>'project_files_count_nav' %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="subNav subNav_jiantou" id="expand_tools_expand"><%= l(:label_project_more) %></div>
|
||||
<ul class="navContent" id="navContent">
|
||||
<%= render 'projects/tools_expand' %>
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
<%= project_pull_rquest_path %>
|
|
@ -805,6 +805,13 @@ RedmineApp::Application.routes.draw do
|
|||
end
|
||||
end
|
||||
|
||||
resources :pull_rquests do
|
||||
collection do
|
||||
end
|
||||
member do
|
||||
end
|
||||
end
|
||||
|
||||
resources :quality_analysis, :only => [:index, :create, :edit, :update, :delete] do
|
||||
collection do
|
||||
end
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
require 'rails_helper'
|
||||
|
||||
RSpec.describe PullRquestsController, :type => :controller do
|
||||
|
||||
end
|
Loading…
Reference in New Issue