jinda 0.5.7 → 0.5.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/generators/jinda/install_generator.rb +2 -1
- data/lib/generators/jinda/templates/app/controllers/jinda_org/articles_controller.rb +9 -7
- data/lib/generators/jinda/templates/app/views/articles/edit.haml +7 -7
- data/lib/generators/jinda/templates/app/views/articles/show.html.haml +1 -1
- data/lib/generators/jinda/templates/app/views/jinda/index.html.haml +1 -1
- data/lib/generators/jinda/templates/app/views/layouts/_head.html.erb +2 -2
- data/lib/jinda/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5437584419d20b8bf830bee5b254f52d79da72b0c7a63e4cff973a7c10156394
|
4
|
+
data.tar.gz: ec3d5a1838787b031e5072fb682b39a592edec96efabf8d3760327a4f832fb27
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 332c30c673a0107c09994ba8c394751789a018d9957adac57839413d86f8dea0f306714f435afeb22d0c9a6e6b34e8278be6f1306c096824e422ef9605a8052c
|
7
|
+
data.tar.gz: 110fb30d49712728b1988754995712612dd1c820c79f829c571fb89e02466fa37d7d300b72276355f2a47e8d0c537474bc24dbddefc5902be7a5002fb761943b
|
data/README.md
CHANGED
@@ -118,8 +118,9 @@ module Jinda
|
|
118
118
|
route "get '/docs/my/destroy' => 'docs#destroy'"
|
119
119
|
route "get '/notes/my' => 'notes/my'"
|
120
120
|
route "get '/docs/my' => 'docs/my'"
|
121
|
-
|
121
|
+
route "get '/articles/edit' => 'articles/edit'"
|
122
122
|
route "get '/articles/show' => 'articles/show'"
|
123
|
+
route "get '/articles/my/destroy' => 'articles#destroy'"
|
123
124
|
route "get '/articles/my' => 'articles#my'"
|
124
125
|
route "get '/logout' => 'sessions#destroy', :as => 'logout'"
|
125
126
|
route "get '/auth/failure' => 'sessions#destroy'"
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class ArticlesController < ApplicationController
|
2
2
|
before_action :load_articles, except: [:destroy]
|
3
3
|
before_action :load_my_articles, only: [:my]
|
4
|
-
before_action :load_article, only: [:destroy, :
|
4
|
+
before_action :load_article, only: [:destroy, :edit]
|
5
5
|
|
6
6
|
def index
|
7
7
|
# before_action
|
@@ -34,13 +34,15 @@ class ArticlesController < ApplicationController
|
|
34
34
|
@article.save!
|
35
35
|
end
|
36
36
|
|
37
|
-
def
|
38
|
-
|
39
|
-
@article.update(
|
40
|
-
|
41
|
-
|
42
|
-
|
37
|
+
def update
|
38
|
+
@article = Article.find(params[:id])
|
39
|
+
@article.update(
|
40
|
+
title: params["article"]["title"],
|
41
|
+
text: params["article"]["text"],
|
42
|
+
keywords: params["article"]["keywords"],
|
43
|
+
body: params["article"]["body"]
|
43
44
|
)
|
45
|
+
redirect_to :action=> 'show', :article_id => @article.id
|
44
46
|
end
|
45
47
|
|
46
48
|
def j_update
|
@@ -1,12 +1,12 @@
|
|
1
1
|
|
2
|
-
%h1= @
|
3
|
-
%h1= title 'Member Login'
|
2
|
+
%h1= @page_title
|
4
3
|
.content= @article.text
|
5
|
-
%div= markdown(@article.body)
|
6
4
|
|
7
|
-
= form_for @article,
|
5
|
+
= form_for @article, :article_id => @article.id do |f|
|
8
6
|
= f.label :title, "Title"
|
9
|
-
= f.text_field :title
|
7
|
+
= f.text_field :title, :required => true
|
8
|
+
= f.label :text, "Description"
|
9
|
+
= f.text_field :text, :required => true
|
10
10
|
= f.label :body, "Body Content"
|
11
|
-
= f.
|
12
|
-
= f.submit
|
11
|
+
= f.text_area :body, rows: 10
|
12
|
+
= f.submit
|
@@ -2,12 +2,12 @@
|
|
2
2
|
- description @article.text
|
3
3
|
- keywords @article.keywords
|
4
4
|
|
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" }
|
5
6
|
%div{"data-role" => "menu_mm", "data-theme" => "b", "data-backbtn"=>"false"}
|
6
7
|
#article-title= @article.title
|
7
8
|
|
8
9
|
#article-text= @article.body.html_safe
|
9
10
|
|
10
|
-
= link_to image_tag('pencil.png', style:'border:none; float:none;'), {controller: "comments", action: "create", article_id: @article.id}, data: { confirm: "Please Confirm" }
|
11
11
|
- @comments.each do |comment|
|
12
12
|
%div#article-comment.ui-corner-all
|
13
13
|
Author:
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<head>
|
2
2
|
<%= favicon_link_tag %>
|
3
|
-
<%= csrf_meta_tags %>
|
4
|
-
<%= meta_tags %>
|
5
3
|
<meta name="description" content="Jinda" />
|
6
4
|
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track":"reload" %>
|
7
5
|
<%= javascript_include_tag "application", "data-turbolinks-track": "reload" %>
|
8
6
|
<%= stylesheet_link_tag "jinda", "sarabun" %>
|
9
7
|
<script src = "https://ajax.aspnetcdn.com/ajax/jquery.validate/1.12.0/jquery.validate.js" ></script>
|
8
|
+
<%= csrf_meta_tags %>
|
9
|
+
<%= display_meta_tags %>
|
10
10
|
</head>
|
data/lib/jinda/version.rb
CHANGED
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.5.
|
4
|
+
version: 0.5.8
|
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
|
+
date: 2020-07-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|