summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorNihad Abbasov <narkoz.2008@gmail.com>2011-11-14 17:42:12 +0400
committerNihad Abbasov <narkoz.2008@gmail.com>2011-11-14 17:42:12 +0400
commit8d74123d61e83c29b5449773e1c471d2e2aa126f (patch)
tree6a9273fdad10175b7003c24333a69342660f4737 /app/views
parentf476c42d00dbea1ddc0736bf991eeb36b9d5dd22 (diff)
parent762946995ea9d477f00fea19e5040bf4dd437cb9 (diff)
downloadgitlab-ce-8d74123d61e83c29b5449773e1c471d2e2aa126f.tar.gz
Merge branch 'master' into features/feeds
Diffstat (limited to 'app/views')
-rw-r--r--app/views/dashboard/index.html.haml3
-rw-r--r--app/views/layouts/_head_panel.html.erb14
-rw-r--r--app/views/layouts/project.html.haml6
-rw-r--r--app/views/notes/_form.html.haml2
-rw-r--r--app/views/projects/_feed.html.haml15
-rw-r--r--app/views/projects/_recent_commits.html.haml32
-rw-r--r--app/views/projects/_recent_messages.html.haml27
-rw-r--r--app/views/projects/_tile.html.haml8
-rw-r--r--app/views/projects/_tree_item.html.haml2
-rw-r--r--app/views/projects/empty.html.erb2
-rw-r--r--app/views/projects/graph.html.haml9
-rw-r--r--app/views/projects/new.html.haml16
-rw-r--r--app/views/projects/show.html.haml12
-rw-r--r--app/views/snippets/_form.html.haml5
-rw-r--r--app/views/snippets/_snippet.html.haml22
-rw-r--r--app/views/snippets/index.html.haml9
16 files changed, 83 insertions, 101 deletions
diff --git a/app/views/dashboard/index.html.haml b/app/views/dashboard/index.html.haml
index 8d48d1f70b5..e25ec249ef5 100644
--- a/app/views/dashboard/index.html.haml
+++ b/app/views/dashboard/index.html.haml
@@ -27,12 +27,13 @@
%a.project-update{:href => dashboard_feed_path(project, update)}
= image_tag gravatar_icon(update.author_email), :class => "left", :width => 40
%span.update-title
+ - if update.kind_of?(Grit::Commit)
+ %span.right.tag.commit= update.head.name
= dashboard_feed_title(update)
%span.update-author
%strong= update.author_name
authored
= time_ago_in_words(update.created_at)
ago
- %br
/ #news-feed
/ #dashboard-content
diff --git a/app/views/layouts/_head_panel.html.erb b/app/views/layouts/_head_panel.html.erb
index 6db1d3897c5..7af6effd149 100644
--- a/app/views/layouts/_head_panel.html.erb
+++ b/app/views/layouts/_head_panel.html.erb
@@ -8,15 +8,11 @@
<%= image_tag gravatar_icon(current_user.email) %>
<% end %>
- <a href="#" class="arrow-up"></a>
-
<div class="account-links">
<%= link_to profile_path, :class => "username" do %>
<%#= current_user.name %>
- Your profile
+ My profile
<% end %>
- <%= link_to "Fluid layout", url_for( :view_style => 'fluid' ) if cookies[:view_style] == "collapsed"%>
- <%= link_to "Fixed layout", url_for( :view_style => 'collapsed' ) unless cookies[:view_style] == "collapsed"%>
<%= link_to 'Logout', destroy_user_session_path, :class => "logout", :method => :delete %>
</div>
</div><!-- .account-box -->
@@ -50,3 +46,11 @@
});
<% end %>
<% end %>
+
+<% if current_user.keys.all.empty? %>
+ <div id="no_ssh_key_defined">
+ <h2>ATTENTION!</h2>
+ <p>No SSH Key is defined. You won't be able to use any Git command!
+ <p>Click <%=link_to( 'here', keys_path ) %> to add one!
+ </div>
+<% end %>
diff --git a/app/views/layouts/project.html.haml b/app/views/layouts/project.html.haml
index 4fb3354bc02..b2d023d4a72 100644
--- a/app/views/layouts/project.html.haml
+++ b/app/views/layouts/project.html.haml
@@ -20,11 +20,13 @@
.project-container
.project-sidebar
.fixed
- %input.git-url.text{:id => "", :name => "", :readonly => "", :type => "text", :value => @project.url_to_repo, :class => "one_click_select"}
+ .git_url_wrapper
+ %input.git-url.text{:id => "", :name => "", :readonly => "", :type => "text", :value => @project.url_to_repo, :class => "one_click_select"}
%aside
- = link_to "History", project_path(@project), :class => current_page?(:controller => "projects", :action => "show", :id => @project) ? "current" : nil
+ = link_to "Activities", project_path(@project), :class => current_page?(:controller => "projects", :action => "show", :id => @project) ? "current" : nil
= link_to "Tree", tree_project_path(@project), :class => current_page?(:controller => "projects", :action => "tree", :id => @project) ? "current" : nil
= link_to "Commits", project_commits_path(@project), :class => current_page?(:controller => "commits", :action => "index", :project_id => @project) ? "current" : nil
+ = link_to "Network graph", graph_project_path(@project), :class => current_page?(:controller => "projects", :action => "graph", :id => @project) ? "current" : nil
= link_to team_project_path(@project), :class => (current_page?(:controller => "projects", :action => "team", :id => @project) || controller.controller_name == "team_members") ? "current" : nil do
Team
- if @project.users_projects.count > 0
diff --git a/app/views/notes/_form.html.haml b/app/views/notes/_form.html.haml
index a0def20b32d..98e66bd4cd1 100644
--- a/app/views/notes/_form.html.haml
+++ b/app/views/notes/_form.html.haml
@@ -28,4 +28,4 @@
.clear
%br
- = f.submit 'Add note', :class => "lbutton vm", :id => "submit_note"
+ = f.submit 'Add note', :class => "button", :id => "submit_note"
diff --git a/app/views/projects/_feed.html.haml b/app/views/projects/_feed.html.haml
new file mode 100644
index 00000000000..e1ed2944b26
--- /dev/null
+++ b/app/views/projects/_feed.html.haml
@@ -0,0 +1,15 @@
+%a.project-update{:href => dashboard_feed_path(project, update)}
+ = image_tag gravatar_icon(update.author_email), :class => "left", :width => 40
+ %span.update-title
+ = dashboard_feed_title(update)
+ %span.update-author
+ %strong= update.author_name
+ authored
+ = time_ago_in_words(update.created_at)
+ ago
+ .right
+ - klass = update.class.to_s.split("::").last.downcase
+ %span.tag{ :class => klass }= klass
+ - if update.kind_of?(Grit::Commit)
+ %span.tag.commit= update.head.name
+
diff --git a/app/views/projects/_recent_commits.html.haml b/app/views/projects/_recent_commits.html.haml
deleted file mode 100644
index 5e9eca8d00a..00000000000
--- a/app/views/projects/_recent_commits.html.haml
+++ /dev/null
@@ -1,32 +0,0 @@
-%table
- %thead
- %th
- Commits
- .filter.right
- = form_tag project_path(@project), :method => :get, :class => "right" do
- .left
- = radio_button_tag :view, "recent", (params[:view] || "recent") == "recent", :onclick => "this.form.submit()", :id => "recent_view"
- = label_tag "recent_view","Recent"
- .left
- = radio_button_tag :view, "day", params[:view] == "day", :onclick => "this.form.submit()", :id => "day_view"
- = label_tag "day_view","Today"
- .left
- = radio_button_tag :view, "week", params[:view] == "week", :onclick => "this.form.submit()", :id => "week_view"
- = label_tag "week_view","Week"
- - @commits.each do |commit|
- %tr
- %td
- %div.commit
- - if commit.author.email
- = image_tag gravatar_icon(commit.author.email), :class => "left", :width => 40, :style => "padding-right:5px;"
- - else
- = image_tag "no_avatar.png", :class => "left", :width => 40, :style => "padding-right:5px;"
- .title
- %p= link_to truncate(commit.safe_message, :length => fixed_mode? ? 40 : 100), project_commit_path(@project, :id => commit.id)
-
- %span
- %span.author
- %strong= commit.author.name.force_encoding("UTF-8")
- %cite.cgray
- = time_ago_in_words(commit.committed_date)
- ago
diff --git a/app/views/projects/_recent_messages.html.haml b/app/views/projects/_recent_messages.html.haml
deleted file mode 100644
index 1a8c8c972e6..00000000000
--- a/app/views/projects/_recent_messages.html.haml
+++ /dev/null
@@ -1,27 +0,0 @@
-- @messages.group_by{ |x| [x.noteable_id, x.noteable_type]}.each do |item, notes|
- - id, type = item[0], item[1]
- - parent = load_note_parent(id, type, @project)
- - next unless parent
-
- %table
- %thead
- %th
- %div{ :class => "recent_message_parent"}
- = link_to(truncate(dashboard_feed_title(parent), :length => fixed_mode? ? 40 : 100 ), dashboard_feed_path(@project, parent))
- - notes.sort {|x,y| y.updated_at <=> x.updated_at }.each do |note|
- %tr
- %td
- %div.message
- = image_tag gravatar_icon(note.author_email), :class => "left", :width => 40, :style => "padding-right:5px;"
- %div.title
- = link_to markdown(truncate(note.note, :length => fixed_mode? ? 40 : 100)), dashboard_feed_path(@project, parent) + "#note_#{note.id}"
- - if note.attachment.url
- %br
- Attachment:
- = link_to note.attachment_identifier, note.attachment.url
- %div.author
- %strong= note.author_name
- %cite.cgray
- = time_ago_in_words(note.updated_at)
- ago
- %br
diff --git a/app/views/projects/_tile.html.haml b/app/views/projects/_tile.html.haml
index 1f2a4a9761f..0d95fbb25c4 100644
--- a/app/views/projects/_tile.html.haml
+++ b/app/views/projects/_tile.html.haml
@@ -1,13 +1,13 @@
- @projects.in_groups_of(3, false) do |projects|
- projects.each_with_index do |project, i|
- %div.grid_1
+ %div.grid_1.projects_selector
%div{ :class => "project-box ui-box ui-box-big" }
= link_to project_path(project) do
- %h3= project.name
+ %h3= truncate(project.name, :length => 20)
.data
- %p.title.repository
+ %p.title.repository.git_url_wrapper
%span Repository:
- = project.url_to_repo
+ %input{ :value => project.url_to_repo, :class => ['git-url', 'one_click_select', 'text', 'project_list_url'], :readonly => 'readonly' }
%p.title.activity
%span Last Activity:
- last_note = project.notes.last
diff --git a/app/views/projects/_tree_item.html.haml b/app/views/projects/_tree_item.html.haml
index 273d0272322..1637202cbd3 100644
--- a/app/views/projects/_tree_item.html.haml
+++ b/app/views/projects/_tree_item.html.haml
@@ -12,7 +12,7 @@
= time_ago_in_words(content_commit.committed_date)
ago
%td.commit
- = link_to truncate(content_commit.safe_message, :length => fixed_mode? ? 40 : 80), project_commit_path(@project, content_commit), :class => "tree-commit-link"
+ = link_to truncate(content_commit.safe_message, :length => 40), project_commit_path(@project, content_commit), :class => "tree-commit-link"
- tm = @project.team_member_by_name_or_email(content_commit.author_email, content_commit.author_name)
- if tm
= link_to "[#{tm.user_name}]", project_team_member_path(@project, tm)
diff --git a/app/views/projects/empty.html.erb b/app/views/projects/empty.html.erb
index ffc1ebfa281..a4c359d3d4b 100644
--- a/app/views/projects/empty.html.erb
+++ b/app/views/projects/empty.html.erb
@@ -28,7 +28,7 @@ eos
<h2>Existing Git Repo?</h2>
<% exist_repo_setup_str = <<eos
cd existing_git_repo
-git remote add origin #{@project.url_to_repo}
+git remote add origin #{@project.url_to_repo}
git push -u origin master
eos
%>
diff --git a/app/views/projects/graph.html.haml b/app/views/projects/graph.html.haml
new file mode 100644
index 00000000000..b5f6921d407
--- /dev/null
+++ b/app/views/projects/graph.html.haml
@@ -0,0 +1,9 @@
+#holder.graph
+
+:javascript
+ var chunk1={commits:#{@commits_json}};
+ var days=#{@days_json};
+ initGraph();
+ $(function(){
+ branchGraph($("#holder")[0]);
+ });
diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml
index 65639a53649..1f8d250a200 100644
--- a/app/views/projects/new.html.haml
+++ b/app/views/projects/new.html.haml
@@ -1,8 +1,10 @@
-.new-project-hodler
- .container_4
- %h2.icon
- %span
- New Project
+- content_for(:body_class, "new-project-page")
+- content_for(:page_title) do
+ .new-project-hodler
+ .container
+ %h2.icon
+ %span
+ New Project
- %div.clear
- = render 'form'
+ %div.clear
+ = render 'form'
diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml
index f693cb9d394..0530736fb4c 100644
--- a/app/views/projects/show.html.haml
+++ b/app/views/projects/show.html.haml
@@ -1,8 +1,12 @@
-.left.width-49p
- =render "projects/recent_commits"
+- content_for(:body_class, "project-page dashboard")
-.right.width-49p
- =render "projects/recent_messages"
+#news-feed.news-feed
+ %h2.icon
+ %span>
+ Activities
+ .project-box.project-updates.ui-box.ui-box-small.ui-box-big
+ - @activities.each do |update|
+ = render "projects/feed", :update => update, :project => @project
:javascript
function updateDashboard(){
diff --git a/app/views/snippets/_form.html.haml b/app/views/snippets/_form.html.haml
index 5cd0f74a0be..b3cae65c3e9 100644
--- a/app/views/snippets/_form.html.haml
+++ b/app/views/snippets/_form.html.haml
@@ -19,7 +19,8 @@
%td{:colspan => 2}
= f.label :content, "Code"
%br
- = f.text_area :content, :style => "height:240px;width:932px;"
+ %br
+ = f.text_area :content
.actions.prepend-top
- = f.submit 'Save', :class => "lbutton vm"
+ = f.submit 'Save', :class => "button"
diff --git a/app/views/snippets/_snippet.html.haml b/app/views/snippets/_snippet.html.haml
index ddfba6bf80f..dc45e132c9f 100644
--- a/app/views/snippets/_snippet.html.haml
+++ b/app/views/snippets/_snippet.html.haml
@@ -2,11 +2,17 @@
%tr{ :id => dom_id(snippet), :class => "snippet", :url => project_snippet_path(@project, snippet) }
%td
= image_tag gravatar_icon(snippet.author.email), :class => "left", :width => 40, :style => "padding:0 5px;"
- = truncate snippet.author.name, :lenght => 20
- %td= html_escape snippet.title
- %td= html_escape snippet.file_name
- %td
- - if can?(current_user, :admin_snippet, @project) || snippet.author == current_user
- = link_to 'Edit', edit_project_snippet_path(@project, snippet), :class => "lbutton positive"
- - if can?(current_user, :admin_snippet, @project) || snippet.author == current_user
- = link_to 'Destroy', [@project, snippet], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "lbutton delete-snippet negative", :id => "destroy_snippet_#{snippet.id}"
+ %span
+ %strong= html_escape snippet.title
+ %br
+ %br
+ %div.author
+ %strong= truncate snippet.author.name, :lenght => 20
+ %cite.cgray
+ = time_ago_in_words(snippet.updated_at)
+ ago
+ .right.action-links
+ - if can?(current_user, :admin_snippet, @project) || snippet.author == current_user
+ = link_to 'Edit', edit_project_snippet_path(@project, snippet), :class => "cgray"
+ - if can?(current_user, :admin_snippet, @project) || snippet.author == current_user
+ = link_to 'Destroy', [@project, snippet], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "cred delete-snippet negative", :id => "destroy_snippet_#{snippet.id}"
diff --git a/app/views/snippets/index.html.haml b/app/views/snippets/index.html.haml
index 3f2610004bf..0ae37cfff63 100644
--- a/app/views/snippets/index.html.haml
+++ b/app/views/snippets/index.html.haml
@@ -1,13 +1,10 @@
%div
- if can? current_user, :write_snippet, @project
- .left= link_to 'New Snippet', new_project_snippet_path(@project), :class => "lbutton vm"
+ = link_to 'New Snippet', new_project_snippet_path(@project), :class => "button append-bottom-10"
%table.round-borders#snippets-table
- %tr
- %th Author
- %th Title
- %th File name
- %th
+ %thead
+ %th
= render @snippets.fresh
:javascript
$('.delete-snippet').live('ajax:success', function() {