notee 1.0.7 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/notee/application.js +45 -76973
  3. data/app/controllers/notee/comments_controller.rb +1 -1
  4. data/app/controllers/notee/tokens_controller.rb +15 -0
  5. data/app/models/notee/post.rb +1 -1
  6. data/app/models/notee/user.rb +0 -6
  7. data/app/views/notee/partials/_comment_box.html.erb +109 -120
  8. data/app/views/notee/partials/_meta.html.erb +3 -1
  9. data/app/views/notee/tokens/new.html.erb +16 -4
  10. data/config/routes.rb +2 -16
  11. data/db/migrate/20160605141437_create_notee_posts.rb +56 -1
  12. data/db/migrate/20160809145754_create_notee_users.rb +5 -0
  13. data/lib/notee/helpers/notee_helper.rb +8 -4
  14. data/lib/notee/version.rb +1 -1
  15. data/lib/tasks/config/notee.rb +1 -1
  16. data/lib/tasks/controllers/errors_controller.rb +23 -0
  17. data/lib/tasks/controllers/notee_controller.rb +1 -0
  18. data/lib/tasks/notee_tasks.rake +86 -48
  19. data/lib/tasks/stylesheets/notee/social/social.css +1 -0
  20. data/lib/tasks/views/layouts/notee_application.html.erb +6 -0
  21. data/lib/tasks/views/notee/about.html.erb +36 -41
  22. data/lib/tasks/views/notee/archives.html.erb +9 -14
  23. data/lib/tasks/views/notee/categories.html.erb +9 -14
  24. data/lib/tasks/views/notee/errors/internal_server_error.html.erb +5 -0
  25. data/lib/tasks/views/notee/errors/not_found.html.erb +5 -0
  26. data/lib/tasks/views/notee/partials/_footer.html.erb +5 -3
  27. data/lib/tasks/views/notee/partials/_header.html.erb +11 -1
  28. data/lib/tasks/views/notee/posts.html.erb +41 -44
  29. data/lib/tasks/views/notee/show.html.erb +29 -34
  30. data/lib/tasks/views/notee/writers.html.erb +5 -10
  31. data/test/controllers/notee/categories_controller_test.rb +2 -2
  32. data/test/controllers/notee/comments_controller_test.rb +2 -2
  33. data/test/controllers/notee/images_controller_test.rb +2 -2
  34. data/test/controllers/notee/posts_controller_test.rb +2 -2
  35. metadata +6 -2
@@ -12,6 +12,11 @@ class CreateNoteeUsers < ActiveRecord::Migration
12
12
  t.timestamps null: false
13
13
  end
14
14
 
15
+ # create root User
16
+ Notee::User.skip_callback(:create, :before, :create_authority)
17
+ Notee::User.create(id: 0, name: Notee.notee_id, email: "root", password: SecureRandom.hex, role: 9999)
18
+ Notee::User.set_callback(:create, :before, :create_authority)
19
+
15
20
  add_index :notee_users, [:name, :email], :unique => true
16
21
  end
17
22
  end
@@ -7,6 +7,8 @@ module Notee
7
7
  post = Notee::Post.find_by(id: search_txt)
8
8
  post = Notee::Post.find_by(slug: search_txt) unless post
9
9
 
10
+ raise ActiveRecord::RecordNotFound unless post
11
+
10
12
  return if post.status == Notee::STATUS[:draft] ||
11
13
  post.status == Notee::STATUS[:deleted] ||
12
14
  post.status == Notee::STATUS[:privated] ||
@@ -25,8 +27,9 @@ module Notee
25
27
  # search_by_category_slug
26
28
  category = Notee::Category.find_by(slug: search_txt)
27
29
  category = Notee::Category.find_by(name: search_txt) unless category
28
- return false unless category
29
- return false if category.is_deleted
30
+
31
+ raise ActiveRecord::RecordNotFound unless category
32
+ raise ActiveRecord::RecordNotFound if category.is_deleted
30
33
 
31
34
  @posts = Notee::Post.where(category_id: category.id, status: Notee::STATUS[:published], is_deleted: false).order(published_at: :desc)
32
35
  @posts
@@ -53,8 +56,9 @@ module Notee
53
56
  def writer_notees(name_or_id)
54
57
  writer = Notee::User.find_by(name: name_or_id)
55
58
  writer = Notee::User.find_by(name: name_or_id) unless writer
56
- return false unless writer
57
- return false if writer.is_deleted
59
+
60
+ raise ActiveRecord::RecordNotFound unless writer
61
+ raise ActiveRecord::RecordNotFound if writer.is_deleted
58
62
 
59
63
  @posts = writer.posts
60
64
  end
data/lib/notee/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Notee
2
- VERSION = "1.0.7"
2
+ VERSION = "1.0.8"
3
3
  end
@@ -1,6 +1,6 @@
1
1
  require 'notee'
2
2
 
3
- # Recommendation using .env for manage id & password
3
+ # Recommendation using .env
4
4
 
5
5
  Notee.configure do |config|
6
6
 
@@ -0,0 +1,23 @@
1
+ class ErrorsController < ActionController::Base
2
+ layout 'notee_application'
3
+
4
+ rescue_from ActiveRecord::RecordNotFound, with: :resque404
5
+ rescue_from ActionController::RoutingError, with: :resque404
6
+ rescue_from StandardError, with: :resque500
7
+
8
+ def resque404(exception = nil)
9
+ if exception
10
+ logger.info "Rendering 404 with exception: #{exception.message}"
11
+ end
12
+ render template: "notee/errors/not_found", status: 404
13
+ end
14
+
15
+ def resque500(exception = nil)
16
+ if exception
17
+ logger.info "Rendering 500 with exception: #{exception.message}"
18
+ end
19
+ render template: "notee/errors/internal_server_error", status: 500
20
+ end
21
+
22
+ def show; raise env["action_dispatch.exception"]; end
23
+ end
@@ -1,4 +1,5 @@
1
1
  class NoteeController < ApplicationController
2
+ layout 'notee_application'
2
3
 
3
4
  before_action :set_meta_info, except: [:show]
4
5
 
@@ -3,17 +3,9 @@ namespace :notee do
3
3
  require 'fileutils'
4
4
 
5
5
 
6
- APPLICATION_ERB_PATH = "/app/views/layouts/application.html.erb"
7
- ADD_META_TXT = <<-EOC
8
-
9
- <!-- default notee setting -->
10
-
11
- <meta name="viewport" content="width=device-width,initial-scale=1.0" />
12
-
13
- <!-- notee setting end -->
14
-
15
- EOC
16
-
6
+ # -----------------------------------------------
7
+ # Constants
8
+ # -----------------------------------------------
17
9
 
18
10
  APPLICATION_JS_PATH = "/app/assets/javascripts/application.js"
19
11
  ADD_HIGHLIGHT_TXT = <<-EOC
@@ -61,61 +53,108 @@ $(document).on('ready', function() {
61
53
  get '/writers/:name_or_id' => 'notee#writer_posts', as: 'notee_public_writer_posts'
62
54
  get '/:id_or_slug' => 'notee#show', as: 'notee_public_show'
63
55
 
56
+ get '*anything' => 'errors#resque404'
57
+
64
58
  ######## notee setting end
65
59
 
66
60
  EOC
67
61
 
68
62
 
69
- NOTEE_VIEW_PATH = "/app/views/notee/"
70
- NOTEE_VIEW_ORIGIN_PATH = "../views/notee"
71
- NOTEE_CSS_PATH = "/app/assets/stylesheets/notee/"
72
- NOTEE_CSS_ORIGIN_PATH = "../stylesheets/notee"
73
- NOTEE_JS_PATH = "/app/assets/javascripts/notee/"
74
- NOTEE_JS_ORIGIN_PATH = "../javascripts/notee"
75
- NOTEE_SCHEJULE_PATH = "/config/schedule.rb"
76
- NOTEE_SCHEJULE_ORIGIN_PATH = "../config/schedule.rb"
77
- NOTEE_CONTROLLER_PATH = "/app/controllers/notee_controller.rb"
78
- NOTEE_CONTROLLER_ORIGIN_PATH = "../controllers/notee_controller.rb"
63
+ ENV_PRODUCTION_FILE_PATH = "/config/environments/production.rb"
64
+ ADD_ENV_PRODUCTION_TXT = "config.exceptions_app = ->(env) { ErrorsController.action(:show).call(env) }"
65
+
66
+
67
+ # FILE PATH
79
68
  NOTEE_INIT_FILE_PATH = "/config/initializers/notee.rb"
80
69
  NOTEE_INIT_FILE_ORIGIN_PATH = "../config/notee.rb"
81
- NOTEE_IMAGE_PATH = "/public/notee/"
82
- NOTEE_IMAGE_ORIGIN_PATH = "../images/notee"
70
+ NOTEE_LAYOUTS_FILE_PATH = "/app/views/layouts/notee_application.html.erb"
71
+ NOTEE_LAYOUTS_FILE_ORIGIN_PATH = "../views/layouts/notee_application.html.erb"
72
+ NOTEE_SCHEJULE_FILE_PATH = "/config/schedule.rb"
73
+ NOTEE_SCHEJULE_FILE_ORIGIN_PATH = "../config/schedule.rb"
74
+ NOTEE_CONTROLLER_FILE_PATH = "/app/controllers/notee_controller.rb"
75
+ NOTEE_CONTROLLER_FILE_ORIGIN_PATH = "../controllers/notee_controller.rb"
76
+ NOTEE_ERROR_CONTROLLER_FILE_PATH = "/app/controllers/errors_controller.rb"
77
+ NOTEE_ERROR_CONTROLLER_FILE_ORIGIN_PATH = "../controllers/errors_controller.rb"
78
+
79
+ # Directory PATH
80
+ NOTEE_VIEW_DIR_PATH = "/app/views/notee/"
81
+ NOTEE_VIEW_DIR_ORIGIN_PATH = "../views/notee"
82
+ NOTEE_CSS_DIR_PATH = "/app/assets/stylesheets/notee/"
83
+ NOTEE_CSS_DIR_ORIGIN_PATH = "../stylesheets/notee"
84
+ NOTEE_JS_DIR_PATH = "/app/assets/javascripts/notee/"
85
+ NOTEE_JS_DIR_ORIGIN_PATH = "../javascripts/notee"
86
+ NOTEE_IMAGE_DIR_PATH = "/public/notee/"
87
+ NOTEE_IMAGE_DIR_ORIGIN_PATH = "../images/notee"
88
+
89
+
90
+ # -----------------------------------------------
91
+ # Tasks
92
+ # -----------------------------------------------
93
+
83
94
 
84
95
  task :start do
85
96
  notee_mark
86
97
  sh 'bundle exec rake notee:install:migrations'
87
- delete_line( APPLICATION_ERB_PATH, "<title>" )
88
- add_notee_code( APPLICATION_ERB_PATH, ADD_META_TXT, "<head>", '<meta name="viewport" content="width=device-width,initial-scale=1.0" />' )
98
+
99
+ # Add Code
89
100
  add_notee_code( APPLICATION_JS_PATH, ADD_HIGHLIGHT_TXT, "//= require_tree .", "hljs.initHighlightingOnLoad()" )
101
+ delete_line( APPLICATION_JS_PATH, "//= require turbolinks" )
90
102
  add_notee_code( APPLICATION_CSS_PATH, ADD_CSS_TXT, "*= require_tree .", "*= require_directory ./notee" )
91
103
  delete_line( APPLICATION_CSS_PATH, "*= require_tree ." )
92
104
  add_notee_code( ROUTE_FILE_PATH, ADD_ROUTE_TXT, "Rails.application.routes.draw do", "Notee::Engine" )
93
- copy_directory( NOTEE_VIEW_PATH, NOTEE_VIEW_ORIGIN_PATH )
94
- copy_directory( NOTEE_CSS_PATH, NOTEE_CSS_ORIGIN_PATH )
95
- copy_directory( NOTEE_JS_PATH, NOTEE_JS_ORIGIN_PATH )
96
- copy_directory( NOTEE_IMAGE_PATH, NOTEE_IMAGE_ORIGIN_PATH )
97
- create_file( NOTEE_SCHEJULE_PATH, NOTEE_SCHEJULE_ORIGIN_PATH)
98
- create_file( NOTEE_CONTROLLER_PATH, NOTEE_CONTROLLER_ORIGIN_PATH)
105
+ add_line( ENV_PRODUCTION_FILE_PATH, ADD_ENV_PRODUCTION_TXT, "Rails.application.configure do")
106
+
107
+ # Copy Directory
108
+ copy_directory( NOTEE_VIEW_DIR_PATH, NOTEE_VIEW_DIR_ORIGIN_PATH )
109
+ copy_directory( NOTEE_CSS_DIR_PATH, NOTEE_CSS_DIR_ORIGIN_PATH )
110
+ copy_directory( NOTEE_JS_DIR_PATH, NOTEE_JS_DIR_ORIGIN_PATH )
111
+ copy_directory( NOTEE_IMAGE_DIR_PATH, NOTEE_IMAGE_DIR_ORIGIN_PATH )
112
+
113
+ # Create File
99
114
  create_file( NOTEE_INIT_FILE_PATH, NOTEE_INIT_FILE_ORIGIN_PATH)
115
+ create_file( NOTEE_LAYOUTS_FILE_PATH, NOTEE_LAYOUTS_FILE_ORIGIN_PATH)
116
+ create_file( NOTEE_SCHEJULE_FILE_PATH, NOTEE_SCHEJULE_FILE_ORIGIN_PATH)
117
+ create_file( NOTEE_CONTROLLER_FILE_PATH, NOTEE_CONTROLLER_FILE_ORIGIN_PATH)
118
+ create_file( NOTEE_ERROR_CONTROLLER_FILE_PATH, NOTEE_ERROR_CONTROLLER_FILE_ORIGIN_PATH)
119
+
120
+ # Set Cron Job
100
121
  sh 'bundle exec whenever --update-crontab RAILS_ENV=production'
101
122
  end
102
123
 
124
+
103
125
  task :destroy do
104
- delete_directory(NOTEE_VIEW_PATH)
105
- delete_directory(NOTEE_CSS_PATH)
106
- delete_directory(NOTEE_JS_PATH)
107
- delete_directory(NOTEE_IMAGE_PATH)
108
- delete_file(NOTEE_SCHEJULE_PATH)
109
- delete_file(NOTEE_CONTROLLER_PATH)
126
+
127
+ # Delete File
128
+ delete_file(NOTEE_ERROR_CONTROLLER_FILE_PATH)
129
+ delete_file(NOTEE_CONTROLLER_FILE_PATH)
130
+ delete_file(NOTEE_SCHEJULE_FILE_PATH)
131
+ delete_file(NOTEE_LAYOUTS_FILE_PATH)
110
132
  delete_file(NOTEE_INIT_FILE_PATH)
111
- add_line(APPLICATION_ERB_PATH, "<title>#{Rails.application.class.parent_name.to_s}</title>", "<head>", "<title>")
112
- delete_notee_code(APPLICATION_ERB_PATH, "<!-- default notee setting -->", "<!-- notee setting end -->")
113
- delete_notee_code(APPLICATION_JS_PATH, "//////// default notee setting", "//////// notee setting end")
114
- add_line(APPLICATION_CSS_PATH, "*= require_tree .", "//////// notee setting end", "*= require_tree .")
115
- delete_notee_code(APPLICATION_CSS_PATH, "//////// default notee setting", "//////// notee setting end")
133
+
134
+ # Delete Directory
135
+ delete_directory(NOTEE_IMAGE_DIR_PATH)
136
+ delete_directory(NOTEE_JS_DIR_PATH)
137
+ delete_directory(NOTEE_CSS_DIR_PATH)
138
+ delete_directory(NOTEE_VIEW_DIR_PATH)
139
+
140
+ # Delete Code
141
+ delete_line( ENV_PRODUCTION_FILE_PATH, ADD_ENV_PRODUCTION_TXT)
116
142
  delete_notee_code(ROUTE_FILE_PATH, "######## default notee path", "######## notee setting end")
143
+ add_line(APPLICATION_CSS_PATH, "*= require_tree .", "//////// notee setting end")
144
+ delete_notee_code(APPLICATION_CSS_PATH, "//////// default notee setting", "//////// notee setting end")
145
+ add_line( APPLICATION_JS_PATH, "//= require turbolinks", "//= require jquery_ujs")
146
+ delete_notee_code(APPLICATION_JS_PATH, "//////// default notee setting", "//////// notee setting end")
147
+
148
+ # Delte Cron Job
149
+ sh 'bundle exec whenever --clear-crontab'
117
150
  end
118
151
 
152
+
153
+ # -----------------------------------------------
154
+ # Methods
155
+ # -----------------------------------------------
156
+
157
+
119
158
  private
120
159
 
121
160
  def notee_mark
@@ -152,7 +191,7 @@ ________________________________
152
191
  f.write(new_file)
153
192
  f.close()
154
193
 
155
- puts 'Notee added code => ' + add_file_path
194
+ puts 'Notee added code => in ' + add_file_path
156
195
  end
157
196
 
158
197
 
@@ -232,16 +271,16 @@ ________________________________
232
271
 
233
272
 
234
273
 
235
- def add_line(file_path, add_line, beginning_path, check_txt)
274
+ def add_line(file_path, add_line, beginning_path)
236
275
  add_file_path = Rails.root.to_s + file_path
237
276
 
238
277
  txt = <<-EOC
239
278
 
240
- #{add_line}
279
+ #{add_line}
241
280
  EOC
242
281
 
243
- return puts 'delete failed => notee code '+ add_file_path + '\n' unless delete_file = File.open(add_file_path,"r")
244
- return if File.open(add_file_path,"r").read.include?(check_txt)
282
+ return puts 'add failed => notee code '+ add_file_path + '\n' unless delete_file = File.open(add_file_path,"r")
283
+ return if File.open(add_file_path,"r").read.include?(add_line)
245
284
 
246
285
  new_file_text = String.new
247
286
  initial_txt = true
@@ -281,5 +320,4 @@ ________________________________
281
320
  puts 'Notee deleted => ' + delete_line + ' in' + delete_file_path
282
321
  end
283
322
 
284
-
285
323
  end
@@ -36,6 +36,7 @@ ul.social-button-syncer {
36
36
  @media screen and ( min-width:480px ) {
37
37
  ul.social-button-syncer {
38
38
  width: 410px ;
39
+ float: left;
39
40
  }
40
41
  }
41
42
 
@@ -0,0 +1,6 @@
1
+ <%= render :partial => "notee/partials/header.html.erb" %>
2
+ <div class="notee_wrapper">
3
+ <%= yield %>
4
+ <%= render :partial => "notee/partials/sidebar.html.erb" %>
5
+ </div>
6
+ <%= render :partial => "notee/partials/footer.html.erb" %>
@@ -1,43 +1,38 @@
1
- <%= render :partial => "notee/partials/header.html.erb" %>
2
- <div class="notee_wrapper">
3
- <div class="notee_main">
4
- <div class="notee_main_content">
5
- <h1>Hello World</h1>
6
- <p>
7
- Lorem ipsum dolor sit amet,
8
- consectetuer adipiscing elit.
9
- Aenean commodo ligula eget dolor.
10
- Aenean massa.
11
- Cum sociis natoque penatibus et magnis dis parturient montes,
12
- nascetur ridiculus mus.
13
- Donec quam felis, ultricies nec, pellentesque eu,
14
- pretium quis, sem. Nulla consequat massa quis enim.
15
- Donec pede justo, fringilla vel, aliquet nec,
16
- vulputate eget, arcu. In enim justo, rhoncus ut,
17
- imperdiet a, venenatis vitae, justo.
18
- Nullam dictum felis eu pede mollis pretium. Integer tincidunt.
19
- Cras dapibus. Vivamus elementum semper nisi.
20
- Aenean vulputate eleifend tellus.
21
- Aenean leo ligula, porttitor eu,
22
- consequat vitae, eleifend ac, enim.
23
- Aliquam lorem ante,
24
- dapibus in, viverra quis, feugiat a, tellus.
25
- Phasellus viverra nulla ut metus varius laoreet.
26
- Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue.
27
- Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus.
28
- Maecenas tempus, tellus eget condimentum rhoncus,
29
- sem quam semper libero, sit amet adipiscing sem neque sed ipsum.
30
- Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem.
31
- Maecenas nec odio et ante tincidunt tempus.
32
- Donec vitae sapien ut libero venenatis faucibus.
33
- Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt.
34
- Duis leo. Sed fringilla mauris sit amet nibh.
35
- Donec sodales sagittis magna. Sed consequat,
36
- leo eget bibendum sodales,
37
- augue velit cursus nunc.
38
- </p>
39
- </div>
1
+ <div class="notee_main">
2
+ <div class="notee_main_content">
3
+ <h1>Hello World</h1>
4
+ <p>
5
+ Lorem ipsum dolor sit amet,
6
+ consectetuer adipiscing elit.
7
+ Aenean commodo ligula eget dolor.
8
+ Aenean massa.
9
+ Cum sociis natoque penatibus et magnis dis parturient montes,
10
+ nascetur ridiculus mus.
11
+ Donec quam felis, ultricies nec, pellentesque eu,
12
+ pretium quis, sem. Nulla consequat massa quis enim.
13
+ Donec pede justo, fringilla vel, aliquet nec,
14
+ vulputate eget, arcu. In enim justo, rhoncus ut,
15
+ imperdiet a, venenatis vitae, justo.
16
+ Nullam dictum felis eu pede mollis pretium. Integer tincidunt.
17
+ Cras dapibus. Vivamus elementum semper nisi.
18
+ Aenean vulputate eleifend tellus.
19
+ Aenean leo ligula, porttitor eu,
20
+ consequat vitae, eleifend ac, enim.
21
+ Aliquam lorem ante,
22
+ dapibus in, viverra quis, feugiat a, tellus.
23
+ Phasellus viverra nulla ut metus varius laoreet.
24
+ Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue.
25
+ Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus.
26
+ Maecenas tempus, tellus eget condimentum rhoncus,
27
+ sem quam semper libero, sit amet adipiscing sem neque sed ipsum.
28
+ Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem.
29
+ Maecenas nec odio et ante tincidunt tempus.
30
+ Donec vitae sapien ut libero venenatis faucibus.
31
+ Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt.
32
+ Duis leo. Sed fringilla mauris sit amet nibh.
33
+ Donec sodales sagittis magna. Sed consequat,
34
+ leo eget bibendum sodales,
35
+ augue velit cursus nunc.
36
+ </p>
40
37
  </div>
41
- <%= render :partial => "notee/partials/sidebar.html.erb" %>
42
38
  </div>
43
- <%= render :partial => "notee/partials/footer.html.erb" %>
@@ -1,15 +1,10 @@
1
- <%= render :partial => "notee/partials/header.html.erb" %>
2
- <div class="notee_wrapper">
3
- <div class="notee_main">
4
- <h2>Archive List</h2>
5
- <% @archives.each do |key, count| %>
6
- <div class="notee_list">
7
- <a href="/archives/<%= key %>">
8
- <h3><%= key %> (<%= count %>)</h3>
9
- </a>
10
- </div>
11
- <% end %>
12
- </div>
13
- <%= render :partial => "notee/partials/sidebar.html.erb" %>
1
+ <div class="notee_main">
2
+ <h2>Archive List</h2>
3
+ <% @archives.each do |key, count| %>
4
+ <div class="notee_list">
5
+ <a href="/archives/<%= key %>">
6
+ <h3><%= key %> (<%= count %>)</h3>
7
+ </a>
8
+ </div>
9
+ <% end %>
14
10
  </div>
15
- <%= render :partial => "notee/partials/footer.html.erb" %>
@@ -1,15 +1,10 @@
1
- <%= render :partial => "notee/partials/header.html.erb" %>
2
- <div class="notee_wrapper">
3
- <div class="notee_main">
4
- <h2>Category List</h2>
5
- <% @categories.each do |key, category_array| %>
6
- <div class="notee_list">
7
- <a href="/categories/<%= category_array[1].slug %>">
8
- <h3><%= category_array[1].name %> (<%= category_array[0] %>)</h3>
9
- </a>
10
- </div>
11
- <% end %>
12
- </div>
13
- <%= render :partial => "notee/partials/sidebar.html.erb" %>
1
+ <div class="notee_main">
2
+ <h2>Category List</h2>
3
+ <% @categories.each do |key, category_array| %>
4
+ <div class="notee_list">
5
+ <a href="/categories/<%= category_array[1].slug %>">
6
+ <h3><%= category_array[1].name %> (<%= category_array[0] %>)</h3>
7
+ </a>
8
+ </div>
9
+ <% end %>
14
10
  </div>
15
- <%= render :partial => "notee/partials/footer.html.erb" %>
@@ -0,0 +1,5 @@
1
+ <div class="notee_main">
2
+ <div class="notee_main_content">
3
+ <h2>ERROR:500 Internal Server Error.</h2>
4
+ </div>
5
+ </div>
@@ -0,0 +1,5 @@
1
+ <div class="notee_main">
2
+ <div class="notee_main_content">
3
+ <h2>ERROR:404 Not Found.</h2>
4
+ </div>
5
+ </div>