Commit 4a5a130a authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'improve/ui' of /home/git/repositories/gitlab/gitlabhq

parents 1a923fe0 cf1416fa
......@@ -6,10 +6,10 @@ class Project
@initEvents()
initEvents: ->
disableButtonIfEmptyField '#project_name', '.project-submit'
$('#project_issues_enabled').change ->
if ($(this).is(':checked') == true)
$('#project_issues_tracker').removeAttr('disabled')
......@@ -29,7 +29,7 @@ class Project
$ ->
# Git clone panel switcher
scope = $ '.project_clone_holder'
scope = $ '.git-clone-holder'
if scope.length > 0
$('a, button', scope).click ->
$('a, button', scope).removeClass 'active'
......
......@@ -86,13 +86,6 @@ span.update-author {
font-weight: bold;
}
.label {
padding: 1px 4px;
font-size: 12px;
font-style: normal;
font-weight: normal;
}
.field_with_errors {
display: inline;
}
......
......@@ -138,4 +138,11 @@
margin-right: 7px;
float: left;
}
&.btn-block {
width: 100%;
margin: 0;
padding: 6px 0;
margin-bottom: 15px;
}
}
......@@ -88,6 +88,13 @@ pre.well-pre {
@include box-shadow(inset 0 2px 4px rgba(0,0,0,.15));
}
.label {
padding: 2px 4px;
font-size: 12px;
font-style: normal;
font-weight: normal;
}
/** Big Labels **/
.state-label {
font-size: 14px;
......
......@@ -14,25 +14,76 @@
}
}
.project_clone_panel {
.project-home-panel {
border-bottom: 1px solid #DDD;
padding-bottom: 30px;
margin-bottom: 30px;
.project-home-title {
font-size: 18px;
color: #777;
margin: 0;
line-height: 2;
}
.project-home-dropdown {
margin-left: 10px;
float: right;
}
.project-home-extra {
margin-top: 15px;
.project-home-desc {
float: left;
color: #999;
}
.project-home-links {
float: right;
a {
margin-left: 10px;
}
}
}
.public-label {
font-size: 14px;
background: #f1f1f1;
padding: 6px 10px;
border-radius: 4px;
margin-left: 10px;
color: #888;
text-shadow: 0 1px 1px #FFF;
}
}
.git-clone-holder {
float: right;
border: 1px solid #E1E1E1;
@include border-radius(4px);
@include bg-gray-gradient;
padding: 4px 7px;
border: 1px solid #CCC;
margin-bottom: 20px;
.btn {
padding: 4px 12px;
margin-left: 3px;
border: none;
background: none;
box-shadow: none;
color: #29b;
padding: 6px;
&.active {
color: #333;
font-weight: bold;
}
}
}
.project_clone_holder {
input[type="text"] {
margin-left: 2px;
border: none;
border-radius: 0;
border-left: 1px solid #E1E1E1;
@extend .monospace;
border: 1px solid #BBB;
box-shadow: none;
margin-left: -1px;
background: #FFF;
background: #FAFAFA;
padding: 6px 10px;
}
}
......@@ -81,16 +132,16 @@ ul.nav.nav-projects-tabs {
.my-projects {
li {
.project-title {
font-size: 14px;
}
.project-info {
margin-bottom: 10px;
}
.access-icon i {
.access-icon {
color: #AAA;
margin-left: 10px;
i {
color: #AAA;
}
}
}
}
......
......@@ -56,13 +56,12 @@
- @projects.each do |project|
%li
%h4.project-title
%span.access-icon
- if project.public
= public_icon
- else
= private_icon
= link_to project_path(project), class: dom_class(project) do
%strong= project.name_with_namespace
= project.name_with_namespace
- if project.public
%small.access-icon
= public_icon
Public
- if project.forked_from_project
%small.pull-right
......
.project_clone_panel
.row
.span8
.form-horizontal= render "shared/clone_panel"
.span3.pull-right
.pull-right
- unless @project.empty_repo?
- if current_user && can?(current_user, :fork_project, @project) && @project.namespace != current_user.namespace
- if current_user.already_forked?(@project)
= link_to project_path(current_user.fork_of(@project)), class: 'btn grouped disabled' do
%i.icon-code-fork
Forked
- else
= link_to fork_project_path(@project), title: "Fork", class: "btn grouped", method: "POST" do
%i.icon-code-fork
Fork
- if can? current_user, :download_code, @project
= link_to archive_project_repository_path(@project), class: "btn grouped" do
%i.icon-download-alt
%span.only-wide Download
- if current_user
.dropdown.pull-right
%a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
%i.icon-plus-sign-alt
%span.only-wide New
%b.caret
%ul.dropdown-menu
- if @project.issues_enabled && can?(current_user, :write_issue, @project)
%li
= link_to url_for_new_issue, title: "New Issue" do
Issue
- if @project.merge_requests_enabled && can?(current_user, :write_merge_request, @project)
%li
= link_to new_project_merge_request_path(@project), title: "New Merge Request" do
Merge Request
- if @project.snippets_enabled && can?(current_user, :write_snippet, @project)
%li
= link_to new_project_snippet_path(@project), title: "New Snippet" do
Snippet
- if can? current_user, :push_code, @project
%li.divider
%li
= link_to new_project_branch_path(@project) do
%i.icon-code-fork
Git branch
%li
= link_to new_project_tag_path(@project) do
%i.icon-tag
Git tag
- if can?(current_user, :admin_team_member, @project)
%li.divider
%li
= link_to new_project_team_member_path(@project), title: "New project member" do
Project member
- if current_user
.dropdown.pull-right
%a.dropdown-toggle.btn.btn-new{href: '#', "data-toggle" => "dropdown"}
%i.icon-reorder
%ul.dropdown-menu
- if @project.issues_enabled && can?(current_user, :write_issue, @project)
%li
= link_to url_for_new_issue, title: "New Issue" do
Issue
- if @project.merge_requests_enabled && can?(current_user, :write_merge_request, @project)
%li
= link_to new_project_merge_request_path(@project), title: "New Merge Request" do
Merge Request
- if @project.snippets_enabled && can?(current_user, :write_snippet, @project)
%li
= link_to new_project_snippet_path(@project), title: "New Snippet" do
Snippet
- if can? current_user, :push_code, @project
%li.divider
%li
= link_to new_project_branch_path(@project) do
%i.icon-code-fork
Git branch
%li
= link_to new_project_tag_path(@project) do
%i.icon-tag
Git tag
- if can?(current_user, :admin_team_member, @project)
%li.divider
%li
= link_to new_project_team_member_path(@project), title: "New project member" do
Project member
= render 'clone_panel'
%h3.page-title
= @project.name_with_namespace
.form-horizontal.pull-right
= render "shared/clone_panel"
- if @project.import? && !@project.imported
.save-project-loader
......
- frequency = @project.issues.tagged_with(label.name).count
%li
%strong
%span{class: "label #{label_css_class(label.name)}"}
%i.icon-tag
- if frequency.zero?
%span.light= label.name
- else
= label.name
%span{class: "label #{label_css_class(label.name)}"}
%i.icon-tag
- if frequency.zero?
%span.light= label.name
- else
= label.name
.pull-right
- unless frequency.zero?
= link_to project_issues_path(label_name: label.name) do
%strong
= pluralize(frequency, 'issue')
= "»"
= pluralize(frequency, 'issue')
= "»"
= render 'clone_panel'
.project-home-panel
.row
.span4
%h4.project-home-title
= @project.name_with_namespace
- if @project.public
%span.public-label Public
- else
%span.public-label Private
.span8
.project-home-dropdown
= render "dropdown"
.form-horizontal
= render "shared/clone_panel"
.project-home-extra.clearfix
.project-home-desc
- if @project.description.present?
= @project.description
- if can?(current_user, :admin_project, @project)
–
%strong= link_to 'Edit', edit_project_path
.project-home-links
= link_to pluralize(@repository.round_commit_count, 'commit'), project_commits_path(@project, @ref || @repository.root_ref)
= link_to pluralize(@repository.branch_names.count, 'branch'), project_branches_path(@project)
= link_to pluralize(@repository.tag_names.count, 'tag'), project_tags_path(@project)
%span.light.prepend-left-20= repository_size
.row
.span9
......@@ -7,17 +35,29 @@
.content_list
.loading.hide
.span3
.light-well
%h3.page-title
= @project.name
- if @project.description.present?
%p.light= @project.description
.clearfix
- if @project.forked_from_project
.alert.alert-success
%i.icon-code-fork
Forked from:
= link_to @project.forked_from_project.name_with_namespace, project_path(@project.forked_from_project)
- unless @project.empty_repo?
- if current_user && can?(current_user, :fork_project, @project) && @project.namespace != current_user.namespace
- if current_user.already_forked?(@project)
= link_to project_path(current_user.fork_of(@project)), class: 'btn btn-block' do
%i.icon-ok
Already forked
- else
= link_to fork_project_path(@project), title: "Fork", class: "btn btn-block", method: "POST" do
%i.icon-code-fork
Fork repository
%hr
%p
%p
%span.light Repo size is
= repository_size
- if can? current_user, :download_code, @project
= link_to archive_project_repository_path(@project), class: "btn btn-block" do
%i.icon-download-alt
%span Download
%br
.light-well
%p
%span.light Created at
#{@project.created_at.stamp('Aug 22, 2013')}
......@@ -27,19 +67,7 @@
#{link_to @project.group.name, @project.group} Group
- else
#{link_to @project.owner_name, @project.owner}
- if @project.forked_from_project
%p
%i.icon-code-fork
Forked from:
= link_to @project.forked_from_project.name_with_namespace, project_path(@project.forked_from_project)
%hr
%p
= link_to pluralize(@repository.round_commit_count, 'commit'), project_commits_path(@project, @ref || @repository.root_ref)
%p
= link_to pluralize(@repository.branch_names.count, 'branch'), project_branches_path(@project)
%p
= link_to pluralize(@repository.tag_names.count, 'tag'), project_tags_path(@project)
- if @project.gitlab_ci?
%hr
......
......@@ -2,35 +2,31 @@
%h3.page-title
Git access for
%strong= @gollum_wiki.path_with_namespace
= render 'main_links'
.content
.project_clone_panel
.row
.span7
.form-horizontal
.input-prepend.project_clone_holder
%button{class: "btn active", :"data-clone" => @gollum_wiki.ssh_url_to_repo} SSH
%button{class: "btn", :"data-clone" => @gollum_wiki.http_url_to_repo}= gitlab_config.protocol.upcase
= text_field_tag :project_clone, @gollum_wiki.url_to_repo, class: "one_click_select input-xxlarge", readonly: true
.git-empty
%fieldset
%legend Install Gollum:
%pre.dark
:preserve
gem install gollum
.form-horizontal.pull-right
.git-clone-holder
%button{class: "btn active", :"data-clone" => @gollum_wiki.ssh_url_to_repo} SSH
%button{class: "btn", :"data-clone" => @gollum_wiki.http_url_to_repo}= gitlab_config.protocol.upcase
= text_field_tag :project_clone, @gollum_wiki.url_to_repo, class: "one_click_select input-xxlarge", readonly: true
%legend Clone Your Wiki:
%pre.dark
:preserve
git clone #{@gollum_wiki.ssh_url_to_repo}
cd #{@gollum_wiki.path}
.git-empty
%fieldset
%legend Install Gollum:
%pre.dark
:preserve
gem install gollum
%legend Start Gollum And Edit Locally:
%pre.dark
:preserve
gollum
== Sinatra/1.3.5 has taken the stage on 4567 for development with backup from Thin
>> Thin web server (v1.5.0 codename Knife)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:4567, CTRL+C to stop
%legend Clone Your Wiki:
%pre.dark
:preserve
git clone #{@gollum_wiki.ssh_url_to_repo}
cd #{@gollum_wiki.path}
%legend Start Gollum And Edit Locally:
%pre.dark
:preserve
gollum
== Sinatra/1.3.5 has taken the stage on 4567 for development with backup from Thin
>> Thin web server (v1.5.0 codename Knife)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:4567, CTRL+C to stop
.input-prepend.input-append.project_clone_holder
.git-clone-holder
%button{class: "btn active", :"data-clone" => @project.ssh_url_to_repo} SSH
%button{class: "btn", :"data-clone" => @project.http_url_to_repo}= gitlab_config.protocol.upcase
= text_field_tag :project_clone, @project.url_to_repo, class: "one_click_select span7", readonly: true
%span.add-on
- if @project.public
= public_icon
%span.cblue public
- else
= private_icon
%span.cgreen private
= text_field_tag :project_clone, @project.url_to_repo, class: "one_click_select span5", readonly: true
......@@ -49,7 +49,9 @@ class Spinach::Features::PublicProjectsFeature < Spinach::FeatureSteps
end
step 'I should see project "Community" home page' do
page.should have_content 'Repo size is'
within '.project-home-title' do
page.should have_content 'Community'
end
end
private
......
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