v1.0
This commit is contained in:
parent
0f43e98ef8
commit
d378468794
317 changed files with 11347 additions and 0 deletions
30
app/views/admin/projects/_form.html.haml
Normal file
30
app/views/admin/projects/_form.html.haml
Normal file
|
@ -0,0 +1,30 @@
|
|||
= form_for [:admin, @admin_project] do |f|
|
||||
-if @admin_project.errors.any?
|
||||
#error_explanation
|
||||
%h2= "#{pluralize(@admin_project.errors.count, "error")} prohibited this admin_project from being saved:"
|
||||
%ul
|
||||
- @admin_project.errors.full_messages.each do |msg|
|
||||
%li= msg
|
||||
|
||||
.span-24
|
||||
.span-12
|
||||
.field
|
||||
= f.label :name
|
||||
%br
|
||||
= f.text_field :name
|
||||
.field
|
||||
= f.label :code
|
||||
%br
|
||||
= f.text_field :code
|
||||
.field
|
||||
= f.label :path
|
||||
%br
|
||||
= f.text_field :path
|
||||
.span-10
|
||||
.field
|
||||
= f.label :description
|
||||
%br
|
||||
= f.text_area :description
|
||||
.clear
|
||||
.actions
|
||||
= f.submit 'Save', :class => "lbutton"
|
5
app/views/admin/projects/edit.html.haml
Normal file
5
app/views/admin/projects/edit.html.haml
Normal file
|
@ -0,0 +1,5 @@
|
|||
= render 'form'
|
||||
|
||||
= link_to 'Show', [:admin, @admin_project]
|
||||
\|
|
||||
= link_to 'Back', admin_projects_path
|
26
app/views/admin/projects/index.html.haml
Normal file
26
app/views/admin/projects/index.html.haml
Normal file
|
@ -0,0 +1,26 @@
|
|||
%table
|
||||
%tr
|
||||
%th Name
|
||||
%th Code
|
||||
%th Path
|
||||
%th Team Members
|
||||
%th Last Commit
|
||||
%th
|
||||
%th
|
||||
%th
|
||||
|
||||
- @admin_projects.each do |project|
|
||||
%tr
|
||||
%td= project.name
|
||||
%td= project.code
|
||||
%td= project.path
|
||||
%td= project.users_projects.count
|
||||
%td= last_commit(project)
|
||||
%td= link_to 'Show', [:admin, project]
|
||||
%td= link_to 'Edit', edit_admin_project_path(project), :id => "edit_#{dom_id(project)}"
|
||||
%td= link_to 'Destroy', [:admin, project], :confirm => 'Are you sure?', :method => :delete
|
||||
|
||||
%br
|
||||
|
||||
= paginate @admin_projects
|
||||
= link_to 'New Project', new_admin_project_path
|
5
app/views/admin/projects/new.html.haml
Normal file
5
app/views/admin/projects/new.html.haml
Normal file
|
@ -0,0 +1,5 @@
|
|||
%h1 New project
|
||||
|
||||
= render 'form'
|
||||
|
||||
= link_to 'Back', admin_projects_path
|
45
app/views/admin/projects/show.html.haml
Normal file
45
app/views/admin/projects/show.html.haml
Normal file
|
@ -0,0 +1,45 @@
|
|||
%p#notice= notice
|
||||
|
||||
.span-8.colborder
|
||||
%h2= @admin_project.name
|
||||
|
||||
%p
|
||||
%b Name:
|
||||
= @admin_project.name
|
||||
%p
|
||||
%b Code:
|
||||
= @admin_project.code
|
||||
%p
|
||||
%b Path:
|
||||
= @admin_project.path
|
||||
%p
|
||||
%b Description:
|
||||
= @admin_project.description
|
||||
|
||||
= link_to 'Edit', edit_admin_project_path(@admin_project)
|
||||
\|
|
||||
= link_to 'Back', admin_projects_path
|
||||
|
||||
.span-14
|
||||
|
||||
%h2 Team
|
||||
|
||||
%table.round-borders
|
||||
%tr
|
||||
%th Name
|
||||
%th Added
|
||||
%th Web
|
||||
%th Git
|
||||
%th Admin
|
||||
%th
|
||||
|
||||
- @admin_project.users_projects.each do |tm|
|
||||
%tr
|
||||
%td= link_to tm.user_name, admin_team_member_path(tm)
|
||||
%td= time_ago_in_words(tm.updated_at) + " ago"
|
||||
%td= check_box_tag "read", 1, @admin_project.readers.include?(tm.user), :disabled => :disabled
|
||||
%td= check_box_tag "commit", 1, @admin_project.writers.include?(tm.user), :disabled => :disabled
|
||||
%td.span-2= check_box_tag "admin", 1, @admin_project.admins.include?(tm.user), :disabled => :disabled
|
||||
%td= link_to 'Destroy', admin_team_member_path(tm), :confirm => 'Are you sure?', :method => :delete
|
||||
|
||||
= link_to 'New Team Member', new_admin_team_member_path(:team_member => {:project_id => @admin_project.id})
|
Loading…
Add table
Add a link
Reference in a new issue