diff --git a/plugins/elasticsearch/helpers/elasticsearch_helper.rb b/plugins/elasticsearch/helpers/elasticsearch_helper.rb index f1bd842..05168f7 100644 --- a/plugins/elasticsearch/helpers/elasticsearch_helper.rb +++ b/plugins/elasticsearch/helpers/elasticsearch_helper.rb @@ -2,10 +2,12 @@ module ElasticsearchHelper def self.searchable_types { - :all => { label: _("All Results")}, - :community => { label: _("Communities")}, - :event => { label: _("Events")}, - :person => { label: _("People")} + :all => { label: _("All Results")}, + :text_article => { label: _("Articles")}, + :uploaded_file => { label: _("Files")}, + :community => { label: _("Communities")}, + :event => { label: _("Events")}, + :person => { label: _("People")} } end diff --git a/plugins/elasticsearch/views/elasticsearch_plugin/_text_article_display.html.erb b/plugins/elasticsearch/views/elasticsearch_plugin/_text_article_display.html.erb new file mode 100644 index 0000000..23fa3b7 --- /dev/null +++ b/plugins/elasticsearch/views/elasticsearch_plugin/_text_article_display.html.erb @@ -0,0 +1,7 @@ +
+ <%= text_article.created_at.strftime("%d %B %Y at %H:%M") %> - <%= text_article.setting[:author_name] %> - <%= _("Community") %> +
+
+

<%= link_to text_article.name, text_article.url %>

+

<%= _("Abstract") %>:<%= text_article.abstract %>

+
diff --git a/plugins/elasticsearch/views/elasticsearch_plugin/_uploaded_file_display.html.erb b/plugins/elasticsearch/views/elasticsearch_plugin/_uploaded_file_display.html.erb new file mode 100644 index 0000000..ea546f2 --- /dev/null +++ b/plugins/elasticsearch/views/elasticsearch_plugin/_uploaded_file_display.html.erb @@ -0,0 +1,7 @@ +
+ <%= uploaded_file.created_at.strftime("%d %B %Y at %H:%M") %> - <%=uploaded_file.setting[:author_name]%> - <%= _("Files") %> +
+
+

<%= link_to uploaded_file.name, uploaded_file.url %>

+

<%= _("Type of file")%> : <%= uploaded_file.content_type %>

+
-- libgit2 0.21.2