Commit 8ee0f3777b85fce49bb5fc754bea2fd93e424896

Authored by Evandro Junior
1 parent 88802f58

Added author info and improved title display

plugins/video/public/style.css
@@ -2,14 +2,15 @@ @@ -2,14 +2,15 @@
2 position: relative; 2 position: relative;
3 display: inline-block; 3 display: inline-block;
4 width: 95px; 4 width: 95px;
5 - height: 85px; 5 + height: 115px;
6 margin: 1em; 6 margin: 1em;
7 border: solid #F0F0F0 1px; 7 border: solid #F0F0F0 1px;
8 vertical-align: top; 8 vertical-align: top;
9 - text-align: center; 9 + text-align: left;
10 overflow: hidden; 10 overflow: hidden;
11 padding-top: 7px; 11 padding-top: 7px;
12 margin-botton: 10px; 12 margin-botton: 10px;
  13 + text-overflow: ellipsis;
13 } 14 }
14 15
15 .video-gallery-top-box{ 16 .video-gallery-top-box{
@@ -23,3 +24,15 @@ @@ -23,3 +24,15 @@
23 font-size: 1em; 24 font-size: 1em;
24 text-color: white; 25 text-color: white;
25 } 26 }
  27 +
  28 +.video-title{
  29 + width: 100%;
  30 + overflow: hidden;
  31 + text-overflow: ellipsis;
  32 +}
  33 +
  34 +.video-author{
  35 + display: none;
  36 + overflow: hidden;
  37 + text-overflow: ellipsis;
  38 +}
plugins/video/views/shared/video_list.html.erb
1 <div> 1 <div>
2 <% contents.each do |content| %> 2 <% contents.each do |content| %>
3 - <%#= py content %>  
4 <% if content.display_to?(user) %> 3 <% if content.display_to?(user) %>
5 <div class="video-gallery-thumbnail"> 4 <div class="video-gallery-thumbnail">
6 <div class="video-gallery-top-box"> 5 <div class="video-gallery-top-box">
@@ -9,7 +8,10 @@ @@ -9,7 +8,10 @@
9 <% end %> 8 <% end %>
10 </div> 9 </div>
11 <div class="video-gallery-botton-box"> 10 <div class="video-gallery-botton-box">
12 - <font size="1em"><%= content.title %></font> 11 + <div class="video-author">
  12 + <%= _("by") %> <%= content.author_name %> <%= _("updated at") %> <%= time_ago_as_sentence(content.updated_at) %>
  13 + </div>
  14 + <div class="video-title"><%= content.title %></div>
13 </div> 15 </div>
14 </div> 16 </div>
15 <% end %> 17 <% end %>