Skip to content

Commit

Permalink
set min- width and height to fix actions not displayed when image is …
Browse files Browse the repository at this point in the history
…broken
  • Loading branch information
Julia Ramstedt committed May 19, 2015
1 parent a298998 commit 399a9b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/assets/stylesheets/godmin-uploads.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ $border-radius: 4px;
border-radius: $border-radius;
max-width: 100%;
max-height: 100%;
min-width: 152px;
min-height: 152px;
}

.godmin-uploads__preview .glyphicon-file {
Expand Down
2 changes: 1 addition & 1 deletion app/views/godmin/uploads/_uploader.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<div class="godmin-uploads__preview">
<% if preview %>
<%= attachment_image_tag(f.object, attachment, :fill, 0, 400, fallback: "http://placehold.it/150/f5f5f5/cccccc", class:"godmin-uploads__preview__image") %>
<%= attachment_image_tag(f.object, attachment, :fill, 0, 400, fallback: "http://placehold.it/150/f5f5f5/cccccc", class:"godmin-uploads__preview__image", alt:"") %>
<% else %>
<div class="glyphicon glyphicon-file godmin-uploads__preview__icon"></div>
<% end %>
Expand Down

0 comments on commit 399a9b6

Please sign in to comment.