jinda 0.6.8 → 0.7.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/app/assets/stylesheets/jinda.scss +185 -0
  4. data/app/views/jinda/index.html.haml +6 -6
  5. data/config/routes.rb +44 -0
  6. data/lib/generators/jinda/config_generator.rb +7 -6
  7. data/lib/generators/jinda/install_generator.rb +2 -2
  8. data/lib/generators/jinda/templates/Dockerfile +4 -2
  9. data/lib/generators/jinda/templates/app/controllers/jinda_org/sessions_controller.rb +4 -3
  10. data/lib/generators/jinda/templates/app/jinda/template/view.html.erb +18 -10
  11. data/lib/generators/jinda/templates/app/views/articles/_report.haml +32 -0
  12. data/lib/generators/jinda/templates/app/views/articles/edit.haml +22 -11
  13. data/lib/generators/jinda/templates/app/views/articles/edit_article/edit_article.html.erb +14 -12
  14. data/lib/generators/jinda/templates/app/views/articles/index.haml +3 -21
  15. data/lib/generators/jinda/templates/app/views/articles/my.haml +1 -16
  16. data/lib/generators/jinda/templates/app/views/articles/new_article/form_article.html.erb +1 -1
  17. data/lib/generators/jinda/templates/app/views/articles/show.html.haml +37 -21
  18. data/lib/generators/jinda/templates/docker-compose.yml +3 -2
  19. data/lib/generators/jinda/templates/entrypoint.sh +2 -1
  20. data/lib/jinda/version.rb +1 -1
  21. metadata +6 -7
  22. data/app/assets/stylesheets/jinda.css +0 -52
  23. data/lib/generators/jinda/templates/app/views/identities/new.html.erb +0 -32
  24. data/lib/generators/jinda/templates/app/views/password_resets/new.html.erb +0 -7
  25. data/lib/generators/jinda/templates/app/views/sessions/new.html.erb +0 -20
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 92cc3ba382cd4b0d889808d5736e20fb4212fe1fd4456ead3672919e4364c51c
4
- data.tar.gz: 6c627e12427aee4ffaab4960fb70ecace0bd711f3765d197ec26a00943c6992c
3
+ metadata.gz: bfc843f29ba73019a6a209b43a1fc8e415f78fc09e781aa52132bb2b6031dd74
4
+ data.tar.gz: 798d4c2e8804b9653ea982992893b81c060be1d4ffea5c4e548fc462130a8dbe
5
5
  SHA512:
6
- metadata.gz: e6a49e48b17a26393d7e941d796d8d95f375d9b3241fe2796f694fbb90b83d0a7ecd111d811db32e8a5da0354fd50693060cf30180679a13a9eeaa57a3d0a1bb
7
- data.tar.gz: 2ce78e594d082a87bdf6388670879f955c63dd31519b0a92fa4e6aa20b66e78aa8a00c76d171ded52ae2525c07971e958b8df3b147f19054fc727a6a8f814b8f
6
+ metadata.gz: b809a61ed31859627ca26f12f8dd95e792083e6239c6b31f25671b8bf1bfbadf001c0b3af46c280cf3f5c7dbc7c6bf051fe9936745d8cfad0e4ab4bfe3cf369d
7
+ data.tar.gz: '01794f1c58a848e40acd08483e9bce48259de8dcbd6378ecbaf971f9972533ed44d735edd1fb6583dbf2baec538995ae48230f26281319fd760b28fd423c7c23'
data/README.md CHANGED
@@ -40,7 +40,7 @@ app without ActiveRecord
40
40
 
41
41
  ## Add jinda to your Gemfile:
42
42
 
43
- gem 'jinda', '~> 0.6.8'
43
+ gem 'jinda', '~> 0.7.0.1'
44
44
 
45
45
  For Development (most updated)
46
46
 
@@ -0,0 +1,185 @@
1
+ // jinda.scss from jinda/app engine
2
+ #tooltip{
3
+ position:absolute;
4
+ border:1px solid #333;
5
+ background:#f7f5d1;
6
+ padding:2px 5px;
7
+ color:#333;
8
+ display:none;
9
+ }
10
+ #notice {
11
+ color: #F90609;
12
+ background-color: #EBD1D1;
13
+ font-weight: bolder;
14
+ padding-left: 10px;
15
+ }
16
+ .step {
17
+ /*display: table-row;*/
18
+ margin-top: 20px;
19
+ margin-bottom: 20px;
20
+ }
21
+ .steps_more {
22
+ font-size: 40px;
23
+ font-weight: bold;
24
+ vertical-align: middle;
25
+ color: white;
26
+ width: 80px;
27
+ height: 80px;
28
+ background:url(images/button_blue.png) no-repeat;
29
+ display: table-cell;
30
+ text-align:center;
31
+ }
32
+ .step_now {
33
+ font-size: 40px;
34
+ font-weight: bold;
35
+ vertical-align: middle;
36
+ color: white;
37
+ width: 80px;
38
+ height: 80px;
39
+ background:url(images/button_red.png) no-repeat;
40
+ display: table-cell;
41
+ text-align:center;
42
+ }
43
+ .steps_done {
44
+ font-size: 40px;
45
+ font-weight: bold;
46
+ vertical-align: middle;
47
+ color: white;
48
+ width: 80px;
49
+ height: 80px;
50
+ background:url(images/button_black.png) no-repeat;
51
+ display: table-cell;
52
+ text-align:center;
53
+ }
54
+ .sign_in {
55
+ width: 100%;
56
+ max-width: 410px;
57
+ padding: 15px;
58
+ margin: auto;
59
+ display: block;
60
+
61
+ }
62
+
63
+ #logreg-forms{
64
+ width:412px;
65
+ margin:10vh auto;
66
+ background-color:#f3f3f3;
67
+ box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
68
+ transition: all 0.3s cubic-bezier(.25,.8,.25,1);
69
+ }
70
+
71
+ .module-table{
72
+ display: grid;
73
+ }
74
+
75
+ body {
76
+ background: #dfe7e9;
77
+ font-family: 'Roboto', sans-serif;
78
+ }
79
+ .form-control {
80
+ font-size: 16px;
81
+ transition: all 0.4s;
82
+ box-shadow: none;
83
+ }
84
+ .form-control:focus {
85
+ border-color: #5cb85c;
86
+ }
87
+ .form-control, .btn {
88
+ border-radius: 50px;
89
+ outline: none !important;
90
+ }
91
+ .form-group input {
92
+ border-width: 0px;
93
+ }
94
+ .signup-form {
95
+ width: 480px;
96
+ margin: 0 auto;
97
+ padding: 30px 0;
98
+ }
99
+ .signup-form form {
100
+ border-radius: 5px;
101
+ margin-bottom: 20px;
102
+ background: #fff;
103
+ box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
104
+ padding: 40px;
105
+ }
106
+ .signup-form a {
107
+ color: #5cb85c;
108
+ }
109
+ .signup-form h2 {
110
+ text-align: center;
111
+ font-size: 34px;
112
+ margin: 10px 0 15px;
113
+ }
114
+ .signup-form .hint-text {
115
+ color: #999;
116
+ text-align: center;
117
+ margin-bottom: 20px;
118
+ }
119
+ .signup-form .form-group {
120
+ margin-bottom: 20px;
121
+ }
122
+ .signup-form .btn {
123
+ font-size: 18px;
124
+ line-height: 26px;
125
+ font-weight: bold;
126
+ text-align: center;
127
+ }
128
+ .signup-btn {
129
+ text-align: center;
130
+ border-color: #5cb85c;
131
+ transition: all 0.4s;
132
+ }
133
+ .signup-btn:hover {
134
+ background: #5cb85c;
135
+ opacity: 0.8;
136
+ }
137
+ .or-seperator {
138
+ margin: 50px 0 15px;
139
+ text-align: center;
140
+ border-top: 1px solid #e0e0e0;
141
+ }
142
+ .or-seperator b {
143
+ padding: 0 10px;
144
+ width: 40px;
145
+ height: 40px;
146
+ font-size: 16px;
147
+ text-align: center;
148
+ line-height: 40px;
149
+ background: #fff;
150
+ display: inline-block;
151
+ border: 1px solid #e0e0e0;
152
+ border-radius: 50%;
153
+ position: relative;
154
+ top: -22px;
155
+ z-index: 1;
156
+ }
157
+ .social-btn .btn {
158
+ color: #fff;
159
+ margin: 10px 0 0 15px;
160
+ font-size: 15px;
161
+ border-radius: 50px;
162
+ font-weight: normal;
163
+ border: none;
164
+ transition: all 0.4s;
165
+ }
166
+ .social-btn .btn:first-child {
167
+ margin-left: 0;
168
+ }
169
+ .social-btn .btn:hover {
170
+ opacity: 0.8;
171
+ }
172
+ .social-btn .btn-primary {
173
+ background: #507cc0;
174
+ }
175
+ .social-btn .btn-info {
176
+ background: #64ccf1;
177
+ }
178
+ .social-btn .btn-danger {
179
+ background: #df4930;
180
+ }
181
+ .social-btn .btn i {
182
+ float: left;
183
+ margin: 3px 10px;
184
+ font-size: 20px;
185
+ }
@@ -6,7 +6,7 @@
6
6
  Dashboard
7
7
  .content
8
8
  %div.row::before
9
- %div.col-lg-3.col-xs-6
9
+ %div.col-lg-4.col-md-4.col-xs-12
10
10
  %div.small-box.bg-aqua
11
11
  %div.inner
12
12
  %b Current gems version found:
@@ -14,31 +14,31 @@
14
14
  %li Ruby Version #{RUBY_VERSION }
15
15
  %li Rails Version #{Rails.version }
16
16
  %li gem jinda #{Gem.loaded_specs['jinda'].version}
17
- %div.col-lg-3.col-xs-6
17
+ %div.col-lg-4.col-md-4.col-xs-12
18
18
  %div.small-box.bg-green
19
19
  %div.inner
20
20
  %b Recently tested with:
21
21
  %ul
22
22
  %li Rubygems 2.7.1
23
23
  %li Rails 6.0.3
24
- %div.col-lg-3.col-xs-6
24
+ %div.col-lg-4.col-md-4.col-xs-12
25
25
  %div.small-box.bg-yellow
26
26
  %div.inner
27
27
  %b Create New Rails:
28
28
  %ul
29
29
  %li rails new YOURAPP --skip-test-unit --skip-bundle --skip-active-record --skip-javascript --skip-turbolinks
30
30
  %li (rails new YOURAPP -BOTJ)
31
- %div.col-lg-3.col-xs-6
31
+ %div.col-lg-6.col-md-12.col-xs-12
32
32
  %div.small-box.bg-red
33
33
  %div.inner
34
34
  %b Installation
35
35
  %ul
36
- %li add gem 'jinda', '0.6.7' to Gemfile then $ bundle
36
+ %li add gem 'jinda' # to Gemfile then $ bundle
37
37
  %li rails generate jinda:install, then bundle
38
38
  %li rails generate jinda:config
39
39
  %li rails jinda:seed, will create initial user:password admin:secret
40
40
  %li when update app/jinda/index.mm, run rake jinda:update
41
- %div.col-lg-3.col-xs-6
41
+ %div.col-lg-6.col-md-12.col-xs-12
42
42
  %div.small-box.bg-blue
43
43
  %div.inner
44
44
  %b Option: Themes available: Jinda_adminbsb, Jinda_adminlte
@@ -0,0 +1,44 @@
1
+ Rails.application.routes.draw do
2
+ # start jiinda method routes
3
+ jinda_methods = ['pending', 'status', 'search', 'doc', 'doc_print', 'logs', 'ajax_notice']
4
+ jinda_methods += ['init', 'run', 'run_mail', 'document', 'run_do', 'run_form', 'end_form']
5
+ jinda_methods += ['run_redirect', 'run_direct_to','run_if']
6
+ jinda_methods += ['error_logs', 'notice_logs', 'cancel', 'run_output', 'end_output']
7
+ jinda_methods.each do |aktion| get "/jinda/#{aktion}" => "jinda##{aktion}" end
8
+ post '/jinda/init' => 'jinda#init'
9
+ post '/jinda/pending' => 'jinda#index'
10
+ post '/jinda/end_form' => 'jinda#end_form'
11
+ post '/jinda/end_output' => 'jinda#end_output'
12
+ # end jinda method routes
13
+ post '/auth/:provider/callback' => 'sessions#create'
14
+ get '/auth/:provider/callback' => 'sessions#create'
15
+ get '/auth/failure' => 'sessions#failure'
16
+ get '/logout' => 'sessions#destroy', :as => 'logout'
17
+ get '/articles/my' => 'articles#my'
18
+ get '/articles/my/destroy' => 'articles#destroy'
19
+ get '/articles/show' => 'articles/show'
20
+ get '/articles/edit' => 'articles/edit'
21
+ get '/docs/my' => 'docs/my'
22
+ get '/notes/my' => 'notes/my'
23
+ get '/docs/my/destroy' => 'docs#destroy'
24
+ get '/notes/my/destroy/:id' => 'notes#destroy'
25
+ get '/notes/destroy/:id' => 'notes#destroy'
26
+ get '/jinda/document/:id' => 'jinda#document'
27
+ resources :articles do resources :comments end
28
+ resources :comments
29
+ resources :notes
30
+ resources :docs
31
+ resources :users
32
+ resources :identities
33
+ resources :sessions
34
+ resources :password_resets
35
+ resources :jinda, :only => [:index, :new]
36
+ # root :to => 'jinda#index'
37
+ # api
38
+ get '/api/v1/notes/my' => 'api/v1/notes#my'
39
+ post '/api/v1/notes' => 'api/v1/notes#create', as: 'api_v1_notes'
40
+ namespace :api do
41
+ namespace :v1 do resources :notes, :only => [:index] end
42
+ end
43
+ # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
44
+ end
@@ -65,12 +65,13 @@ module Jinda
65
65
  end
66
66
  end
67
67
 
68
- # desc "Setup Dockerfile"
69
- # def setup_docker
70
- # FileUtils.mv "Dockerfile", "Dockerfile"
71
- # FileUtils.mv "docker-compose.yml", "docker-compose.yml"
72
- # FileUtils.mv "entrypoint.sh", "entrypoint.sh"
73
- # end
68
+ desc "Setup Dockerfile"
69
+ def setup_docker
70
+ puts " Setup Docker files"
71
+ FileUtils.cp source_paths[0]+"/"+"Dockerfile", "Dockerfile"
72
+ FileUtils.cp source_paths[0]+"/"+"docker-compose.yml", "docker-compose.yml"
73
+ FileUtils.cp source_paths[0]+"/"+"entrypoint.sh", "entrypoint.sh"
74
+ end
74
75
 
75
76
  def finish
76
77
  puts " configured omniauth.\n"
@@ -19,7 +19,7 @@ module Jinda
19
19
  gem 'bson', '4.4.2'
20
20
  gem 'mongoid', '7.1.0.rc0'
21
21
  gem 'turbolinks_render'
22
- gem 'nokogiri', '1.10.10'
22
+ gem 'nokogiri', '~> 1.11.0'
23
23
  gem 'haml', '~> 5.1', '>= 5.1.2'
24
24
  gem 'haml-rails', '~> 2.0.1'
25
25
  gem 'mail'
@@ -53,7 +53,7 @@ module Jinda
53
53
  gem 'selenium-webdriver'
54
54
  gem 'rb-fsevent'
55
55
  gem 'valid_attribute'
56
- gem 'faker', :git => 'https://github.com/stympy/faker.git', :branch => 'master'
56
+ gem 'faker'
57
57
  end
58
58
  end
59
59
 
@@ -11,13 +11,15 @@ COPY . /myapp
11
11
 
12
12
  # Set Rails environment to production
13
13
  # ENV RAILS_ENV production
14
- # RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \
15
- # && apt install -y nodejs
14
+ ENV RAILS_ENV development
15
+ RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \
16
+ && apt install -y nodejs
16
17
 
17
18
  # Add a script to be executed every time the container starts.
18
19
  COPY entrypoint.sh /usr/bin/
19
20
  RUN chmod +x /usr/bin/entrypoint.sh
20
21
  ENTRYPOINT ["entrypoint.sh"]
22
+ # EXPOSE 3000
21
23
  EXPOSE 3000
22
24
 
23
25
  # Start the main process.
@@ -5,6 +5,7 @@ class SessionsController < ApplicationController
5
5
  end
6
6
 
7
7
  def failure
8
+ # redirect_to login_path, alert: "Authentication failed, please try again."
8
9
  redirect_to login_path, alert: "Authentication failed, please try again."
9
10
  end
10
11
 
@@ -21,8 +22,8 @@ class SessionsController < ApplicationController
21
22
  cookies[:auth_token] = user.auth_token
22
23
  end
23
24
  # refresh_to root_path, :ma_notice => "Logged in" # Called by jinda_conroller
24
- # redirect_to root_path
25
- redirect_to articles_my_path
25
+ redirect_to root_path
26
+ # redirect_to articles_my_path
26
27
 
27
28
  rescue
28
29
  redirect_to root_path, :alert=> "Authentication failed, please try again."
@@ -38,6 +39,6 @@ class SessionsController < ApplicationController
38
39
 
39
40
  def failure
40
41
  ma_log "Authentication failed, please try again."
41
- redirect_to root_path, :alert=> "Authentication failed, please try again."
42
+ redirect_to new_session_path, :alert=> "Authentication failed, please try again."
42
43
  end
43
44
  end
@@ -1,11 +1,17 @@
1
+
2
+ <%- @title= 'Template for Document' %>
1
3
  <%
2
4
  doc = Jinda::Doc.new :issue_on=> Date.today, :process_at => Time.now
3
- %>
4
- <%= fields_for doc do |f| %>
5
- <%= f.label :category, "Category" %>
6
- <%= f.select :category, [["Book", "book"], ["Letter", "letter"], ["Brochure", "brochure"]] %>
7
- <!--div>
8
- </div-->
5
+ %>
6
+
7
+ <h1>
8
+ <%= @title %>
9
+ </h1>
10
+
11
+ <div class = "module-table">
12
+ <%= fields_for doc do |f| %>
13
+ <%= f.label :category, "Category" %>
14
+ <%= f.select :category, [["Book", "book"], ["Letter", "letter"], ["Brochure", "brochure"]] %>
9
15
  <%= f.label :issue_on, "Dated" %>
10
16
  <%= f.date_field :issue_on, "blackDays"=>[0,6] %>
11
17
 
@@ -13,14 +19,16 @@
13
19
  <%= f.file_field :dscan %>
14
20
  <% end %>
15
21
  <div>
16
- <%= label_tag :description, "Description" %>
17
- <%= text_field_tag :description %>
22
+ <%= label_tag :description, "Description" %>
23
+ <%= text_field_tag :description %>
18
24
  </div>
19
25
  <div>
20
26
  <%= label_tag :ma_display, "Display", :class=>"ui-input-text" %>
21
27
  <%= select_tag :ma_display, options_for_select([['Yes', 'y'], ['No', 'n']],'y'), 'data-role'=>"slider" %>
22
28
  </div>
23
29
  <div>
24
- <%= label_tag :keywords, "Search Keywords" %>
25
- <%= text_field_tag :keywords %>
30
+ <%= label_tag :keywords, "Search Keywords" %>
31
+ <%= text_field_tag :keywords %>
26
32
  </div>
33
+ </div>
34
+
@@ -0,0 +1,32 @@
1
+ .box.box-info
2
+ .box-header.with-border
3
+
4
+ %h3.box-title
5
+ = @page_title
6
+ .label-warning
7
+ = flash[:notice]
8
+ .box-tools.pull-right
9
+ %button.btn.btn-box-tool{"data-widget" => "collapse", :type => "button"}
10
+ %i.fa.fa-minus
11
+ %button.btn.btn-box-tool{"data-widget" => "remove", :type => "button"}
12
+ %i.fa.fa-times
13
+ / /.box-header
14
+ .box-body
15
+ .table-responsive
16
+ %table.table.no-margin
17
+ %thead
18
+ %tr
19
+ %th Title
20
+ %th Description
21
+ %th Created
22
+ %th Updated
23
+ %th Delete
24
+ %th Edit
25
+ - report.each do |article|
26
+ %tr
27
+ %td= link_to article.title, :controller=>"articles", :action=>"show", :article_id => article.id
28
+ %td= article.text.html_safe
29
+ %td= article.created_at.strftime('%m/%d/%Y')
30
+ %td= article.updated_at.strftime('%m/%d/%Y')
31
+ %td(align='center')= link_to image_tag('delete.png', style:'border:none; float:none;'), {controller: "articles", action: "destroy", article_id: article.id}, data: { confirm: "Please Confirm" }
32
+ %td(align='center')= link_to image_tag('pencil.png', style:'border:none; float:none;'), {controller: "jinda", action: "init", s: 'articles:xedit_article', article_id: article.id}, data: { confirm: "Please Confirm" }
@@ -1,12 +1,23 @@
1
+ - @title= "Edit"
2
+ - @page_title = 'Edit'
3
+ .container
4
+ %div.row::before
5
+ %div.col-md-12
6
+ %h2.display-3.mt-5.pt-5
7
+ = @article.title
8
+ %hr
9
+ = @article.text
10
+ %h4.display-5
11
+ = @article.body.html_safe
1
12
 
2
- %h1= @page_title
3
- .content= @article.text
4
-
5
- = form_for @article, :article_id => @article.id do |f|
6
- = f.label :title, "Title"
7
- = f.text_field :title, :required => true
8
- = f.label :text, "Description"
9
- = f.text_field :text, :required => true
10
- = f.label :body, "Body Content"
11
- = f.text_area :body, rows: 10
12
- = f.submit
13
+ .container
14
+ .card
15
+ = form_for @article, :html => {:class => "form-horizontal center"} , :article_id => @article.id do |f|
16
+ .form-group
17
+ = f.text_field :title, class: "form-control", :required => true
18
+ .form-group
19
+ = f.text_field :text, class: "form-control", :required => true
20
+ .form-group
21
+ = f.text_area :body, rows: 10, class: "form-control"
22
+ .form-group
23
+ = f.submit "Submit", class: "btn btn-default btn-success"
@@ -1,13 +1,15 @@
1
1
  <%
2
- article = Article.find_by :id=> $xvars["select_article"]["title"]
3
- %>
4
- <%= fields_for article do |f| %>
5
- <%= f.label :title, "Title" %>
6
- <%= f.text_field :title %>
7
- <%= f.label :text, "Text" %>
8
- <%= f.text_field :text %>
9
- <%= f.label :text, "Keywords" %>
10
- <%= f.text_field :keywords %>
11
- <%= f.label :body, "Body Content" %>
12
- <%= f.text_area :body %>
13
- <% end %>
2
+ article = Article.find_by :id=> $xvars["select_article"]["title"]
3
+ %>
4
+ <div class ="module-table">
5
+ <%= fields_for article do |f| %>
6
+ <%= f.label :title, "Title" %>
7
+ <%= f.text_field :title %>
8
+ <%= f.label :text, "Text" %>
9
+ <%= f.text_field :text %>
10
+ <%= f.label :text, "Keywords" %>
11
+ <%= f.text_field :keywords %>
12
+ <%= f.label :body, "Body Content" %>
13
+ <%= f.text_area :body %>
14
+ <% end %>
15
+ </div>
@@ -1,23 +1,5 @@
1
1
  - @title= "All Articles"
2
+ %p
3
+ - @page_title = 'All Articlces'
4
+ = render :partial => 'report', locals: { report: @articles}
2
5
  = paginate @articles
3
- %table{:id=>"pending-table", :width=>"100%"}
4
- %tr{:style=>"color:black; background-color:#97BF60;"}
5
- %th User
6
- %th Title
7
- %th Description
8
- %th Created
9
- %th Updated
10
- %th Delete
11
- - @articles.each do |article|
12
- %tr
13
- %td= article.user.code if article.user
14
- %td= link_to article.title, :controller=>"articles", :action=>"show", :article_id=>article.id
15
- %td= article.text
16
- %td= article.created_at
17
- %td= article.updated_at
18
- %td(align='center')
19
- - next unless login?
20
- - unless current_ma_user.role.upcase.split(',').include?("A")
21
- - next unless article.user
22
- - next unless current_ma_user == article.user
23
- = link_to image_tag('delete.png', style:'border:none; float:none;'), {controller: "articles", action: "destroy", article_id: article.id}, data: { confirm: "Please Confirm" }
@@ -1,20 +1,5 @@
1
1
  - @title= "My Articles"
2
2
  %p
3
3
  - @page_title = 'All Articlces'
4
+ = render :partial => 'report', locals: { report: @my_articles}
4
5
  = paginate @my_articles
5
- %table#article-table
6
- %tr
7
- %th Title
8
- %th Description
9
- %th Created
10
- %th Updated
11
- %th Delete
12
- %th Edit
13
- - @my_articles.each do |article|
14
- %tr
15
- %td= link_to article.title, :controller=>"articles", :action=>"show", :article_id => article.id
16
- %td= article.text.html_safe
17
- %td= article.created_at.strftime('%m/%d/%Y')
18
- %td= article.updated_at.strftime('%m/%d/%Y')
19
- %td(align='center')= link_to image_tag('delete.png', style:'border:none; float:none;'), {controller: "articles", action: "destroy", article_id: article.id}, data: { confirm: "Please Confirm" }
20
- %td(align='center')= link_to image_tag('pencil.png', style:'border:none; float:none;'), {controller: "jinda", action: "init", s: 'articles:xedit_article', article_id: article.id}, data: { confirm: "Please Confirm" }
@@ -2,7 +2,7 @@
2
2
  <%
3
3
  article = @article
4
4
  %>
5
- <div id="article-table">
5
+ <div class ="module-table">
6
6
  <%= fields_for article do |f| %>
7
7
  <%= f.label :title, "Title" %>
8
8
  <%= f.text_field :title, :required => true %>
@@ -1,26 +1,42 @@
1
1
  - title @article.title
2
2
  - description @article.text
3
3
  - keywords @article.keywords
4
+ .container
5
+ %div.row::before
6
+ %div.col-md-12
7
+ %h2.display-3.mt-5.pt-5
8
+ = @article.title
9
+ = link_to image_tag('pencil.png', style:'border:none; float:right;', id: 'article_pen'), {controller: "articles", action: "edit", article_id: @article.id}, data: { confirm: "Please Confirm" }
10
+ %hr
11
+ = @article.text
12
+ %h4.display-5
13
+ = @article.body.html_safe
14
+ - @comments.each do |comment|
15
+ %div#article-comment.ui-corner-all
16
+ .col-md-10.col-sm-12
17
+ %div.small-box.bg-gray
18
+ %div.inner
19
+ %div.font-weight-light
20
+ Author:
21
+ %b= comment.user.code if comment.user
22
+ %div#comment-body
23
+ %i= comment.body
24
+ %hr
4
25
 
5
- = link_to image_tag('pencil.png', style:'border:none; float:right;', id: 'article_pen'), {controller: "articles", action: "edit", article_id: @article.id}, data: { confirm: "Please Confirm" }
6
- %div{"data-role" => "menu_mm", "data-theme" => "b", "data-backbtn"=>"false"}
7
- #article-title= @article.title
26
+ .container
27
+ .card
8
28
 
9
- #article-text= @article.body.html_safe
10
-
11
- - @comments.each do |comment|
12
- %div#article-comment.ui-corner-all
13
- Author:
14
- %b= comment.user.code if comment.user
15
- %div#comment-body
16
- %i= comment.body
17
- -#
18
- - if login?
19
- %h3 Add a comment:
20
- =# form_for([@comment, @article.comments.build]) do |f|
21
- = form_with(model: [@article, Comment.new], local: true) do |f|
22
- = f.hidden_field :article_id, :value => @article.id
23
- = f.label :body, "Comment"
24
- = f.text_area :body
25
- = f.hidden_field :user_id, :value => current_ma_user
26
- = f.submit
29
+ - if login?
30
+ %h4.display-5
31
+ Add a comment:
32
+ = form_with(model: [@article, Comment.new], local: true) do |f|
33
+ .form-group
34
+ = f.hidden_field :article_id, :value => @article.id
35
+ .form-group
36
+ = f.label :body, "Comment"
37
+ .form-group
38
+ = f.text_area :body, rows: 5, class: "form-control"
39
+ .form-group
40
+ = f.hidden_field :user_id, :value => current_ma_user
41
+ .form-group
42
+ = f.submit "Submit", class: "btn btn-default btn-success"
@@ -1,7 +1,8 @@
1
- version: '3'
1
+ version: '3.5'
2
2
  services:
3
3
  web:
4
4
  build: .
5
+ env_file: .env
5
6
  command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
6
7
  volumes:
7
8
  - .:/myapp
@@ -13,4 +14,4 @@ services:
13
14
  mongodb:
14
15
  image: mongo
15
16
  ports:
16
- - "27017:27017"
17
+ - "27888:27017"
@@ -5,8 +5,9 @@ cp /myapp/config/mongoid.yml-docker /myapp/config/mongoid.yml
5
5
  # Remove a potentially pre-existing server.pid for Rails.
6
6
  rm -f /myapp/tmp/pids/server.pid
7
7
  # Compile the assets
8
- # bundle exec rake assets:precompile
8
+ bundle exec rake assets:precompile
9
9
  # Add admin user
10
+ # rake db:seed
10
11
  rake jinda:seed
11
12
  # Then exec the container's main process (what's set as CMD in the Dockerfile).
12
13
  exec "$@"
@@ -1,3 +1,3 @@
1
1
  module Jinda
2
- VERSION = "0.6.8"
2
+ VERSION = "0.7.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jinda
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.8
4
+ version: 0.7.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Prateep Kul
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2020-12-12 00:00:00.000000000 Z
12
+ date: 2021-01-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -180,7 +180,7 @@ files:
180
180
  - app/assets/stylesheets/images/icons-36-black.png
181
181
  - app/assets/stylesheets/images/icons-36-white.png
182
182
  - app/assets/stylesheets/images/indicator.gif
183
- - app/assets/stylesheets/jinda.css
183
+ - app/assets/stylesheets/jinda.scss
184
184
  - app/assets/stylesheets/jinda_jqm.css.scss
185
185
  - app/assets/stylesheets/jquery.mobile-1.2.1.css
186
186
  - app/assets/stylesheets/jquery.mobile.datebox.css
@@ -222,6 +222,7 @@ files:
222
222
  - app/views/jinda/status.haml
223
223
  - bin/console
224
224
  - bin/setup
225
+ - config/routes.rb
225
226
  - lib/generators/jinda/USAGE
226
227
  - lib/generators/jinda/config_generator.rb
227
228
  - lib/generators/jinda/install_generator.rb
@@ -284,6 +285,7 @@ files:
284
285
  - lib/generators/jinda/templates/app/views/admins/edit_role/edit_role.html.erb
285
286
  - lib/generators/jinda/templates/app/views/admins/edit_role/select_user.html.erb
286
287
  - lib/generators/jinda/templates/app/views/api/v1/note.haml
288
+ - lib/generators/jinda/templates/app/views/articles/_report.haml
287
289
  - lib/generators/jinda/templates/app/views/articles/edit.haml
288
290
  - lib/generators/jinda/templates/app/views/articles/edit_article/edit_article.html.erb
289
291
  - lib/generators/jinda/templates/app/views/articles/edit_article/select_article.html.erb
@@ -304,7 +306,6 @@ files:
304
306
  - lib/generators/jinda/templates/app/views/docs/edit/select_note.html.erb
305
307
  - lib/generators/jinda/templates/app/views/docs/index.haml
306
308
  - lib/generators/jinda/templates/app/views/docs/my.haml
307
- - lib/generators/jinda/templates/app/views/identities/new.html.erb
308
309
  - lib/generators/jinda/templates/app/views/jinda_mailer/gmail.html.erb
309
310
  - lib/generators/jinda/templates/app/views/layouts/_head.html.erb
310
311
  - lib/generators/jinda/templates/app/views/layouts/_meta_tag.html.erb
@@ -342,8 +343,6 @@ files:
342
343
  - lib/generators/jinda/templates/app/views/notes/show.haml
343
344
  - lib/generators/jinda/templates/app/views/notes/xedit/edit_note.html.erb
344
345
  - lib/generators/jinda/templates/app/views/password_resets/edit.html.erb
345
- - lib/generators/jinda/templates/app/views/password_resets/new.html.erb
346
- - lib/generators/jinda/templates/app/views/sessions/new.html.erb
347
346
  - lib/generators/jinda/templates/app/views/sitemap/index.xml.haml
348
347
  - lib/generators/jinda/templates/app/views/user_mailer/password_reset.html.haml
349
348
  - lib/generators/jinda/templates/app/views/user_mailer/password_reset.text.erb
@@ -477,7 +476,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
477
476
  - !ruby/object:Gem::Version
478
477
  version: '0'
479
478
  requirements: []
480
- rubygems_version: 3.1.4
479
+ rubygems_version: 3.2.3
481
480
  signing_key:
482
481
  specification_version: 4
483
482
  summary: 'Rails workflow from mind map: Freemind'
@@ -1,52 +0,0 @@
1
- #tooltip{
2
- position:absolute;
3
- border:1px solid #333;
4
- background:#f7f5d1;
5
- padding:2px 5px;
6
- color:#333;
7
- display:none;
8
- }
9
- #notice {
10
- color: #F90609;
11
- background-color: #EBD1D1;
12
- font-weight: bolder;
13
- padding-left: 10px;
14
- }
15
- .step {
16
- /*display: table-row;*/
17
- margin-top: 20px;
18
- margin-bottom: 20px;
19
- }
20
- .steps_more {
21
- font-size: 40px;
22
- font-weight: bold;
23
- vertical-align: middle;
24
- color: white;
25
- width: 80px;
26
- height: 80px;
27
- background:url(images/button_blue.png) no-repeat;
28
- display: table-cell;
29
- text-align:center;
30
- }
31
- .step_now {
32
- font-size: 40px;
33
- font-weight: bold;
34
- vertical-align: middle;
35
- color: white;
36
- width: 80px;
37
- height: 80px;
38
- background:url(images/button_red.png) no-repeat;
39
- display: table-cell;
40
- text-align:center;
41
- }
42
- .steps_done {
43
- font-size: 40px;
44
- font-weight: bold;
45
- vertical-align: middle;
46
- color: white;
47
- width: 80px;
48
- height: 80px;
49
- background:url(images/button_black.png) no-repeat;
50
- display: table-cell;
51
- text-align:center;
52
- }
@@ -1,32 +0,0 @@
1
- <div class="container">
2
- <%- @title= 'Sign Up' %>
3
- <%= form_tag "/auth/identity/register", {'data-ajax'=>'false'} do %>
4
- <% if @identity && @identity.errors.any? %>
5
- <div class="error_messages">
6
- <h2><%= pluralize(@identity.errors.count, "error") %> prohibited this account from being saved:</h2>
7
- <ul>
8
- <% @identity.errors.full_messages.each do |msg| %>
9
- <li><%= msg %></li>
10
- <% end %>
11
- </ul>
12
- </div>
13
- <% end %>
14
- <div class="field" data-role="fieldcontain">
15
- <%= label_tag :code, 'Username' %>
16
- <%= text_field_tag :code, @identity.try(:code) %>
17
- </div>
18
- <div class="field" data-role="fieldcontain">
19
- <%= label_tag :email %>
20
- <%= text_field_tag :email, @identity.try(:email) %>
21
- </div>
22
- <div class="field" data-role="fieldcontain">
23
- <%= label_tag :password, 'Password' %>
24
- <%= password_field_tag :password %>
25
- </div>
26
- <div class="field" data-role="fieldcontain">
27
- <%= label_tag :password_confirmation, 'Confirm password' %>
28
- <%= password_field_tag :password_confirmation %>
29
- </div>
30
- <div class="actions"><%= submit_tag "Sign Up" %></div>
31
- <% end %>
32
- </div>
@@ -1,7 +0,0 @@
1
- <%= form_tag password_resets_path, :method => :post do %>
2
- <div class="field">
3
- <%= label_tag :email %>
4
- <%= text_field_tag :email, params[:email] %>
5
- </div>
6
- <div class="actions"><%= submit_tag "Reset Password" %></div>
7
- <% end %>
@@ -1,20 +0,0 @@
1
- <div class="container">
2
- <div class="ui.head">
3
- <%= form_tag "/auth/identity/callback", {'data-ajax'=>'false'} do %>
4
- <div class="field" data-role="fieldcontain">
5
- <%= label_tag :auth_key, "User name" %>
6
- <%= text_field_tag :auth_key %>
7
- </div>
8
- <div class="field" data-role="fieldcontain">
9
- <%= label_tag :password, "Password" %>
10
- <%= password_field_tag :password %>
11
- </div>
12
- <div class="field" data-role="fieldcontain" data-icon="info">
13
- <%= label_tag :remember_me %>
14
- <%= check_box_tag :remember_me, 1, params.permit[:remember_me] %>
15
- </div>
16
- <div class="actions"><%= submit_tag "Sign In" %></div>
17
- <%= link_to 'Forgotten password?', new_password_reset_path, data: {icon: 'info', mini: 'true', role: 'button'} %>
18
- <% end %>
19
- </div>
20
- </div>