Merge remote-tracking branch 'origin/master' into network_graph
Conflicts: app/assets/stylesheets/projects.css.scss lib/commit_ext.rb
This commit is contained in:
commit
762946995e
18 changed files with 213 additions and 312 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
15
app/views/projects/_feed.html.haml
Normal file
15
app/views/projects/_feed.html.haml
Normal file
|
@ -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
|
||||
|
|
@ -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
|
|
@ -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
|
|
@ -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(){
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue