smug 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/layouts/smug/_flash.html.slim +4 -0
- data/app/views/layouts/smug/admin.html.slim +7 -0
- data/app/views/smug/admin/crud/show.html.slim +12 -1
- data/lib/smug.rb +3 -6
- data/lib/smug/configuration.rb +3 -1
- data/lib/smug/version.rb +1 -1
- data/smug.gemspec +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 54a8c1826cc0888a956a99482b87bdef09035455
|
4
|
+
data.tar.gz: f05143f9eafd5369b9db21858e9f2edf98159a10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2eba9bc221d169f54dbe439ed635c83489182e44cd7be98ca94d7bfdf3263f19ef87c8562cd81cf0e86e36e37714c9c611854e27f4959330996a771bbac0afe9
|
7
|
+
data.tar.gz: f7f0d499c27312ae6d3965f456259e60972515168a2a8a5743e07fe9717424b6d93698eb9b9dd98acbb7c715afd97b74921e25a1bf4ac14abaa6aace9d5083cc
|
@@ -6,8 +6,15 @@ html
|
|
6
6
|
= stylesheet_link_tag 'smug/admin/application',
|
7
7
|
media: 'all',
|
8
8
|
'data-turbolinks-track' => true
|
9
|
+
- Smug.configuration.additional_css.each do |css|
|
10
|
+
= stylesheet_link_tag css,
|
11
|
+
media: 'all',
|
12
|
+
'data-turbolinks-track' => true
|
9
13
|
= javascript_include_tag 'smug/admin/application',
|
10
14
|
'data-turbolinks-track' => true
|
15
|
+
- Smug.configuration.additional_js.each do |js|
|
16
|
+
= javascript_include_tag js,
|
17
|
+
'data-turbolinks-track' => true
|
11
18
|
= csrf_meta_tags
|
12
19
|
body
|
13
20
|
= render "layouts/smug/nav"
|
@@ -1,10 +1,21 @@
|
|
1
|
-
.container
|
1
|
+
.container.mb-4
|
2
2
|
h1.mb-2.text-center = controller.class.model_name.human
|
3
3
|
.text-center.mb-2
|
4
4
|
= link_to :back do
|
5
5
|
i.glyphicon.glyphicon-arrow-left>
|
6
6
|
= t(".back", default: "Back")
|
7
|
+
|
8
|
+
- begin
|
9
|
+
= render "smug/admin/#{controller.class.model_name.route_key}/before_show"
|
10
|
+
- rescue ActionView::MissingTemplate
|
11
|
+
/ do nothing
|
12
|
+
|
7
13
|
dl
|
8
14
|
- controller.class.show_attrs.each do |attr|
|
9
15
|
dt = controller.class.model.human_attribute_name(attr)
|
10
16
|
dd = @item.render_attr(attr)
|
17
|
+
|
18
|
+
- begin
|
19
|
+
= render "smug/admin/#{controller.class.model_name.route_key}/after_show"
|
20
|
+
- rescue ActionView::MissingTemplate
|
21
|
+
/ do nothing
|
data/lib/smug.rb
CHANGED
@@ -9,6 +9,7 @@ require "will_paginate-bootstrap"
|
|
9
9
|
require "devise"
|
10
10
|
require "devise-bootstrap-views"
|
11
11
|
require "bootstrap-wysihtml5-rails"
|
12
|
+
require "simple_form"
|
12
13
|
|
13
14
|
require "smug/version"
|
14
15
|
require "smug/engine"
|
@@ -17,15 +18,11 @@ require "smug/plugin"
|
|
17
18
|
|
18
19
|
module Smug
|
19
20
|
class << self
|
20
|
-
|
21
|
-
|
22
|
-
def configuration
|
23
|
-
@configuration || Configuration.new
|
24
|
-
end
|
21
|
+
attr_accessor :configuration
|
25
22
|
end
|
26
23
|
|
27
24
|
def self.configure
|
28
|
-
self.configuration
|
25
|
+
self.configuration ||= Configuration.new
|
29
26
|
yield(configuration)
|
30
27
|
end
|
31
28
|
end
|
data/lib/smug/configuration.rb
CHANGED
data/lib/smug/version.rb
CHANGED
data/smug.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smug
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Bolt
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -220,6 +220,20 @@ dependencies:
|
|
220
220
|
- - ">="
|
221
221
|
- !ruby/object:Gem::Version
|
222
222
|
version: '0'
|
223
|
+
- !ruby/object:Gem::Dependency
|
224
|
+
name: simple_form
|
225
|
+
requirement: !ruby/object:Gem::Requirement
|
226
|
+
requirements:
|
227
|
+
- - ">="
|
228
|
+
- !ruby/object:Gem::Version
|
229
|
+
version: '0'
|
230
|
+
type: :runtime
|
231
|
+
prerelease: false
|
232
|
+
version_requirements: !ruby/object:Gem::Requirement
|
233
|
+
requirements:
|
234
|
+
- - ">="
|
235
|
+
- !ruby/object:Gem::Version
|
236
|
+
version: '0'
|
223
237
|
description: Write a longer description or delete this line.
|
224
238
|
email:
|
225
239
|
- nick@yoomee.com
|