Commit 05a2153aaf31daf3bc47e14f2fa8d7046782078f

Authored by Dylan Guedes
Committed by Macartur Sousa
1 parent 5d4872d8
Exists in elasticsearch_sort

Adds person partial style

plugins/elasticsearch/controllers/elasticsearch_plugin_controller.rb
@@ -26,8 +26,8 @@ class ElasticsearchPluginController < ApplicationController @@ -26,8 +26,8 @@ class ElasticsearchPluginController < ApplicationController
26 @results = [] 26 @results = []
27 27
28 # results 'article' 28 # results 'article'
29 -# results 'people'  
30 - results "community" 29 + results 'people'
  30 + # results "community"
31 end 31 end
32 32
33 def selected_type params 33 def selected_type params
plugins/elasticsearch/public/style.css
@@ -38,6 +38,7 @@ @@ -38,6 +38,7 @@
38 color: black; 38 color: black;
39 } 39 }
40 40
  41 +.controller-elasticsearch_plugin .search-item .right-side .model-label,
41 .controller-elasticsearch_plugin .community-header .model-label { 42 .controller-elasticsearch_plugin .community-header .model-label {
42 background: #ddd; 43 background: #ddd;
43 color: black; 44 color: black;
@@ -48,4 +49,14 @@ @@ -48,4 +49,14 @@
48 .controller-elasticsearch_plugin .search-item { 49 .controller-elasticsearch_plugin .search-item {
49 margin-bottom: 25px; 50 margin-bottom: 25px;
50 margin-top: 25px; 51 margin-top: 25px;
  52 + display: flex;
  53 +}
  54 +
  55 +.controller-elasticsearch_plugin .right-side {
  56 + flex: 2;
  57 +}
  58 +
  59 +.controller-elasticsearch_plugin .left-side {
  60 + margin-left: 25px;
  61 + width: 100px;
51 } 62 }
plugins/elasticsearch/views/elasticsearch_plugin/_person_display.html.erb
1 -<div class="person-model">  
2 - <h3> PERSON </h3>  
3 - <p>  
4 - <%= person.created_at %> <%= person.class %>  
5 - </p>  
6 - <span>  
7 - Name: <%= person.name %>  
8 - </span>  
9 - 1 +<div class="left-side">
  2 + <%= profile_image person %>
  3 +</div>
  4 +<div class="right-side">
  5 + <%= person.created_at.strftime("%d %B %Y at %H:%M") %> - <%= person.name %> <span class="model-label"><%= _("PERSON") %></span>
  6 + <div class="body">
  7 + <h2><%= person.name %></h2>
  8 + <p><%= person.description %></p>
  9 + </div>
10 </div> 10 </div>
11 11