Sha256: 6ed7fc38a3206572a4c6eab48e93404539e52a09fd29f796736e8002c3e8c79f
Contents?: true
Size: 1.32 KB
Versions: 13
Compression:
Stored size: 1.32 KB
Contents
<% cache({:locale => Language.locale_id, :format => 'pjs', :details => @details, :grain_size => @grain_size, :q => @search, :omit_feeds => @omit_feeds, :page => @page, :per_page => @per_page}) do %> <% if !@results.blank? %> function truncate(text, length) { nEnd = text.indexOf(" ", 200); if (nEnd < 200) return text; else return text.substring(0, nEnd) + " ..."; } var recs = <%= @results.to_json %>; var app = "<%= request.protocol + request.host_with_port + '/' %>"; document.write('<div class="oer_recommender_container">'); document.write('<div class="oer_recommender_list">'); for(nRec = 0; nRec < recs.length; nRec++) { r = recs[nRec].entry; if (r == null) r = recs[nRec].attributes; if (r == null) r = recs[nRec]; document.write('<p class="oer_recommender_item">'); document.write('<a class="oer_recommender_recommendation_link" href="' + app + 'visits/' + r.id + '">' + r.title + ' (' + r.collection + ')</a>'); <% if @details == 'true' %> if (r.description) document.write('<br/><span class="oer_recommender_description">' + truncate(r.description) + '</span>'); document.write('<br/><span class="oer_recommender_uri">' + r.permalink + '</span>'); document.write('</p>'); <% end %> } document.write('</div>'); document.write('</div>'); <% end %> <% end %>
Version data entries
13 entries across 13 versions & 1 rubygems