update to newest merb_helpers
parent
35e7270977
commit
63313f84b6
|
@ -1,11 +1,11 @@
|
|||
<fieldset>
|
||||
<legend>Album Details</legend>
|
||||
<p>
|
||||
<%= text_control :name, :label => 'Name: ' %>
|
||||
<%= text_field :name, :label => 'Name: ' %>
|
||||
</p>
|
||||
<h3>Tags</h3>
|
||||
<p>
|
||||
<p><a href="#" onclick="$('album[tag_names]').value = ''; return false;"><img src="/images/edit-clear.png" style="vertical-align: top;" /></a> <%= text_control 'tag_names', :size => 30 -%></p>
|
||||
<p><a href="#" onclick="$('album[tag_names]').value = ''; return false;"><img src="/images/edit-clear.png" style="vertical-align: top;" /></a> <%= text_field :tag_names, :size => 30 -%></p>
|
||||
<div id="tag_auto_complete" class="auto_complete"></div>
|
||||
</p>
|
||||
</fieldset>
|
||||
|
|
|
@ -7,6 +7,6 @@
|
|||
<% form_for :album, :action => url(:album, :id => @album.name.gsub(/ /, '_')) do %>
|
||||
<%= partial :album_form %>
|
||||
<p>
|
||||
<%= submit_button 'Update' %>
|
||||
<%= submit 'Update' %>
|
||||
</p>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<%= error_messages_for :album %>
|
||||
|
||||
<% form_for :album, :action => url(:album) do %>
|
||||
<%= form_for :album, :action => url(:album) do %>
|
||||
<%= partial :album_form %>
|
||||
<p>
|
||||
<%= submit_button 'Create' %>
|
||||
<%= submit 'Create' %>
|
||||
</p>
|
||||
<% end -%>
|
||||
<% end =%>
|
||||
|
|
|
@ -1,18 +1,20 @@
|
|||
<fieldset>
|
||||
<legend>Create an author</legend>
|
||||
<p>
|
||||
<%= text_control :name, :label => 'Name: ' %>
|
||||
<%= text_field :name, :label => 'Name: ' %>
|
||||
</p>
|
||||
<% if @author.new_record? -%>
|
||||
<p>
|
||||
Invitation Code: <strong><em><%= (params[:invitation_code].to_s.empty? ? 'None! This will not work!' : params[:invitation_code]) -%><%= hidden_field :name => 'invitation_code', :value => params[:invitation_code] -%></em></strong>
|
||||
</p>
|
||||
<% end -%>
|
||||
<p>
|
||||
<%= text_control :url, :label => 'Home URL: ' %>
|
||||
<%= text_field :url, :label => 'Home URL: ' %>
|
||||
</p>
|
||||
<p>
|
||||
<%= password_control :password, :label => 'Password: ', :size => 40 %>
|
||||
<%= password_field :password, :label => 'Password: ', :size => 40 %>
|
||||
</p>
|
||||
<p>
|
||||
<%= password_control :password_confirmation, :label => 'Password (Confirm): ', :size => 40 %>
|
||||
<%= password_field :password_confirmation, :label => 'Password (Confirm): ', :size => 40 %>
|
||||
</p>
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<%= error_messages_for :author %>
|
||||
|
||||
<% form_for :author, :action => url(:author, :id => @author.name) do -%>
|
||||
<%= form_for :author, :action => url(:author, :id => @author.name) do -%>
|
||||
<%= partial :author_form %>
|
||||
<p>
|
||||
<%= submit_button 'Update' %>
|
||||
<%= submit 'Update' %>
|
||||
</p>
|
||||
<% end -%>
|
||||
<% end =%>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<%= error_messages_for :author %>
|
||||
|
||||
<% form_for :author, :action => url(:author) do %>
|
||||
<%= form_for :author, :action => url(:author) do %>
|
||||
<%= partial :author_form %>
|
||||
<p>
|
||||
<%= submit_button 'Create' %>
|
||||
<%= submit 'Create' %>
|
||||
</p>
|
||||
<% end -%>
|
||||
<% end =%>
|
||||
|
|
|
@ -7,16 +7,16 @@
|
|||
</p>
|
||||
<% else -%>
|
||||
<p>
|
||||
<%= text_control :user, :label => 'Name: ', :size => 32 %>
|
||||
<%= text_field :user, :label => 'Name: ', :size => 32 %>
|
||||
</p>
|
||||
<% end -%>
|
||||
|
||||
<p>
|
||||
<%= text_control :url, :label => 'URL: ', :size => 60, :max_size => 256 %>
|
||||
<%= text_field :url, :label => 'URL: ', :size => 60, :max_size => 256 %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= text_area_control :comment, :label => 'Comment: ', :rows => 8, :cols => 60 %>
|
||||
<%= text_area :comment, :label => 'Comment: ', :rows => 8, :cols => 60 %>
|
||||
</p>
|
||||
<% unless logged_in? -%>
|
||||
<p>
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
<%= error_messages_for :comment %>
|
||||
|
||||
<% form_for :comment, :action => url(:comments) do %>
|
||||
<%= form_for :comment, :action => url(:comments) do %>
|
||||
<%= partial :comment_form %>
|
||||
<p>
|
||||
<%= submit_button 'Create' %>
|
||||
<%= submit 'Create' %>
|
||||
</p>
|
||||
<% end -%>
|
||||
<% end =%>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<% form_for :invitation, :action => url(:invitation) do -%>
|
||||
<%= form_for :invitation, :action => url(:invitation) do -%>
|
||||
<fieldset>
|
||||
<legend>Invite A Drinker</legend>
|
||||
<p>
|
||||
<%= text_control 'recipient', :label => 'Recipient: ' %>
|
||||
<%= text_field 'recipient', :label => 'Recipient: ' %>
|
||||
</p>
|
||||
</fieldset>
|
||||
<p>
|
||||
<%= submit_button 'Send' %>
|
||||
<%= submit 'Send' %>
|
||||
</p>
|
||||
<% end -%>
|
||||
<% end =%>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<%= error_messages_for :page %>
|
||||
|
||||
<% form_for :page, :action => url(:page, :id => @page.name.gsub(/ /, '_')) do -%>
|
||||
<%= form_for :page, :action => url(:page, :id => @page.name.gsub(/ /, '_')) do -%>
|
||||
<fieldset>
|
||||
<legend>Update a page</legend>
|
||||
|
||||
|
@ -10,23 +10,23 @@
|
|||
<h3>Original Author</h3>
|
||||
<p><img src="/images/emblem-readonly.png" alt="Read Only" /> <span style="vertical-align: top"><%= (@page.author.name) %></span></p>
|
||||
|
||||
<p><%= checkbox_control :published, :label => ' Published in blog?', :value => "1" %></p>
|
||||
<p><label>Published in blog? <%= check_box :published %></label></p>
|
||||
|
||||
<h3>Department</h3>
|
||||
<p><%= text_control :department, :size => 50 %></p>
|
||||
<p><%= text_field :department, :size => 50 %></p>
|
||||
|
||||
<h3>Description</h3>
|
||||
<p><%= text_area_control :description, :rows => 10, :cols => 70 %></p>
|
||||
<p><%= text_area :description, :rows => 10, :cols => 70 %></p>
|
||||
|
||||
<h3>Tags</h3>
|
||||
<p>
|
||||
<p><a href="#" onclick="$('page_tag_names').value = ''; return false;"><img src="/images/edit-clear.png" style="vertical-align: top;" /></a> <%= text_control 'tag_names', :size => 30 -%></p>
|
||||
<p><a href="#" onclick="$('page_tag_names').value = ''; return false;"><img src="/images/edit-clear.png" style="vertical-align: top;" /></a> <%= text_field :tag_names, :size => 30 -%></p>
|
||||
<div id="tag_auto_complete" class="auto_complete"></div>
|
||||
</p>
|
||||
</fieldset>
|
||||
|
||||
<p><%= submit_button 'Update' %></p>
|
||||
<% end -%>
|
||||
<p><%= submit 'Update' %></p>
|
||||
<% end =%>
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
|
|
@ -1,30 +1,30 @@
|
|||
<%= error_messages_for :page %>
|
||||
|
||||
<% form_for :page, :action => url(:page) do -%>
|
||||
<%= form_for :page, :action => url(:page) do %>
|
||||
<fieldset>
|
||||
<legend>Create a page</legend>
|
||||
<h3 style="margin-top: 10px;">Name</h3>
|
||||
<p><%= text_control :name, :size => 50 %></p>
|
||||
<p><%= text_field :name, :size => 50 -%></p>
|
||||
|
||||
<p><%= checkbox_control :published, :label => ' Published in blog?', :value => "1" %></p>
|
||||
<p><label>Published in blog? <%= check_box :published -%></label></p>
|
||||
|
||||
<h3>Department</h3>
|
||||
<p><%= text_control :department, :size => 50 %></p>
|
||||
<p><%= text_field :department, :size => 50 -%></p>
|
||||
|
||||
<h3>Description</h3>
|
||||
<p><%= text_area_control :description, :rows => 10, :cols => 70 %></p>
|
||||
<p><%= text_area :description, :rows => 10, :cols => 70 -%></p>
|
||||
|
||||
<h3>Tags</h3>
|
||||
<p>
|
||||
<p><a href="#" onclick="$('page[tag_names]').value = ''; return false;"><img src="/images/edit-clear.png" style="vertical-align: top;" /></a> <%= text_control 'tag_names', :size => 30 -%></p>
|
||||
<p><a href="#" onclick="$('page[tag_names]').value = ''; return false;"><img src="/images/edit-clear.png" style="vertical-align: top;" /></a> <%= text_field :tag_names, :size => 30 -%></p>
|
||||
<div id="tag_auto_complete" class="auto_complete"></div>
|
||||
</p>
|
||||
</fieldset>
|
||||
|
||||
<br />
|
||||
|
||||
<p><%= submit_button 'Create' %></p>
|
||||
<% end -%>
|
||||
<p><%= submit 'Create' %></p>
|
||||
<% end =%>
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
@ -47,4 +47,4 @@ new Ajax.Autocompleter(
|
|||
);
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -20,7 +20,7 @@ function check_all(form_name, field_name, checkbox_value)
|
|||
}
|
||||
</script>
|
||||
|
||||
<% form_for :permission, :action => url(:permission, @author), :id => 'permission_form' do -%>
|
||||
<%= form_for :permission, :action => url(:permission, @author), :id => 'permission_form' do -%>
|
||||
<%= hidden_field :name => '_method', :value => 'put' %>
|
||||
<fieldset>
|
||||
<legend>Select Author's permissions</legend>
|
||||
|
@ -33,11 +33,11 @@ function check_all(form_name, field_name, checkbox_value)
|
|||
attr[:checked] = true
|
||||
end
|
||||
-%>
|
||||
<li><%= checkbox_field attr -%> <%= p.name -%></li>
|
||||
<li><%= checkbox attr -%> <%= p.name -%></li>
|
||||
<% end -%>
|
||||
</ul>
|
||||
</fieldset>
|
||||
<p>
|
||||
<%= submit_button 'Save' %>
|
||||
<%= submit 'Save' %>
|
||||
</p>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
|
|
|
@ -4,14 +4,14 @@
|
|||
|
||||
<%= error_messages_for :photo %>
|
||||
|
||||
<% form_for :photo, :action => url(:photo), :multipart => true, :onsubmit => "$('indicator').style.display = 'inline';" do %>
|
||||
<%= form_for :photo, :action => url(:photo), :multipart => true, :onsubmit => "$('indicator').style.display = 'inline';" do %>
|
||||
<fieldset>
|
||||
<legend>Upload a photo</legend>
|
||||
<p>Album: <%= select_control 'album_id', :collection => Album.for_select, :selected => (@photo.album.name rescue nil) -%></p>
|
||||
<p>File: <%= file_control 'file' -%></p>
|
||||
<p>Album: <%= select :album_id, :collection => Album.for_select, :selected => (@photo.album.name rescue nil) -%></p>
|
||||
<p>File: <%= file_field :file -%></p>
|
||||
</fieldset>
|
||||
|
||||
<p>
|
||||
<%= submit_button 'Create' %> <img src='/images/ajax-loader.gif' id='indicator' style='display:none;' />
|
||||
<%= submit 'Create' %> <img src='/images/ajax-loader.gif' id='indicator' style='display:none;' />
|
||||
</p>
|
||||
<% end -%>
|
||||
<% end =%>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<% form_tag :action => url(:sessions) do -%>
|
||||
<%= form :action => url(:sessions) do -%>
|
||||
<fieldset>
|
||||
<legend>Login</legend>
|
||||
<p><%= text_field :name => :username, :label => 'Username: ', :id => 'username' -%></p>
|
||||
<p><%= password_field :name => :password, :label => 'Password: ' -%></p>
|
||||
</fieldset>
|
||||
<p><%= submit_button 'Login' -%></p>
|
||||
<% end -%>
|
||||
<p><%= submit 'Login' -%></p>
|
||||
<% end =%>
|
||||
|
||||
<script type="text/javascript">
|
||||
$('username').focus();
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<% form_for :tag, :action => url(:tag, :id => @tag.name) do -%>
|
||||
<%= form_for :tag, :action => url(:tag, :id => @tag.name) do -%>
|
||||
<fieldset>
|
||||
<legend>Change a tag's name</legend>
|
||||
<p>
|
||||
<%= text_control :name, :label => 'Name: ' -%>
|
||||
<%= text_field :name, :label => 'Name: ' -%>
|
||||
</p>
|
||||
</fieldset>
|
||||
<p>
|
||||
<%= submit_button 'Save' %>
|
||||
<%= submit 'Save' %>
|
||||
</p>
|
||||
<% end -%>
|
||||
<% end =%>
|
||||
|
|
Reference in New Issue