mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-22 07:04:09 +01:00
Added message to contexts page when no contexts exist. Fixes #476.
Also tweaked a couple of selenium login tests to make them work properly if run alone. git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@488 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
parent
704d39add1
commit
8e719d9e9a
8 changed files with 17 additions and 4 deletions
|
|
@ -11,7 +11,7 @@ class ContextsController < ApplicationController
|
|||
|
||||
def index
|
||||
respond_to do |format|
|
||||
format.html { @page_title = "TRACKS::List Contexts"; render }
|
||||
format.html &render_contexts_html
|
||||
format.xml { render :xml => @contexts.to_xml( :except => :user_id ) }
|
||||
format.rss &render_contexts_rss_feed
|
||||
format.atom &render_contexts_atom_feed
|
||||
|
|
@ -98,6 +98,14 @@ class ContextsController < ApplicationController
|
|||
|
||||
protected
|
||||
|
||||
def render_contexts_html
|
||||
lambda do
|
||||
@page_title = "TRACKS::List Contexts"
|
||||
@no_contexts = @contexts.empty?
|
||||
render
|
||||
end
|
||||
end
|
||||
|
||||
def render_contexts_rss_feed
|
||||
lambda do
|
||||
render_rss_feed_for @contexts, :feed => Context.feed_options(@user),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue