Commit d6ac38133c57336fa555532c1e85d7ad99499def
1 parent
98bea4b1
Exists in
master
and in
4 other branches
Admin.projects: remove views and route specs
Showing
4 changed files
with
0 additions
and
109 deletions
Show diff stats
app/views/admin/projects/_form.html.haml
| @@ -1,86 +0,0 @@ | @@ -1,86 +0,0 @@ | ||
| 1 | -= form_for [:admin, project] do |f| | ||
| 2 | - -if project.errors.any? | ||
| 3 | - .alert.alert-error | ||
| 4 | - %ul | ||
| 5 | - - project.errors.full_messages.each do |msg| | ||
| 6 | - %li= msg | ||
| 7 | - | ||
| 8 | - .clearfix.project_name_holder | ||
| 9 | - = f.label :name do | ||
| 10 | - Project name is | ||
| 11 | - .input | ||
| 12 | - = f.text_field :name, placeholder: "Example Project", class: "xxlarge" | ||
| 13 | - | ||
| 14 | - - if project.repo_exists? | ||
| 15 | - %fieldset.adv_settings | ||
| 16 | - %legend Advanced settings: | ||
| 17 | - .clearfix | ||
| 18 | - = f.label :path do | ||
| 19 | - Path | ||
| 20 | - .input | ||
| 21 | - = text_field_tag :ppath, @project.repository.path_to_repo, class: "xlarge", disabled: true | ||
| 22 | - | ||
| 23 | - .clearfix | ||
| 24 | - = f.label :default_branch, "Default Branch" | ||
| 25 | - .input= f.select(:default_branch, @project.repository.heads.map(&:name), {}, style: "width:210px;") | ||
| 26 | - | ||
| 27 | - %fieldset.adv_settings | ||
| 28 | - %legend Features: | ||
| 29 | - | ||
| 30 | - .clearfix | ||
| 31 | - = f.label :issues_enabled, "Issues" | ||
| 32 | - .input= f.check_box :issues_enabled | ||
| 33 | - | ||
| 34 | - - if Project.issues_tracker.values.count > 1 | ||
| 35 | - .clearfix | ||
| 36 | - = f.label :issues_tracker, "Issues tracker", class: 'control-label' | ||
| 37 | - .input= f.select(:issues_tracker, Project.issues_tracker.values, {}, { disabled: !@project.issues_enabled }) | ||
| 38 | - | ||
| 39 | - .clearfix | ||
| 40 | - = f.label :issues_tracker_id, "Project name or id in issues tracker", class: 'control-label' | ||
| 41 | - .input= f.text_field :issues_tracker_id, class: "xxlarge", disabled: !@project.can_have_issues_tracker_id? | ||
| 42 | - | ||
| 43 | - .clearfix | ||
| 44 | - = f.label :merge_requests_enabled, "Merge Requests" | ||
| 45 | - .input= f.check_box :merge_requests_enabled | ||
| 46 | - | ||
| 47 | - .clearfix | ||
| 48 | - = f.label :wall_enabled, "Wall" | ||
| 49 | - .input= f.check_box :wall_enabled | ||
| 50 | - | ||
| 51 | - .clearfix | ||
| 52 | - = f.label :wiki_enabled, "Wiki" | ||
| 53 | - .input= f.check_box :wiki_enabled | ||
| 54 | - | ||
| 55 | - %fieldset.features | ||
| 56 | - %legend Public mode: | ||
| 57 | - .clearfix | ||
| 58 | - = f.label :public do | ||
| 59 | - %span Allow public http clone | ||
| 60 | - .input= f.check_box :public | ||
| 61 | - | ||
| 62 | - %fieldset.features | ||
| 63 | - %legend Transfer: | ||
| 64 | - .control-group | ||
| 65 | - = f.label :namespace_id do | ||
| 66 | - %span Namespace | ||
| 67 | - .controls | ||
| 68 | - = f.select :namespace_id, namespaces_options(@project.namespace_id, :all), {}, {class: 'chosen'} | ||
| 69 | - %br | ||
| 70 | - %ul.prepend-top-10.cred | ||
| 71 | - %li Be careful. Changing project namespace can have unintended side effects | ||
| 72 | - %li You can transfer project only to namespaces you can manage | ||
| 73 | - %li You will need to update your local repositories to point to the new location. | ||
| 74 | - | ||
| 75 | - | ||
| 76 | - .actions | ||
| 77 | - = f.submit 'Save Project', class: "btn btn-save" | ||
| 78 | - = link_to 'Cancel', admin_projects_path, class: "btn btn-cancel" | ||
| 79 | - | ||
| 80 | - | ||
| 81 | - | ||
| 82 | -:javascript | ||
| 83 | - $(function(){ | ||
| 84 | - new Projects(); | ||
| 85 | - }) | ||
| 86 | - |
app/views/admin/projects/edit.html.haml
app/views/admin/projects/team.html.haml
spec/routing/admin_routing_spec.rb
| @@ -66,33 +66,13 @@ end | @@ -66,33 +66,13 @@ end | ||
| 66 | # PUT /admin/projects/:id(.:format) admin/projects#update {:id=>/[^\/]+/} | 66 | # PUT /admin/projects/:id(.:format) admin/projects#update {:id=>/[^\/]+/} |
| 67 | # DELETE /admin/projects/:id(.:format) admin/projects#destroy {:id=>/[^\/]+/} | 67 | # DELETE /admin/projects/:id(.:format) admin/projects#destroy {:id=>/[^\/]+/} |
| 68 | describe Admin::ProjectsController, "routing" do | 68 | describe Admin::ProjectsController, "routing" do |
| 69 | - it "to #team" do | ||
| 70 | - get("/admin/projects/gitlab/team").should route_to('admin/projects#team', id: 'gitlab') | ||
| 71 | - end | ||
| 72 | - | ||
| 73 | - it "to #team_update" do | ||
| 74 | - put("/admin/projects/gitlab/team_update").should route_to('admin/projects#team_update', id: 'gitlab') | ||
| 75 | - end | ||
| 76 | - | ||
| 77 | it "to #index" do | 69 | it "to #index" do |
| 78 | get("/admin/projects").should route_to('admin/projects#index') | 70 | get("/admin/projects").should route_to('admin/projects#index') |
| 79 | end | 71 | end |
| 80 | 72 | ||
| 81 | - it "to #edit" do | ||
| 82 | - get("/admin/projects/gitlab/edit").should route_to('admin/projects#edit', id: 'gitlab') | ||
| 83 | - end | ||
| 84 | - | ||
| 85 | it "to #show" do | 73 | it "to #show" do |
| 86 | get("/admin/projects/gitlab").should route_to('admin/projects#show', id: 'gitlab') | 74 | get("/admin/projects/gitlab").should route_to('admin/projects#show', id: 'gitlab') |
| 87 | end | 75 | end |
| 88 | - | ||
| 89 | - it "to #update" do | ||
| 90 | - put("/admin/projects/gitlab").should route_to('admin/projects#update', id: 'gitlab') | ||
| 91 | - end | ||
| 92 | - | ||
| 93 | - it "to #destroy" do | ||
| 94 | - delete("/admin/projects/gitlab").should route_to('admin/projects#destroy', id: 'gitlab') | ||
| 95 | - end | ||
| 96 | end | 76 | end |
| 97 | 77 | ||
| 98 | # edit_admin_project_member GET /admin/projects/:project_id/members/:id/edit(.:format) admin/projects/members#edit {:id=>/[^\/]+/, :project_id=>/[^\/]+/} | 78 | # edit_admin_project_member GET /admin/projects/:project_id/members/:id/edit(.:format) admin/projects/members#edit {:id=>/[^\/]+/, :project_id=>/[^\/]+/} |