Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com>2011-10-20 20:21:58 +0400
committerDmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com>2011-10-20 20:21:58 +0400
commit3f91cf4562dc59e9f13c979880c1b549458ece68 (patch)
tree5ec7405df2d0002a915b0f26973a08e1ac31d2f4 /app/views
parentfce1428d1055eeed98af56be5ae7e8de84c08edf (diff)
Wall redesign
Diffstat (limited to 'app/views')
-rw-r--r--app/views/commits/_commits.html.haml4
-rw-r--r--app/views/commits/show.js.haml4
-rw-r--r--app/views/notes/_form.html.haml4
-rw-r--r--app/views/notes/_notes.html.haml17
-rw-r--r--app/views/notes/_show.html.haml12
-rw-r--r--app/views/notes/create.js.haml2
-rw-r--r--app/views/projects/_recent_commits.html.haml4
-rw-r--r--app/views/projects/_recent_messages.html.haml6
-rw-r--r--app/views/projects/wall.html.haml25
9 files changed, 48 insertions, 30 deletions
diff --git a/app/views/commits/_commits.html.haml b/app/views/commits/_commits.html.haml
index 5a3ba3a7f46..94a1bd1b995 100644
--- a/app/views/commits/_commits.html.haml
+++ b/app/views/commits/_commits.html.haml
@@ -15,8 +15,8 @@
= link_to "Browse Code", tree_project_path(@project, :commit_id => commit.id), :class => "lite_button", :style => "float:right"
= link_to truncate(commit.id.to_s, :length => 16), project_commit_path(@project, :id => commit.id), :class => "lite_button", :style => "width:120px;float:right"
%span
- %span
- [ #{commit.author} ]
+ %span.author
+ = commit.author
= time_ago_in_words(commit.committed_date)
ago
= more_commits_link if @commits.size > 99
diff --git a/app/views/commits/show.js.haml b/app/views/commits/show.js.haml
index 2c46689b1ed..cec1fe28348 100644
--- a/app/views/commits/show.js.haml
+++ b/app/views/commits/show.js.haml
@@ -1,6 +1,8 @@
-:plain
+-#:plain
$("#side-commit-preview").remove();
var side = $("<div id='side-commit-preview'></div>");
side.html("#{escape_javascript(render "commits/show")}");
$("##{dom_id(@project)}").parent().append(side);
$("##{dom_id(@project)}").addClass("span-14");
+:plain
+ $("#notes-list").html("#{escape_javascript(render(:partial => 'notes/notes_list'))}");
diff --git a/app/views/notes/_form.html.haml b/app/views/notes/_form.html.haml
index 8eaf968c803..ca56a2450a0 100644
--- a/app/views/notes/_form.html.haml
+++ b/app/views/notes/_form.html.haml
@@ -12,9 +12,9 @@
= f.label :note
%cite (255 symbols only)
%br
- = f.text_area :note, :style => "width:97%;height:100px", :size => 255
+ = f.text_area :note, :size => 255
- %div
+ %div.attach_holder
= f.label :attachment
%cite (less than 10 MB)
%br
diff --git a/app/views/notes/_notes.html.haml b/app/views/notes/_notes.html.haml
index c93a47239fb..2d110162eca 100644
--- a/app/views/notes/_notes.html.haml
+++ b/app/views/notes/_notes.html.haml
@@ -1,9 +1,12 @@
-%ul#notes-list= render "notes/notes_list"
+- if controller.action_name == "wall"
+ %ul#notes-list= render "notes/notes_list"
-%br
-%br
-- if can? current_user, :write_note, @project
- = render "notes/form"
+- else
+ %ul#notes-list= render "notes/notes_list"
+ %br
+ %br
+ - if can? current_user, :write_note, @project
+ = render "notes/form"
:javascript
$('.delete-note').live('ajax:success', function() {
@@ -23,7 +26,3 @@
$(function(){
var int =self.setInterval("updatePage()", 20000);
});
-
- function updatePage(){
- $.ajax({type: "GET", url: location.href, dataType: "script"});
- }
diff --git a/app/views/notes/_show.html.haml b/app/views/notes/_show.html.haml
index 2b0a6d2ebcd..ee9f9ffaa4b 100644
--- a/app/views/notes/_show.html.haml
+++ b/app/views/notes/_show.html.haml
@@ -1,19 +1,17 @@
%li{:id => dom_id(note)}
%div.note_author
= image_tag gravatar_icon(note.author.email), :class => "left", :width => 40, :style => "padding-right:5px;"
- %div.note_content
+ %div.note_content.left
= simple_format(html_escape(note.note))
- if note.attachment.url
Attachment:
- = link_to note.attachment_identifier, note.attachment.url
+ = link_to note.attachment_identifier, note.attachment.url, :target => "_blank"
%br
- %span
- %span
- [ #{note.author.name} ]
- &nbsp;
+ %span.author= note.author.name
+ %cite.ago
= time_ago_in_words(note.updated_at)
ago
- %br
+ %br
- if(note.author_id == current_user.id) || can?(current_user, :admin_note, @project)
= link_to 'Remove', [@project, note], :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "lbutton delete-note right negative"
.clear
diff --git a/app/views/notes/create.js.haml b/app/views/notes/create.js.haml
index 0af548ff855..15371dbce2b 100644
--- a/app/views/notes/create.js.haml
+++ b/app/views/notes/create.js.haml
@@ -1,7 +1,7 @@
- if @note.valid?
:plain
$("#new_note .errors").remove();
- $("#notes-list").append("#{escape_javascript(render(:partial => 'show', :locals => {:note => @note} ))}");
+ updatePage();
$('#note_note').val("");
- else
:plain
diff --git a/app/views/projects/_recent_commits.html.haml b/app/views/projects/_recent_commits.html.haml
index 812be93c1a3..e435ea30f00 100644
--- a/app/views/projects/_recent_commits.html.haml
+++ b/app/views/projects/_recent_commits.html.haml
@@ -9,8 +9,8 @@
= link_to truncate_commit_message(commit, 60), project_commit_path(@project, :id => commit.id)
%span
- %span
- [ #{commit.author} ]
+ %span.author
+ = commit.author.name.force_encoding("UTF-8")
%cite
= 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
index 03f723da877..1af7fe3bb24 100644
--- a/app/views/projects/_recent_messages.html.haml
+++ b/app/views/projects/_recent_messages.html.haml
@@ -46,12 +46,6 @@
Attachment:
= link_to note.attachment_identifier, note.attachment.url
%br
- -#%span
- %span
- [ #{note.author.name} ]
- %cite
- = time_ago_in_words(note.created_at)
- ago
%br
.append-bottom
&nbsp;
diff --git a/app/views/projects/wall.html.haml b/app/views/projects/wall.html.haml
index 479bb3cfc5b..d3dcb3530aa 100644
--- a/app/views/projects/wall.html.haml
+++ b/app/views/projects/wall.html.haml
@@ -1 +1,26 @@
+%div.wall_page
+ - if can? current_user, :write_note, @project
+ = render "notes/form"
+ .right
+ = form_tag wall_project_path(@project), :method => :get do
+ .span-2
+ = radio_button_tag :view, "day", (params[:view] || "day") == "day", :onclick => "this.form.submit()", :id => "day_view"
+ = label_tag "day_view","Today"
+ .span-2
+ = radio_button_tag :view, "week", params[:view] == "week", :onclick => "this.form.submit()", :id => "week_view"
+ = label_tag "week_view","Week"
+ .span-2
+ = radio_button_tag :view, "all", params[:view] == "all", :onclick => "this.form.submit()", :id => "all_view"
+ = label_tag "all_view","All"
+ .clear
+ %br
+ %hr
= render "notes/notes"
+
+:javascript
+ $(function(){
+ $("#note_note").live("click", function(){
+ $(this).css("height", "100px");
+ $('.attach_holder').show();
+ });
+ });