Commit 31e51dd1162c99bc2a4c710309eb7866be1a9945

Authored by gitlabhq
1 parent 46bebac9

button common style + flash messages fix

app/assets/stylesheets/projects.css.scss
... ... @@ -178,7 +178,7 @@ input.ssh_project_url {
178 178 position:fixed;
179 179 z-index:10001;
180 180 top:0px;
181   - width:980px;
  181 + width:100%;
182 182 margin-bottom:15px;
183 183 overflow:hidden;
184 184 background:white;
... ... @@ -368,3 +368,6 @@ body.dashboard.project-page .news-feed .project-updates a.project-update span.up
368 368 body.dashboard.project-page .news-feed .project-updates a.project-update span.update-author{color: #999; font-weight: normal; font-style: italic;}
369 369 body.dashboard.project-page .news-feed .project-updates a.project-update span.update-author strong{font-weight: bold; font-style: normal;}
370 370 /* eo Dashboard Page */
  371 +
  372 +body.project-page .team_member_new .span-6, .team_member_edit .span-6{ padding:10px 0; }
  373 +
... ...
app/views/admin/projects/_form.html.haml
... ... @@ -29,9 +29,9 @@
29 29 %br
30 30 = f.text_area :description
31 31 .clear
32   - %hr
  32 + %br
33 33 .actions
34   - = f.submit 'Save', :class => "lbutton"
  34 + = f.submit 'Save', :class => "grey-button"
35 35  
36 36 :javascript
37 37 $(function(){
... ...
app/views/admin/projects/edit.html.haml
1 1 %h2= @admin_project.name
2 2 = render 'form'
3 3  
4   -= link_to 'Back', admin_projects_path, :class => "right lbutton"
5   -= link_to 'Show', [:admin, @admin_project], :class => "right lbutton"
6 4 \ No newline at end of file
  5 +%br
  6 += link_to 'Back', admin_projects_path, :class => ""
  7 +|
  8 += link_to 'Show', [:admin, @admin_project], :class => ""
... ...
app/views/admin/projects/index.html.haml
... ... @@ -7,7 +7,6 @@
7 7 %th Last Commit
8 8 %th
9 9 %th
10   - %th
11 10  
12 11 - @admin_projects.each do |project|
13 12 %tr
... ... @@ -16,9 +15,8 @@
16 15 %td= project.path
17 16 %td= project.users_projects.count
18 17 %td= last_commit(project)
19   - %td= link_to 'Show', [:admin, project]
20 18 %td= link_to 'Edit', edit_admin_project_path(project), :id => "edit_#{dom_id(project)}"
21 19 %td= link_to 'Destroy', [:admin, project], :confirm => 'Are you sure?', :method => :delete
22 20  
23 21 = paginate @admin_projects
24   -= link_to 'New Project', new_admin_project_path, :class => "lbutton"
  22 += link_to 'New Project', new_admin_project_path, :class => "grey-button"
... ...
app/views/admin/projects/new.html.haml
... ... @@ -2,4 +2,5 @@
2 2  
3 3 = render 'form'
4 4  
5   -= link_to 'Back', admin_projects_path, :class => 'right lbutton'
6 5 \ No newline at end of file
  6 +%br
  7 += link_to 'Back', admin_projects_path, :class => ''
... ...
app/views/admin/projects/show.html.haml
... ... @@ -31,8 +31,7 @@
31 31 = @admin_project.description
32 32 %tr
33 33 %td{:colspan => 2}
34   - = link_to 'Edit', edit_admin_project_path(@admin_project), :class => "lbutton"
35   - = link_to 'Back', admin_projects_path, :class => "right lbutton"
  34 + = link_to 'Edit', edit_admin_project_path(@admin_project), :class => "grey-button"
36 35  
37 36  
38 37 .span-14
... ... @@ -58,4 +57,4 @@
58 57 %td.span-2= check_box_tag "admin", 1, @admin_project.admins.include?(tm.user), :disabled => :disabled
59 58 %td= link_to 'Destroy', admin_team_member_path(tm), :confirm => 'Are you sure?', :method => :delete
60 59  
61   - = link_to 'New Team Member', new_admin_team_member_path(:team_member => {:project_id => @admin_project.id}), :class => "lbutton"
  60 + = link_to 'New Team Member', new_admin_team_member_path(:team_member => {:project_id => @admin_project.id}), :class => "grey-button"
... ...
app/views/admin/team_members/_form.html.haml
... ... @@ -6,29 +6,32 @@
6 6 - @admin_team_member.errors.full_messages.each do |msg|
7 7 %li= msg
8 8  
9   - .span-10
10   - - if @admin_team_member.new_record?
11   - .field
12   - = f.label :user_id
13   - %br
14   - = f.select :user_id, User.all.map { |user| [user.name, user.id] }
15   - .field
16   - = f.label :project_id
17   - %br
18   - = f.select :project_id, Project.all.map { |user| [user.name, user.id] }
19   -
20   - .span-10
  9 + - if @admin_team_member.new_record?
  10 + .span-6
  11 + = f.label :user_id
21 12 .span-6
22   - %b Access:
23   - .span-8
24   - = f.check_box :read
25   - Web Access (Browse Repo)
26   - .span-8
27   - = f.check_box :write
28   - Git Access (User will be added to commiters list)
29   - .span-6.append-bottom
30   - = f.check_box :admin
31   - Admin (Can manage project)
32   - %hr
  13 + = f.select :user_id, User.all.map { |user| [user.name, user.id] }
  14 + .span-6
  15 + = f.label :project_id
  16 + .span-6
  17 + = f.select :project_id, Project.all.map { |user| [user.name, user.id] }
  18 +
  19 + .span-6
  20 + %b Access:
  21 + .span-6
  22 + = f.check_box :read
  23 + Web Access (Browse Repo)
  24 + .span-6
  25 + = f.check_box :write
  26 + Git Access (User will be added to commiters list)
  27 + .span-6
  28 + = f.check_box :admin
  29 + Admin (Can manage project)
  30 + %br
33 31 .actions
34   - = f.submit 'Save'
  32 + = f.submit 'Save', :class => "grey-button"
  33 +
  34 +:javascript
  35 + $('select#team_member_user_id').selectmenu({width:300});
  36 + $('select#team_member_project_id').selectmenu({width:300});
  37 +
... ...
app/views/admin/team_members/edit.html.haml
1 1 = render 'form'
2 2  
  3 +%br
3 4 = link_to 'Show', admin_team_member_path(@admin_team_member)
4 5 \|
5 6 = link_to 'Back', admin_team_members_path
... ...
app/views/admin/team_members/index.html.haml
... ... @@ -10,7 +10,6 @@
10 10 %th Added
11 11 %th
12 12 %th
13   - %th
14 13 - members.each do |tm|
15 14 - user = tm.user
16 15 %tr
... ... @@ -20,11 +19,10 @@
20 19 %td.span-1= check_box_tag "commit", 1, project.writers.include?(user), :disabled => :disabled
21 20 %td.span-2= check_box_tag "admin", 1, project.admins.include?(user), :disabled => :disabled
22 21 %td.span-3= time_ago_in_words(tm.updated_at) + " ago"
23   - %td= link_to 'Show', admin_team_member_path(tm)
24 22 %td= link_to 'Edit', edit_admin_team_member_path(tm), :id => "edit_#{dom_id(tm)}"
25 23 %td= link_to 'Destroy', admin_team_member_path(tm), :confirm => 'Are you sure?', :method => :delete
26 24  
27 25 %br
28 26  
29 27 = paginate @admin_team_members
30   -= link_to 'New Team Member', new_admin_team_member_path
  28 += link_to 'New Team Member', new_admin_team_member_path, :class => "grey-button"
... ...
app/views/admin/team_members/new.html.haml
... ... @@ -2,4 +2,5 @@
2 2  
3 3 = render 'form'
4 4  
  5 +%br
5 6 = link_to 'Back', admin_team_members_path
... ...
app/views/admin/team_members/show.html.haml
1   -%p#notice= notice
2   -
3 1 #infoblock
4 2 %p
5 3 %b Name:
... ... @@ -9,22 +7,25 @@
9 7 = @admin_team_member.project.name
10 8 %p
11 9 %b Since:
12   - = @admin_team_member.updated_at
  10 + = @admin_team_member.updated_at.stamp("Nov 11, 2010")
13 11  
14 12 #infoblock
15 13 .span-6
16 14 %b Access:
17   - .span-8
  15 + %br
  16 + .span-6
18 17 = check_box_tag "read", 1, @admin_team_member.read, :disabled => :disabled
19 18 Web Access (Browse Repo)
20   - .span-8
  19 + %br
  20 + .span-6
21 21 = check_box_tag "commit", 1, @admin_team_member.write, :disabled => :disabled
22 22 Git Access (User will be added to commiters list)
  23 + %br
23 24 .span-6.append-bottom
24 25 = check_box_tag "admin", 1, @admin_team_member.admin, :disabled => :disabled
25 26 Admin (Can manage project)
26 27  
27   -%hr
  28 +%br
28 29  
29 30 = link_to 'Edit', edit_admin_team_member_path(@admin_project)
30 31 \|
... ...
app/views/admin/users/_form.html.haml
... ... @@ -44,6 +44,6 @@
44 44 %br
45 45 = f.text_field :twitter
46 46 .clear
47   - %hr
  47 + %br
48 48 .actions
49   - = f.submit 'Save', :class => "lbutton"
  49 + = f.submit 'Save', :class => "grey-button"
... ...
app/views/admin/users/edit.html.haml
1 1 = render 'form'
2 2  
3   -= link_to 'Back', admin_users_path, :class => "right lbutton"
4   -= link_to 'Show', [:admin, @admin_user], :class => "right lbutton"
  3 +%br
  4 += link_to 'Back', admin_users_path, :class => ""
  5 +|
  6 += link_to 'Show', [:admin, @admin_user], :class => ""
... ...
app/views/admin/users/index.html.haml
... ... @@ -6,7 +6,6 @@
6 6 %th Projects
7 7 %th
8 8 %th
9   - %th
10 9  
11 10 - @admin_users.each do |user|
12 11 %tr
... ... @@ -14,9 +13,9 @@
14 13 %td= link_to user.name, [:admin, user]
15 14 %td= user.email
16 15 %td= user.users_projects.count
17   - %td= link_to 'Show', [:admin, user]
18 16 %td= link_to 'Edit', edit_admin_user_path(user), :id => "edit_#{dom_id(user)}"
19 17 %td= link_to 'Destroy', [:admin, user], :confirm => 'Are you sure?', :method => :delete
20 18  
21 19 = paginate @admin_users
22   -= link_to 'New User', new_admin_user_path, :class => "lbutton"
  20 +%br
  21 += link_to 'New User', new_admin_user_path, :class => "grey-button"
... ...
app/views/admin/users/new.html.haml
... ... @@ -2,4 +2,5 @@
2 2  
3 3 = render 'form'
4 4  
5   -= link_to 'Back', admin_users_path, :class => "right lbutton"
  5 +%br
  6 += link_to 'Back', admin_users_path, :class => ""
... ...
app/views/admin/users/show.html.haml
... ... @@ -44,8 +44,7 @@
44 44 = @admin_user.twitter
45 45 %tr
46 46 %td{:colspan => 2}
47   - = link_to 'Edit', edit_admin_user_path(@admin_user), :class => "lbutton"
48   - = link_to 'Back', admin_users_path, :class => "right lbutton"
  47 + = link_to 'Edit', edit_admin_user_path(@admin_user), :class => "grey-button"
49 48  
50 49 .span-14
51 50 %h2 Projects
... ... @@ -59,6 +58,7 @@
59 58 %th Git
60 59 %th Admin
61 60 %th
  61 + %th
62 62  
63 63 - @admin_user.users_projects.each do |tm|
64 64 - project = tm.project
... ... @@ -71,4 +71,4 @@
71 71 %td= link_to 'Edit', edit_admin_team_member_path(tm)
72 72 %td= link_to 'Cancel', admin_team_member_path(tm), :confirm => 'Are you sure?', :method => :delete
73 73  
74   - = link_to 'Add To Another Project', new_admin_team_member_path(:team_member => {:user_id => @admin_user.id}), :class => "lbutton"
  74 + = link_to 'Add To Another Project', new_admin_team_member_path(:team_member => {:user_id => @admin_user.id}), :class => "grey-button"
... ...
app/views/commits/show.html.haml
1 1 - content_for(:body_class, "project-page commits-page")
2   -
3   --#%a.right.button{:href => "#"} Download
4   --#-if can? current_user, :admin_project, @project
5   - %a.right.button.blue{:href => "#"} EDIT
6 2 %h2.icon
7 3 %span
8 4 %d
9 5 = "#{truncate(@commit.safe_message, :length => 50)}"
10 6 .right
11   - = link_to 'Browse Code', tree_project_ref_path(@project, @commit.id), :class => "button"
12   --#= link_to 'Back', project_commits_path(@project), :class => "button"
  7 + = link_to 'Browse Code', tree_project_ref_path(@project, @commit.id), :class => "browse-code button yellow"
13 8 %table.round-borders
14 9 %thead
15 10 %th{:colspan => 2} Details
... ...
app/views/issues/_form.html.haml
... ... @@ -20,6 +20,5 @@
20 20 = f.label :closed
21 21 %br
22 22 = f.check_box :closed
23   - %hr
24 23 .form-row
25   - = f.submit 'Save', :class => "lbutton vm"
  24 + = f.submit 'Save', :class => "grey-button"
... ...
app/views/issues/_show.html.haml
... ... @@ -23,4 +23,4 @@
23 23 - if can? current_user, :write_issue, issue
24 24 = link_to 'Edit', edit_project_issue_path(@project, issue), :class => "cgray edit-issue-link", :remote => true
25 25 - if can?(current_user, :admin_issue, @project) || issue.author == current_user
26   - = link_to 'Destroy', [@project, issue], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "cred delete-issue negative", :id => "destroy_issue_#{issue.id}"
  26 + = link_to 'Remove', [@project, issue], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "cred delete-issue negative", :id => "destroy_issue_#{issue.id}"
... ...
app/views/issues/index.html.haml
... ... @@ -5,7 +5,7 @@
5 5 .top_panel_issues
6 6 - if can? current_user, :write_issue, @project
7 7 %div{:class => "left", :style => "margin-right: 10px;" }
8   - = link_to 'New Issue', new_project_issue_path(@project), :remote => true, :class => "lbutton vm"
  8 + = link_to 'New Issue', new_project_issue_path(@project), :remote => true, :class => "grey-button", :style => "margin-top:5px;"
9 9 = form_tag search_project_issues_path(@project), :method => :get, :remote => true, :class => :left, :id => "issue_search_form" do
10 10 = hidden_field_tag :project_id, @project.id, { :id => 'project_id' }
11 11 = search_field_tag :issue_search, nil, { :placeholder => 'Search', :class => 'issue_search' }
... ...
app/views/layouts/admin.html.haml
... ... @@ -10,8 +10,8 @@
10 10 REQ_URI = "#{request.env["REQUEST_URI"]}";
11 11 REQ_REFFER = "#{request.env["HTTP_REFERER"]}";
12 12 %body{ :class => body_class('project-page'), :id => yield(:boyd_id)}
  13 + = render :partial => "layouts/flash"
13 14 #container
14   - = render :partial => "layouts/flash"
15 15 = render :partial => "layouts/head_panel"
16 16 .project-container
17 17 .project-sidebar
... ...
app/views/layouts/application.html.haml
... ... @@ -10,8 +10,8 @@
10 10 REQ_URI = "#{request.env["REQUEST_URI"]}";
11 11 REQ_REFFER = "#{request.env["HTTP_REFERER"]}";
12 12 %body{ :class => body_class, :id => yield(:boyd_id)}
  13 + = render :partial => "layouts/flash"
13 14 #container
14   - = render :partial => "layouts/flash"
15 15 = render :partial => "layouts/head_panel"
16 16 = render :partial => "layouts/page_title"
17 17 = yield
... ...
app/views/layouts/profile.html.haml
... ... @@ -10,8 +10,8 @@
10 10 REQ_URI = "#{request.env["REQUEST_URI"]}";
11 11 REQ_REFFER = "#{request.env["HTTP_REFERER"]}";
12 12 %body{ :class => body_class('project-page'), :id => yield(:boyd_id)}
  13 + = render :partial => "layouts/flash"
13 14 #container
14   - = render :partial => "layouts/flash"
15 15 = render :partial => "layouts/head_panel"
16 16 .project-container
17 17 .project-sidebar
... ...
app/views/layouts/project.html.haml
... ... @@ -14,8 +14,8 @@
14 14 REQ_URI = "#{request.env["REQUEST_URI"]}";
15 15 REQ_REFFER = "#{request.env["HTTP_REFERER"]}";
16 16 %body{ :class => body_class('project-page'), :id => yield(:boyd_id)}
  17 + = render :partial => "layouts/flash"
17 18 #container
18   - = render :partial => "layouts/flash"
19 19 = render :partial => "layouts/head_panel"
20 20 .project-container
21 21 .project-sidebar
... ...
app/views/notes/_form.html.haml
... ... @@ -28,4 +28,4 @@
28 28  
29 29 .clear
30 30 %br
31   - = f.submit 'Add note', :class => "button", :id => "submit_note"
  31 + = f.submit 'Add note', :class => "grey-button", :id => "submit_note"
... ...
app/views/projects/_team.html.haml
1 1 - if can? current_user, :admin_team_member, @project
2 2 %div#new-member-holder
3   - = link_to "Add new", new_project_team_member_path(@project), :remote => true, :class => "lbutton vm"
  3 + = link_to "Add new", new_project_team_member_path(@project), :remote => true, :class => "grey-button"
  4 + %br
4 5 %table.round-borders#team-table
5 6 %thead
6 7 %th Name
... ...
app/views/team_members/_form.html.haml
... ... @@ -7,7 +7,7 @@
7 7  
8 8 .span-6.append-bottom
9 9 %b Name
10   - %br
  10 + .span-6
11 11 = f.select(:user_id, User.not_in_project(@project).all.collect {|p| [ p.name, p.id ] }, { :include_blank => "Select user" })
12 12 .span-6
13 13 %b Access:
... ... @@ -20,6 +20,6 @@
20 20 .span-6.append-bottom
21 21 = f.check_box :admin
22 22 Admin
23   - %hr
  23 + %br
24 24 .span-6
25   - = f.submit 'Save', :class => "lbutton vm"
  25 + = f.submit 'Save', :class => "grey-button"
... ...
app/views/team_members/_show.html.haml
... ... @@ -17,4 +17,4 @@
17 17 %td= check_box_tag "admin", 1, member.admin, :disabled => :disabled
18 18 - if can? current_user, :admin_team_member, @project
19 19 %td
20   - = link_to 'Cancel', project_team_member_path(:project_id => @project, :id => member.id), :confirm => 'Are you sure?', :method => :delete, :class => "lbutton negative delete-team-member", :remote => true
  20 + = 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
... ...