Module: IshManager::ImagesHelper
- Defined in:
- app/helpers/ish_manager/images_helper.rb
Instance Method Summary collapse
- #button_fb_login ⇒ Object
- #edit_img ⇒ Object
- #image_3s(input) ⇒ Object
- #image_add ⇒ Object
- #image_cac ⇒ Object
- #image_city(cityname) ⇒ Object
- #image_close ⇒ Object
- #image_contact ⇒ Object
- #image_customize ⇒ Object
- #image_delete ⇒ Object
- #image_doc ⇒ Object
- #image_edit ⇒ Object
- #image_email ⇒ Object
- #image_expand ⇒ Object
- #image_expand_down ⇒ Object
- #image_expand_up ⇒ Object
- #image_extended_forms ⇒ Object
- #image_facebook ⇒ Object
- #image_fb ⇒ Object
- #image_flag(locale) ⇒ Object
- #image_github ⇒ Object
- #image_index ⇒ Object
- #image_ish ⇒ Object
- #image_linkedin ⇒ Object
- #image_logout ⇒ Object
-
#image_missing ⇒ Object
This needs to be a string url, not an image_tag.
- #image_missing_tag ⇒ Object
- #image_my_profile ⇒ Object
- #image_new ⇒ Object
- #image_new_addritem ⇒ Object
- #image_new_photo ⇒ Object
- #image_new_report ⇒ Object
-
#image_or_missing(photo, size = :thumb) ⇒ Object
missing stuff.
- #image_pdf ⇒ Object
- #image_ppf ⇒ Object
- #image_restart ⇒ Object
- #image_scratchpad ⇒ Object
- #image_search(args = {}) ⇒ Object
- #image_settings ⇒ Object
- #image_top ⇒ Object
- #image_twitter ⇒ Object
- #image_vote_down ⇒ Object
- #image_vote_up ⇒ Object
- #is_public_image_tag(resource) ⇒ Object
- #missing ⇒ Object
- #missing?(item) ⇒ Boolean
- #new_image_tag ⇒ Object
- #new_img ⇒ Object
-
#s3_image_tag(input) ⇒ Object
@deprecated, should use image_3s.
- #trash_image_tag ⇒ Object
-
#video_thumb(video) ⇒ Object
@TODO:.
- #youtube_image_tag(video) ⇒ Object
Instance Method Details
#button_fb_login ⇒ Object
49 50 51 |
# File 'app/helpers/ish_manager/images_helper.rb', line 49 def link_to image_tag('http://s3.amazonaws.com/ish-assets/loginWithFacebook.png'), (:facebook), :class => :fb end |
#edit_img ⇒ Object
241 242 243 |
# File 'app/helpers/ish_manager/images_helper.rb', line 241 def edit_img raw('<i class="fa fa-pencil-square"></i>') end |
#image_3s(input) ⇒ Object
149 150 151 |
# File 'app/helpers/ish_manager/images_helper.rb', line 149 def image_3s input image_tag 'https://s3.amazonaws.com/ish-assets/' + input end |
#image_add ⇒ Object
115 116 117 |
# File 'app/helpers/ish_manager/images_helper.rb', line 115 def image_add image_tag 'new.png' end |
#image_cac ⇒ Object
123 124 125 |
# File 'app/helpers/ish_manager/images_helper.rb', line 123 def image_cac s3_image_tag 'cac.png' end |
#image_city(cityname) ⇒ Object
37 38 39 |
# File 'app/helpers/ish_manager/images_helper.rb', line 37 def image_city cityname image_tag 'icons/48x48/city.png' end |
#image_close ⇒ Object
107 108 109 |
# File 'app/helpers/ish_manager/images_helper.rb', line 107 def image_close image_tag('close.png') end |
#image_contact ⇒ Object
66 67 68 |
# File 'app/helpers/ish_manager/images_helper.rb', line 66 def image_contact image_tag 'http://s3.amazonaws.com/ish-assets/contact.png', :class => :contact end |
#image_customize ⇒ Object
41 42 43 |
# File 'app/helpers/ish_manager/images_helper.rb', line 41 def image_customize image_tag 'icons/28x28/customize.png' end |
#image_delete ⇒ Object
127 128 129 |
# File 'app/helpers/ish_manager/images_helper.rb', line 127 def image_delete raw('<i class="fa fa-trash"></i>') end |
#image_doc ⇒ Object
4 5 6 |
# File 'app/helpers/ish_manager/images_helper.rb', line 4 def image_doc image_tag 'icons/32x32/doc.png' end |
#image_edit ⇒ Object
244 245 246 |
# File 'app/helpers/ish_manager/images_helper.rb', line 244 def image_edit raw('<i class="fa fa-pencil-square"></i>') end |
#image_email ⇒ Object
28 29 30 |
# File 'app/helpers/ish_manager/images_helper.rb', line 28 def image_email image_tag 'icons/32x32/email.png' end |
#image_expand ⇒ Object
57 58 59 60 |
# File 'app/helpers/ish_manager/images_helper.rb', line 57 def # image_tag 'icons/28x28/expand.png' image_tag 'icons/16x16/expand_down.png' end |
#image_expand_down ⇒ Object
62 63 64 |
# File 'app/helpers/ish_manager/images_helper.rb', line 62 def image_tag 'drag.png' end |
#image_expand_up ⇒ Object
70 71 72 |
# File 'app/helpers/ish_manager/images_helper.rb', line 70 def image_tag 'drag.png' end |
#image_extended_forms ⇒ Object
103 104 105 |
# File 'app/helpers/ish_manager/images_helper.rb', line 103 def image_extended_forms image_tag 'icons/64x64/extended_forms.png' end |
#image_facebook ⇒ Object
16 17 18 |
# File 'app/helpers/ish_manager/images_helper.rb', line 16 def image_facebook image_tag 'icons/32x32/facebook.png' end |
#image_fb ⇒ Object
145 146 147 |
# File 'app/helpers/ish_manager/images_helper.rb', line 145 def image_fb image_tag 'http://s3.amazonaws.com/ish-assets/loginWithFacebook.png' end |
#image_flag(locale) ⇒ Object
32 33 34 35 |
# File 'app/helpers/ish_manager/images_helper.rb', line 32 def image_flag locale # image_tag "flags/#{locale.to_s}.png" "[#{locale.to_s}]" end |
#image_github ⇒ Object
24 25 26 |
# File 'app/helpers/ish_manager/images_helper.rb', line 24 def image_github image_tag 'icons/32x32/github.png' end |
#image_index ⇒ Object
131 132 133 |
# File 'app/helpers/ish_manager/images_helper.rb', line 131 def image_index image_tag 'icons/32x32/list.png' end |
#image_ish ⇒ Object
82 83 84 85 |
# File 'app/helpers/ish_manager/images_helper.rb', line 82 def image_ish # image_tag 'logo.png' image_tag 'ish_logo_100.png' end |
#image_linkedin ⇒ Object
12 13 14 |
# File 'app/helpers/ish_manager/images_helper.rb', line 12 def image_linkedin image_tag 'icons/32x32/linkedin.png' end |
#image_logout ⇒ Object
53 54 55 |
# File 'app/helpers/ish_manager/images_helper.rb', line 53 def image_logout image_tag 'icons/32x32/logout.png' end |
#image_missing ⇒ Object
This needs to be a string url, not an image_tag. vp 2020-02-25
179 180 181 |
# File 'app/helpers/ish_manager/images_helper.rb', line 179 def image_missing 'missing.png' end |
#image_missing_tag ⇒ Object
182 183 184 |
# File 'app/helpers/ish_manager/images_helper.rb', line 182 def image_missing_tag image_tag image_missing end |
#image_my_profile ⇒ Object
218 219 220 |
# File 'app/helpers/ish_manager/images_helper.rb', line 218 def image_my_profile image_tag 'icons/64x64/my-profile.png' end |
#image_new ⇒ Object
135 136 137 138 |
# File 'app/helpers/ish_manager/images_helper.rb', line 135 def image_new raw('<i class="fa fa-plus-square"></i>') # image_tag 'icons/32x32/new.png', :alt => '[+]' end |
#image_new_addritem ⇒ Object
87 88 89 |
# File 'app/helpers/ish_manager/images_helper.rb', line 87 def image_new_addritem image_tag 'icons/64x64/new_addritem.png' end |
#image_new_photo ⇒ Object
45 46 47 |
# File 'app/helpers/ish_manager/images_helper.rb', line 45 def image_new_photo image_tag 'icons/48x48/new_photo.png' end |
#image_new_report ⇒ Object
78 79 80 |
# File 'app/helpers/ish_manager/images_helper.rb', line 78 def image_new_report image_tag 'icons/64x64/new_report.png' end |
#image_or_missing(photo, size = :thumb) ⇒ Object
missing stuff
163 164 165 166 167 168 169 170 171 172 173 174 175 176 |
# File 'app/helpers/ish_manager/images_helper.rb', line 163 def image_or_missing photo, size = :thumb if defined? photo.photo if defined? photo.photo.url if photo.photo.url == '/photos/original/missing.png' ; else return image_tag photo.photo.url(size) end end end image_missing end |
#image_pdf ⇒ Object
8 9 10 |
# File 'app/helpers/ish_manager/images_helper.rb', line 8 def image_pdf image_tag 'icons/32x32/pdf.png' end |
#image_ppf ⇒ Object
74 75 76 |
# File 'app/helpers/ish_manager/images_helper.rb', line 74 def image_ppf image_tag 'ppf.gif' end |
#image_restart ⇒ Object
214 215 216 |
# File 'app/helpers/ish_manager/images_helper.rb', line 214 def image_restart t('apps.restart') end |
#image_scratchpad ⇒ Object
95 96 97 |
# File 'app/helpers/ish_manager/images_helper.rb', line 95 def image_scratchpad image_tag 'icons/64x64/scratchpad.png' end |
#image_search(args = {}) ⇒ Object
119 120 121 |
# File 'app/helpers/ish_manager/images_helper.rb', line 119 def image_search args = {} image_tag 'icons/16x16/search.png', args end |
#image_settings ⇒ Object
99 100 101 |
# File 'app/helpers/ish_manager/images_helper.rb', line 99 def image_settings image_tag 'icons/64x64/settings.png' end |
#image_top ⇒ Object
91 92 93 |
# File 'app/helpers/ish_manager/images_helper.rb', line 91 def image_top image_tag('top.gif') end |
#image_twitter ⇒ Object
20 21 22 |
# File 'app/helpers/ish_manager/images_helper.rb', line 20 def image_twitter image_tag 'icons/32x32/twitter.png' end |
#image_vote_down ⇒ Object
206 207 208 |
# File 'app/helpers/ish_manager/images_helper.rb', line 206 def image_vote_down image_tag 'icons/32x32/thumbs_down.png', :width => '16px' end |
#image_vote_up ⇒ Object
202 203 204 |
# File 'app/helpers/ish_manager/images_helper.rb', line 202 def image_vote_up image_tag 'icons/32x32/thumbs_up.png', :width => '16px' end |
#is_public_image_tag(resource) ⇒ Object
233 234 235 236 237 238 239 |
# File 'app/helpers/ish_manager/images_helper.rb', line 233 def is_public_image_tag resource if resource.is_public image_tag 'icons/20x20/public2.png' else image_tag 'icons/20x20/private.png' end end |
#missing ⇒ Object
186 187 188 |
# File 'app/helpers/ish_manager/images_helper.rb', line 186 def missing image_missing end |
#missing?(item) ⇒ Boolean
190 191 192 193 194 195 196 197 198 199 200 |
# File 'app/helpers/ish_manager/images_helper.rb', line 190 def missing? item if defined? item.photo and defined? item.photo.url if item.photo.url == "/photos/original/missing.png" return true else return false end end return true end |
#new_image_tag ⇒ Object
226 227 228 |
# File 'app/helpers/ish_manager/images_helper.rb', line 226 def new_image_tag raw('<i class="fa fa-plus-square"></i>') end |
#new_img ⇒ Object
229 230 231 |
# File 'app/helpers/ish_manager/images_helper.rb', line 229 def new_img raw('<i class="fa fa-plus-square"></i>') end |
#s3_image_tag(input) ⇒ Object
@deprecated, should use image_3s
141 142 143 |
# File 'app/helpers/ish_manager/images_helper.rb', line 141 def s3_image_tag input image_tag 'https://s3.amazonaws.com/ish-assets/' + input end |
#trash_image_tag ⇒ Object
222 223 224 |
# File 'app/helpers/ish_manager/images_helper.rb', line 222 def trash_image_tag image_tag 'icons/20x20/trash.png' end |
#video_thumb(video) ⇒ Object
@TODO:
154 155 156 157 |
# File 'app/helpers/ish_manager/images_helper.rb', line 154 def video_thumb video warn 'todo wtf?' image_tag 'no_image.png' end |
#youtube_image_tag(video) ⇒ Object
248 249 250 |
# File 'app/helpers/ish_manager/images_helper.rb', line 248 def youtube_image_tag video image_tag "https://img.youtube.com/vi/#{video.youtube_id}/0.jpg", :class => [ :youtube_img ] end |