bootstrap_refile 0.0.2 → 0.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.
- checksums.yaml +4 -4
- data/README.md +9 -3
- data/lib/bootstrap_refile/rails/attachment_helper.rb +4 -6
- data/lib/bootstrap_refile/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47355f72fa07677a0c8d68dcc22de69feabb48b8
|
4
|
+
data.tar.gz: e2f9bc8575212549c1ce4f19d32f200c29f0a255
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa90f245c52979a9d93048112f3f87d37992f555911ad83d4b50694a21e1bc59341466208c792f17b4d58a3b3f00b8f828f373bdf26125bf299dca9725929fa2
|
7
|
+
data.tar.gz: 22fecfcad88b4b756de52be20a22f5a919da8c155ae2df6cb987e090f03a14ce4e76484e61b9249e588de32de1bc65894cd0c020ad67f519ca9064ccd2fc221d
|
data/README.md
CHANGED
@@ -30,7 +30,7 @@ Add this line to your stylesheet:
|
|
30
30
|
|
31
31
|
``` erb
|
32
32
|
<%= form_for @user do |form| %>
|
33
|
-
<%= form.bootstrap_attachment_field :profile_image %>
|
33
|
+
<%= form.bootstrap_attachment_field :profile_image, direct: true %>
|
34
34
|
<% end %>
|
35
35
|
```
|
36
36
|
|
@@ -38,12 +38,18 @@ If you want to change the style of the progress bar you can pass it in:
|
|
38
38
|
|
39
39
|
``` erb
|
40
40
|
<%= form_for @user do |form| %>
|
41
|
-
<%= form.
|
41
|
+
<%= form.bootstrap_attachment_field :profile_image, direct: true, progress_class: 'progress-bar-danger' %>
|
42
42
|
<% end %>
|
43
43
|
```
|
44
44
|
|
45
|
-
Options:
|
45
|
+
## Options:
|
46
46
|
|
47
47
|
- progress_class
|
48
48
|
- remove_class
|
49
49
|
- select_class
|
50
|
+
|
51
|
+
## Note:
|
52
|
+
|
53
|
+
The filename field for Refile is required for this to work, so make sure to add it to your tables.
|
54
|
+
|
55
|
+
Another note, this is my first gem, so it's probably pretty awful, if you have a problem open an issue and and let me know if you know how to fix it.
|
@@ -87,12 +87,10 @@ module BootstrapRefile
|
|
87
87
|
</div>
|
88
88
|
</div>
|
89
89
|
<div class="file-info"><i class="fa #{attachment_icon}"></i> #{file_name}</div>
|
90
|
-
<
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
</label>
|
95
|
-
</span>
|
90
|
+
<label style="display: block; padding-bottom: 10px;">
|
91
|
+
#{remove_attachment}
|
92
|
+
Remove #{attachment_name}
|
93
|
+
</label>
|
96
94
|
<span class="btn #{options[:select_class]} btn-file">
|
97
95
|
Select #{attachment_name}
|
98
96
|
#{attachment_field}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bootstrap_refile
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joshua Novak
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|