v1.0
This commit is contained in:
parent
0f43e98ef8
commit
d378468794
317 changed files with 11347 additions and 0 deletions
6
app/views/admin/_top_menu.html.haml
Normal file
6
app/views/admin/_top_menu.html.haml
Normal file
|
@ -0,0 +1,6 @@
|
|||
%div.top_project_menu
|
||||
%span= link_to "Users", admin_users_path, :style => "width:50px;", :class => controller.controller_name == "users" ? "current" : nil
|
||||
%span= link_to "Projects", admin_projects_path, :style => "width:50px;", :class => controller.controller_name == "projects" ? "current" : nil
|
||||
%span= link_to "Teams", admin_team_members_path, :style => "width:50px;", :class => controller.controller_name == "team_members" ? "current" : nil
|
||||
%span= link_to "Emails", admin_emails_path, :style => "width:50px;", :class => controller.controller_name == "mailer" ? "current" : nil
|
||||
|
29
app/views/admin/mailer/preview.html.haml
Normal file
29
app/views/admin/mailer/preview.html.haml
Normal file
|
@ -0,0 +1,29 @@
|
|||
%p This is page with preview for all system emails that are sent to user
|
||||
%p Email previews built based on existing Project/Commit/Issue base - so some preview maybe unavailable unless object appear in system
|
||||
|
||||
#accordion
|
||||
%h3
|
||||
%a New user
|
||||
%div
|
||||
%iframe{ :src=> admin_mailer_preview_user_new_path, :width=>"100%", :height=>"350"}
|
||||
%h3
|
||||
%a New issue
|
||||
%div
|
||||
%iframe{ :src=> admin_mailer_preview_issue_new_path, :width=>"100%", :height=>"350"}
|
||||
%h3
|
||||
%a Commit note
|
||||
%div
|
||||
%iframe{ :src=> admin_mailer_preview_note_path(:type => "Commit"), :width=>"100%", :height=>"350"}
|
||||
%h3
|
||||
%a Issue note
|
||||
%div
|
||||
%iframe{ :src=> admin_mailer_preview_note_path(:type => "Issue"), :width=>"100%", :height=>"350"}
|
||||
%h3
|
||||
%a Wall note
|
||||
%div
|
||||
%iframe{ :src=> admin_mailer_preview_note_path(:type => "Wall"), :width=>"100%", :height=>"350"}
|
||||
|
||||
|
||||
:javascript
|
||||
$(function() {
|
||||
$( "#accordion" ).accordion(); });
|
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})
|
34
app/views/admin/team_members/_form.html.haml
Normal file
34
app/views/admin/team_members/_form.html.haml
Normal file
|
@ -0,0 +1,34 @@
|
|||
= form_for @admin_team_member, :as => :team_member, :url => @admin_team_member.new_record? ? admin_team_members_path(@admin_team_member) : admin_team_member_path(@admin_team_member) do |f|
|
||||
-if @admin_team_member.errors.any?
|
||||
#error_explanation
|
||||
%h2= "#{pluralize(@admin_team_member.errors.count, "error")} prohibited this admin_project from being saved:"
|
||||
%ul
|
||||
- @admin_team_member.errors.full_messages.each do |msg|
|
||||
%li= msg
|
||||
|
||||
.span-10
|
||||
- if @admin_team_member.new_record?
|
||||
.field
|
||||
= f.label :user_id
|
||||
%br
|
||||
= f.select :user_id, User.all.map { |user| [user.name, user.id] }
|
||||
.field
|
||||
= f.label :project_id
|
||||
%br
|
||||
= f.select :project_id, Project.all.map { |user| [user.name, user.id] }
|
||||
|
||||
.span-10
|
||||
.span-6
|
||||
%b Access:
|
||||
.span-8
|
||||
= f.check_box :read
|
||||
Web Access (Browse Repo)
|
||||
.span-8
|
||||
= f.check_box :write
|
||||
Git Access (User will be added to commiters list)
|
||||
.span-6.append-bottom
|
||||
= f.check_box :admin
|
||||
Admin (Can manage project)
|
||||
%hr
|
||||
.actions
|
||||
= f.submit 'Save'
|
5
app/views/admin/team_members/edit.html.haml
Normal file
5
app/views/admin/team_members/edit.html.haml
Normal file
|
@ -0,0 +1,5 @@
|
|||
= render 'form'
|
||||
|
||||
= link_to 'Show', admin_team_member_path(@admin_team_member)
|
||||
\|
|
||||
= link_to 'Back', admin_team_members_path
|
30
app/views/admin/team_members/index.html.haml
Normal file
30
app/views/admin/team_members/index.html.haml
Normal file
|
@ -0,0 +1,30 @@
|
|||
- @admin_team_members.group_by(&:project).sort.each do |project, members|
|
||||
%h3= link_to project.name, [:admin, project]
|
||||
%table
|
||||
%tr
|
||||
%th Name
|
||||
%th Email
|
||||
%th Read
|
||||
%th Git
|
||||
%th Manage
|
||||
%th Added
|
||||
%th
|
||||
%th
|
||||
%th
|
||||
- members.each do |tm|
|
||||
- user = tm.user
|
||||
%tr
|
||||
%td.span-6= tm.user_name
|
||||
%td.span-6= tm.user_email
|
||||
%td.span-1= check_box_tag "read", 1, project.readers.include?(user), :disabled => :disabled
|
||||
%td.span-1= check_box_tag "commit", 1, project.writers.include?(user), :disabled => :disabled
|
||||
%td.span-2= check_box_tag "admin", 1, project.admins.include?(user), :disabled => :disabled
|
||||
%td.span-3= time_ago_in_words(tm.updated_at) + " ago"
|
||||
%td= link_to 'Show', admin_team_member_path(tm)
|
||||
%td= link_to 'Edit', edit_admin_team_member_path(tm), :id => "edit_#{dom_id(tm)}"
|
||||
%td= link_to 'Destroy', admin_team_member_path(tm), :confirm => 'Are you sure?', :method => :delete
|
||||
|
||||
%br
|
||||
|
||||
= paginate @admin_team_members
|
||||
= link_to 'New Team Member', new_admin_team_member_path
|
5
app/views/admin/team_members/new.html.haml
Normal file
5
app/views/admin/team_members/new.html.haml
Normal file
|
@ -0,0 +1,5 @@
|
|||
%h1 New team member
|
||||
|
||||
= render 'form'
|
||||
|
||||
= link_to 'Back', admin_team_members_path
|
32
app/views/admin/team_members/show.html.haml
Normal file
32
app/views/admin/team_members/show.html.haml
Normal file
|
@ -0,0 +1,32 @@
|
|||
%p#notice= notice
|
||||
|
||||
.span-10
|
||||
%p
|
||||
%b Name:
|
||||
= @admin_team_member.user_name
|
||||
%p
|
||||
%b Project:
|
||||
= @admin_team_member.project.name
|
||||
%p
|
||||
%b Since:
|
||||
= @admin_team_member.updated_at
|
||||
|
||||
|
||||
.span-10
|
||||
.span-6
|
||||
%b Access:
|
||||
.span-8
|
||||
= check_box_tag "read", 1, @admin_team_member.read, :disabled => :disabled
|
||||
Web Access (Browse Repo)
|
||||
.span-8
|
||||
= check_box_tag "commit", 1, @admin_team_member.write, :disabled => :disabled
|
||||
Git Access (User will be added to commiters list)
|
||||
.span-6.append-bottom
|
||||
= check_box_tag "admin", 1, @admin_team_member.admin, :disabled => :disabled
|
||||
Admin (Can manage project)
|
||||
|
||||
%hr
|
||||
|
||||
= link_to 'Edit', edit_admin_team_member_path(@admin_project)
|
||||
\|
|
||||
= link_to 'Back', admin_team_members_path
|
38
app/views/admin/users/_form.html.haml
Normal file
38
app/views/admin/users/_form.html.haml
Normal file
|
@ -0,0 +1,38 @@
|
|||
.user_new
|
||||
= form_for [:admin, @admin_user] do |f|
|
||||
-if @admin_user.errors.any?
|
||||
#error_explanation
|
||||
%h2= "#{pluralize(@admin_user.errors.count, "error")} prohibited this admin_user from being saved:"
|
||||
%ul
|
||||
- @admin_user.errors.full_messages.each do |msg|
|
||||
%li= msg
|
||||
|
||||
.span-24
|
||||
.span-11.colborder
|
||||
.field
|
||||
= f.label :name
|
||||
%br
|
||||
= f.text_field :name
|
||||
.field
|
||||
= f.label :email
|
||||
%br
|
||||
= f.text_field :email
|
||||
.field
|
||||
= f.label :password
|
||||
%br
|
||||
= f.password_field :password
|
||||
.field
|
||||
= f.label :password_confirmation
|
||||
%br
|
||||
= f.password_field :password_confirmation
|
||||
.span-11
|
||||
.field.prepend-top.append-bottom
|
||||
= f.check_box :admin
|
||||
= f.label :admin
|
||||
.field.prepend-top
|
||||
= f.text_field :projects_limit, :class => "small_input"
|
||||
= f.label :projects_limit
|
||||
.clear
|
||||
%br
|
||||
.actions
|
||||
= f.submit 'Save', :class => "lbutton"
|
4
app/views/admin/users/edit.html.haml
Normal file
4
app/views/admin/users/edit.html.haml
Normal file
|
@ -0,0 +1,4 @@
|
|||
= render 'form'
|
||||
|
||||
= link_to 'Show', [:admin, @admin_user], :class => "right lbutton"
|
||||
= link_to 'Back', admin_users_path, :class => "right lbutton"
|
24
app/views/admin/users/index.html.haml
Normal file
24
app/views/admin/users/index.html.haml
Normal file
|
@ -0,0 +1,24 @@
|
|||
%table
|
||||
%tr
|
||||
%th Admin
|
||||
%th Name
|
||||
%th Email
|
||||
%th Projects
|
||||
%th
|
||||
%th
|
||||
%th
|
||||
|
||||
- @admin_users.each do |user|
|
||||
%tr
|
||||
%td= check_box_tag "admin", 1, user.admin, :disabled => :disabled
|
||||
%td= user.name
|
||||
%td= user.email
|
||||
%td= user.users_projects.count
|
||||
%td= link_to 'Show', [:admin, user]
|
||||
%td= link_to 'Edit', edit_admin_user_path(user), :id => "edit_#{dom_id(user)}"
|
||||
%td= link_to 'Destroy', [:admin, user], :confirm => 'Are you sure?', :method => :delete
|
||||
|
||||
%br
|
||||
|
||||
= paginate @admin_users
|
||||
= link_to 'New User', new_admin_user_path
|
6
app/views/admin/users/new.html.haml
Normal file
6
app/views/admin/users/new.html.haml
Normal file
|
@ -0,0 +1,6 @@
|
|||
%h1 New user
|
||||
|
||||
= render 'form'
|
||||
|
||||
|
||||
= link_to 'Back', admin_users_path, :class => "right lbutton"
|
45
app/views/admin/users/show.html.haml
Normal file
45
app/views/admin/users/show.html.haml
Normal file
|
@ -0,0 +1,45 @@
|
|||
%p#notice= notice
|
||||
|
||||
.span-8.colborder
|
||||
%p
|
||||
%b Name:
|
||||
= @admin_user.name
|
||||
%p
|
||||
%b Email:
|
||||
= @admin_user.email
|
||||
%p
|
||||
%b Admin:
|
||||
= @admin_user.admin
|
||||
%p
|
||||
%b Projects limit:
|
||||
= @admin_user.projects_limit
|
||||
|
||||
.clear
|
||||
= link_to 'Edit', edit_admin_user_path(@admin_user)
|
||||
\|
|
||||
= link_to 'Back', admin_users_path
|
||||
|
||||
.span-14
|
||||
%h2 Projects
|
||||
|
||||
%table.round-borders
|
||||
%tr
|
||||
%th Name
|
||||
%th Added
|
||||
%th Web
|
||||
%th Git
|
||||
%th Admin
|
||||
%th
|
||||
|
||||
- @admin_user.users_projects.each do |tm|
|
||||
- project = tm.project
|
||||
%tr
|
||||
%td= link_to project.name, admin_project_path(project)
|
||||
%td= time_ago_in_words(tm.updated_at) + " ago"
|
||||
%td= check_box_tag "read", 1, project.readers.include?(@admin_user), :disabled => :disabled
|
||||
%td= check_box_tag "commit", 1, project.writers.include?(@admin_usertm), :disabled => :disabled
|
||||
%td.span-2= check_box_tag "admin", 1, project.admins.include?(@admin_user), :disabled => :disabled
|
||||
%td= link_to 'Edit', edit_admin_team_member_path(tm)
|
||||
%td= link_to 'Cancel', admin_team_member_path(tm), :confirm => 'Are you sure?', :method => :delete
|
||||
|
||||
= link_to 'Add To Another Project', new_admin_team_member_path(:team_member => {:user_id => @admin_user.id})
|
Loading…
Add table
Add a link
Reference in a new issue