Commit 6a58deb53630de59fc05d2dacd272463901c42d8

Authored by randx
1 parent ad3f4922

UI changes:

* .page_title  class added. Used for better page headers
* improved help page
* added back links for help pages
* show app version & revision on help page

Backend changes:
* Gitab::Version && Gitlab::Revision constants
app/assets/stylesheets/gitlab_bootstrap.scss
... ... @@ -281,6 +281,7 @@ table.no-borders {
281 281 font-size:13px;
282 282 background: #474D57;
283 283 color:#fff;
  284 + font-weight:bold;
284 285 font-family: monospace;
285 286 }
286 287 }
... ... @@ -590,3 +591,27 @@ ul.breadcrumb {
590 591 border-top:1px solid #eee;
591 592 }
592 593 }
  594 +
  595 +input[type=text] {
  596 + &.large_text {
  597 + padding:6px;
  598 + font-size:16px;
  599 + }
  600 +}
  601 +
  602 +p {
  603 + &.slead {
  604 + color:#456;
  605 + font-size:16px;
  606 + margin-bottom: 12px;
  607 + font-weight: 200;
  608 + line-height: 24px;
  609 + }
  610 +}
  611 +
  612 +h3.page_title {
  613 + color:#456;
  614 + font-size:20px;
  615 + font-weight: 600;
  616 + line-height: 28px;
  617 +}
... ...
app/views/commits/_commit_box.html.haml
... ... @@ -12,7 +12,7 @@
12 12 %i.icon-download-alt
13 13 Get Patch
14 14  
15   - %h3.commit-title
  15 + %h3.commit-title.page_title
16 16 = commit_msg_with_link_to_issues(@project, @commit.title)
17 17 - if @commit.description.present?
18 18 %pre.commit-description
... ...
app/views/dashboard/issues.html.haml
1   -%h3
  1 +%h3.page_title
2 2 Issues
3 3 %small (assigned to you)
4 4 %small.right #{@issues.total_count} issues
5 5  
  6 +%br
6 7 .clearfix
7 8 - if @issues.any?
8 9 - @issues.group_by(&:project).each do |group|
... ...
app/views/dashboard/merge_requests.html.haml
1   -%h3
  1 +%h3.page_title
2 2 Merge Requests
3 3 %small (authored or assigned to you)
4 4 %small.right #{@merge_requests.total_count} merge requests
... ...
app/views/help/index.html.haml
1   -%h3.cgray
  1 +%h3.page_title
2 2 GITLAB
3   - %span.right v2.6
  3 + .right
  4 + %span= Gitlab::Version
  5 + %small= Gitlab::Revision
4 6 %hr
5   -%h4 Self Hosted Git Management
6   -%h4 Fast, secure and stable solution based on Ruby on Rails & Gitolite.
  7 +%p.lead
  8 + Self Hosted Git Management
  9 + %br
  10 + Fast, secure and stable solution based on Ruby on Rails & Gitolite.
7 11  
8 12 %hr
9 13  
... ... @@ -15,3 +19,6 @@
15 19  
16 20 %li
17 21 %h5= link_to "Permissions", help_permissions_path
  22 +
  23 + %li
  24 + %h5= link_to "Web Hooks", help_web_hooks_path
... ...
app/views/help/permissions.html.haml
1 1 %h3 Permissions
  2 +.back_link
  3 + = link_to help_path do
  4 + ← to index
2 5 %hr
3 6  
4 7 .row
... ...
app/views/help/web_hooks.html.haml
1 1 %h3 Web hooks
2   -%br
  2 +.back_link
  3 + = link_to help_path do
  4 + ← to index
  5 +%hr
3 6  
4   -%p Application will send POST request with some data like example below:
  7 +%p.slead
  8 + Every Gitlab project can trigger a web server whenever the repo is pushed to.
  9 + %br
  10 + Web Hooks can be used to update an external issue tracker, trigger CI builds, update a backup mirror, or even deploy to your production server.
  11 + %br
  12 + GITLAB will send POST request with commits information on every push.
5 13 %h5 Hooks request example:
6 14 = render "hooks/data_ex"
7 15  
... ...
app/views/help/workflow.html.haml
1 1 - bash_lexer = Pygments::Lexer[:bash]
2 2 %h3 Workflow
  3 +.back_link
  4 + = link_to help_path do
  5 + ← to index
3 6 %hr
4 7  
5 8 %ol.help
... ...
app/views/hooks/_data_ex.html.erb
... ... @@ -36,7 +36,8 @@
36 36 :email => "gitlabdev@dv6700.(none)"
37 37 }
38 38 }
39   - ]
  39 + ],
  40 + total_commits_count => 3
40 41 }
41 42 eos
42 43 %>
... ...
app/views/issues/index.html.haml
1 1 = render "issues/head"
2 2 .issues_content
3   - %h3
  3 + %h3.page_title
4 4 Issues
5 5 %small (#{@issues.total_count})
6 6 .right
... ...
app/views/issues/show.html.haml
1   -%h3
  1 +%h3.page_title
2 2 Issue ##{@issue.id}
3 3  
4 4 %small
... ...
app/views/keys/index.html.haml
1   -%h3
  1 +%h3.page_title
2 2 SSH Keys
3 3 = link_to "Add new", new_key_path, :class => "btn small right"
4 4  
5   -%br
  5 +%hr
  6 +%p.slead
  7 + SSH key allows you to establish a secure connection between your computer and Gitlab
  8 +
6 9  
7 10 %table#keys-table.admin-table
8 11 %thead
... ...
app/views/keys/show.html.haml
1   -%h3
  1 +%h3.page_title
2 2 Public key:
3 3 = @key.title
4 4 %small
... ...
app/views/merge_requests/index.html.haml
1   -%h3
  1 +%h3.page_title
2 2 Merge Requests
3 3 - if can? current_user, :write_issue, @project
4 4 = link_to new_project_merge_request_path(@project), :class => "right btn small", :title => "New Merge Request" do
... ...
app/views/merge_requests/show/_mr_title.html.haml
1   -%h3
  1 +%h3.page_title
2 2 = "Merge Request ##{@merge_request.id}:"
3 3  
4 4 %span.pretty_label.branch= @merge_request.source_branch
... ...
app/views/milestones/index.html.haml
1 1 = render "issues/head"
2 2 .milestones_content
3   - %h3
  3 + %h3.page_title
4 4 Milestones
5 5 - if can? current_user, :admin_milestone, @project
6 6 = link_to "New Milestone", new_project_milestone_path(@project), :class => "right btn small", :title => "New Milestone"
... ...
app/views/profile/password.html.haml
1   -%h3 Password
  1 +%h3.page_title Password
2 2 %hr
3 3 = form_for @user, :url => profile_password_path, :method => :put do |f|
4 4 .data
5   - .alert.alert-info
6   - %span After successful password update you will be redirected to login page where you should login with new password
  5 + %p.slead After successful password update you will be redirected to login page where you should login with new password
7 6 -if @user.errors.any?
8 7 .alert-message.block-message.error
9 8 %ul
... ...
app/views/profile/show.html.haml
1 1 .profile_avatar_holder
2 2 = image_tag gravatar_icon(@user.email, 90), :class => "styled_image"
3   -%h3
  3 +%h3.page_title
4 4 = @user.name
5 5 %br
6 6 %small
... ...
app/views/profile/token.html.haml
1   -%h3
  1 +%h3.page_title
2 2 Private token
3 3 %span.cred.right
4 4 keep it in secret!
5 5 %hr
6 6 = form_for @user, :url => profile_reset_private_token_path, :method => :put do |f|
7 7 .data
8   - .alert.alert-info
9   - %p Private token used to access application resources without authentication.
10   - %p * required for rss feed
  8 + %p.slead
  9 + Private token used to access application resources without authentication.
  10 + %br
  11 + It can be used for atom feed or API
11 12 %p.cgray
12 13 - if current_user.private_token
13   - = text_field_tag "token", current_user.private_token
  14 + = text_field_tag "token", current_user.private_token, :class => "xxlarge large_text"
14 15 - else
15 16 You don`t have one yet. Click generate to fix it.
16 17 .actions
... ...
app/views/projects/graph.html.haml
1   -%h3 Project Network Graph
  1 +%h3.page_title Project Network Graph
2 2 %br
3 3 .graph_holder
4 4 %h4
... ...
app/views/projects/team.html.haml
1 1 = render "project_head"
2   -%h3
  2 +%h3.page_title
3 3 Team Members
4 4 %small (#{@project.users_projects.count})
5 5  
6 6 - if can? current_user, :admin_team_member, @project
7   - .alert.alert-info
  7 + %p.slead
8 8 = link_to new_project_team_member_path(@project), :class => "btn small right", :title => "New Team Member" do
9 9 New Team Member
10 10 Read more about project permissions
11 11 %strong= link_to "here", help_permissions_path, :class => "vlink"
12   - %br
13   - To open team member profile - click on avatar.
14 12  
15 13  
16 14 = render :partial => "team", :locals => {:project => @project}
... ...
config/initializers/gitlab/10_app.rb 0 → 100644
... ... @@ -0,0 +1,4 @@
  1 +module Gitlab
  2 + Version = File.read(Rails.root.join("VERSION"))
  3 + Revision = `git log --pretty=format:'%h' -n 1`
  4 +end
... ...
config/initializers/gitlab/20_grit_ext.rb 0 → 100644
... ... @@ -0,0 +1,28 @@
  1 +require 'grit'
  2 +require 'pygments'
  3 +
  4 +Grit::Git.git_timeout = GIT_OPTS["git_timeout"]
  5 +Grit::Git.git_max_size = GIT_OPTS["git_max_size"]
  6 +
  7 +Grit::Blob.class_eval do
  8 + include Linguist::BlobHelper
  9 +
  10 + def data
  11 + @data ||= @repo.git.cat_file({:p => true}, id)
  12 + Gitlab::Encode.utf8 @data
  13 + end
  14 +end
  15 +
  16 +Grit::Diff.class_eval do
  17 + def old_path
  18 + Gitlab::Encode.utf8 @a_path
  19 + end
  20 +
  21 + def new_path
  22 + Gitlab::Encode.utf8 @b_path
  23 + end
  24 +
  25 + def diff
  26 + Gitlab::Encode.utf8 @diff
  27 + end
  28 +end
... ...
config/initializers/gitlab/30_resque_queues.rb 0 → 100644
... ... @@ -0,0 +1 @@
  1 +Resque.watch_queue(PostReceive.instance_variable_get("@queue"))
... ...
config/initializers/gitlabhq/20_grit_ext.rb
... ... @@ -1,28 +0,0 @@
1   -require 'grit'
2   -require 'pygments'
3   -
4   -Grit::Git.git_timeout = GIT_OPTS["git_timeout"]
5   -Grit::Git.git_max_size = GIT_OPTS["git_max_size"]
6   -
7   -Grit::Blob.class_eval do
8   - include Linguist::BlobHelper
9   -
10   - def data
11   - @data ||= @repo.git.cat_file({:p => true}, id)
12   - Gitlab::Encode.utf8 @data
13   - end
14   -end
15   -
16   -Grit::Diff.class_eval do
17   - def old_path
18   - Gitlab::Encode.utf8 @a_path
19   - end
20   -
21   - def new_path
22   - Gitlab::Encode.utf8 @b_path
23   - end
24   -
25   - def diff
26   - Gitlab::Encode.utf8 @diff
27   - end
28   -end
config/initializers/gitlabhq/30_resque_queues.rb
... ... @@ -1 +0,0 @@
1   -Resque.watch_queue(PostReceive.instance_variable_get("@queue"))