Sha256: 0646fc09e5be45bed384158c696d5a811218e4862bd2cac91641dc50bd5e5c64

Contents?: true

Size: 830 Bytes

Versions: 3

Compression:

Stored size: 830 Bytes

Contents

<h3 class="boxTitle"><%= _('Visitors') %></h3>

<%visitors = Person.find :all,
  :select => 'people.id, people.name, MAX(updated_on) AS updated_on, MAX(filter) AS filter',
  :joins => "JOIN visits ON people.id = visits.person_id \
    JOIN elts elts ON visits.elt_id = elts.id
      AND ((#{@elt.lft} <= elts.lft AND elts.rgt <= #{@elt.rgt}) \
        OR (elts.lft < #{@elt.lft} AND #{@elt.rgt} < elts.rgt))",
  :group => [ 'people.id, ', 'people.name' ],
  :order => 'MAX(visits.updated_on) DESC' %>

<% visitors.each do |visitor| %>
  <span class="person">
    <span class="author" title="<%= visitor.updated_on %>">
      <%= link_to visitor.name, :controller => 'person', :action => 'show', :id => visitor.id %>
    </span>
    <span class="filter"><%= "(#{ visitor.filter })" if visitor.filter %></span>
  </span>
<% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
parlement-0.14 app/views/elt/list/_visitors.rhtml
parlement-0.13 app/views/elt/_listVisitors.rhtml
parlement-0.17 app/views/elt/list/_visitors.rhtml