diff --git a/config/initializers/action_tracker.rb b/config/initializers/action_tracker.rb
index 7f23a90..f295c33 100644
--- a/config/initializers/action_tracker.rb
+++ b/config/initializers/action_tracker.rb
@@ -23,7 +23,28 @@ ActionTrackerConfig.verbs = {
},
:upload_image => {
- :description => lambda { n_('uploaded 1 image
%{thumbnails}
', 'uploaded %{num} images
%{thumbnails}
', get_view_url.size) % { :num => get_view_url.size, :thumbnails => '{{ta.collect_group_with_index(:thumbnail_path){ |t,i| content_tag(:span, link_to(image_tag(t), ta.get_view_url[i]))}.last(3).join}}' } },
+ :description => lambda do
+ total = get_view_url.size
+ n_('uploaded 1 image', 'uploaded %d images', total) % total +
+ '
{{'+
+ 'ta.collect_group_with_index(:thumbnail_path) { |t,i|' +
+ " if ( #{total} == 1 );" +
+ ' link_to( image_tag(t), ta.get_view_url[i], :class => \'upimg\' );' +
+ ' else;' +
+ " pos = #{total}-i;" +
+ ' morethen2 = pos>2 ? \'morethen2\' : \'\';' +
+ ' morethen5 = pos>5 ? \'morethen5\' : \'\';' +
+ ' t = t.gsub(/(.*)(display)(.*)/, \'\\1thumb\\3\');' +
+ ' link_to( \' \', ta.get_view_url[i],' +
+ ' :style => "background-image:url(#{t})",' +
+ ' :class => "upimg pos#{pos} #{morethen2} #{morethen5}" );' +
+ ' end' +
+ '}.reverse.join}}' +
+ ( total > 5 ?
+ '' +
+ '…' : '' ) +
+ '
'
+ end,
:type => :groupable
},
diff --git a/public/designs/templates/leftbar/stylesheets/style.css b/public/designs/templates/leftbar/stylesheets/style.css
index 17c460b..de29438 100644
--- a/public/designs/templates/leftbar/stylesheets/style.css
+++ b/public/designs/templates/leftbar/stylesheets/style.css
@@ -45,26 +45,25 @@
width: 489px;
}
-#profile-wall li.profile-activity-item.upload_image span,
-#profile-wall li.profile-activity-item.upload_image span img,
-#profile-wall li.profile-activity-item.upload_image span a,
-#profile-network li.profile-activity-item.upload_image span,
-#profile-network li.profile-activity-item.upload_image span img,
-#profile-network li.profile-activity-item.upload_image span a {
- width: 178px;
- height: 144px;
+li.profile-activity-item.upload_image .upimg {
+ width: 168px;
+ height: 168px;
}
-
-#profile-wall li.profile-activity-item.upload_image .activity-gallery-images-count-1 span,
-#profile-wall li.profile-activity-item.upload_image .activity-gallery-images-count-1 span a img,
-#profile-wall li.profile-activity-item.upload_image .activity-gallery-images-count-1 span a,
-#profile-network li.profile-activity-item.upload_image .activity-gallery-images-count-1 span,
-#profile-network li.profile-activity-item.upload_image .activity-gallery-images-count-1 span a img,
-#profile-network li.profile-activity-item.upload_image .activity-gallery-images-count-1 span a {
- max-width: 540px;
+li.profile-activity-item.upload_image .more,
+li.profile-activity-item.upload_image .upimg.morethen2 {
+ font-size: 46px;
+ width: 77px;
+ height: 77px;
+}
+li.profile-activity-item.upload_image .activity-gallery-images-count-3 .pos3 {
+ /* reduce size only for 4 or more itens */
+ width: 168px;
+ height: 168px;
}
-#profile-wall li.profile-activity-item.upload_image .activity-gallery-images-count-1 span a,
-#profile-network li.profile-activity-item.upload_image .activity-gallery-images-count-1 span a {
- background-image: url(/images/gallery-image-activity-border-big-onecol.png);
+li.profile-activity-item.upload_image .activity-gallery-images-count-4 .pos3 {
+ /* make a line-break on this case */
+ float: none;
+ margin-left: 364px;
}
+
diff --git a/public/designs/templates/rightbar/stylesheets/style.css b/public/designs/templates/rightbar/stylesheets/style.css
index 0b38254..362d077 100644
--- a/public/designs/templates/rightbar/stylesheets/style.css
+++ b/public/designs/templates/rightbar/stylesheets/style.css
@@ -45,21 +45,25 @@
width: 489px;
}
-#profile-wall li.profile-activity-item.upload_image span,
-#profile-wall li.profile-activity-item.upload_image span img,
-#profile-wall li.profile-activity-item.upload_image span a,
-#profile-network li.profile-activity-item.upload_image span,
-#profile-network li.profile-activity-item.upload_image span img,
-#profile-network li.profile-activity-item.upload_image span a {
- width: 178px;
- height: 144px;
+li.profile-activity-item.upload_image .upimg {
+ width: 168px;
+ height: 168px;
+}
+li.profile-activity-item.upload_image .more,
+li.profile-activity-item.upload_image .upimg.morethen2 {
+ font-size: 46px;
+ width: 77px;
+ height: 77px;
+}
+li.profile-activity-item.upload_image .activity-gallery-images-count-3 .pos3 {
+ /* reduce size only for 4 or more itens */
+ width: 168px;
+ height: 168px;
}
-#profile-wall li.profile-activity-item.upload_image .activity-gallery-images-count-1 span,
-#profile-wall li.profile-activity-item.upload_image .activity-gallery-images-count-1 span a img,
-#profile-wall li.profile-activity-item.upload_image .activity-gallery-images-count-1 span a,
-#profile-network li.profile-activity-item.upload_image .activity-gallery-images-count-1 span,
-#profile-network li.profile-activity-item.upload_image .activity-gallery-images-count-1 span a img,
-#profile-network li.profile-activity-item.upload_image .activity-gallery-images-count-1 span a {
- max-width: 540px;
+li.profile-activity-item.upload_image .activity-gallery-images-count-4 .pos3 {
+ /* make a line-break on this case */
+ float: none;
+ margin-left: 364px;
}
+
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index 3c4192f..85bf012 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -4702,16 +4702,13 @@ h1#agenda-title {
}
#profile-activity li, #profile-network li, #profile-wall li {
display: block;
- padding: 3px;
+ padding: 3px 0px;
margin-bottom: 3px;
background-color: #fff;
border-bottom: 1px solid #e8e8e8;
position: relative;
}
-#profile-activity li, #profile-network li, #profile-wall li {
-}
-
.profile-activity-lead img {
width: 124px;
float: left;
@@ -4775,75 +4772,79 @@ h1#agenda-title {
color: #000;
}
-#profile-wall li.profile-activity-item.upload_image span,
-#profile-wall li.profile-activity-item.upload_image span a,
-#profile-network li.profile-activity-item.upload_image span,
-#profile-network li.profile-activity-item.upload_image span a {
- width: 110px;
- height: 100px;
+li.profile-activity-item.upload_image .more,
+li.profile-activity-item.upload_image .upimg {
display: block;
- overflow: hidden;
- position: absolute;
+ float: left;
+ width: 114px;
+ height: 114px;
+ background-size: cover;
+ -o-background-size: cover;
+ -moz-background-size: cover;
+ -webkit-background-size: cover;
+ background-position: 50% 50%;
+ border: 4px solid #D2D2D2;
+ border-radius: 4px;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ margin: 3px 6px 3px 0px;
}
-#profile-wall li.profile-activity-item.upload_image span a img,
-#profile-network li.profile-activity-item.upload_image span a img {
- width: 110px;
- height: 100px;
+#wrap-1 li.profile-activity-item.upload_image .upimg:hover {
+ text-decoration: none;
}
-#profile-wall li.profile-activity-item.upload_image .activity-gallery-images-count-1 span,
-#profile-wall li.profile-activity-item.upload_image .activity-gallery-images-count-1 span a,
-#profile-wall li.profile-activity-item.upload_image .activity-gallery-images-count-1 span a img,
-#profile-network li.profile-activity-item.upload_image .activity-gallery-images-count-1 span,
-#profile-network li.profile-activity-item.upload_image .activity-gallery-images-count-1 span a,
-#profile-network li.profile-activity-item.upload_image .activity-gallery-images-count-1 span a img {
- width: auto;
- max-width: 383px;
- height: auto;
+li.profile-activity-item.upload_image .more,
+li.profile-activity-item.upload_image .upimg.morethen2 {
+ width: 50px;
+ height: 50px;
+}
+li.profile-activity-item.upload_image .activity-gallery-images-count-3 .pos3 {
+ /* reduce size only for 4 or more itens */
+ width: 114px;
+ height: 114px;
}
-#profile-wall li.profile-activity-item.upload_image span img,
-#profile-network li.profile-activity-item.upload_image span img {
- display: block;
+li.profile-activity-item.upload_image .activity-gallery-images-count-4 .pos3 {
+ /* make a line-break on this case */
+ float: none;
+ margin-left: 256px;
}
-#profile-wall li.profile-activity-item.upload_image span,
-#profile-network li.profile-activity-item.upload_image span {
- position: relative;
- display: inline-block;
- margin: 5px 0px 0px 5px;
+li.profile-activity-item.upload_image .more {
+ text-align: center;
+ font-weight: bold;
+ font-size: 28px;
+ color: #DDD;
+ background: #888;
+ cursor: pointer;
+}
+li.profile-activity-item.upload_image .more:hover {
+ color: #EEE;
+ background: #999;
}
-#profile-wall li.profile-activity-item.upload_image .profile-activity-text span,
-#profile-network li.profile-activity-item.upload_image .profile-activity-text span {
- border: 4px solid #D2D2D2;
- border-radius: 4px;
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
+li.profile-activity-item.upload_image .morethen5 {
+ display: none;
}
-#profile-wall li.profile-activity-item.upload_image span a,
-#profile-network li.profile-activity-item.upload_image span a {
- text-indent: -5000em;
+li.profile-activity-item.upload_image .show-all .morethen5 {
+ display: block;
}
-#profile-wall li.profile-activity-item.upload_image .activity-gallery-images-count-1 span a,
-#profile-network li.profile-activity-item.upload_image .activity-gallery-images-count-1 span a {
- position: relative;
+li.profile-activity-item.upload_image .show-all .more {
+ display: none;
}
-#profile-wall li.profile-activity-item.upload_image .article-comment span,
-#profile-wall li.profile-activity-item.upload_image .profile-wall-actions span,
-#profile-network li.profile-activity-item.upload_image .article-comment span,
-#profile-network li.profile-activity-item.upload_image .profile-wall-actions span {
- display: inline;
- position: static;
- margin: 0;
+li.profile-activity-item.upload_image .activity-gallery-images-count-1 .upimg,
+li.profile-activity-item.upload_image .activity-gallery-images-count-1 img {
+ /* Only ".activity-gallery-images-count-1" has a "img" inside */
float: none;
+ display: inline-block;
width: auto;
+ max-width: 100%;
height: auto;
- font-weight: normal;
+ max-height: 300px;
}
#profile-wall li.profile-activity-item ul.profile-wall-activities-comments,
--
libgit2 0.21.2