semantic-rails-ui 0.0.18 → 0.0.19
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 +32 -2
- data/app/helpers/semantic_rails_ui/ui_helper.rb +4 -0
- data/lib/semantic-rails-ui/version.rb +1 -1
- metadata +2 -3
- data/app/assets/images/semantic-rails-ui/.keep +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ed527fde8e50ef39933b95d93e57bcf57d5537b
|
4
|
+
data.tar.gz: 8aa85e0a817ce4facd48388d0ad39adc8b8e0157
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34550655adf62de7bbdd4f7063d18e248eaf28e65afa2330fd647c715c94b5d3428c187af16bc743a9a19ec18951fd54d9477d8fdebcef9764137227bab87b7f
|
7
|
+
data.tar.gz: f314513e88fc01980268044689f9c1cd96345f09a3aaa73be6f4f4f9b88632de4cf3bea8d13daaf3e0701e4bc69273128af3d05892b71cc32c0beac9f62496fa
|
data/README.md
CHANGED
@@ -13,7 +13,10 @@
|
|
13
13
|
[coveralls]: https://coveralls.io/r/igorj/semantic-rails-ui
|
14
14
|
|
15
15
|
|
16
|
-
|
16
|
+
- Integration with semantic-ui (with semantic-ui-sass gem) and simple_form.
|
17
|
+
- The gem also includes coffee-rails, sass-rails, jquery-rails, uglifier and turbolinks, so you don't have to include them in your rails application
|
18
|
+
- Adds following view helpers: `ui_flash_messages`, `ui_icon`, `ui_icon_header`, `ui_delete_link`
|
19
|
+
- Modifies the default rails scaffolding templates so that you get nice semantic-ui scaffolds out of the box
|
17
20
|
|
18
21
|
## Installation
|
19
22
|
|
@@ -33,7 +36,34 @@ Or install it yourself as:
|
|
33
36
|
|
34
37
|
## Usage
|
35
38
|
|
36
|
-
|
39
|
+
Add semantic-rails-ui to your assets:
|
40
|
+
|
41
|
+
application.js
|
42
|
+
```
|
43
|
+
//= require semantic-rails-ui
|
44
|
+
```
|
45
|
+
|
46
|
+
application.sass:
|
47
|
+
```
|
48
|
+
@import "semantic-rails-ui"
|
49
|
+
```
|
50
|
+
|
51
|
+
Now you can generate a scaffold and enjoy the semanic-ui look & feel.
|
52
|
+
|
53
|
+
You can also use the provided helpers:
|
54
|
+
|
55
|
+
```
|
56
|
+
<%= ui_icon_header "Welcome home", "home" %>
|
57
|
+
```
|
58
|
+
|
59
|
+
```
|
60
|
+
<%= ui_delete_link 'Destroy', article, 'Are you sure?' %>
|
61
|
+
```
|
62
|
+
|
63
|
+
```
|
64
|
+
<%= ui_flash_messages %>
|
65
|
+
```
|
66
|
+
|
37
67
|
|
38
68
|
## Development
|
39
69
|
|
@@ -10,6 +10,8 @@ module SemanticRailsUi
|
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
|
+
# supported flash message types: :error, :success, :warning, :info
|
14
|
+
# todo: add support for :alert and :notice
|
13
15
|
def ui_flash_messages(options = {})
|
14
16
|
merged_options = { id: "messages", class: "messages" }.merge(options)
|
15
17
|
content_tag :div, merged_options do
|
@@ -26,10 +28,12 @@ module SemanticRailsUi
|
|
26
28
|
end
|
27
29
|
end
|
28
30
|
|
31
|
+
# renders a semantic-ui icon
|
29
32
|
def ui_icon(icon_name)
|
30
33
|
content_tag(:i, '', class: "#{icon_name} icon")
|
31
34
|
end
|
32
35
|
|
36
|
+
# renders a delete link with semantic-ui confirmation dialog instead of default js confirmation
|
33
37
|
def ui_delete_link(button_text, url, message)
|
34
38
|
link_to url, class: "ui red tiny compact basic button", method: :delete,
|
35
39
|
data: { confirm: message, 'confirm-title' => button_text } do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: semantic-rails-ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Jancev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -250,7 +250,6 @@ files:
|
|
250
250
|
- LICENCE.txt
|
251
251
|
- README.md
|
252
252
|
- Rakefile
|
253
|
-
- app/assets/images/semantic-rails-ui/.keep
|
254
253
|
- app/assets/javascripts/semantic-rails-ui.js
|
255
254
|
- app/assets/javascripts/semantic-rails-ui/confirm.coffee
|
256
255
|
- app/assets/javascripts/semantic-rails-ui/menu.coffee
|
File without changes
|