diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-07-29 14:56:11 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-07-29 14:56:11 +0000 |
commit | be17a32d041209c5268c72005ac7c82eac15c934 (patch) | |
tree | 8a58053877a81ffaad5fffee0a42c6f14f55ffb0 /app/views | |
parent | b55e22e277bd754d4ab89c046ccbe8f943730c8d (diff) | |
parent | 4de1db11685811e06b351fdcfe92c1d7a34e3246 (diff) | |
download | gitlab-ce-be17a32d041209c5268c72005ac7c82eac15c934.tar.gz |
Merge branch 'improve/public_area' of /home/git/repositories/gitlab/gitlabhq
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/layouts/errors.html.haml | 2 | ||||
-rw-r--r-- | app/views/layouts/public.html.haml | 8 | ||||
-rw-r--r-- | app/views/public/projects/_tree.html.haml | 5 | ||||
-rw-r--r-- | app/views/public/projects/index.html.haml | 22 | ||||
-rw-r--r-- | app/views/public/projects/show.html.haml | 46 |
5 files changed, 69 insertions, 14 deletions
diff --git a/app/views/layouts/errors.html.haml b/app/views/layouts/errors.html.haml index b9395873c33..df2350b1535 100644 --- a/app/views/layouts/errors.html.haml +++ b/app/views/layouts/errors.html.haml @@ -2,7 +2,7 @@ %html{ lang: "en"} = render "layouts/head", title: "Error" %body{class: "#{app_theme} application"} - = render "layouts/head_panel", title: "" + = render "layouts/head_panel", title: "" if current_user = render "layouts/flash" .container .content diff --git a/app/views/layouts/public.html.haml b/app/views/layouts/public.html.haml index e330da9bd73..4a06d63fafd 100644 --- a/app/views/layouts/public.html.haml +++ b/app/views/layouts/public.html.haml @@ -10,10 +10,16 @@ .container %div.app_logo %span.separator - = link_to root_path, class: "home" do + = link_to public_root_path, class: "home" do %h1 GITLAB %span.separator %h1.project_name Public Projects + %ul.nav + %li + %a + %div.hide.turbolink-spinner + %i.icon-refresh.icon-spin + Loading... .container.navless-container .content diff --git a/app/views/public/projects/_tree.html.haml b/app/views/public/projects/_tree.html.haml new file mode 100644 index 00000000000..bd09c236a0b --- /dev/null +++ b/app/views/public/projects/_tree.html.haml @@ -0,0 +1,5 @@ +- if tree.readme + = render "projects/tree/readme", readme: tree.readme +- else + .alert + %h3.nothing_here_message This project does not have README file diff --git a/app/views/public/projects/index.html.haml b/app/views/public/projects/index.html.haml index 4bc67d8c6ae..e933268973a 100644 --- a/app/views/public/projects/index.html.haml +++ b/app/views/public/projects/index.html.haml @@ -11,22 +11,20 @@ = search_field_tag :search, params[:search], placeholder: "gitlab-ci", class: "span3 search-text-input", id: "projects_search" = submit_tag 'Search', class: "btn btn-primary wide" -%hr - .public-projects - %ul.unstyled + %ul.bordered-list - @projects.each do |project| - %li.clearfix - %div - %i.icon-share - - if current_user - = link_to_project project - - else + %li + .project-title + %i.icon-share.cgray + = link_to public_project_path(project) do = project.name_with_namespace .pull-right - %pre.dark.tiny git clone #{project.http_url_to_repo} - %div.description - = project.description + %pre.public-clone git clone #{project.http_url_to_repo} + + - if project.description.present? + %div.description + = project.description - unless @projects.present? %h3.nothing_here_message No public projects diff --git a/app/views/public/projects/show.html.haml b/app/views/public/projects/show.html.haml new file mode 100644 index 00000000000..c4d8a4f5a5f --- /dev/null +++ b/app/views/public/projects/show.html.haml @@ -0,0 +1,46 @@ +%h3.page-title + = @project.name_with_namespace + .pull-right + %pre.public-clone git clone #{@project.http_url_to_repo} + .pull-right + - if current_user + = link_to 'Browse project', @project, class: 'btn btn-create append-right-10' + + +%div + = link_to public_root_path do + ← To projects list + .pull-right + %span.light= @project.description + +%br +.row + .span9 + = render 'tree', tree: @tree + .span3 + %h5 Repository: + %div + %p + %span.light Bare size is + #{@project.repository.size} MB + + %p + = pluralize(@repository.round_commit_count, 'commit') + %p + = pluralize(@repository.branch_names.count, 'branch') + %p + = pluralize(@repository.tag_names.count, 'tag') + + - if @recent_tags.present? + %hr + %h5 Most Recent Tags: + %ul.unstyled + - @recent_tags.each do |tag| + %li + %p + %i.icon-tag + %strong= tag.name + %small.light.pull-right + %i.icon-calendar + = time_ago_in_words(tag.commit.committed_date) + ago |