tracks/tracks/app/views/context/list.rhtml
bsag 74224084e6 Added the ability to change your own password (linked from user/preferences). This updates 'word' at the same time to a new value.
Tidied some of the CSS for the user and login pages.

Tidied the flash display so that it dynamically shows either the notice, warning or message flash as appropriate.

Note that the login tests are broken for now.


git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@190 a4c988fc-2ded-0310-b66e-134b36920a42
2006-02-19 15:18:46 +00:00

48 lines
No EOL
1.9 KiB
Text

<div id="full_width_display">
<% for name in ["notice", "warning", "message"] %>
<% if flash[name] %>
<%= "<div id=\"#{name}\">#{flash[name]}</div>" %>
<% end %>
<% end %>
<div id="list-contexts">
<% for context in @contexts %>
<%= render_partial( 'context_listing', context ) %>
<% end %>
</div>
<% sortable_options = {
:tag => 'div',
:handle => 'handle',
:complete => visual_effect(:highlight, 'list-contexts'),
:url => {:controller => 'context', :action => 'order'}
}%>
<%= sortable_element 'list-contexts', sortable_options %>
<br />
<a href="javascript:void(0)" onClick="Element.toggle('context_new'); Form.focusFirstElement('context-form');" accesskey="n" title="Create a new context">Create new context &#187;</a>
<div id="context_new" class="context_new" style="display:none">
<!--[form:context]-->
<%= form_remote_tag :url => { :action => "new_context" },
:update=> "list-contexts",
:position=> "bottom",
:loading => "Form.reset('context-form')",
:complete => "Sortable.create('list-contexts', #{options_for_javascript(sortable_options)});Form.focusFirstElement('context-form');",
:html=> { :id=>'context-form', :name=>'context', :class => 'inline-form' } %>
<%= hidden_field( "context", "id" ) %>
<label for="context_name">Context name</label>
<%= text_field( "context", "name" ) %>
<label for="new_context_on_front">Hide from front page?</label>
<%= check_box( "context", "hide" ) %>
<input type="submit" value="Add" />
<%= end_form_tag %>
<!--[eoform:context]-->
</div>
<% if @flash["confirmation"] %>
<div class="confirmation"><%= @flash["confirmation"] %></div>
<% end %>
<% if @flash["warning"] %>
<div class="warning"><%= @flash["warning"] %></div>
<% end %>
</div><!-- End of display_box -->