summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-01-28 11:54:11 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-01-28 11:54:11 +0200
commitc7933d7a78433f026bd4344667f6d4b270bfef15 (patch)
tree874e799b3ec3ecdcc2ea8784804880ea648ed9e4 /app
parent1afd93ee1a91232a14353c0fdcecd6ee7d4b3402 (diff)
downloadgitlab-ce-c7933d7a78433f026bd4344667f6d4b270bfef15.tar.gz
Bootstrap: team
Diffstat (limited to 'app')
-rw-r--r--app/assets/stylesheets/commits.css.scss21
-rw-r--r--app/assets/stylesheets/common.scss9
-rw-r--r--app/assets/stylesheets/style.scss20
-rw-r--r--app/controllers/team_members_controller.rb2
-rw-r--r--app/views/commits/show.html.haml2
-rw-r--r--app/views/issues/index.html.haml14
-rw-r--r--app/views/layouts/_flash.html.haml2
-rw-r--r--app/views/layouts/_project_side_right.html.haml65
-rw-r--r--app/views/notes/_per_line_form.html.haml23
-rw-r--r--app/views/projects/_team.html.haml10
-rw-r--r--app/views/team_members/_show.html.haml28
-rw-r--r--app/views/team_members/show.html.haml25
12 files changed, 106 insertions, 115 deletions
diff --git a/app/assets/stylesheets/commits.css.scss b/app/assets/stylesheets/commits.css.scss
index 1addb257116..15fe06e28c5 100644
--- a/app/assets/stylesheets/commits.css.scss
+++ b/app/assets/stylesheets/commits.css.scss
@@ -113,3 +113,24 @@ ul.bordered-list li:last-child { border:none }
tr.line_notes_row {
border-bottom:1px solid #DDD;
}
+
+/** FLASH **/
+#flash_container {
+ height:45px;
+ position:fixed;
+ z-index:10001;
+ top:0px;
+ width:100%;
+ margin-bottom:15px;
+ overflow:hidden;
+ background:white;
+ cursor:pointer;
+ border-bottom:1px solid #777;
+
+ h4 {
+ color:#444;
+ font-size:22px;
+ padding-top:5px;
+ margin:2px;
+ }
+}
diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss
index 8167e23cf87..998930eab0c 100644
--- a/app/assets/stylesheets/common.scss
+++ b/app/assets/stylesheets/common.scss
@@ -138,6 +138,15 @@ img.avatar {
padding-right:5px;
}
+.media-grid {
+ h3, h2 , h4 {
+ &.media_h {
+ padding-left:10px;
+ float:left;
+ }
+ }
+}
+
@import "reset_bootstrap.scss";
@import "top_panel.scss";
@import "projects.css.scss";
diff --git a/app/assets/stylesheets/style.scss b/app/assets/stylesheets/style.scss
index 0921b048348..a090e322440 100644
--- a/app/assets/stylesheets/style.scss
+++ b/app/assets/stylesheets/style.scss
@@ -483,26 +483,6 @@ body, button, input, select, textarea {
border-width: 1px;
}
-/** FLASH **/
-#flash_container {
- height:45px;
- position:fixed;
- z-index:10001;
- top:0px;
- width:100%;
- margin-bottom:15px;
- overflow:hidden;
- background:white;
- cursor:pointer;
- border-bottom:1px solid #777;
-
- h4 {
- color:#444;
- font-size:22px;
- padding-top:5px;
- margin:2px;
- }
-}
.errors_holder {
diff --git a/app/controllers/team_members_controller.rb b/app/controllers/team_members_controller.rb
index c05602f9a80..ab51c19e0c8 100644
--- a/app/controllers/team_members_controller.rb
+++ b/app/controllers/team_members_controller.rb
@@ -40,7 +40,7 @@ class TeamMembersController < ApplicationController
@team_member.destroy
respond_to do |format|
- format.html { redirect_to root_path }
+ format.html { redirect_to team_project_path(@project) }
format.js { render :nothing => true }
end
end
diff --git a/app/views/commits/show.html.haml b/app/views/commits/show.html.haml
index d5bc2b8143a..05a4c38de5a 100644
--- a/app/views/commits/show.html.haml
+++ b/app/views/commits/show.html.haml
@@ -1,6 +1,6 @@
.commit
%span.commit-info
- = link_to tree_project_ref_path(@project, @commit.id), :class => "btn" do
+ = link_to tree_project_ref_path(@project, @commit.id), :class => "btn right" do
Browse Code »
- if @commit.author_email
= image_tag gravatar_icon(@commit.author_email), :class => "left", :width => 40, :style => "padding-right:5px;"
diff --git a/app/views/issues/index.html.haml b/app/views/issues/index.html.haml
index 3e85e5cded8..ddf55350c05 100644
--- a/app/views/issues/index.html.haml
+++ b/app/views/issues/index.html.haml
@@ -1,11 +1,3 @@
-- if can? current_user, :write_issue, @project
- = content_for :sidebar_top_block do
- - if current_user.can_create_project?
- .alert-message.block-message.error
- You are able to create an issue. Click on button to add a new one
- = link_to new_project_issue_path(@project), :class => "btn small", :title => "New Issue", :remote => true do
- New Issue
-
- if current_user.private_token
= content_for :rss_icon do
.rss-icon
@@ -14,7 +6,11 @@
.issues_content
- %h3 Issues
+ %h3
+ Issues
+ - if can? current_user, :write_issue, @project
+ = link_to new_project_issue_path(@project), :class => "right btn small", :title => "New Issue", :remote => true do
+ New Issue
%hr
%div#issues-table-holder
%ul.pills.left
diff --git a/app/views/layouts/_flash.html.haml b/app/views/layouts/_flash.html.haml
index 4011485c55d..5139aed498c 100644
--- a/app/views/layouts/_flash.html.haml
+++ b/app/views/layouts/_flash.html.haml
@@ -10,7 +10,7 @@
$("#flash_container").click(function(){
$(this).slideUp("slow");
});
- setTimeout("hideFlash()",2000);
+ setTimeout("hideFlash()",3000);
});
function hideFlash(){
diff --git a/app/views/layouts/_project_side_right.html.haml b/app/views/layouts/_project_side_right.html.haml
index a8793976b4d..79e1b6680b8 100644
--- a/app/views/layouts/_project_side_right.html.haml
+++ b/app/views/layouts/_project_side_right.html.haml
@@ -1,38 +1,43 @@
%aside.project-right
- - if content_for? :sidebar_top_block
- = yield :sidebar_top_block
+ - if content_for? :sidebar_all
+ = render :sidebar_all
- else
- - if current_user.can_create_project?
- .alert-message.block-message.info
- You can create at least
- = current_user.projects_limit
- projects. Click on button to add a new one
- = link_to new_project_path, :class => "btn small" do
- New Project
+ - if content_for? :sidebar_top_block
+ = yield :sidebar_top_block
+ - else
+ - if can? current_user, :write_project, @project
+ %h4 Report
+ %ul
+ %li
+ = link_to new_project_issue_path(@project), :title => "New Issue", :class => "" do
+ New Issue »
+ %li
+ = link_to new_project_merge_request_path(@project), :title => "New Merge Request", :class => "" do
+ New Merge Request »
- %h4
- Recent Projects:
- %ul
- - current_user.projects.order("id DESC").limit(5).each do |project|
- %li
- = link_to project_path(project) do
- = project.name
+ %h4
+ Recent Projects:
+ %ul
+ - current_user.projects.order("id DESC").limit(5).each do |project|
+ %li
+ = link_to project_path(project) do
+ = project.name
- %h4
- Recent Issues:
- %ul
- - current_user.assigned_issues.order("id DESC").limit(5).each do |issue|
- %li
- = link_to project_issue_path(issue.project, issue) do
- = truncate issue.title
+ %h4
+ Recent Issues:
+ %ul
+ - current_user.assigned_issues.order("id DESC").limit(5).each do |issue|
+ %li
+ = link_to project_issue_path(issue.project, issue) do
+ = truncate issue.title
- %h4
- Recent Requests:
- %ul
- - current_user.assigned_merge_requests.order("id DESC").limit(5).each do |issue|
- %li
- = link_to project_merge_request_path(issue.project, issue) do
- = truncate issue.title
+ %h4
+ Recent Requests:
+ %ul
+ - current_user.assigned_merge_requests.order("id DESC").limit(5).each do |issue|
+ %li
+ = link_to project_merge_request_path(issue.project, issue) do
+ = truncate issue.title
diff --git a/app/views/notes/_per_line_form.html.haml b/app/views/notes/_per_line_form.html.haml
index 72989320226..00fa3db82cd 100644
--- a/app/views/notes/_per_line_form.html.haml
+++ b/app/views/notes/_per_line_form.html.haml
@@ -1,29 +1,22 @@
%table{:style => "display:none;"}
%tr.per_line_form
%td{:colspan => 3 }
- %div
+ %div.well
= form_for [@project, @note], :remote => "true", :multipart => true do |f|
+ %h3 Leave a note
-if @note.errors.any?
- .errors.error
+ .alert-message.block-message.error
- @note.errors.full_messages.each do |msg|
%div= msg
= f.hidden_field :noteable_id
= f.hidden_field :noteable_type
= f.hidden_field :line_code
-
- %div
- = f.label :note
- %cite.cgray markdown supported
- %br
- %br
- = f.text_area :note, :size => 255
-
- .clear
- %br
- = f.submit 'Add note', :class => "positive-button", :id => "submit_note"
- .right
- = link_to "Close", "#", :class => "grey-button hide-button"
+ = f.text_area :note, :size => 255
+ .prepend-top-10
+ = f.submit 'Add note', :class => "btn primary", :id => "submit_note"
+ .right
+ = link_to "Close", "#", :class => "btn hide-button"
:javascript
$(function(){
diff --git a/app/views/projects/_team.html.haml b/app/views/projects/_team.html.haml
index 3d033a85913..7271479e1d8 100644
--- a/app/views/projects/_team.html.haml
+++ b/app/views/projects/_team.html.haml
@@ -1,10 +1,4 @@
-%table.no-borders#team-table
- %thead
- %th Name
- %th Project
- %th Repository
- - if can? current_user, :admin_team_member, @project
- %th Actions
+%ul.media-grid
- @project.users_projects.each do |up|
= render(:partial => 'team_members/show', :locals => {:member => up})
@@ -15,5 +9,7 @@
});
})
+ /*
$('.delete-team-member').live('ajax:success', function() {
$(this).closest('tr').fadeOut(); });
+ */
diff --git a/app/views/team_members/_show.html.haml b/app/views/team_members/_show.html.haml
index b0e8f17204f..8bf3e3856a6 100644
--- a/app/views/team_members/_show.html.haml
+++ b/app/views/team_members/_show.html.haml
@@ -1,19 +1,19 @@
- user = member.user
- allow_admin = can? current_user, :admin_project, @project
-%tr{:id => dom_id(member)}
- %td
- = link_to image_tag(gravatar_icon(user.email), :class => "left", :width => 40, :style => "padding:0 5px;"), project_team_member_path(@project, member)
+%li{:id => dom_id(member)}
+ = link_to project_team_member_path(@project, member) do
+ = image_tag gravatar_icon(user.email, 90), :class => "thumbnail"
+ .row
+ .span6
+ %h4
+ = truncate(user.name, :lenght => 24)
+ %small= truncate user.email, :lenght => 24
- = link_to truncate(user.name, :lenght => 24), project_team_member_path(@project, member)
- %br
- .cgray{:style => "padding-top:10px;"}= truncate user.email, :lenght => 24
- %td
+ .span3
= form_for(member, :as => :team_member, :url => project_team_member_path(@project, member)) do |f|
- = f.select :project_access, options_for_select(Project.access_options, member.project_access), {}, :class => "project-access-select", :disabled => !allow_admin
- %td
+ = f.select :project_access, options_for_select(Project.access_options, member.project_access), {}, :class => "medium project-access-select", :disabled => !allow_admin
+ .span3
= form_for(member, :as => :team_member, :url => project_team_member_path(@project, member)) do |f|
- = f.select :repo_access, options_for_select(Repository.access_options, member.repo_access), {}, :class => "repo-access-select", :disabled => !allow_admin
- - if allow_admin
- %td
- = link_to 'Cancel', project_team_member_path(:project_id => @project, :id => member.id), :confirm => 'Are you sure?', :method => :delete, :class => "grey-button negative delete-team-member", :remote => true
-
+ = f.select :repo_access, options_for_select(Repository.access_options, member.repo_access), {}, :class => "medium repo-access-select", :disabled => !allow_admin
+ - if @project.owner == user
+ %span.label Project Owner
diff --git a/app/views/team_members/show.html.haml b/app/views/team_members/show.html.haml
index 6293eee9789..3712819aace 100644
--- a/app/views/team_members/show.html.haml
+++ b/app/views/team_members/show.html.haml
@@ -1,21 +1,13 @@
- allow_admin = can? current_user, :admin_project, @project
- user = @team_member.user
%div
- %span.entity-info
- = link_to team_project_path(@project) do
- .entity-button
- Team
- %i
+ = link_to team_project_path(@project), :class => "btn right" do
+ Team »
- = image_tag gravatar_icon(user.email), :class => "left", :width => 40, :style => "padding-right:5px;"
- %span.commit-title
- %strong
- = user.name
- %span.commit-author
- %strong
- = user.email
- %hr
- %br
+ .media-grid
+ = link_to "#" do
+ = image_tag gravatar_icon(user.email, 90), :class => "thumbnail"
+ %h3.media_h= user.name
%table.no-borders
%tr
@@ -59,9 +51,8 @@
%td= user.twitter
- if can? current_user, :admin_project, @project
- .merge-tabs
- .right
- = link_to 'Remove from team', [@project, @issue], :confirm => 'Are you sure?', :method => :delete, :class => "red-button"
+ .actions
+ = link_to 'Remove from team', project_team_member_path(:project_id => @project, :id => @team_member.id), :confirm => 'Are you sure?', :method => :delete, :class => "btn danger"
:javascript
$(function(){