poodle-rb 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/poodle/action_view/theme_helper.rb +27 -28
- data/lib/poodle/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: 148d0f4cd6fb2c57e9b8e00fa0f2fecc475f333a
|
4
|
+
data.tar.gz: 29df628f0d01994f956cd73ea4a58b6c9394d418
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 805334ef3bc567ec4fe2f93eef62df67a08af93f29f781955c247aaf5a6da2306db769a4d6bf2feca18bdd57d39ed22b1817a7ca1bad971518d96e7197217e98
|
7
|
+
data.tar.gz: e29766968915d98137d0717eb2b1631e20aa720a1bf0af1e23f4dfec78b26720a01bd7eaeb5b14b7666faca189761c1ac525d9b2abab86e89336b5e7456cf990
|
@@ -248,34 +248,6 @@ module Poodle
|
|
248
248
|
:display_footer => false}) if display
|
249
249
|
end
|
250
250
|
|
251
|
-
# Example
|
252
|
-
# theme_image(@project, admin_project_path(@project), :url, "logo.image.url")
|
253
|
-
# is equivalent to:
|
254
|
-
# ---------------------------
|
255
|
-
# <% change_picture_url = upload_image_link(@project, admin_project_path(@project), :logo) %>
|
256
|
-
# <% img_tag = display_image(@project, "logo.image.url", width: "100%", place_holder: {width: 300, height: 180, text: "<No Image>"}) %>
|
257
|
-
# <%= link_to img_tag, change_picture_url, :remote => true %>
|
258
|
-
# <%= link_to raw("<i class=\"fa fa-photo mr-5\"></i> Change Picture"), change_picture_url, :class=>"btn btn-default btn-xs mt-10", :remote=>true %>
|
259
|
-
def theme_image(object, url, assoc_name, assoc_url, options={})
|
260
|
-
options.reverse_merge!(
|
261
|
-
width: "100%",
|
262
|
-
ph: {
|
263
|
-
width: 300,
|
264
|
-
height: 180,
|
265
|
-
text: "<No Image>"
|
266
|
-
},
|
267
|
-
remote: true,
|
268
|
-
text: "Change Image",
|
269
|
-
icon: "photo",
|
270
|
-
classes: "btn btn-default btn-xs mt-10"
|
271
|
-
)
|
272
|
-
change_picture_url = upload_image_link(object, url, assoc_name)
|
273
|
-
img_tag = display_image(object, assoc_url, width: options[:width], place_holder: options[:ph])
|
274
|
-
btn_display = raw(theme_fa_icon(options[:icon])+theme_button_text(options[:text]))
|
275
|
-
link_to(img_tag, change_picture_url, :remote => options[:remote]) +
|
276
|
-
link_to(btn_display, change_picture_url, :class=>options[:classes], :remote=>options[:remote])
|
277
|
-
end
|
278
|
-
|
279
251
|
# Example
|
280
252
|
# theme_panel_heading(@project.name)
|
281
253
|
# is equivalent to:
|
@@ -305,6 +277,33 @@ module Poodle
|
|
305
277
|
content_tag(:div, text, class: classes)
|
306
278
|
end
|
307
279
|
|
280
|
+
# Example
|
281
|
+
# theme_image(@project, admin_project_path(@project), :url, "logo.image.url", change_picture_url: change_picture_url)
|
282
|
+
# is equivalent to:
|
283
|
+
# ---------------------------
|
284
|
+
# <% img_tag = display_image(@project, "logo.image.url", width: "100%", place_holder: {width: 300, height: 180, text: "<No Image>"}) %>
|
285
|
+
# <%= link_to img_tag, change_picture_url, :remote => true %>
|
286
|
+
# <%= link_to raw("<i class=\"fa fa-photo mr-5\"></i> Change Picture"), change_picture_url, :class=>"btn btn-default btn-xs mt-10", :remote=>true %>
|
287
|
+
def theme_image(object, url, assoc_name, assoc_url, **options)
|
288
|
+
options.reverse_merge!(
|
289
|
+
width: "100%",
|
290
|
+
ph: {
|
291
|
+
width: 300,
|
292
|
+
height: 180,
|
293
|
+
text: "<No Image>"
|
294
|
+
},
|
295
|
+
remote: true,
|
296
|
+
text: "Change Image",
|
297
|
+
icon: "photo",
|
298
|
+
classes: "btn btn-default btn-xs mt-10",
|
299
|
+
change_picture_url: nil
|
300
|
+
)
|
301
|
+
img_tag = display_image(object, assoc_url, width: options[:width], place_holder: options[:ph])
|
302
|
+
btn_display = raw(theme_fa_icon(options[:icon])+theme_button_text(options[:text]))
|
303
|
+
link_to(img_tag, options[:change_picture_url], :remote => options[:remote]) +
|
304
|
+
link_to(btn_display, options[:change_picture_url], :class=>options[:classes], :remote=>options[:remote])
|
305
|
+
end
|
306
|
+
|
308
307
|
# Example
|
309
308
|
# theme_user_image(@user, @role)
|
310
309
|
# is equivalent to:
|
data/lib/poodle/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: poodle-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Krishnaprasad Varma
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|