Nja das mijn stage niet eh :/

This commit is contained in:
Arthur Vercruysse 2020-09-10 13:27:02 +02:00
parent 4eb4dcec3a
commit c8ed80bdab
4 changed files with 3 additions and 8 deletions

View file

@ -4,7 +4,7 @@
</div>
<div class="link__content">
<h3 class="link__title">
<%= item[:titel] %>
<%= item[:titel] || item[:naam] %>
</h3>
<p class="link__text">
<%= text_segment(item.compiled_content) %>

View file

@ -12,8 +12,7 @@
<h1> Konventen en projecten </h1>
<ul>
<% for item in konventen_and_projecten %>
<%= image_tag item %>
<li> <%= link_to(item[:naam], item) %> </li>
<%= render '/partials/pretty_link.*', :item => item %>
<% end %>
</ul>
</div>

View file

@ -29,7 +29,7 @@ module SearchHelper
def partial_verenigingen
@items.find_all("**/verenigingen/*").map do |x|
{
titel: x[:titel],
titel: x[:titel] || x[:naam],
url: x.path,
konvent: x[:konvent],
abbrev: abbreviation(x),

View file

@ -1,8 +1,4 @@
module UtilHelper
# def truncate(string, max=30)
# string.length > max ? "#{string[0...max]}..." : string
# end
def truncate(string, max=20, delim=" ")
parts = string.split(delim)
parts.length > max ?