[Git][noosfero/noosfero][stable-1.8] Merge branch 'media_panel_imgs' into 'master'
Rodrigo Souto
gitlab at mg.gitlab.com
Thu Jun 29 09:48:46 BRT 2017
Rodrigo Souto pushed to branch stable-1.8 at Noosfero / noosfero
Commits:
5ca074e1 by Rodrigo Souto at 2017-06-29T12:48:10+00:00
Merge branch 'media_panel_imgs' into 'master'
Uses CMS links for media_panel images
Closes #223
See merge request !1257
- - - - -
2 changed files:
- app/views/cms/media_panel/_image.html.erb
- test/functional/cms_controller_test.rb
Changes:
=====================================
app/views/cms/media_panel/_image.html.erb
=====================================
--- a/app/views/cms/media_panel/_image.html.erb
+++ b/app/views/cms/media_panel/_image.html.erb
@@ -1,6 +1,6 @@
<div class="item image" data-item="span" title="<%= @file.name %>">
<span>
- <%= image_tag(@file.public_filename(:uploaded)) %>
+ <%= image_tag(@file.full_path) %>
</span>
<div class="controls image-controls">
<a class="button icon-add add-to-text" href="#"><span><%= _('Add to the text') %></span></a>
=====================================
test/functional/cms_controller_test.rb
=====================================
--- a/test/functional/cms_controller_test.rb
+++ b/test/functional/cms_controller_test.rb
@@ -2057,6 +2057,12 @@ class CmsControllerTest < ActionController::TestCase
assert_equivalent [author1.id, author2.id], article.versions.map(&:last_changed_by_id)
end
+ should 'display CMS links for media panel images' do
+ file = UploadedFile.create!(:profile => profile, :uploaded_data => fixture_file_upload('/files/rails.png', 'image/png'))
+ get :published_media_items, profile: profile.identifier
+ assert_tag 'img', attributes: { src: file.full_path }
+ end
+
protected
# FIXME this is to avoid adding an extra dependency for a proper JSON parser.
View it on GitLab: https://gitlab.com/noosfero/noosfero/commit/5ca074e1449bc01d5222ab1c4b80100565a774cd
---
View it on GitLab: https://gitlab.com/noosfero/noosfero/commit/5ca074e1449bc01d5222ab1c4b80100565a774cd
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20170629/ab45409b/attachment.html>
More information about the Noosfero-dev
mailing list