Skip to content

Commit

Permalink
[webui] Coolo wants old-school result titles, fixes #200
Browse files Browse the repository at this point in the history
  • Loading branch information
hennevogel authored and adrianschroeter committed Feb 19, 2013
1 parent ad94748 commit d400142
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/webui/app/views/search/_results.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@
<% if result[:type] == 'project' %>
<div class="search_result">
<% if result[:data].has_element?( 'title' ) and !result[:data].to_hash['title'].empty? %>
<% linkname = result[:data].to_hash['title'] %>
<% title = result[:data].to_hash['title'] %>
<% else %>
<% linkname = result[:data].to_hash['name'] %>
<% title = "" %>
<% end %>
<h6>
<%= image_tag('project.png', class: 'project') %>
<%= link_to linkname, { :controller => 'project', :action => :show, :project => result[:data],}, :title => result[:data].to_hash['name'], class: "data-title"-%>
<%= link_to result[:data].to_hash['name'], { :controller => 'project', :action => :show, :project => result[:data],}, :title => title, class: "data-title"-%>
<span class="data-name"><%= result[:data].to_hash['name'] %></span>
</h6>
<% elsif result[:type] == 'package' %>
<div class="search_result">
<% if result[:data].has_element?( 'title' ) and !result[:data].to_hash['title'].empty? %>
<% linkname = result[:data].to_hash['title'] -%>
<% title = result[:data].to_hash['title'] -%>
<% else %>
<% linkname = result[:data].to_hash['name'] -%>
<% title = "" -%>
<% end %>
<h6>
<%= image_tag('package.png', class: 'package') %>
<%= link_to linkname, { :controller => 'package', :action => :show, :package => result[:data].name, :project => result[:data].project }, :title => result[:data].to_hash['name'], class: 'data-title'-%>
<%= link_to result[:data].to_hash['name'], { :controller => 'package', :action => :show, :package => result[:data].name, :project => result[:data].project }, :title => title, class: 'data-title'-%>
</h6>
<p>
in project <span class="data-project"><%= result[:data].project %></span>
Expand Down

0 comments on commit d400142

Please sign in to comment.