Commit 7563abbe49fc16280877be89342d552e0609d57c

Authored by Riyad Preukschas
1 parent e63d7b60

Add 'notes/reversed_notes_with_form' partial

app/assets/stylesheets/sections/notes.scss
@@ -10,7 +10,10 @@ @@ -10,7 +10,10 @@
10 padding:0px; 10 padding:0px;
11 } 11 }
12 12
13 -#notes-list li:last-child { 13 +#new-notes-list:not(.reversed) {
  14 + border-top:1px solid #aaa;
  15 +}
  16 +#new-notes-list.reversed {
14 border-bottom:1px solid #aaa; 17 border-bottom:1px solid #aaa;
15 } 18 }
16 19
@@ -48,7 +51,6 @@ @@ -48,7 +51,6 @@
48 51
49 .note { 52 .note {
50 padding: 8px 0; 53 padding: 8px 0;
51 - border-bottom: 1px solid #eee;  
52 overflow: hidden; 54 overflow: hidden;
53 display: block; 55 display: block;
54 img {float: left; margin-right: 10px;} 56 img {float: left; margin-right: 10px;}
@@ -70,6 +72,14 @@ @@ -70,6 +72,14 @@
70 .delete-note { display:block; } 72 .delete-note { display:block; }
71 } 73 }
72 } 74 }
  75 +#notes-list:not(.reversed) .note,
  76 +#new-notes-list:not(.reversed) .note {
  77 + border-bottom: 1px solid #eee;
  78 +}
  79 +#notes-list.reversed .note,
  80 +#new-notes-list.reversed .note {
  81 + border-top: 1px solid #eee;
  82 +}
73 83
74 .notes-status { 84 .notes-status {
75 margin: 18px; 85 margin: 18px;
app/views/notes/_reversed_notes_with_form.html.haml 0 → 100644
@@ -0,0 +1,11 @@ @@ -0,0 +1,11 @@
  1 +- if can? current_user, :write_note, @project
  2 + = render "notes/common_form"
  3 +
  4 +%ul.reversed#new-notes-list
  5 +%ul.reversed#notes-list
  6 +.notes-status
  7 +
  8 +:javascript
  9 + $(function(){
  10 + NoteList.init("#{tid}", "#{tt}", "#{project_notes_path(@project)}");
  11 + });
0 \ No newline at end of file 12 \ No newline at end of file
app/views/projects/wall.html.haml
1 %div.wall_page 1 %div.wall_page
2 - = render "notes/notes_with_form", tid: nil, tt: "wall" 2 + = render "notes/reversed_notes_with_form", tid: nil, tt: "wall"