trestle 0.8.8 → 0.8.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -0
- data/Gemfile +2 -0
- data/app/assets/stylesheets/trestle/components/_avatar.scss +1 -2
- data/app/helpers/trestle/avatar_helper.rb +4 -2
- data/app/helpers/trestle/{debug_helper.rb → flash_helper.rb} +5 -1
- data/app/views/trestle/application/_dialog.html.erb +1 -1
- data/app/views/trestle/flash/_alert.html.erb +4 -1
- data/app/views/trestle/flash/_flash.html.erb +2 -2
- data/gemfiles/rails-4.2.gemfile +2 -0
- data/gemfiles/rails-5.0.gemfile +2 -0
- data/gemfiles/rails-5.1.gemfile +2 -0
- data/gemfiles/rails-5.2.gemfile +2 -0
- data/gemfiles/rails-edge.gemfile +2 -0
- data/lib/trestle/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d5f74ea1864e543221e224711053214f59d7ebaaa302ae105a566e6105dc8486
|
4
|
+
data.tar.gz: a3fd93cbc5acb0bacd23cc4354a0c6d2875709c20f84222d5c6a461e38b19505
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a821671d5f9f3d1fc49ce3bde54890957c0562def8d512f016c8860ad6aa8f39bdbeb38dd821f587819db3e90bb2f239f187d81fdb22dfc28ec2be58b20790d3
|
7
|
+
data.tar.gz: 49fc89e2f174f9988ca56ba168b2b229b72bde4a8de88d2936b8e9712cbe87fa166d52211d11576d6dfe5e2ea0ed3a8f2393b250c2a7424bbf19fbe89c401d30
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
width: 40px;
|
6
6
|
height: 40px;
|
7
7
|
|
8
|
-
background: #
|
8
|
+
background: #ccc;
|
9
9
|
border-radius: 50%;
|
10
10
|
box-shadow: rgba(black, 0.25) 0 1px 0;
|
11
11
|
|
@@ -28,7 +28,6 @@
|
|
28
28
|
right: 0;
|
29
29
|
border-radius: 50%;
|
30
30
|
|
31
|
-
background: #ccc;
|
32
31
|
color: white;
|
33
32
|
|
34
33
|
display: flex;
|
@@ -1,8 +1,10 @@
|
|
1
1
|
module Trestle
|
2
2
|
module AvatarHelper
|
3
3
|
def avatar(options={})
|
4
|
-
|
5
|
-
|
4
|
+
fallback = options.delete(:fallback) if options[:fallback]
|
5
|
+
|
6
|
+
content_tag(:div, options.reverse_merge(class: "avatar")) do
|
7
|
+
concat content_tag(:span, fallback, class: "avatar-fallback") if fallback
|
6
8
|
concat yield if block_given?
|
7
9
|
end
|
8
10
|
end
|
@@ -1,5 +1,9 @@
|
|
1
1
|
module Trestle
|
2
|
-
module
|
2
|
+
module FlashHelper
|
3
|
+
def normalize_flash_alert(flash)
|
4
|
+
flash.is_a?(Hash) ? flash.with_indifferent_access : { message: flash }
|
5
|
+
end
|
6
|
+
|
3
7
|
def debug_form_errors?
|
4
8
|
Trestle.config.debug_form_errors && instance_has_errors?
|
5
9
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<% if flash[:message] -%>
|
2
|
-
<%= render "trestle/flash/alert", html_class: "alert-success", icon: icon("alert-icon ion-ios-checkmark-outline"), alert: flash[:message]
|
2
|
+
<%= render "trestle/flash/alert", html_class: "alert-success", icon: icon("alert-icon ion-ios-checkmark-outline"), alert: normalize_flash_alert(flash[:message]) %>
|
3
3
|
<% elsif flash[:error] -%>
|
4
|
-
<%= render layout: "trestle/flash/alert", locals: { html_class: "alert-danger", icon: icon("alert-icon ion-ios-close-outline"), alert: flash[:error]
|
4
|
+
<%= render layout: "trestle/flash/alert", locals: { html_class: "alert-danger", icon: icon("alert-icon ion-ios-close-outline"), alert: normalize_flash_alert(flash[:error]) } do %>
|
5
5
|
<%= render "trestle/flash/debug" if debug_form_errors? %>
|
6
6
|
<% end %>
|
7
7
|
<% end -%>
|
data/gemfiles/rails-4.2.gemfile
CHANGED
data/gemfiles/rails-5.0.gemfile
CHANGED
data/gemfiles/rails-5.1.gemfile
CHANGED
data/gemfiles/rails-5.2.gemfile
CHANGED
data/gemfiles/rails-edge.gemfile
CHANGED
data/lib/trestle/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trestle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Pohlenz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -258,8 +258,8 @@ files:
|
|
258
258
|
- app/controllers/trestle/dashboard_controller.rb
|
259
259
|
- app/helpers/trestle/avatar_helper.rb
|
260
260
|
- app/helpers/trestle/container_helper.rb
|
261
|
-
- app/helpers/trestle/debug_helper.rb
|
262
261
|
- app/helpers/trestle/display_helper.rb
|
262
|
+
- app/helpers/trestle/flash_helper.rb
|
263
263
|
- app/helpers/trestle/form_helper.rb
|
264
264
|
- app/helpers/trestle/format_helper.rb
|
265
265
|
- app/helpers/trestle/grid_helper.rb
|
@@ -626,7 +626,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
626
626
|
version: '0'
|
627
627
|
requirements: []
|
628
628
|
rubyforge_project:
|
629
|
-
rubygems_version: 2.7.
|
629
|
+
rubygems_version: 2.7.6
|
630
630
|
signing_key:
|
631
631
|
specification_version: 4
|
632
632
|
summary: A modern, responsive admin framework for Ruby on Rails
|