jinda 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generators/jinda/install_generator.rb +24 -10
- data/lib/generators/jinda/templates/app/assets/javascripts/application.js-jqm +2 -0
- data/lib/generators/jinda/templates/app/assets/stylesheets/{application.css → application.css.scss} +0 -0
- data/lib/generators/jinda/templates/app/controllers/api/v1/notes_controller.rb +81 -0
- data/lib/generators/jinda/templates/app/controllers/jinda_org/jinda_controller.rb +22 -0
- data/lib/generators/jinda/templates/app/controllers/jinda_org/notes_controller.rb +86 -0
- data/lib/generators/jinda/templates/app/jinda/index.mm +138 -21
- data/lib/generators/jinda/templates/app/mailers/note_mailer.rb +10 -0
- data/lib/generators/jinda/templates/app/models/note.rb +22 -0
- data/lib/generators/jinda/templates/app/views/api/v1/note.haml +0 -0
- data/lib/generators/jinda/templates/app/views/jinda/index.html.haml +1 -1
- data/lib/generators/jinda/templates/app/views/jinda/run_form.haml +4 -0
- data/lib/generators/jinda/templates/app/views/note_mailer/gmail.html.haml +7 -0
- data/lib/generators/jinda/templates/app/views/note_mailer/gmail.text.haml +8 -0
- data/lib/generators/jinda/templates/app/views/notes/delete/select_note.html.erb +14 -0
- data/lib/generators/jinda/templates/app/views/notes/edit/edit_note.html.erb +10 -0
- data/lib/generators/jinda/templates/app/views/notes/edit/select_note.html.erb +14 -0
- data/lib/generators/jinda/templates/app/views/notes/index.haml +71 -0
- data/lib/generators/jinda/templates/app/views/notes/mail/display_mail.html.erb +20 -0
- data/lib/generators/jinda/templates/app/views/notes/mail/select_note.html.erb +19 -0
- data/lib/generators/jinda/templates/app/views/notes/mail/show.html.haml +13 -0
- data/lib/generators/jinda/templates/app/views/notes/my.haml +21 -0
- data/lib/generators/jinda/templates/app/views/notes/new/new_note.html.erb +13 -0
- data/lib/generators/jinda/templates/app/views/notes/show.haml +10 -0
- data/lib/generators/jinda/templates/app/views/notes/xedit/edit_note.html.erb +10 -0
- data/lib/generators/jinda/templates/spec/controllers/api/v1_get_index_spec.rb +23 -0
- data/lib/generators/jinda/templates/spec/controllers/api/v1_get_my_spec.rb +14 -0
- data/lib/generators/jinda/templates/spec/controllers/api/v1_post_spec.rb +19 -0
- data/lib/generators/jinda/templates/spec/mailers/note_spec.rb +24 -0
- data/lib/generators/jinda/templates/spec/mailers/previews/note_preview.rb +9 -0
- data/lib/generators/jinda/templates/spec/models/note_spec.rb +41 -0
- data/lib/generators/jinda/templates/spec/rails_helper.rb +29 -40
- data/lib/generators/jinda/templates/spec/support/authentication_helper.rb +20 -0
- data/lib/generators/jinda/templates/spec/support/factory_bot.rb +9 -3
- data/lib/generators/jinda/templates/spec/support/request_spec_helper.rb +8 -0
- data/lib/jinda/ template/view.html.erb +0 -2
- data/lib/jinda/version.rb +1 -1
- metadata +29 -4
- data/lib/generators/jinda/templates/install.sh +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc475da4a23373ee9c19c6a1e4f2fc3f10dcfe82d94dc67197651fe3cde8ee3c
|
4
|
+
data.tar.gz: 58c799c742f34feb2f62d17667fa4da4f4b1ab20913869b44a78a192e1df9c1b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1ceffa9eb1a6270e7da0bdf5a8ddd03fb08ad9e07f77e5e4b0947ec065628b29d9c9dac0fc7e840a10a8c348450bbd647484936a675cf24e8706a3c6288f574
|
7
|
+
data.tar.gz: e70897bac06191c0a1cb6198451a10d6148221bebb37ee30c77c5276ffc3ef708b6243b796030c29514cde351142c8bdae4b470c602300dde9fdba800140ac92
|
@@ -10,14 +10,16 @@ module Jinda
|
|
10
10
|
gem 'maruku', '~> 0.7.3'
|
11
11
|
gem 'rouge'
|
12
12
|
gem 'normalize-rails'
|
13
|
-
gem 'font-awesome-
|
13
|
+
gem 'font-awesome-rails'
|
14
|
+
gem 'font-awesome-sass', '~> 5.12.0'
|
14
15
|
gem 'ckeditor', github: 'galetahub/ckeditor'
|
15
16
|
gem 'mongoid-paperclip', require: 'mongoid_paperclip'
|
16
17
|
gem 'meta-tags'
|
17
18
|
gem 'jquery-turbolinks'
|
18
19
|
gem 'mongo', '~> 2.7.0'
|
19
20
|
gem 'bson', '~> 4.0'
|
20
|
-
gem 'mongoid'
|
21
|
+
gem 'mongoid', '>= 6.0'
|
22
|
+
gem 'turbolinks_render'
|
21
23
|
gem 'nokogiri' # use for jinda/doc
|
22
24
|
gem 'haml', '~> 5.1', '>= 5.1.2'
|
23
25
|
gem 'haml-rails', '~> 1.0'
|
@@ -42,14 +44,14 @@ module Jinda
|
|
42
44
|
gem 'binding_of_caller'
|
43
45
|
gem 'pry-byebug'
|
44
46
|
gem 'factory_bot_rails'
|
45
|
-
|
47
|
+
gem 'database_cleaner'
|
46
48
|
gem 'guard'
|
47
49
|
gem 'guard-rspec'
|
48
50
|
gem 'guard-minitest'
|
49
51
|
gem 'capybara'
|
50
|
-
|
52
|
+
gem 'selenium-webdriver'
|
51
53
|
gem 'rb-fsevent'
|
52
|
-
|
54
|
+
gem 'valid_attribute'
|
53
55
|
gem 'faker', :git => 'https://github.com/stympy/faker.git', :branch => 'master'
|
54
56
|
end
|
55
57
|
end
|
@@ -60,7 +62,7 @@ module Jinda
|
|
60
62
|
inside("app/views/layouts") {(File.file? "application.html.erb") ? (FileUtils.mv 'application.html.erb', 'application.html.erb.bak') : ( say "no app/views/layout/ application.html.erb", :blue )}
|
61
63
|
inside("app/controllers") {(File.file? "application_controller.rb") ? (FileUtils.mv 'application_controller.rb', 'application_controller.rb.bak' ) : ( say "no app/controller/application_controller.rb, :blue ")}
|
62
64
|
inside("app/helpers") {(File.file? "application_helper.rb") ? (FileUtils.mv 'application_helper.rb', 'application_helper.rb.bak') : ( say "no app/helpers/application_helper.rb", :blue)}
|
63
|
-
inside("app/assets/javascripts") {(File.file?
|
65
|
+
inside("app/assets/javascripts") {(File.file? 'application.js') ? (FileUtils.mv 'application.js', 'application.js.bak') : ( say "no application.js", :blue)}
|
64
66
|
inside("app/assets/stylesheets") {(File.file? "application.css") ? (FileUtils.mv 'application.css', 'application.css.bak') : ( say "no application.css", :blue)}
|
65
67
|
inside("config/initializers") {(File.file? "omniauth.rb") ? (FileUtils.mv 'omniauth.rb', 'omniauth.rb.bak') : (say "no omniauth.rb", :blue)}
|
66
68
|
# inside("config/initializers") {(File.file? "mongoid.rb") ? (FileUtils.mv 'mongoid.rb', 'mongoid.rb.bak') : (say "no mongoid.rb")}
|
@@ -88,29 +90,41 @@ module Jinda
|
|
88
90
|
inside("app/controllers") {(File.file? "sessions_controller.rb") ? ( say "Please merge existing jinda_org/sessions_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/sessions_controller.rb', 'sessions_controller.rb')}
|
89
91
|
inside("app/controllers") {(File.file? "users_controller.rb") ? ( say "Please merge existing jinda_org/users_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/users_controller.rb', 'users_controller.rb')}
|
90
92
|
inside("app/controllers") {(File.file? "sitemap_controller.rb") ? ( say "Please merge existing jinda_org/sitemap_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/sitemap_controller.rb', 'sitemap_controller.rb')}
|
93
|
+
inside("app/controllers") {(File.file? "notes_controller.rb") ? ( say "Please merge existing jinda_org/notes_controller.rb after this installation", :red) : (FileUtils.mv 'jinda_org/notes_controller.rb', 'notes_controller.rb')}
|
91
94
|
end
|
92
95
|
# routes created each line as reversed order button up in routes
|
93
96
|
def setup_routes
|
97
|
+
route "end"
|
98
|
+
route " end"
|
99
|
+
route " namespace :v1 do resources :notes, :only => [:index] end"
|
100
|
+
route " namespace :api do"
|
101
|
+
route "post '/api/v1/notes' => 'api/v1/notes#create', as: 'api_v1_notes'"
|
102
|
+
route "get '/api/v1/notes/my' => 'api/v1/notes#my'"
|
103
|
+
route "\# api"
|
94
104
|
route "root :to => 'jinda#index'"
|
95
105
|
route "resources :jinda, :only => [:index, :new]"
|
96
106
|
route "resources :password_resets"
|
97
107
|
route "resources :sessions"
|
98
108
|
route "resources :identities"
|
99
109
|
route "resources :users"
|
110
|
+
route "resources :notes"
|
100
111
|
route "resources :articles"
|
101
|
-
|
112
|
+
route "get '/notes/destroy/:id' => 'notes#destroy'"
|
113
|
+
route "get '/notes/my/destroy/:id' => 'notes#destroy'"
|
114
|
+
route "get '/notes/my' => 'notes/my'"
|
115
|
+
route "get '/articles/my/destroy' => 'articles#destroy'"
|
102
116
|
route "get '/articles/my' => 'articles/my'"
|
103
117
|
route "get '/logout' => 'sessions#destroy', :as => 'logout'"
|
104
118
|
route "get '/auth/failure' => 'sessions#destroy'"
|
105
119
|
route "get '/auth/:provider/callback' => 'sessions#create'"
|
106
120
|
route "post '/auth/:provider/callback' => 'sessions#create'"
|
107
|
-
|
121
|
+
route "\# end jinda method routes"
|
108
122
|
route "mount Ckeditor::Engine => '/ckeditor'"
|
109
123
|
route "post '/jinda/end_form' => 'jinda#end_form'"
|
110
124
|
route "post '/jinda/pending' => 'jinda#index'"
|
111
125
|
route "post '/jinda/init' => 'jinda#init'"
|
112
126
|
route "jinda_methods.each do \|aktion\| get \"/jinda/\#\{aktion\}\" => \"jinda#\#\{aktion\}\" end"
|
113
|
-
route "jinda_methods += ['init','run','run_do','run_form','end_form','error_logs', 'notice_logs', 'cancel']"
|
127
|
+
route "jinda_methods += ['init','run','run_mail','document','run_do','run_form','end_form','error_logs', 'notice_logs', 'cancel']"
|
114
128
|
route "jinda_methods = ['pending','status','search','doc','logs','ajax_notice']"
|
115
129
|
route "\# start jiinda method routes"
|
116
130
|
end
|
@@ -156,7 +170,7 @@ MM = "#{Rails.root}/app/jinda/index.mm"
|
|
156
170
|
DEFAULT_TITLE = 'Jinda'
|
157
171
|
DEFAULT_HEADER = 'Jinda'
|
158
172
|
DEFAULT_DESCRIPTION = 'Rails Application Generator'
|
159
|
-
DEFAULT_KEYWORDS = %w[Jinda Rails ruby Generator]
|
173
|
+
DEFAULT_KEYWORDS = %w[Jinda Rails ruby Generator, Prateep Kul]
|
160
174
|
GMAP = false
|
161
175
|
# ADSENSE = true
|
162
176
|
NEXT = "Next >"
|
data/lib/generators/jinda/templates/app/assets/stylesheets/{application.css → application.css.scss}
RENAMED
File without changes
|
@@ -0,0 +1,81 @@
|
|
1
|
+
class Api::V1::NotesController < ApplicationController
|
2
|
+
before_action :load_note, only: [:show, :destroy]
|
3
|
+
# before_action :xload_current_ma_user, only: [:destroy]
|
4
|
+
|
5
|
+
def index
|
6
|
+
@notes = Note.desc(:created_at).page(params[:page]).per(10)
|
7
|
+
render json: @notes
|
8
|
+
end
|
9
|
+
|
10
|
+
def my
|
11
|
+
@notes = Note.where(user_id: current_ma_user).desc(:created_at).page(params[:page]).per(10)
|
12
|
+
render json: @notes
|
13
|
+
end
|
14
|
+
|
15
|
+
def show
|
16
|
+
end
|
17
|
+
|
18
|
+
def edit
|
19
|
+
@note = Note.find(params[:id])
|
20
|
+
@page_title = 'Edit Note'
|
21
|
+
end
|
22
|
+
|
23
|
+
def create
|
24
|
+
@note = Note.new(
|
25
|
+
title: params[:title],
|
26
|
+
body: params[:body],
|
27
|
+
user_id: params[:user])
|
28
|
+
|
29
|
+
@note.save!
|
30
|
+
render json: @note, status: :created
|
31
|
+
end
|
32
|
+
|
33
|
+
|
34
|
+
def update
|
35
|
+
# $xvars["select_note"] and $xvars["edit_note"]
|
36
|
+
# These are variables.
|
37
|
+
# They contain everything that we get their forms select_note and edit_note
|
38
|
+
note_id = $xvars["select_note"] ? $xvars["select_note"]["id"] : $xvars["p"]["note_id"]
|
39
|
+
@note = Note.find(note_id)
|
40
|
+
@note.update(title: $xvars["edit_note"]["title"],
|
41
|
+
body: $xvars["edit_note"]["body"])
|
42
|
+
redirect_to @note
|
43
|
+
|
44
|
+
end
|
45
|
+
|
46
|
+
def delete
|
47
|
+
# called by freemind
|
48
|
+
# Tobe called from other controller:jinda
|
49
|
+
@note_id = $xvars["select_note"] ? $xvars["select_note"]["id"] : $xvars["p"]["note_id"]
|
50
|
+
@note = Note.find(@note_id)
|
51
|
+
@note.destroy
|
52
|
+
end
|
53
|
+
|
54
|
+
def destroy
|
55
|
+
# called by rails menu my
|
56
|
+
if current_ma_user.role.upcase.split(',').include?("A") || current_ma_user == @note.user
|
57
|
+
@note.destroy
|
58
|
+
end
|
59
|
+
redirect_to :action=>'my'
|
60
|
+
end
|
61
|
+
|
62
|
+
def mail
|
63
|
+
NoteMailer.gmail(
|
64
|
+
$xvars["display_mail"]["body"],
|
65
|
+
$xvars["select_note"]["email"],
|
66
|
+
$xvars["display_mail"]["title"],
|
67
|
+
xload_current_ma_user.email)
|
68
|
+
end
|
69
|
+
|
70
|
+
private
|
71
|
+
|
72
|
+
# Tobe called from other controller:jinda
|
73
|
+
def xload_current_ma_user
|
74
|
+
@current_ma_user = User.find($xvars["user_id"])
|
75
|
+
end
|
76
|
+
|
77
|
+
def load_note
|
78
|
+
@note = Note.find(params[:id])
|
79
|
+
end
|
80
|
+
|
81
|
+
end
|
@@ -1,4 +1,26 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
+
###################################################### @runseq ####################################################
|
3
|
+
# @runseq => #<Jinda::Runseq _id: 5df31912a54d758417a7afc9,
|
4
|
+
# created_at: 2019-12-13 04:52:34 UTC,
|
5
|
+
# updated_at: 2019-12-13 04:52:43 UTC,
|
6
|
+
# user_id: nil,
|
7
|
+
# xmain_id: BSON::ObjectId('5df31912a54d758417a7afc7'),
|
8
|
+
# action: "do",
|
9
|
+
# status: "R",
|
10
|
+
# code: "create",
|
11
|
+
# name: "Create Article",
|
12
|
+
# role: "",
|
13
|
+
# rule: "true",
|
14
|
+
# rstep: 2,
|
15
|
+
# form_step: 1,
|
16
|
+
# start: 2019-12-13 04:52:43 UTC,
|
17
|
+
# stop: nil,
|
18
|
+
# end: true,
|
19
|
+
# xml: "<node CREATED='1493419491125' ID='ID_1687683396' MODIFIED='1493483244848' TEXT='create: Create Article'><icon BUILTIN='bookmark'/></node>",
|
20
|
+
# ip: nil>
|
21
|
+
|
22
|
+
######################################################################################################################
|
23
|
+
|
2
24
|
class JindaController < ApplicationController
|
3
25
|
def index
|
4
26
|
end
|
@@ -0,0 +1,86 @@
|
|
1
|
+
class NotesController < ApplicationController
|
2
|
+
before_action :load_note, only: [:show, :destroy]
|
3
|
+
# before_action :xload_current_ma_user, only: [:destroy]
|
4
|
+
|
5
|
+
def index
|
6
|
+
@notes = Note.desc(:created_at).page(params[:page]).per(10)
|
7
|
+
end
|
8
|
+
|
9
|
+
def my
|
10
|
+
@notes = Note.where(user_id: current_ma_user).desc(:created_at).page(params[:page]).per(10)
|
11
|
+
end
|
12
|
+
|
13
|
+
def show
|
14
|
+
end
|
15
|
+
|
16
|
+
def edit
|
17
|
+
@note = Note.find(params[:id])
|
18
|
+
@page_title = 'Edit Note'
|
19
|
+
end
|
20
|
+
|
21
|
+
def create
|
22
|
+
@note = Note.new(
|
23
|
+
title: $xvars["new_note"]["title"],
|
24
|
+
body: $xvars["new_note"]["body"],
|
25
|
+
user_id: $xvars["user_id"])
|
26
|
+
@note.save!
|
27
|
+
# if @note.save!
|
28
|
+
# format.html { redirect_to @note, notice: 'Sample was successfully created.' }
|
29
|
+
# format.json { render :show, status: :created, location: @note }
|
30
|
+
# else
|
31
|
+
# format.html { render :new }
|
32
|
+
# format.json { render json: @note.errors, status: :unprocessable_entity }
|
33
|
+
# end
|
34
|
+
redirect_to @note
|
35
|
+
|
36
|
+
end
|
37
|
+
|
38
|
+
|
39
|
+
def update
|
40
|
+
# $xvars["select_note"] and $xvars["edit_note"]
|
41
|
+
# These are variables.
|
42
|
+
# They contain everything that we get their forms select_note and edit_note
|
43
|
+
note_id = $xvars["select_note"] ? $xvars["select_note"]["id"] : $xvars["p"]["note_id"]
|
44
|
+
@note = Note.find(note_id)
|
45
|
+
@note.update(title: $xvars["edit_note"]["title"],
|
46
|
+
body: $xvars["edit_note"]["body"])
|
47
|
+
redirect_to @note
|
48
|
+
|
49
|
+
end
|
50
|
+
|
51
|
+
def delete
|
52
|
+
# called by freemind
|
53
|
+
# Tobe called from other controller:jinda
|
54
|
+
@note_id = $xvars["select_note"] ? $xvars["select_note"]["id"] : $xvars["p"]["note_id"]
|
55
|
+
@note = Note.find(@note_id)
|
56
|
+
@note.destroy
|
57
|
+
end
|
58
|
+
|
59
|
+
def destroy
|
60
|
+
# called by rails menu my
|
61
|
+
if current_ma_user.role.upcase.split(',').include?("A") || current_ma_user == @note.user
|
62
|
+
@note.destroy
|
63
|
+
end
|
64
|
+
redirect_to :action=>'my'
|
65
|
+
end
|
66
|
+
|
67
|
+
def mail
|
68
|
+
NoteMailer.gmail(
|
69
|
+
$xvars["display_mail"]["body"],
|
70
|
+
$xvars["select_note"]["email"],
|
71
|
+
$xvars["display_mail"]["title"],
|
72
|
+
xload_current_ma_user.email)
|
73
|
+
end
|
74
|
+
|
75
|
+
private
|
76
|
+
|
77
|
+
# Tobe called from other controller:jinda
|
78
|
+
def xload_current_ma_user
|
79
|
+
@current_ma_user = User.find($xvars["user_id"])
|
80
|
+
end
|
81
|
+
|
82
|
+
def load_note
|
83
|
+
@note = Note.find(params[:id])
|
84
|
+
end
|
85
|
+
|
86
|
+
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<map version="1.0.1">
|
2
2
|
<!-- To view this file, download free mind mapping software FreeMind from http://freemind.sourceforge.net -->
|
3
3
|
<node CREATED="1273819432637" ID="ID_1098419600" MODIFIED="1334737006485" TEXT="Jinda">
|
4
|
-
<node CREATED="1273819462973" ID="ID_282419531" MODIFIED="
|
5
|
-
<node CREATED="1275756501221" ID="ID_1720745721" MODIFIED="
|
4
|
+
<node CREATED="1273819462973" ID="ID_282419531" MODIFIED="1583088810861" POSITION="right" TEXT="services">
|
5
|
+
<node CREATED="1275756501221" FOLDED="true" ID="ID_1720745721" MODIFIED="1583097151076" TEXT="users:User">
|
6
6
|
<node CREATED="1278491598711" ID="ID_1662699954" MODIFIED="1494393920347" TEXT="role:m"/>
|
7
7
|
<node CREATED="1279700865182" ID="ID_1266797279" MODIFIED="1357798847781" TEXT="link:info: /users"/>
|
8
8
|
<node CREATED="1319015338880" ID="ID_189841353" MODIFIED="1528215866339" TEXT="link:pending tasks: /jinda/pending"/>
|
@@ -25,7 +25,7 @@
|
|
25
25
|
</node>
|
26
26
|
</node>
|
27
27
|
</node>
|
28
|
-
<node CREATED="1275752678377" ID="ID_1348489452" MODIFIED="
|
28
|
+
<node CREATED="1275752678377" FOLDED="true" ID="ID_1348489452" MODIFIED="1583097147577" TEXT="admins:Admin">
|
29
29
|
<node CREATED="1275752688167" ID="ID_229996461" MODIFIED="1275752690948" TEXT="role:a"/>
|
30
30
|
<node CREATED="1282722836614" ID="ID_1213363124" MODIFIED="1330477902602" TEXT="edit_role:edit user role">
|
31
31
|
<node CREATED="1282722862918" ID="ID_1190117882" MODIFIED="1330477922159" TEXT="select_user:select user">
|
@@ -44,33 +44,69 @@
|
|
44
44
|
<node CREATED="1275790679363" ID="ID_829325467" MODIFIED="1511159696044" TEXT="link: logs: /jinda/logs"/>
|
45
45
|
<node CREATED="1507573166973" ID="ID_351025910" MODIFIED="1511159700908" TEXT="link: docs: /jinda/doc"/>
|
46
46
|
</node>
|
47
|
-
<node CREATED="1273706796854" ID="ID_1003882979" MODIFIED="
|
47
|
+
<node CREATED="1273706796854" FOLDED="true" ID="ID_1003882979" MODIFIED="1583097155227" TEXT="devs: Developer">
|
48
48
|
<node CREATED="1275373154914" ID="ID_340725299" MODIFIED="1275373158632" TEXT="role:d"/>
|
49
49
|
<node CREATED="1275788317299" ID="ID_716276608" MODIFIED="1511159716471" TEXT="link: error_logs: /jinda/error_logs"/>
|
50
50
|
</node>
|
51
|
-
<node CREATED="
|
52
|
-
<node CREATED="
|
53
|
-
<node CREATED="
|
54
|
-
|
51
|
+
<node CREATED="1493393619430" FOLDED="true" ID="ID_554831343" MODIFIED="1583091831967" TEXT="notes: Notes">
|
52
|
+
<node CREATED="1493489768542" ID="ID_737469676" MODIFIED="1581383331288" TEXT="link:My Notes: /notes/my">
|
53
|
+
<node CREATED="1493490295677" ID="ID_514416082" MODIFIED="1493490302239" TEXT="role:m"/>
|
54
|
+
</node>
|
55
|
+
<node CREATED="1493419257021" ID="ID_553734932" MODIFIED="1581180635669" TEXT="new: New Note">
|
56
|
+
<node CREATED="1493419299004" ID="ID_723334321" MODIFIED="1581351169990" TEXT="new_note: New ">
|
55
57
|
<icon BUILTIN="attach"/>
|
56
|
-
<node CREATED="
|
58
|
+
<node CREATED="1493479075294" ID="ID_1009521360" MODIFIED="1493479079687" TEXT="role:m"/>
|
57
59
|
</node>
|
58
|
-
<node CREATED="
|
60
|
+
<node CREATED="1493419491125" ID="ID_1125779183" MODIFIED="1581180747700" TEXT="create: Create">
|
61
|
+
<icon BUILTIN="bookmark"/>
|
62
|
+
</node>
|
63
|
+
</node>
|
64
|
+
<node CREATED="1493419562726" ID="ID_1241171950" MODIFIED="1581180788218" TEXT="edit: Edit">
|
65
|
+
<node CREATED="1493419577933" ID="ID_1790163920" MODIFIED="1581350888992" TEXT="select_note: Select">
|
59
66
|
<icon BUILTIN="attach"/>
|
60
|
-
<node CREATED="
|
67
|
+
<node CREATED="1493479602815" ID="ID_1289003986" MODIFIED="1493479606921" TEXT="role:m"/>
|
61
68
|
</node>
|
62
|
-
<node CREATED="
|
69
|
+
<node CREATED="1493419612720" ID="ID_938262436" MODIFIED="1581350996674" TEXT="edit_note: Edit">
|
70
|
+
<icon BUILTIN="attach"/>
|
71
|
+
<node CREATED="1493479557266" ID="ID_211108947" MODIFIED="1493479561055" TEXT="role:m"/>
|
72
|
+
</node>
|
73
|
+
<node CREATED="1493419735921" ID="ID_1581002301" MODIFIED="1581180869775" TEXT="update: Update">
|
63
74
|
<icon BUILTIN="bookmark"/>
|
64
75
|
</node>
|
65
76
|
</node>
|
66
|
-
<node CREATED="
|
67
|
-
<
|
77
|
+
<node CREATED="1495246388313" ID="ID_320521408" MODIFIED="1581340759604" STYLE="fork" TEXT="delete:Delete">
|
78
|
+
<edge COLOR="#808080" STYLE="bezier" WIDTH="thin"/>
|
79
|
+
<node CREATED="1493419577933" ID="ID_1631275659" MODIFIED="1581350942681" TEXT="select_note: Select">
|
68
80
|
<icon BUILTIN="attach"/>
|
69
|
-
<node CREATED="
|
81
|
+
<node CREATED="1493479602815" ID="ID_851238107" MODIFIED="1493479606921" TEXT="role:m"/>
|
82
|
+
</node>
|
83
|
+
<node CREATED="1495246466176" ID="ID_1347765598" MODIFIED="1581799929028" TEXT="delete: Delete">
|
84
|
+
<icon BUILTIN="bookmark"/>
|
70
85
|
</node>
|
71
86
|
</node>
|
87
|
+
<node CREATED="1581531446494" ID="ID_1325232876" MODIFIED="1581715693485" TEXT="mail: Mail">
|
88
|
+
<node CREATED="1493419577933" FOLDED="true" ID="ID_1817148049" MODIFIED="1581531563343" TEXT="select_note: Select">
|
89
|
+
<icon BUILTIN="attach"/>
|
90
|
+
<node CREATED="1493479602815" ID="ID_1650154281" MODIFIED="1493479606921" TEXT="role:m"/>
|
91
|
+
</node>
|
92
|
+
<node CREATED="1581531468872" ID="ID_379926448" MODIFIED="1581564690354" TEXT="display_mail: Dsiplay Mail">
|
93
|
+
<icon BUILTIN="attach"/>
|
72
94
|
</node>
|
73
|
-
<node CREATED="
|
95
|
+
<node CREATED="1581564346466" ID="ID_1981382192" MODIFIED="1581564388041" TEXT="mail: Mail">
|
96
|
+
<icon BUILTIN="bookmark"/>
|
97
|
+
</node>
|
98
|
+
</node>
|
99
|
+
<node CREATED="1495246388313" FOLDED="true" ID="ID_807216843" MODIFIED="1581715858604" TEXT="xedit: Future use">
|
100
|
+
<node CREATED="1493419612720" ID="ID_6864095" MODIFIED="1581350996674" TEXT="edit_note: Edit">
|
101
|
+
<icon BUILTIN="attach"/>
|
102
|
+
<node CREATED="1493479557266" ID="ID_297597260" MODIFIED="1493479561055" TEXT="role:m"/>
|
103
|
+
</node>
|
104
|
+
<node CREATED="1581400438157" ID="ID_1206027492" MODIFIED="1581400464170" TEXT="update: Update">
|
105
|
+
<icon BUILTIN="bookmark"/>
|
106
|
+
</node>
|
107
|
+
</node>
|
108
|
+
</node>
|
109
|
+
<node CREATED="1493393619430" FOLDED="true" ID="ID_328863650" MODIFIED="1583093622195" TEXT="articles: Article">
|
74
110
|
<node CREATED="1493419096527" ID="ID_1521905276" MODIFIED="1493478060121" TEXT="link: All Articles: /articles"/>
|
75
111
|
<node CREATED="1493489768542" ID="ID_1376361427" MODIFIED="1493768994418" TEXT="link: My article: /articles/my">
|
76
112
|
<node CREATED="1493490295677" ID="ID_628476988" MODIFIED="1493490302239" TEXT="role:m"/>
|
@@ -107,7 +143,7 @@
|
|
107
143
|
</node>
|
108
144
|
</node>
|
109
145
|
</node>
|
110
|
-
<node CREATED="1493664700564" FOLDED="true" ID="ID_704959130" MODIFIED="
|
146
|
+
<node CREATED="1493664700564" FOLDED="true" ID="ID_704959130" MODIFIED="1583091848193" TEXT="comments: Comment">
|
111
147
|
<node CREATED="1493665155709" ID="ID_1973520751" MODIFIED="1493665186791" TEXT="new_comment: New Comment">
|
112
148
|
<node CREATED="1493665192413" ID="ID_345629058" MODIFIED="1493665226422" TEXT="create">
|
113
149
|
<icon BUILTIN="bookmark"/>
|
@@ -116,12 +152,71 @@
|
|
116
152
|
</node>
|
117
153
|
<node CREATED="1494393494180" ID="ID_1101205873" MODIFIED="1495275996686" TEXT="role:m"/>
|
118
154
|
</node>
|
155
|
+
<node CREATED="1489875563330" FOLDED="true" ID="ID_1495015891" MODIFIED="1507248509212" TEXT="ctrs: ctrs& Menu">
|
156
|
+
<node CREATED="1489875583646" ID="ID_1796125628" MODIFIED="1494393464288" TEXT="role:a"/>
|
157
|
+
<node CREATED="1275905802131" ID="ID_1960607342" MODIFIED="1489938927874" TEXT="vfolder1:Sub Menu 1">
|
158
|
+
<node CREATED="1275756515843" ID="ID_328242903" MODIFIED="1489939229748" TEXT="viewfile1: Title 1">
|
159
|
+
<icon BUILTIN="attach"/>
|
160
|
+
<node CREATED="1282816887988" ID="ID_1479413309" MODIFIED="1282817769412" TEXT="rule:login? && own_xmain?"/>
|
161
|
+
</node>
|
162
|
+
<node CREATED="1275756515843" ID="ID_1316819449" MODIFIED="1490683859703" TEXT="viewfile2: Title 2">
|
163
|
+
<icon BUILTIN="attach"/>
|
164
|
+
<node CREATED="1282816887988" ID="ID_1510989172" MODIFIED="1282817769412" TEXT="rule:login? && own_xmain?"/>
|
165
|
+
</node>
|
166
|
+
<node CREATED="1275756530989" ID="ID_171099141" MODIFIED="1489939276491" TEXT="update_viewfile1">
|
167
|
+
<icon BUILTIN="bookmark"/>
|
168
|
+
</node>
|
169
|
+
</node>
|
170
|
+
<node CREATED="1275756504750" ID="ID_914236141" MODIFIED="1489939000929" TEXT="vfolder2:Title 2">
|
171
|
+
<node CREATED="1275756515843" ID="ID_1222970183" MODIFIED="1489939293714" TEXT="viewfile2: Title 2">
|
172
|
+
<icon BUILTIN="attach"/>
|
173
|
+
<node CREATED="1282816887988" ID="ID_1312913420" MODIFIED="1282817769412" TEXT="rule:login? && own_xmain?"/>
|
174
|
+
</node>
|
175
|
+
</node>
|
176
|
+
</node>
|
119
177
|
<node CREATED="1494172726642" ID="ID_925257043" MODIFIED="1494172755433" TEXT="sitemap: Sitemap">
|
120
178
|
<node CREATED="1494172758253" ID="ID_961056168" MODIFIED="1494172797972" TEXT="sitemap: Sitemap"/>
|
121
179
|
<node CREATED="1494393494180" ID="ID_242460166" MODIFIED="1494393504971" TEXT="role:a"/>
|
122
180
|
</node>
|
181
|
+
<node CREATED="1493393619430" FOLDED="true" ID="ID_35210833" MODIFIED="1583097140716" TEXT="api/v1/notes: Notes API ">
|
182
|
+
<node CREATED="1493489768542" ID="ID_1053900670" MODIFIED="1582131857208" TEXT="link:My Notes: /api/v1/notes/my">
|
183
|
+
<node CREATED="1493490295677" ID="ID_1597553308" MODIFIED="1493490302239" TEXT="role:m"/>
|
184
|
+
</node>
|
185
|
+
<node CREATED="1493419257021" ID="ID_1182560700" MODIFIED="1581180635669" TEXT="new: New Note">
|
186
|
+
<node CREATED="1493419299004" ID="ID_840380967" MODIFIED="1581351169990" TEXT="new_note: New ">
|
187
|
+
<icon BUILTIN="attach"/>
|
188
|
+
<node CREATED="1493479075294" ID="ID_10690659" MODIFIED="1493479079687" TEXT="role:m"/>
|
189
|
+
</node>
|
190
|
+
<node CREATED="1493419491125" ID="ID_924027059" MODIFIED="1581180747700" TEXT="create: Create">
|
191
|
+
<icon BUILTIN="bookmark"/>
|
192
|
+
</node>
|
193
|
+
</node>
|
194
|
+
<node CREATED="1493419562726" ID="ID_963001770" MODIFIED="1581180788218" TEXT="edit: Edit">
|
195
|
+
<node CREATED="1493419577933" ID="ID_1640736660" MODIFIED="1581350888992" TEXT="select_note: Select">
|
196
|
+
<icon BUILTIN="attach"/>
|
197
|
+
<node CREATED="1493479602815" ID="ID_1623444138" MODIFIED="1493479606921" TEXT="role:m"/>
|
198
|
+
</node>
|
199
|
+
<node CREATED="1493419612720" ID="ID_1362613316" MODIFIED="1581350996674" TEXT="edit_note: Edit">
|
200
|
+
<icon BUILTIN="attach"/>
|
201
|
+
<node CREATED="1493479557266" ID="ID_1838104057" MODIFIED="1493479561055" TEXT="role:m"/>
|
202
|
+
</node>
|
203
|
+
<node CREATED="1493419735921" ID="ID_1445882396" MODIFIED="1581180869775" TEXT="update: Update">
|
204
|
+
<icon BUILTIN="bookmark"/>
|
205
|
+
</node>
|
206
|
+
</node>
|
207
|
+
<node CREATED="1495246388313" ID="ID_918406528" MODIFIED="1581340759604" STYLE="fork" TEXT="delete:Delete">
|
208
|
+
<edge COLOR="#808080" STYLE="bezier" WIDTH="thin"/>
|
209
|
+
<node CREATED="1493419577933" ID="ID_809771470" MODIFIED="1581350942681" TEXT="select_note: Select">
|
210
|
+
<icon BUILTIN="attach"/>
|
211
|
+
<node CREATED="1493479602815" ID="ID_1160875526" MODIFIED="1493479606921" TEXT="role:m"/>
|
212
|
+
</node>
|
213
|
+
<node CREATED="1495246466176" ID="ID_506410154" MODIFIED="1581799929028" TEXT="delete: Delete">
|
214
|
+
<icon BUILTIN="bookmark"/>
|
215
|
+
</node>
|
123
216
|
</node>
|
124
|
-
|
217
|
+
</node>
|
218
|
+
</node>
|
219
|
+
<node CREATED="1273819465949" FOLDED="true" ID="ID_855471610" MODIFIED="1583097143651" POSITION="right" TEXT="roles">
|
125
220
|
<node CREATED="1273819847470" ID="ID_1681080231" MODIFIED="1330477307826" TEXT="m: member"/>
|
126
221
|
<node CREATED="1273819855875" ID="ID_1429503284" MODIFIED="1330477311102" TEXT="a: admin"/>
|
127
222
|
<node CREATED="1273819859775" ID="ID_568365839" MODIFIED="1330477315009" TEXT="d: developer"/>
|
@@ -150,7 +245,7 @@
|
|
150
245
|
<node CREATED="1292243471343" ID="ID_1859608350" MODIFIED="1310195256623" TEXT="lat: float"/>
|
151
246
|
<node CREATED="1292243477436" ID="ID_48497260" MODIFIED="1310195262534" TEXT="lng: float"/>
|
152
247
|
</node>
|
153
|
-
<node CREATED="1493418879485" ID="ID_1995497233" MODIFIED="
|
248
|
+
<node CREATED="1493418879485" FOLDED="true" ID="ID_1995497233" MODIFIED="1583097163789" TEXT="article">
|
154
249
|
<node CREATED="1493418891110" ID="ID_364756011" MODIFIED="1493418905253" TEXT="title"/>
|
155
250
|
<node CREATED="1493418906868" ID="ID_1676483995" MODIFIED="1493418911919" TEXT="text"/>
|
156
251
|
<node CREATED="1493487131376" ID="ID_1334057464" MODIFIED="1538328284823" TEXT="belongs_to :user, :class_name => "User"">
|
@@ -165,7 +260,7 @@
|
|
165
260
|
<node CREATED="1494181636998" ID="ID_229502630" MODIFIED="1494181660419" TEXT="body"/>
|
166
261
|
<node CREATED="1497913676275" ID="ID_404103076" MODIFIED="1497913685065" TEXT="keywords"/>
|
167
262
|
</node>
|
168
|
-
<node CREATED="1493418915637" ID="ID_429078131" MODIFIED="
|
263
|
+
<node CREATED="1493418915637" FOLDED="true" ID="ID_429078131" MODIFIED="1583097162517" TEXT="comment">
|
169
264
|
<node CREATED="1493418939760" ID="ID_1251093062" MODIFIED="1493418943423" TEXT="body"/>
|
170
265
|
<node CREATED="1493418945686" ID="ID_911071644" MODIFIED="1493418986711" TEXT="belongs_to :article">
|
171
266
|
<icon BUILTIN="edit"/>
|
@@ -177,13 +272,35 @@
|
|
177
272
|
<icon BUILTIN="edit"/>
|
178
273
|
</node>
|
179
274
|
</node>
|
180
|
-
<node CREATED="1494040082403" ID="ID_864577403" MODIFIED="
|
275
|
+
<node CREATED="1494040082403" FOLDED="true" ID="ID_864577403" MODIFIED="1583097161145" TEXT="picture">
|
181
276
|
<node CREATED="1494040091583" ID="ID_679208099" MODIFIED="1494040119098" TEXT="picture"/>
|
182
277
|
<node CREATED="1494040120208" ID="ID_1266154874" MODIFIED="1494040125130" TEXT="description"/>
|
183
278
|
<node CREATED="1493487131376" ID="ID_1422817360" MODIFIED="1493487186856" TEXT="belongs_to :user">
|
184
279
|
<icon BUILTIN="edit"/>
|
185
280
|
</node>
|
186
281
|
</node>
|
282
|
+
<node CREATED="1581177067029" FOLDED="true" ID="ID_1450593753" MODIFIED="1583089083450" TEXT="note">
|
283
|
+
<node CREATED="1581243923100" ID="ID_537548385" MODIFIED="1581243965554" TEXT="include Mongoid::Attributes::Dynamic">
|
284
|
+
<icon BUILTIN="edit"/>
|
285
|
+
</node>
|
286
|
+
<node CREATED="1581177848957" ID="ID_1611227370" MODIFIED="1581177857470" TEXT="title"/>
|
287
|
+
<node CREATED="1581177867775" ID="ID_88547965" MODIFIED="1581177883555" TEXT="body"/>
|
288
|
+
<node CREATED="1493643129947" ID="ID_1655403736" MODIFIED="1493643146424" TEXT="belongs_to :user">
|
289
|
+
<icon BUILTIN="edit"/>
|
290
|
+
</node>
|
291
|
+
<node CREATED="1581984419312" ID="ID_1934899110" MODIFIED="1581985586488" TEXT="before_validation :ensure_title_has_a_value ">
|
292
|
+
<icon BUILTIN="edit"/>
|
293
|
+
</node>
|
294
|
+
<node CREATED="1581495182445" ID="ID_1430552418" MODIFIED="1581985664674" TEXT="validates :title, length: { maximum: (MAX_TITLE_LENGTH = 30), message: "Must be less than 30 characters" }, presence: true">
|
295
|
+
<icon BUILTIN="edit"/>
|
296
|
+
</node>
|
297
|
+
<node CREATED="1581495221779" ID="ID_1231500988" MODIFIED="1581985709585" TEXT="validates :body, length: { maximum: (MAX_BODY_LENGTH = 1000), message: "Must be less than 1000 characters"} ">
|
298
|
+
<icon BUILTIN="edit"/>
|
299
|
+
</node>
|
300
|
+
<node CREATED="1581986280028" ID="ID_1069060625" MODIFIED="1581987310544" TEXT="private
 def ensure_title_has_a_value
 if title.blank?
 self.title = body[0..(MAX_TITLE_LENGTH-1)] unless body.blank?
 end
 end
 
">
|
301
|
+
<icon BUILTIN="edit"/>
|
302
|
+
</node>
|
303
|
+
</node>
|
187
304
|
</node>
|
188
305
|
</node>
|
189
306
|
</map>
|