Commit 81e340ff10040ca0a0d0f996de7bc5da3b1a7373
Committed by
Macartur Sousa
1 parent
4ef36561
Exists in
elasticsearch_api
Adds style for communities partial.
Signed-off-by: DylanGuedes <djmgguedes@gmail.com> Signed-off-by: Macartur Sousa <marcartur.sc@gmail.com>
Showing
3 changed files
with
21 additions
and
6 deletions
Show diff stats
plugins/elasticsearch/public/style.css
@@ -37,3 +37,15 @@ | @@ -37,3 +37,15 @@ | ||
37 | text-decoration: none; | 37 | text-decoration: none; |
38 | color: black; | 38 | color: black; |
39 | } | 39 | } |
40 | + | ||
41 | +.controller-elasticsearch_plugin .community-header .model-label { | ||
42 | + background: #ddd; | ||
43 | + color: black; | ||
44 | + font-weight: 900; | ||
45 | + padding: 3px; | ||
46 | +} | ||
47 | + | ||
48 | +.controller-elasticsearch_plugin .search-item { | ||
49 | + margin-bottom: 25px; | ||
50 | + margin-top: 25px; | ||
51 | +} |
plugins/elasticsearch/views/elasticsearch_plugin/_community_display.html.erb
1 | -<div class="community-model"> | ||
2 | - <h3><%= community.name %></h3> | ||
3 | - <div class="description"> | ||
4 | - SAMPLE DESCRIPTION | ||
5 | - </div> | 1 | +<div class="community-header"> |
2 | + <%= community.created_at.strftime("%d %B %Y at %H:%M") %> - Eduardo Santos <span class="model-label">COMUNIDADE</span> | ||
3 | +</div> | ||
4 | +<div class="body"> | ||
5 | + <h2><%= community.name %></h2> | ||
6 | + <p><%= community.description %></p> | ||
6 | </div> | 7 | </div> |
plugins/elasticsearch/views/elasticsearch_plugin/search.html.erb
@@ -34,7 +34,9 @@ | @@ -34,7 +34,9 @@ | ||
34 | <% next if klass.to_s.include? "all" %> | 34 | <% next if klass.to_s.include? "all" %> |
35 | 35 | ||
36 | <% if result.is_a? klass.to_s.classify.constantize %> | 36 | <% if result.is_a? klass.to_s.classify.constantize %> |
37 | - <%= render partial: "#{klass}_display", :locals => { klass => result} %> | 37 | + <div class="search-item"> |
38 | + <%= render partial: "#{klass}_display", :locals => { klass => result} %> | ||
39 | + </div> | ||
38 | <% break %> | 40 | <% break %> |
39 | <% end %> | 41 | <% end %> |
40 | 42 |