Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

66 lines (63 sloc) 2.509 kB
<%#
View arguments:
- saved_search: a SavedSearch object.
- token: a stringified PagingToken given by the client
- direction: "before" or "after"
- page_number: the page number we should display for this page. This doesn't need to be strictly accurate;
it's a best guess. It's managed by the client for continuity of user experience.
%>
<%
min_commit_date = Time.now - 60 * 60 * 24 * current_user.saved_search_time_period
commits, tokens = saved_search.commits(token, direction, min_commit_date)
from = tokens[:from]
to = tokens[:to]
%>
<div class="savedSearch" from-token="<%= from %>" to-token="<%= to %>"
saved-search-id="<%= saved_search.id %>">
<div class="header">
<div class="dragHandle"></div>
<a href="#" class="delete">x</a>
<div class="searchOptions">
<a href="#" class="searchOptionsLink">Search options</a>
<!-- This container is needed because the search options menu slides down from it. It has
overflow set to "none". -->
<div class="searchOptionsMenuContainer">
<div class="searchOptionsMenu" style="display:none">
<ul>
<li>
<label>
<input type="checkbox" name="show_unapproved_commits" class="emailCheckbox"
<%= "checked" if saved_search.unapproved_only %>/>Only show unapproved
</label>
</li>
<li>
<label><input type="checkbox" name="email_comments"
<%= "checked" if saved_search.email_comments %> />Email me comments
</label>
</li>
<li>
<label><input type="checkbox" name="email_commits"
<%= "checked" if saved_search.email_commits %> />Email me new commits
</label>
</li>
</ul>
</div>
</div>
</div>
<div class="name"><%= CGI.escapeHTML(saved_search.title) %></div>
</div>
<% if commits.empty? %>
<div class="noResults">No search results.</div>
<% else %>
<table class="commitsList">
<% commits.each do |commit| %>
<%= erb :_commit_line, :layout => false, :locals => { :commit => commit } %>
<% end %>
</table>
<% end %>
<div class="pageControls" style="<%= commits.empty? ? "display:none" : "" %>">
<a href="#" class="pageLeftButton pageButton">&laquo;</a>
<span class="pageNumber"><%= page_number %></span>
<a href="#" class="pageRightButton pageButton">&raquo;</a>
</div>
</div>
Jump to Line
Something went wrong with that request. Please try again.