diff --git a/app/routes/notes_routes.rb b/app/routes/notes_routes.rb
index ec8be13..ca0bb6f 100644
--- a/app/routes/notes_routes.rb
+++ b/app/routes/notes_routes.rb
@@ -14,7 +14,7 @@ class Sinatra::Application
end
get '/notes' do
- @notes = current_user.notes.includes(:tags)
+ @notes = current_user.notes.includes(:tags).order('title ASC')
erb :'notes/index'
end
diff --git a/app/views/layout.erb b/app/views/layout.erb
index 8cffbab..eb59d90 100644
--- a/app/views/layout.erb
+++ b/app/views/layout.erb
@@ -10,7 +10,7 @@
-
+
<% if current_user %>
<%= partial :'sidebar' %>
diff --git a/app/views/notes/_form.erb b/app/views/notes/_form.erb
index 4f6fe90..8d725de 100644
--- a/app/views/notes/_form.erb
+++ b/app/views/notes/_form.erb
@@ -1,6 +1,6 @@
<% action_url = note.new_record? ? '/note/create' : "/note/#{note.id}" %>
<% method = note.new_record? ? 'post' : 'patch' %>
-
-Tasks
+Tasks
<% if @project.tasks.any? %>
<% @project.tasks.each do |task| %>
@@ -51,10 +51,16 @@
<% end %>
-Notes
+
+Notes
<% if @project.notes.any? %>
- <%= partial :'notes/_notes_table', locals: {notes: @project.notes} %>
+ <% @project.notes.each do |note| %>
+
+ <%= partial :'notes/_form', locals: { note: note } %>
+
+ <%= partial :'notes/_note', locals: {note: note} %>
+ <% end %>
<% else %>
No notes have been created yet for this project
diff --git a/app/views/sidebar.erb b/app/views/sidebar.erb
index 899940b..d11089f 100644
--- a/app/views/sidebar.erb
+++ b/app/views/sidebar.erb
@@ -1,4 +1,4 @@
-