summaryrefslogtreecommitdiff
path: root/app/views/projects
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-02-08 01:00:49 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-02-08 01:00:49 +0200
commit4d89322d6785580e9a77e2536b8f2a7db8482664 (patch)
tree79e80598cecf1410440410590657a3388307ace6 /app/views/projects
parent3d77183c160c57f51f1908bd57312344e34c8524 (diff)
downloadgitlab-ce-4d89322d6785580e9a77e2536b8f2a7db8482664.tar.gz
Snippets - fixed after bootstrap
Project - restyled show page, removed info page Repository - restyled show page, added download option Tags - added download options
Diffstat (limited to 'app/views/projects')
-rw-r--r--app/views/projects/_feed.html.haml48
-rw-r--r--app/views/projects/_form.html.haml12
-rw-r--r--app/views/projects/_project_head.html.haml26
-rw-r--r--app/views/projects/info.html.haml96
-rw-r--r--app/views/projects/show.html.haml38
-rw-r--r--app/views/projects/team.html.haml9
-rw-r--r--app/views/projects/update.js.haml2
7 files changed, 61 insertions, 170 deletions
diff --git a/app/views/projects/_feed.html.haml b/app/views/projects/_feed.html.haml
index e399f5cab9a..e973a763d9b 100644
--- a/app/views/projects/_feed.html.haml
+++ b/app/views/projects/_feed.html.haml
@@ -1,29 +1,23 @@
-%li.wll
- .row
- .span9
- = image_tag gravatar_icon(update.author_email), :class => "avatar thumb"
- %p
- %strong.author= update.author_name
- %span
+- @activities.each do |update|
+ .entry
+ = link_to dashboard_feed_path(@project, update) do
+ - if update.kind_of? Note
+ %p
+ %strong
+ - if update.target
+ = update.target.class.name.titleize
+ = truncate update.target.id.to_s, :length => 10
+ commented
+ - else
+ Project wall
&ndash;
- authored
- = time_ago_in_words(update.created_at)
- ago
- - if update.kind_of? MergeRequest
- = link_to project_merge_request_path(@project, update) do
- = "Opened merge request ##{update.id}."
- %span.label= update.source_branch
- &rarr;
- %span.label= update.target_branch
- - elsif update.kind_of? Issue
- = link_to project_issue_path(@project, update) do
- Opened new
- %span.label.important= "issue ##{update.id}"
- = truncate update.title
+ = image_tag gravatar_icon(update.author_email), :class => "", :width => 16
+ = truncate dashboard_feed_title(update), :length => 50
- else
- = link_to [@project, update.target] do
- %p
- = update.target.class.name.titleize
- = truncate(update.target.id.to_s, :length => 10)
- &nbsp;
- = dashboard_feed_title(update)
+ %p
+ %strong
+ = update.class.name.titleize
+ = truncate update.id.to_s
+ &ndash;
+ = image_tag gravatar_icon(update.author_email), :class => "", :width => 16
+ = truncate dashboard_feed_title(update), :length => 50
diff --git a/app/views/projects/_form.html.haml b/app/views/projects/_form.html.haml
index 37446585d9b..01c1cac1793 100644
--- a/app/views/projects/_form.html.haml
+++ b/app/views/projects/_form.html.haml
@@ -10,13 +10,17 @@
.clearfix
= f.label :path do
Path
- %cite= "git@#{GIT_HOST["host"]}:"
- .input= f.text_field :path, :placeholder => "example_project", :disabled => !@project.new_record?
+ .input
+ .input-prepend
+ %span.add-on= "git@#{GIT_HOST["host"]}:"
+ = f.text_field :path, :placeholder => "example_project", :disabled => !@project.new_record?
.clearfix
= f.label :code do
Code
- %cite= "http://#{GIT_HOST["host"]}/"
- .input= f.text_field :code, :placeholder => "example"
+ .input
+ .input-prepend
+ %span.add-on= "http://#{GIT_HOST["host"]}/"
+ = f.text_field :code, :placeholder => "example"
- unless @project.new_record? || @project.heads.empty?
.clearfix
diff --git a/app/views/projects/_project_head.html.haml b/app/views/projects/_project_head.html.haml
index 0d56b43970e..8207d89d4b5 100644
--- a/app/views/projects/_project_head.html.haml
+++ b/app/views/projects/_project_head.html.haml
@@ -1,30 +1,18 @@
%ul.tabs
%li{ :class => "#{'active' if current_page?(project_path(@project)) }" }
= link_to project_path(@project), :class => "activities-tab tab" do
- Activities
- %li{ :class => "#{'active' if current_page?(info_project_path(@project)) || current_page?(edit_project_path(@project)) }" }
- = link_to info_project_path(@project), :class => "stat-tab tab " do
- Info
+ Show
+ - if can? current_user, :admin_project, @project
+ %li{ :class => "#{'active' if current_page?(edit_project_path(@project)) }" }
+ = link_to edit_project_path(@project), :class => "stat-tab tab " do
+ Edit
- %li{ :class => " #{'active' if current_page?(team_project_path(@project)) }" }
+ %li{ :class => " #{'active' if (controller.controller_name == "team_members") || current_page?(team_project_path(@project)) }" }
= link_to team_project_path(@project), :class => "team-tab tab" do
Team
%li{ :class => "#{'active' if current_page?(files_project_path(@project)) }" }
= link_to files_project_path(@project), :class => "files-tab tab " do
Files
- %li{ :class => " #{'active' if current_page?(project_snippets_path(@project)) }" }
+ %li{ :class => " #{'active' if (controller.controller_name == "snippets") }" }
= link_to project_snippets_path(@project), :class => "snippets-tab tab" do
Snippets
-
- - if current_page?(project_snippets_path(@project))
- - if can? current_user, :write_snippet, @project
- %li
- = link_to new_project_snippet_path(@project), :class => "add_new", :title => "New Snippet" do
- Add new
-
-
- - if current_page?(team_project_path(@project))
- - if can? current_user, :admin_team_member, @project
- %li
- = link_to new_project_team_member_path(@project), :class => "add_new", :title => "New Team Member" do
- Add New
diff --git a/app/views/projects/info.html.haml b/app/views/projects/info.html.haml
deleted file mode 100644
index d1196873619..00000000000
--- a/app/views/projects/info.html.haml
+++ /dev/null
@@ -1,96 +0,0 @@
-= render "project_head"
-
-.entry
- %h3= @project.name
- %br
-
-
-
- %pre
- = "git clone #{@project.url_to_repo}"
-
-
-
-%h4 Details:
-
-%table
- %tr
- %td Name
- %td= @project.name
-
- %tr
- %td Slug
- %td= @project.code
-
- %tr
- %td Path
- %td= @project.path
-
- %tr
- %td Owner
- %td= link_to @project.owner.name, project_team_member_path(@project, @project.team_member_by_id(@project.owner))
-
- %tr
- %td Last commit
- %td
- = time_ago_in_words(@project.commit.committed_date)
- ago
-
- %tr
- %td Team
- %td
- = @project.users_projects.count
- users
-
- %tr
- %td Open Issues
- %td
- = @project.issues.opened.count
-
- %tr
- %td Merge Requests
- %td
- = @project.merge_requests.opened.count
-
- %tr
- %td Created
- %td= @project.created_at.stamp("Aug 21, 2011")
-
- %tr
- %td{:colspan => 2}= simple_format @project.description
-
-
-%h4 Features:
-
-%table
- %tr
- %td Issues
- %td
- - if @project.issues_enabled
- .alert-message.success
- Enabled
- - else
- .alert-message.error
- Disabled
-
- %tr
- %td Merge Requests
- %td
- - if @project.merge_requests_enabled
- .alert-message.success
- Enabled
- - else
- .alert-message.error
- Disabled
- %tr
- %td Wall
- %td
- - if @project.wall_enabled
- .alert-message.success
- Enabled
- - else
- .alert-message.error
- Disabled
-.actions
- = link_to "Edit", edit_project_path(@project), :class => "btn"
-
diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml
index 066aea4edae..7886daec1da 100644
--- a/app/views/projects/show.html.haml
+++ b/app/views/projects/show.html.haml
@@ -1,24 +1,16 @@
= render "project_head"
-- @activities.each do |update|
- .entry
- = link_to dashboard_feed_path(@project, update) do
- - if update.kind_of? Note
- %p
- %strong
- - if update.target
- = update.target.class.name.titleize
- = truncate update.target.id.to_s, :length => 10
- commented
- - else
- Project wall
- &ndash;
- = image_tag gravatar_icon(update.author_email), :class => "", :width => 16
- = truncate dashboard_feed_title(update), :length => 50
- - else
- %p
- %strong
- = update.class.name.titleize
- = truncate update.id.to_s
- &ndash;
- = image_tag gravatar_icon(update.author_email), :class => "", :width => 16
- = truncate dashboard_feed_title(update), :length => 50
+%h3
+ = @project.name
+%hr
+.alert-message.block-message.warning
+ .input
+ .input-prepend
+ %span.add-on git clone
+ = text_field_tag :project_clone, @project.url_to_repo, :class => "xlarge one_click_select git_clone_url"
+
+= simple_format @project.description
+
+%h5.cgray Recent Activity
+.content_list= render "feed"
+
+
diff --git a/app/views/projects/team.html.haml b/app/views/projects/team.html.haml
index 295e212fbaa..884c1645445 100644
--- a/app/views/projects/team.html.haml
+++ b/app/views/projects/team.html.haml
@@ -1,3 +1,12 @@
= render "project_head"
+
+- if can? current_user, :admin_team_member, @project
+ .alert-message.block-message
+ = link_to new_project_team_member_path(@project), :class => "btn small right", :title => "New Team Member" do
+ New Team Member
+ Manage project team from this page.
+ %br
+ To open team member profile - click on avatar.
+
= render :partial => "team", :locals => {:project => @project}
diff --git a/app/views/projects/update.js.haml b/app/views/projects/update.js.haml
index 4c69128b297..de12527e004 100644
--- a/app/views/projects/update.js.haml
+++ b/app/views/projects/update.js.haml
@@ -1,6 +1,6 @@
- if @project.valid?
:plain
- location.href = "#{info_project_path(@project, :notice => 'Project was successfully updated.')}";
+ location.href = "#{edit_project_path(@project, :notice => 'Project was successfully updated.')}";
- else
:plain
$(".edit_project").replaceWith("#{escape_javascript(render('form'))}");