app/views/georgia/messages/search.html.erb in georgia_mailer-0.1.3 vs app/views/georgia/messages/search.html.erb in georgia_mailer-0.8.0

- old
+ new

@@ -20,44 +20,62 @@ </div> </header> <section class="body-main"> - <table class="table table-hover table-results messages js-checkboxable"> - <thead> - <th colspan='3'> - <div class="btn-group"> - <div class="btn btn-default dropdown-toggle" data-toggle="dropdown"> - <%= checkboxable_all_tag :messages %> - <span class="caret"></span> - </div> - <ul class="dropdown-menu" role="menu"> - <li><%= link_to 'All', '#', class: 'js-select-all' %></li> - <li><%= link_to 'None', '#', class: 'js-select-none' %></li> - <li><%= link_to 'Spam', '#', class: 'js-select-spam' %></li> - </ul> - </div> - <%= link_to "#{icon_tag('thumbs-up')} ham".html_safe, '#', class: 'btn btn-default btn-xs js-ham disabled' %> - <%= link_to "#{icon_tag('thumbs-down')} spam".html_safe, '#', class: 'btn btn-default btn-xs js-spam disabled' %> - <%= link_to "#{icon_tag('trash-o')} trash".html_safe, '#', class: 'btn btn-default btn-xs js-delete disabled' %> - <%#= link_to '#', class: 'btn btn-warning' do %> - <%#= icon_tag('tags') %> <%#= icon_tag('caret-down') %> - <%# end -%> - </th> - <th colspan='3'> - <%= pagination_tag(@search) %> - </th> - </thead> - <tbody> - <% if @messages and @messages.any? %> - <%= render @messages %> - <% else %> - <tr> - <td colspan="6"> - There are currently no messages. - </td> - </tr> - <% end %> - </tbody> - </table> + <div class="row"> + <div class="col-md-1"> + <div class="inbox-categories"> + <%= link_to 'Inbox', search_messages_path, class: "inbox-category-link#{' active' unless params[:spam].present?}" %> + <%= link_to 'Spam', search_messages_path(spam: 1), class: "inbox-category-link#{' active' if params[:spam] == '1'}" %> + <%= link_to 'All', search_messages_path(spam: 0), class: "inbox-category-link#{' active' if params[:spam] == '0'}" %> + </div> + </div> + <div class="col-md-11"> + <table class="table table-hover table-results messages js-checkboxable"> + <thead> + <tr> + <th class='status'></th> + <th class='checkbox-cell'> + <%= checkboxable_all_tag :messages %> + </th> + <th class='actions'> + <% if params[:spam] == '1' %> + <%= link_to "#{icon_tag('thumbs-up')} Move to Inbox".html_safe, '#', class: 'btn btn-default btn-xs js-ham disabled' %> + <% else %> + <%= link_to "#{icon_tag('thumbs-down')} Report spam".html_safe, '#', class: 'btn btn-default btn-xs js-spam disabled' %> + <% end %> + <%= link_to "#{icon_tag('trash-o')} Delete".html_safe, '#', class: 'btn btn-default btn-xs js-delete disabled' %> + </th> + <th colspan='3'> + <%= pagination_tag(@search) %> + </th> + </tr> + <% if params[:spam] == '1' and @messages and @messages.any? %> + <tr class='active'> + <th colspan='7' class='messages-destroy-spam'> + <%= link_to 'delete all spam messages now', destroy_all_spam_messages_path %> + </th> + </tr> + <% end %> + </thead> + <tbody> + <% if @messages and @messages.any? %> + <%= render @messages %> + <% else %> + <tr> + <td colspan="7"> + <%# FIXME: Should work with I18n %> + <% if params[:spam] == '1' %> + Hooray, no spam here! + <% else %> + Your inbox is empty. + <% end %> + </td> + </tr> + <% end %> + </tbody> + </table> + </div> + </div> </section> \ No newline at end of file