Commit c7933d7a authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Bootstrap: team

parent 1afd93ee
...@@ -113,3 +113,24 @@ ul.bordered-list li:last-child { border:none } ...@@ -113,3 +113,24 @@ ul.bordered-list li:last-child { border:none }
tr.line_notes_row { tr.line_notes_row {
border-bottom:1px solid #DDD; 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;
}
}
...@@ -138,6 +138,15 @@ img.avatar { ...@@ -138,6 +138,15 @@ img.avatar {
padding-right:5px; padding-right:5px;
} }
.media-grid {
h3, h2 , h4 {
&.media_h {
padding-left:10px;
float:left;
}
}
}
@import "reset_bootstrap.scss"; @import "reset_bootstrap.scss";
@import "top_panel.scss"; @import "top_panel.scss";
@import "projects.css.scss"; @import "projects.css.scss";
......
...@@ -483,26 +483,6 @@ body, button, input, select, textarea { ...@@ -483,26 +483,6 @@ body, button, input, select, textarea {
border-width: 1px; 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 { .errors_holder {
......
...@@ -40,7 +40,7 @@ class TeamMembersController < ApplicationController ...@@ -40,7 +40,7 @@ class TeamMembersController < ApplicationController
@team_member.destroy @team_member.destroy
respond_to do |format| respond_to do |format|
format.html { redirect_to root_path } format.html { redirect_to team_project_path(@project) }
format.js { render :nothing => true } format.js { render :nothing => true }
end end
end end
......
.commit .commit
%span.commit-info %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 » Browse Code »
- if @commit.author_email - if @commit.author_email
= image_tag gravatar_icon(@commit.author_email), :class => "left", :width => 40, :style => "padding-right:5px;" = image_tag gravatar_icon(@commit.author_email), :class => "left", :width => 40, :style => "padding-right:5px;"
......
- 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 - if current_user.private_token
= content_for :rss_icon do = content_for :rss_icon do
.rss-icon .rss-icon
...@@ -14,7 +6,11 @@ ...@@ -14,7 +6,11 @@
.issues_content .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 %hr
%div#issues-table-holder %div#issues-table-holder
%ul.pills.left %ul.pills.left
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
$("#flash_container").click(function(){ $("#flash_container").click(function(){
$(this).slideUp("slow"); $(this).slideUp("slow");
}); });
setTimeout("hideFlash()",2000); setTimeout("hideFlash()",3000);
}); });
function hideFlash(){ function hideFlash(){
......
%aside.project-right %aside.project-right
- if content_for? :sidebar_top_block - if content_for? :sidebar_all
= yield :sidebar_top_block = render :sidebar_all
- else - else
- if current_user.can_create_project? - if content_for? :sidebar_top_block
.alert-message.block-message.info = yield :sidebar_top_block
You can create at least - else
= current_user.projects_limit - if can? current_user, :write_project, @project
projects. Click on button to add a new one %h4 Report
= link_to new_project_path, :class => "btn small" do %ul
New Project %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 %h4
Recent Projects: Recent Projects:
%ul %ul
- current_user.projects.order("id DESC").limit(5).each do |project| - current_user.projects.order("id DESC").limit(5).each do |project|
%li %li
= link_to project_path(project) do = link_to project_path(project) do
= project.name = project.name
%h4 %h4
Recent Issues: Recent Issues:
%ul %ul
- current_user.assigned_issues.order("id DESC").limit(5).each do |issue| - current_user.assigned_issues.order("id DESC").limit(5).each do |issue|
%li %li
= link_to project_issue_path(issue.project, issue) do = link_to project_issue_path(issue.project, issue) do
= truncate issue.title = truncate issue.title
%h4 %h4
Recent Requests: Recent Requests:
%ul %ul
- current_user.assigned_merge_requests.order("id DESC").limit(5).each do |issue| - current_user.assigned_merge_requests.order("id DESC").limit(5).each do |issue|
%li %li
= link_to project_merge_request_path(issue.project, issue) do = link_to project_merge_request_path(issue.project, issue) do
= truncate issue.title = truncate issue.title
%table{:style => "display:none;"} %table{:style => "display:none;"}
%tr.per_line_form %tr.per_line_form
%td{:colspan => 3 } %td{:colspan => 3 }
%div %div.well
= form_for [@project, @note], :remote => "true", :multipart => true do |f| = form_for [@project, @note], :remote => "true", :multipart => true do |f|
%h3 Leave a note
-if @note.errors.any? -if @note.errors.any?
.errors.error .alert-message.block-message.error
- @note.errors.full_messages.each do |msg| - @note.errors.full_messages.each do |msg|
%div= msg %div= msg
= f.hidden_field :noteable_id = f.hidden_field :noteable_id
= f.hidden_field :noteable_type = f.hidden_field :noteable_type
= f.hidden_field :line_code = f.hidden_field :line_code
= f.text_area :note, :size => 255
%div .prepend-top-10
= f.label :note = f.submit 'Add note', :class => "btn primary", :id => "submit_note"
%cite.cgray markdown supported .right
%br = link_to "Close", "#", :class => "btn hide-button"
%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"
:javascript :javascript
$(function(){ $(function(){
......
%table.no-borders#team-table %ul.media-grid
%thead
%th Name
%th Project
%th Repository
- if can? current_user, :admin_team_member, @project
%th Actions
- @project.users_projects.each do |up| - @project.users_projects.each do |up|
= render(:partial => 'team_members/show', :locals => {:member => up}) = render(:partial => 'team_members/show', :locals => {:member => up})
...@@ -15,5 +9,7 @@ ...@@ -15,5 +9,7 @@
}); });
}) })
/*
$('.delete-team-member').live('ajax:success', function() { $('.delete-team-member').live('ajax:success', function() {
$(this).closest('tr').fadeOut(); }); $(this).closest('tr').fadeOut(); });
*/
- user = member.user - user = member.user
- allow_admin = can? current_user, :admin_project, @project - allow_admin = can? current_user, :admin_project, @project
%tr{:id => dom_id(member)} %li{:id => dom_id(member)}
%td = link_to project_team_member_path(@project, member) do
= link_to image_tag(gravatar_icon(user.email), :class => "left", :width => 40, :style => "padding:0 5px;"), project_team_member_path(@project, member) = 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) .span3
%br
.cgray{:style => "padding-top:10px;"}= truncate user.email, :lenght => 24
%td
= form_for(member, :as => :team_member, :url => project_team_member_path(@project, member)) do |f| = 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 = f.select :project_access, options_for_select(Project.access_options, member.project_access), {}, :class => "medium project-access-select", :disabled => !allow_admin
%td .span3
= form_for(member, :as => :team_member, :url => project_team_member_path(@project, member)) do |f| = 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 = f.select :repo_access, options_for_select(Repository.access_options, member.repo_access), {}, :class => "medium repo-access-select", :disabled => !allow_admin
- if allow_admin - if @project.owner == user
%td %span.label Project Owner
= 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
- allow_admin = can? current_user, :admin_project, @project - allow_admin = can? current_user, :admin_project, @project
- user = @team_member.user - user = @team_member.user
%div %div
%span.entity-info = link_to team_project_path(@project), :class => "btn right" do
= link_to team_project_path(@project) do Team »
.entity-button
Team
%i
= image_tag gravatar_icon(user.email), :class => "left", :width => 40, :style => "padding-right:5px;" .media-grid
%span.commit-title = link_to "#" do
%strong = image_tag gravatar_icon(user.email, 90), :class => "thumbnail"
= user.name %h3.media_h= user.name
%span.commit-author
%strong
= user.email
%hr
%br
%table.no-borders %table.no-borders
%tr %tr
...@@ -59,9 +51,8 @@ ...@@ -59,9 +51,8 @@
%td= user.twitter %td= user.twitter
- if can? current_user, :admin_project, @project - if can? current_user, :admin_project, @project
.merge-tabs .actions
.right = 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"
= link_to 'Remove from team', [@project, @issue], :confirm => 'Are you sure?', :method => :delete, :class => "red-button"
:javascript :javascript
$(function(){ $(function(){
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment