Skip to content

Instantly share code, notes, and snippets.

@batasrki
Created July 25, 2008 15:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save batasrki/2462 to your computer and use it in GitHub Desktop.
Save batasrki/2462 to your computer and use it in GitHub Desktop.
#@me variable is like current_user
<% alert_list = Alert.list(@me, 5) %>
<!-- Alerts -->
<div id="alerts" class="module">
<div class="module_head">
<h3 class="module_name">Alerts and Notifications</h3>
<ul class="module_options cx">
<li><%= link_to(_('View All'), :controller => 'alert', :action => 'list') if not alert_list.empty? %></li>
<li><%= link_to(_('Preferences'), :controller => 'user', :action => 'settings', :anchor => 'alerts') %></li>
</ul>
</div>
<div class="module_content">
<% if alert_list.empty? %><strong>No alerts at this time</strong><% end %>
<% alert_list.each do |a| %>
<%= render :partial => '/alert/row', :locals => {:alert => a, :user => @me} %>
<% end %>
<% unless alert_list.empty? %>
<img src="/images/alert_legend.png" />
<% end %>
</div>
</div>
<!-- End Alerts -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment