jinda_adminlte 0.7.0 → 0.7.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (20) hide show
  1. checksums.yaml +4 -4
  2. data/lib/generators/jinda_adminlte/install_generator.rb +4 -0
  3. data/lib/generators/jinda_adminlte/templates/app/views/identities/new.html.haml +45 -0
  4. data/lib/generators/jinda_adminlte/templates/app/views/layouts/lte/_flash.haml +9 -0
  5. data/lib/generators/jinda_adminlte/templates/app/views/layouts/lte/_menu.haml +0 -10
  6. data/lib/generators/jinda_adminlte/templates/app/views/sessions/new.html.haml +35 -0
  7. data/lib/generators/jinda_adminlte/templates/application.haml +48 -36
  8. data/lib/generators/jinda_adminlte/templates/application.scss +1 -1
  9. data/lib/generators/jinda_adminlte/templates/jinda.scss +188 -5
  10. data/lib/jinda_adminlte/version.rb +1 -1
  11. metadata +5 -11
  12. data/lib/generators/jinda_adminlte/templates/app/views/articles/edit.haml +0 -12
  13. data/lib/generators/jinda_adminlte/templates/app/views/articles/edit_article/edit_article.html.erb +0 -13
  14. data/lib/generators/jinda_adminlte/templates/app/views/articles/edit_article/select_article.html.erb +0 -12
  15. data/lib/generators/jinda_adminlte/templates/app/views/articles/index.haml +0 -23
  16. data/lib/generators/jinda_adminlte/templates/app/views/articles/my.haml +0 -55
  17. data/lib/generators/jinda_adminlte/templates/app/views/articles/new_article/form_article.html.erb +0 -15
  18. data/lib/generators/jinda_adminlte/templates/app/views/articles/show.html.haml +0 -24
  19. data/lib/generators/jinda_adminlte/templates/app/views/articles/xedit_article/edit_article.html.erb +0 -13
  20. data/lib/generators/jinda_adminlte/templates/app/views/articles/xedit_article/xedit_article.html.erb +0 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2e7c980e7b44e5814f9a60b70bc858b630fb3ae40b9413551ebbc015ef1b3ebf
4
- data.tar.gz: e54de59ad5e452961c956f2116f6b335fe7f5feb33150a5ac9bc89f4f8f224d4
3
+ metadata.gz: feb1df8d22828b6fbc83d1f2c1c8eaed29f50b46e867979b2863d5ab1f196e89
4
+ data.tar.gz: 96176dbaf6e189039a582cd97755efeb0d2de10f339e634c462114d139418264
5
5
  SHA512:
6
- metadata.gz: 96d7165004e12f391aa7f9bc8d1c86097c830e239381c5c96015be46e52abbf38c0befbc64027ce86c3a9249860580fbef3401819fa4a20cabf784707b0df4b1
7
- data.tar.gz: c7fbd6053be8934c8a07a6b502fbd74c04f3d39cab9c9a342fbc829554a08134cf7637ed7f5772cc67cb105ba5dc3aa2ed38b803d5a247af79f215c91567aa0a
6
+ metadata.gz: '09284efd23c58be4d5e77f3381137b51a0d23a9beac848317f8e0317ac1ce0e0258d9a6a0da19deda6cef9b1f1ad3c7e2b26c92f63a028ccccfd8f1dda0196de'
7
+ data.tar.gz: 822a103af0e5a29a8d4b758148f80d5e2802ee065c954a98eb732ae98d3bbd2bd758072d3e1cc0e792d215366ece069635d4da1f5b97f5ae2e943bce3d027b3a
@@ -9,11 +9,15 @@ module Jinda_adminlte
9
9
  def setup_app
10
10
  inside("app/views/layouts") { run "mv application.haml application.haml.bak" }
11
11
  inside("app/views/layouts") { run "mv lte lte.bak" }
12
+ inside("app/views/identities") { run "mv new.html.haml new-bak.html.haml" }
13
+ inside("app/views/sessions") { run "mv new.html.haml new-bak.html.haml" }
12
14
  inside("app/assets") { run "mv jinda_assets ../../tmp/cache" }
13
15
  inside("app/assets") { run "mv javascripts ../../tmp/cache" }
14
16
  inside("app/assets") { run "mv stylesheets ../../tmp/cache" }
15
17
  directory "app/views/adminltes"
16
18
  directory "app/views/layouts/lte"
19
+ directory "app/views/identities"
20
+ directory "app/views/sessions"
17
21
 
18
22
  end
19
23
 
@@ -0,0 +1,45 @@
1
+ .container
2
+ .signup-form
3
+ - @title= 'Sign Up'
4
+ = form_tag "/auth/identity/register", {'data-ajax'=>'false'} do
5
+ %h1.h3.mb-3.font-weight-normal{:style => "text-align: center"} Sign Up
6
+ %p.hint-text Sign Up with your social media account or Username
7
+ .social-btn.text-center
8
+ %a.btn.btn-primary.btn-lg{:href => "/auth/facebook"}
9
+ %i.fa.fa-facebook
10
+ Facebook
11
+ %a.btn.btn-info.btn-lg{:href => "#"}
12
+ %i.fa.fa-twitter
13
+ Twitter
14
+ %a.btn.btn-danger.btn-lg{:href => "/auth/google_oauth2"}
15
+ %i.fa.fa-google
16
+ Google
17
+ .or-seperator
18
+ %b or
19
+ .sign_in
20
+ .label-warning
21
+ = flash[:alert]
22
+ - if @identity && @identity.errors.any?
23
+ .error_messages
24
+ %h3
25
+ = pluralize(@identity.errors.count, "error")
26
+ prohibited this account from being saved:
27
+ %ul
28
+ - @identity.errors.full_messages.each do |msg|
29
+ %li= msg
30
+ .form-group.form-control
31
+ = label_tag :code, 'Username'
32
+ = text_field_tag :code, @identity.try(:code)
33
+ .form-group.form-control
34
+ = label_tag :email
35
+ = text_field_tag :email, @identity.try(:email)
36
+ .form-group.form-control
37
+ = label_tag :password, 'Password'
38
+ = password_field_tag :password
39
+ .form-group.form-control
40
+ = label_tag :password_confirmation, 'Confirm password'
41
+ = password_field_tag :password_confirmation
42
+ %button.btn.btn-success.btn-block.actions{:type => "submit"}
43
+ %i.fas.fa-sign-up-alt
44
+ Sign Up
45
+
@@ -0,0 +1,9 @@
1
+ .label-warning
2
+ #flashes
3
+ - if flash[:notice]
4
+ %p#flash_notice.messages.notice= flash[:notice]
5
+ = javascript_tag "$('#flash_notice').effect('highlight',{},1000);"
6
+ - if flash[:error] || flash[:errors]
7
+ %p#flash_errors.messages.errors= flash[:error] || flash[:errors]
8
+ = javascript_tag "$('#flash_errors').effect('highlight',{},1000);"
9
+ - flash[:error] = flash[:errors] = flash[:notice] = nil
@@ -33,16 +33,6 @@
33
33
  Sign Up
34
34
  %li
35
35
  = link_to "Refresh", "#", :onclick=>"window.location.replace('/')"
36
- - if !login?
37
- %li
38
- %a{:href => '/auth/facebook', "data-panel" => "main", rel: "external"}
39
- %i.fa.fa-facebook
40
- %span
41
- Sign-in with facebook
42
- %li
43
- %a{:href => '/auth/google_oauth2', "data-panel" => "main", rel: "external"}
44
- %i.fa.fa-google
45
- Sign-in with Google+
46
36
 
47
37
 
48
38
 
@@ -0,0 +1,35 @@
1
+ .container
2
+ .signup-form
3
+ = form_tag "/auth/identity/callback", {'data-ajax'=>'false'} do
4
+ %h1.h3.mb-3.font-weight-normal{:style => "text-align: center"} Sign in
5
+ %p.hint-text Sign in with your social media account or Username
6
+ .social-btn.text-center
7
+ %a.btn.btn-primary.btn-lg{:href => "/auth/facebook"}
8
+ %i.fa.fa-facebook
9
+ Facebook
10
+ %a.btn.btn-info.btn-lg{:href => "#"}
11
+ %i.fa.fa-twitter
12
+ Twitter
13
+ %a.btn.btn-danger.btn-lg{:href => "/auth/google_oauth2"}
14
+ %i.fa.fa-google
15
+ Google
16
+ .or-seperator
17
+ %b or
18
+ .sign_in
19
+ .label-warning
20
+ = flash[:alert]
21
+ .form-group.form-control
22
+ = label_tag :auth_key, "User name"
23
+ = text_field_tag :auth_key
24
+ .form-group.form-control
25
+ = label_tag :password, "Password"
26
+ = password_field_tag :password
27
+ .form-group
28
+ = label_tag :remember_me
29
+ = check_box_tag :remember_me, 1, params.permit[:remember_me]
30
+ %button.btn.btn-success.btn-block.actions{:type => "submit"}
31
+ %i.fas.fa-sign-in-alt
32
+ Sign in
33
+ = link_to 'Forgotten password?', new_password_reset_path, data: {icon: 'info', mini: 'true', role: 'button'}
34
+ %hr/
35
+
@@ -1,39 +1,51 @@
1
1
  %html
2
- %head
3
- %meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/
4
- = csrf_meta_tags
5
- /%link{:href => "https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic", :rel => "stylesheet"}/
6
- %title Jinda AdminLTE 2 | Starter
7
- = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload'
8
- = javascript_include_tag "application", 'data-turbolinks-track': 'reload'
9
- /
10
- BODY TAG OPTIONS:
11
- \=================
12
- Apply one or more of the following classes to get the
13
- desired effect
14
- |---------------------------------------------------------|
15
- | SKINS | skin-blue |
16
- | | skin-black |
17
- | | skin-purple |
18
- | | skin-yellow |
19
- | | skin-red |
20
- | | skin-green |
21
- |---------------------------------------------------------|
22
- |LAYOUT OPTIONS | fixed |
23
- | | layout-boxed |
24
- | | layout-top-nav |
25
- | | sidebar-collapse |
26
- | | sidebar-mini |
27
- |---------------------------------------------------------|
2
+ %head
3
+ %meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/
4
+ = csrf_meta_tags
5
+ /%link{:href => "https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic", :rel => "stylesheet"}/
6
+ %title Jinda AdminLTE 2 | Starter
7
+ = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload'
8
+ = javascript_include_tag "application", 'data-turbolinks-track': 'reload'
9
+ /
10
+ BODY TAG OPTIONS:
11
+ \=================
12
+ Apply one or more of the following classes to get the
13
+ desired effect
14
+ |---------------------------------------------------------|
15
+ | SKINS | skin-blue |
16
+ | | skin-black |
17
+ | | skin-purple |
18
+ | | skin-yellow |
19
+ | | skin-red |
20
+ | | skin-green |
21
+ |---------------------------------------------------------|
22
+ |LAYOUT OPTIONS | fixed |
23
+ | | layout-boxed |
24
+ | | layout-top-nav |
25
+ | | sidebar-collapse |
26
+ | | sidebar-mini |
27
+ |---------------------------------------------------------|
28
28
 
29
- %body.hold-transition.skin-yellow.sidebar-mini
30
- .wrapper
31
- = render "layouts/lte/header"
32
- = render "layouts/lte/sidebar"
33
- .content-wrapper
34
- = yield
35
- = render 'layouts/lte/footer'
36
- .control-sidebar-bg
37
- / REQUIRED JS SCRIPTS
38
- / jQuery 3
29
+ %body.hold-transition.skin-yellow.sidebar-mini
30
+ .wrapper
31
+ = render "layouts/lte/header"
32
+ = render "layouts/lte/sidebar"
33
+ .content-wrapper
34
+ %h3.box-title
35
+ = @page_title
36
+ = render 'layouts/lte/flash'
37
+ .label-warning
38
+ #flashes
39
+ - if flash[:notice]
40
+ %p#flash_notice.messages.notice= flash[:notice]
41
+ = javascript_tag "$('#flash_notice').effect('highlight',{},1000);"
42
+ - if flash[:error] || flash[:errors]
43
+ %p#flash_errors.messages.errors= flash[:error] || flash[:errors]
44
+ = javascript_tag "$('#flash_errors').effect('highlight',{},1000);"
45
+ - flash[:error] = flash[:errors] = flash[:notice] = nil
46
+ = yield
47
+ = render 'layouts/lte/footer'
48
+ .control-sidebar-bg
49
+ / REQUIRED JS SCRIPTS
50
+ / jQuery 3
39
51
 
@@ -10,7 +10,7 @@
10
10
  *
11
11
  *= require_self
12
12
  *= require jindalte.css
13
- *= require jinda.css
13
+ *= require jinda
14
14
  */
15
15
 
16
16
 
@@ -1,3 +1,4 @@
1
+ // jinda.scss from theme jinda_adminlte template directory
1
2
  #tooltip{
2
3
  position:absolute;
3
4
  border:1px solid #333;
@@ -56,14 +57,196 @@
56
57
  padding: 15px;
57
58
  margin: auto;
58
59
  display: block;
59
-
60
+
61
+ }
62
+ .row-description{
63
+ font-size: 12px;
60
64
  }
61
65
 
66
+ .right-date{
67
+ font-size: 10px;
68
+ float: right;
69
+ }
70
+ .row-body{
71
+ font-size: 12px;
72
+ }
62
73
  #logreg-forms{
63
- width:412px;
64
- margin:10vh auto;
65
- background-color:#f3f3f3;
66
- box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
74
+ width:412px;
75
+ margin:10vh auto;
76
+ background-color:#f3f3f3;
77
+ box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
67
78
  transition: all 0.3s cubic-bezier(.25,.8,.25,1);
68
79
  }
69
80
 
81
+ .module-table{
82
+ display: grid;
83
+ }
84
+
85
+ body {
86
+ background: #dfe7e9;
87
+ font-family: 'Roboto', sans-serif;
88
+ }
89
+ .form-control {
90
+ font-size: 12px;
91
+ transition: all 0.4s;
92
+ box-shadow: none;
93
+ }
94
+ .form-control:focus {
95
+ border-color: #5cb85c;
96
+ }
97
+ .form-control, .btn {
98
+ border-radius: 10px;
99
+ outline: none !important;
100
+ }
101
+ .form-group input {
102
+ border-width: 0px;
103
+ }
104
+ .signup-form {
105
+ width: 480px;
106
+ margin: 0 auto;
107
+ padding: 30px 0;
108
+ }
109
+ .signup-form form {
110
+ border-radius: 5px;
111
+ margin-bottom: 20px;
112
+ background: #fff;
113
+ box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
114
+ padding: 40px;
115
+ }
116
+ .signup-form a {
117
+ color: #5cb85c;
118
+ }
119
+ .signup-form h2 {
120
+ text-align: center;
121
+ font-size: 34px;
122
+ margin: 10px 0 15px;
123
+ }
124
+ .signup-form .hint-text {
125
+ color: #999;
126
+ text-align: center;
127
+ margin-bottom: 20px;
128
+ }
129
+ .signup-form .form-group {
130
+ margin-bottom: 20px;
131
+ }
132
+ .signup-form .btn {
133
+ font-size: 18px;
134
+ line-height: 26px;
135
+ font-weight: bold;
136
+ text-align: center;
137
+ }
138
+ .signup-btn {
139
+ text-align: center;
140
+ border-color: #5cb85c;
141
+ transition: all 0.4s;
142
+ }
143
+ .signup-btn:hover {
144
+ background: #5cb85c;
145
+ opacity: 0.8;
146
+ }
147
+ .or-seperator {
148
+ margin: 50px 0 15px;
149
+ text-align: center;
150
+ border-top: 1px solid #e0e0e0;
151
+ }
152
+ .or-seperator b {
153
+ padding: 0 10px;
154
+ width: 40px;
155
+ height: 40px;
156
+ font-size: 16px;
157
+ text-align: center;
158
+ line-height: 40px;
159
+ background: #fff;
160
+ display: inline-block;
161
+ border: 1px solid #e0e0e0;
162
+ border-radius: 50%;
163
+ position: relative;
164
+ top: -22px;
165
+ z-index: 1;
166
+ }
167
+ .social-btn .btn {
168
+ color: #fff;
169
+ margin: 10px 0 0 15px;
170
+ font-size: 15px;
171
+ border-radius: 50px;
172
+ font-weight: normal;
173
+ border: none;
174
+ transition: all 0.4s;
175
+ }
176
+ .social-btn .btn:first-child {
177
+ margin-left: 0;
178
+ }
179
+ .social-btn .btn:hover {
180
+ opacity: 0.8;
181
+ }
182
+ .social-btn .btn-primary {
183
+ background: #507cc0;
184
+ }
185
+ .social-btn .btn-info {
186
+ background: #64ccf1;
187
+ }
188
+ .social-btn .btn-danger {
189
+ background: #df4930;
190
+ }
191
+ .social-btn .btn i {
192
+ float: left;
193
+ margin: 3px 10px;
194
+ font-size: 20px;
195
+ }
196
+ .container{
197
+ margin: 5px;
198
+ }
199
+
200
+ /* Fixed Jinda_adminLTE .main-header .logo */
201
+ .main-header .logo {
202
+ height: 51px;
203
+ }
204
+
205
+ /* Fixed Jinda_adminLTE treemenu, Sign_in*/
206
+
207
+
208
+ @media (min-width: 768px) {
209
+
210
+ .sidebar-mini.sidebar-collapse .main-sidebar {
211
+ width: 40px !important;
212
+ }
213
+ .container{
214
+ width: 580px;
215
+ }
216
+ }
217
+
218
+ body {
219
+ margin: 0;
220
+ font-family: Arial, Helvetica, sans-serif;
221
+ line-height: 1.5;
222
+ }
223
+ .sidebar-menu {
224
+ text-align: left;
225
+ }
226
+
227
+ .inner ul {
228
+ list-style: none;
229
+ margin: 0;
230
+ padding: 0;
231
+ }
232
+ .form-group.form-control input{
233
+ background: transparent;
234
+ padding: 5px;
235
+ }
236
+
237
+ .form-group.form-control input[type=text]:focus {
238
+ background-color: transparent;
239
+ }
240
+
241
+ .display-addcomment{
242
+
243
+ float: left;
244
+ width: 450px;
245
+ }
246
+
247
+ .img-circle {
248
+ max-width: 45px;
249
+ }
250
+ .comment-user-image{
251
+ max-width: 45px;
252
+ }
@@ -1,3 +1,3 @@
1
1
  module JindaAdminlte
2
- VERSION = "0.7.0"
2
+ VERSION = "0.7.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jinda_adminlte
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Prateep Kul
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-01-01 00:00:00.000000000 Z
11
+ date: 2021-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -334,21 +334,15 @@ files:
334
334
  - lib/generators/jinda_adminlte/templates/app/controllers/adminltes_controller.rb
335
335
  - lib/generators/jinda_adminlte/templates/app/views/adminltes/dashboard1.haml
336
336
  - lib/generators/jinda_adminlte/templates/app/views/adminltes/dashboard2.haml
337
- - lib/generators/jinda_adminlte/templates/app/views/articles/edit.haml
338
- - lib/generators/jinda_adminlte/templates/app/views/articles/edit_article/edit_article.html.erb
339
- - lib/generators/jinda_adminlte/templates/app/views/articles/edit_article/select_article.html.erb
340
- - lib/generators/jinda_adminlte/templates/app/views/articles/index.haml
341
- - lib/generators/jinda_adminlte/templates/app/views/articles/my.haml
342
- - lib/generators/jinda_adminlte/templates/app/views/articles/new_article/form_article.html.erb
343
- - lib/generators/jinda_adminlte/templates/app/views/articles/show.html.haml
344
- - lib/generators/jinda_adminlte/templates/app/views/articles/xedit_article/edit_article.html.erb
345
- - lib/generators/jinda_adminlte/templates/app/views/articles/xedit_article/xedit_article.html.erb
337
+ - lib/generators/jinda_adminlte/templates/app/views/identities/new.html.haml
338
+ - lib/generators/jinda_adminlte/templates/app/views/layouts/lte/_flash.haml
346
339
  - lib/generators/jinda_adminlte/templates/app/views/layouts/lte/_footer.haml
347
340
  - lib/generators/jinda_adminlte/templates/app/views/layouts/lte/_header.haml
348
341
  - lib/generators/jinda_adminlte/templates/app/views/layouts/lte/_menu.haml
349
342
  - lib/generators/jinda_adminlte/templates/app/views/layouts/lte/_menu_mm.haml
350
343
  - lib/generators/jinda_adminlte/templates/app/views/layouts/lte/_rightbar.haml
351
344
  - lib/generators/jinda_adminlte/templates/app/views/layouts/lte/_sidebar.haml
345
+ - lib/generators/jinda_adminlte/templates/app/views/sessions/new.html.haml
352
346
  - lib/generators/jinda_adminlte/templates/application.haml
353
347
  - lib/generators/jinda_adminlte/templates/application.js
354
348
  - lib/generators/jinda_adminlte/templates/application.scss
@@ -1,12 +0,0 @@
1
-
2
- %h1= @article.title
3
- %h1= title 'Member Login'
4
- .content= @article.text
5
- %div= markdown(@article.body)
6
-
7
- = form_for @article, url: "/jinda/init?s=articles:edit_article" do |f|
8
- = f.label :title, "Title"
9
- = f.text_field :title
10
- = f.label :body, "Body Content"
11
- = f.cktext_area :body, rows: 10
12
- = f.submit
@@ -1,13 +0,0 @@
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.cktext_area :body %>
13
- <% end %>
@@ -1,12 +0,0 @@
1
- <%
2
- if current_ma_user.role.upcase.split(',').include?("A")
3
- article = Article.all.desc(:created_at)
4
- else
5
- article = Article.where(user: current_ma_user).desc(:created_at)
6
- end
7
- %>
8
- <div class="field" data-role="fieldcontain">
9
- <%= label_tag :title, 'Article title' %>
10
- <%= select_tag :title, options_from_collection_for_select(article, :id, :title), "data-native-menu"=>"false" %>
11
- </div>
12
-
@@ -1,23 +0,0 @@
1
- - @title= "All Articles"
2
- = 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", :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;'), "#", :onclick=>"if (confirm('Please Confirm')) {location.hash='/articles/destroy/#{article.id}';}"
@@ -1,55 +0,0 @@
1
- %section.content
2
- %h1
3
- - @title= "My Articles"
4
- - @page_title = 'All Articlces'
5
- = paginate @articles
6
- .row
7
- .col-md-8
8
- .box.box-success
9
- .box-header.with-border
10
- %i.fa.fa-comments-o
11
- %h3.box-title
12
- = @page_title
13
- = paginate @articles
14
-
15
- .box-tools.pull-right{"data-toggle" => "tooltip", :title => "Status"}
16
- .btn-group{"data-toggle" => "btn-toggle"}
17
- %button.btn.btn-default.btn-sm.active{:type => "button"}
18
- %i.fa.fa-square.text-green
19
- %button.btn.btn-default.btn-sm{:type => "button"}
20
- %i.fa.fa-square.text-red
21
- #chat-box.box-body.chat
22
- .table-responsive
23
- %table#article-table.table.no-margin
24
-
25
- %tbody
26
-
27
-
28
- - @articles.each do |article|
29
- %tr
30
- .item
31
- %img.online{:alt => "user image", :src => asset_url("dist/img/user4-128x128.jpg")}/
32
- %p.message
33
-
34
- %a.name{:href => "#"}
35
- %small.text-muted.pull-right
36
- = 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" }
37
- = link_to image_tag('delete.png', style:'border:none; float:none;'), "#", :onclick=>"if (confirm('Please Confirm')) {location.hash='/articles/destroy/#{article.id}';}"
38
- %i.fa.fa-clock-o
39
- = article.created_at.strftime('%m/%d/%Y')
40
- Mike
41
-
42
- = link_to article.title, :controller=>"articles", :action=>"show", :id=>article.id
43
- .attachment
44
- %p.filename
45
- Theme-thumbnail-image.jpg
46
- = article.body.html_safe
47
- .pull-right
48
- %button.btn.btn-primary.btn-sm.btn-flat{:type => "button"} Open
49
-
50
-
51
-
52
- / /.box-body
53
- .box-footer.clearfix
54
-
55
-
@@ -1,15 +0,0 @@
1
- <div class="box box-info">
2
- <div class="box-header">
3
- <%- @title= 'New Article' %>
4
- <% article = @article %>
5
- <%= fields_for article do |f| %>
6
- <%= f.label :title, "Title" %>
7
- <%= f.text_field :title %>
8
- <%= f.label :text, "Description" %>
9
- <%= f.text_field :text %>
10
- <%= f.label :text, "Keywords" %>
11
- <%= f.text_field :keywords %>
12
- <%= f.cktext_area :body %>
13
- <% end %>
14
- </div>
15
- </div>
@@ -1,24 +0,0 @@
1
- - title @article.title
2
- - description @article.text
3
- - keywords @article.keywords
4
-
5
- %div{"data-role" => "menu_mm", "data-theme" => "b", "data-backbtn"=>"false"}
6
- #article-title= @article.title
7
-
8
- #article-text= @article.body.html_safe
9
-
10
- = 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" }
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 @article.comments.build, url: "/jinda/init?s=comments:new_comment" do |f|
21
- = f.hidden_field :article_id, :value => @article.id
22
- = f.label :body, "Comment"
23
- = f.text_area :body
24
- = f.submit
@@ -1,13 +0,0 @@
1
- <%
2
- article = Article.find_by :id=> $xvars["p"]["article_id"]
3
- %>
4
- <%= fields_for article do |f| %>
5
- <%= f.label :title, "Title" %>
6
- <%= f.text_field :title %>
7
- <%= f.label :text, "Description" %>
8
- <%= f.text_field :text %>
9
- <%= f.label :text, "Keywords" %>
10
- <%= f.text_field :keywords %>
11
- <%= f.label :body, "Body Content" %>
12
- <%= f.cktext_area :body %>
13
- <% end %>
@@ -1,11 +0,0 @@
1
- article = @article
2
- <%= fields_for article do |f| %>
3
- <%= f.label :title, "Title" %>
4
- <%= f.text_field :title %>
5
- <%= f.label :text, "About" %>
6
- <%= f.text_field :text %>
7
- <%= f.label :text, "Keywords" %>
8
- <%= f.text_field :keywords %>
9
- <%= f.label :body, "Body Content" %>
10
- <%= f.cktext_area :body %>
11
- <% end %>