summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorValery Sizov <vsv2711@gmail.com>2011-11-13 15:57:34 +0200
committerValery Sizov <vsv2711@gmail.com>2011-11-13 15:57:34 +0200
commit762946995ea9d477f00fea19e5040bf4dd437cb9 (patch)
treeb94dc6074eeba1b49c0ed6427cb847f89227fd4f /app/views
parentdc844f013848ee1fa7721173bda3f3fc0ed0b8ba (diff)
parent2f790001a029144f7a614d49a123cd1037f6398c (diff)
downloadgitlab-ce-762946995ea9d477f00fea19e5040bf4dd437cb9.tar.gz
Merge remote-tracking branch 'origin/master' into network_graph
Conflicts: app/assets/stylesheets/projects.css.scss lib/commit_ext.rb
Diffstat (limited to 'app/views')
-rw-r--r--app/views/dashboard/index.html.haml2
-rw-r--r--app/views/layouts/project.html.haml2
-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/show.html.haml12
-rw-r--r--app/views/snippets/_form.html.haml5
-rw-r--r--app/views/snippets/index.html.haml2
9 files changed, 31 insertions, 68 deletions
diff --git a/app/views/dashboard/index.html.haml b/app/views/dashboard/index.html.haml
index e7559dd5762..e25ec249ef5 100644
--- a/app/views/dashboard/index.html.haml
+++ b/app/views/dashboard/index.html.haml
@@ -27,6 +27,8 @@
%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
diff --git a/app/views/layouts/project.html.haml b/app/views/layouts/project.html.haml
index fc28b9307b3..8ef88f9d427 100644
--- a/app/views/layouts/project.html.haml
+++ b/app/views/layouts/project.html.haml
@@ -19,7 +19,7 @@
.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
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 7dfc1971213..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 => 40), 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 57583f5cd98..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 => 40 ), 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 => 40)), 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/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/index.html.haml b/app/views/snippets/index.html.haml
index 58e6085f388..0ae37cfff63 100644
--- a/app/views/snippets/index.html.haml
+++ b/app/views/snippets/index.html.haml
@@ -1,6 +1,6 @@
%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
%thead