Changeset 464
- Timestamp:
- 07/21/07 10:13:00 (1 year ago)
- Files:
-
- branches/jargon/radiant/app/controllers/admin/abstract_model_controller.rb (modified) (1 diff)
- branches/jargon/radiant/app/controllers/admin/layout_controller.rb (modified) (1 diff)
- branches/jargon/radiant/app/controllers/admin/page_controller.rb (modified) (2 diffs)
- branches/jargon/radiant/app/controllers/admin/user_controller.rb (modified) (3 diffs)
- branches/jargon/radiant/app/controllers/admin/welcome_controller.rb (modified) (1 diff)
- branches/jargon/radiant/app/helpers/admin/page_helper.rb (modified) (1 diff)
- branches/jargon/radiant/app/helpers/application_helper.rb (modified) (3 diffs)
- branches/jargon/radiant/app/models/layout.rb (modified) (1 diff)
- branches/jargon/radiant/app/views/admin/extension/index.rhtml (modified) (3 diffs)
- branches/jargon/radiant/app/views/admin/layout/edit.rhtml (modified) (5 diffs)
- branches/jargon/radiant/app/views/admin/layout/index.rhtml (modified) (3 diffs)
- branches/jargon/radiant/app/views/admin/layout/remove.rhtml (modified) (2 diffs)
- branches/jargon/radiant/app/views/admin/page/_part.rhtml (modified) (1 diff)
- branches/jargon/radiant/app/views/admin/page/edit.rhtml (modified) (5 diffs)
- branches/jargon/radiant/app/views/admin/page/index.rhtml (modified) (2 diffs)
- branches/jargon/radiant/app/views/admin/page/remove.rhtml (modified) (2 diffs)
- branches/jargon/radiant/app/views/admin/snippet/edit.rhtml (modified) (2 diffs)
- branches/jargon/radiant/app/views/admin/snippet/index.rhtml (modified) (2 diffs)
- branches/jargon/radiant/app/views/admin/snippet/remove.rhtml (modified) (2 diffs)
- branches/jargon/radiant/app/views/admin/user/edit.rhtml (modified) (3 diffs)
- branches/jargon/radiant/app/views/admin/user/index.rhtml (modified) (2 diffs)
- branches/jargon/radiant/app/views/admin/user/preferences.rhtml (modified) (1 diff)
- branches/jargon/radiant/app/views/admin/user/remove.rhtml (modified) (2 diffs)
- branches/jargon/radiant/app/views/admin/welcome/login.rhtml (modified) (1 diff)
- branches/jargon/radiant/app/views/layouts/application.rhtml (modified) (1 diff)
- branches/jargon/radiant/app/views/site/not_found.rhtml (modified) (1 diff)
- branches/jargon/radiant/config/environment.rb (modified) (1 diff)
- branches/jargon/radiant/vendor/plugins/gibberish (added)
- branches/jargon/radiant/vendor/plugins/gibberish/LICENSE (added)
- branches/jargon/radiant/vendor/plugins/gibberish/README (added)
- branches/jargon/radiant/vendor/plugins/gibberish/init.rb (added)
- branches/jargon/radiant/vendor/plugins/gibberish/lang (added)
- branches/jargon/radiant/vendor/plugins/gibberish/lang/es.yml (added)
- branches/jargon/radiant/vendor/plugins/gibberish/lang/fr.yml (added)
- branches/jargon/radiant/vendor/plugins/gibberish/lib (added)
- branches/jargon/radiant/vendor/plugins/gibberish/lib/gibberish (added)
- branches/jargon/radiant/vendor/plugins/gibberish/lib/gibberish.rb (added)
- branches/jargon/radiant/vendor/plugins/gibberish/lib/gibberish/localize.rb (added)
- branches/jargon/radiant/vendor/plugins/gibberish/lib/gibberish/string_ext.rb (added)
- branches/jargon/radiant/vendor/plugins/gibberish/tasks (added)
- branches/jargon/radiant/vendor/plugins/gibberish/test (added)
- branches/jargon/radiant/vendor/plugins/gibberish/test/gibberish_test.rb (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/jargon/radiant/app/controllers/admin/abstract_model_controller.rb
r405 r464 90 90 91 91 def announce_saved(message = nil) 92 flash[:notice] = message || " #{humanized_model_name} saved below."92 flash[:notice] = message || "{name} saved below."[:notice_model_saved, { :name => humanized_model_name }] 93 93 end 94 94 95 95 def announce_validation_errors 96 flash[:error] = "Validation errors occurred while processing this form. Please take a moment to review the form and correct any input errors before continuing." 96 flash[:error] = "Validation errors occurred while processing this form. Please take a moment to review the form and correct any input errors before continuing."[:error_validation_errors] 97 97 end 98 98 99 99 def announce_removed 100 flash[:notice] = " #{humanized_model_name} has been deleted."100 flash[:notice] = "{name} has been deleted."[:notice_model_deleted, { :name => humanized_model_name }] 101 101 end 102 102 103 103 def announce_update_conflict 104 flash[:error] = " #{humanized_model_name} has been modified since it was last loaded. Changes cannot be saved without potentially losing data."104 flash[:error] = "{name} has been modified since it was last loaded. Changes cannot be saved without potentially losing data."[:error_model_update_conflict, { :name => humanized_model_name }] 105 105 end 106 106 branches/jargon/radiant/app/controllers/admin/layout_controller.rb
r405 r464 7 7 :when => [:developer, :admin], 8 8 :denied_url => { :controller => 'page', :action => 'index' }, 9 :denied_message => 'You must have developer privileges to perform this action.' 9 :denied_message => 'You must have developer privileges to perform this action.'[:developer_permissions] 10 10 11 11 def initialize branches/jargon/radiant/app/controllers/admin/page_controller.rb
r427 r464 41 41 redirect_to page_index_url 42 42 else 43 render :text => 'Do not access this URL directly.' 43 render :text => 'Do not access this URL directly.'[:do_not_access] 44 44 end 45 45 end … … 70 70 71 71 def announce_saved(message = nil) 72 flash[:notice] = message || "Your page has been saved below." 72 flash[:notice] = message || "Your page has been saved below."[:notice_page_saved] 73 73 end 74 74 75 75 def announce_pages_removed(count) 76 76 flash[:notice] = if count > 1 77 "The pages were successfully removed from the site." 77 "The pages were successfully removed from the site."[:notice_pages_removed] 78 78 else 79 "The page was successfully removed from the site." 79 "The page was successfully removed from the site."[:notice_page_removed] 80 80 end 81 81 end 82 82 83 83 def announce_cache_cleared 84 flash[:notice] = "The page cache was successfully cleared." 84 flash[:notice] = "The page cache was successfully cleared."[:notice_cache_cleared] 85 85 end 86 86 branches/jargon/radiant/app/controllers/admin/user_controller.rb
r405 r464 4 4 only_allow_access_to :index, :new, :edit, :remove, :when => :admin, 5 5 :denied_url => {:controller => 'page', :action => :index}, 6 :denied_message => 'You must have administrative privileges to perform this action.' 6 :denied_message => 'You must have administrative privileges to perform this action.'[:admin_permissions] 7 7 8 8 def preferences … … 11 11 handle_new_or_edit_post( 12 12 :redirect_to => page_index_url, 13 :saved_message => 'Your preferences have been saved.' 13 :saved_message => 'Your preferences have been saved.'[:preferences_saved] 14 14 ) 15 15 else … … 30 30 31 31 def announce_cannot_delete_self 32 flash[:error] = 'You cannot delete yourself.' 32 flash[:error] = 'You cannot delete yourself.'[:error_delete_self] 33 33 end 34 34 35 35 def announce_bad_data 36 flash[:error] = 'Bad form data.' 36 flash[:error] = 'Bad form data.'[:error_bad_data] 37 37 end 38 38 branches/jargon/radiant/app/controllers/admin/welcome_controller.rb
r405 r464 28 28 29 29 def announce_logged_out 30 flash[:notice] = 'You are now logged out.' 30 flash[:notice] = 'You are now logged out.'[:notice_logout] 31 31 end 32 32 33 33 def announce_invalid_user 34 flash[:error] = 'Invalid username or password.' 34 flash[:error] = 'Invalid username or password.'[:error_login] 35 35 end 36 36 branches/jargon/radiant/app/helpers/admin/page_helper.rb
r428 r464 32 32 unless filter_name.blank? 33 33 filter_class = (filter_name + "Filter").constantize 34 filter_class.description.blank? ? "There is no documentation on this filter." : filter_class.description34 filter_class.description.blank? ? "There is no documentation on this filter."[:no_filter_docs] : filter_class.description 35 35 else 36 "There is no filter on the current page part." 36 "There is no filter on the current page part."[:no_filter] 37 37 end 38 38 end branches/jargon/radiant/app/helpers/application_helper.rb
r405 r464 22 22 def save_model_button(model) 23 23 label = if model.new_record? 24 "Create #{model.class.name}"24 "Create {name}"[:create_model, { :name => model.class.name }] 25 25 else 26 'Save Changes' 26 'Save Changes'[:save_changes] 27 27 end 28 28 submit_tag label, :class => 'button' … … 30 30 31 31 def save_model_and_continue_editing_button(model) 32 submit_tag 'Save and Continue Editing' , :name => 'continue', :class => 'button'32 submit_tag 'Save and Continue Editing'[:save_and_continue], :name => 'continue', :class => 'button' 33 33 end 34 34 … … 109 109 time = (model.updated_at || model.created_at) 110 110 if login or time 111 html = %{<p style="clear: left"><small> Last updated}112 html << %{ by#{login} } if login113 html << %{ at #{ time.strftime("%I:%M <small>%p</small> on %B %d, %Y") }} if time111 html = %{<p style="clear: left"><small>#{"Last updated"[:last_updated]} } 112 html << %{#{"by"[:by]} #{login} } if login 113 html << %{#{"at"[:at]} #{ time.strftime("%I:%M <small>%p</small> on %B %d, %Y"[:datetime_format]) }} if time 114 114 html << %{</small></p>} 115 115 html branches/jargon/radiant/app/models/layout.rb
r405 r464 10 10 11 11 # Validations 12 validates_presence_of :name, :message => 'required' 13 validates_uniqueness_of :name, :message => 'name already in use' 14 validates_length_of :name, :maximum => 100, :message => '%d-character limit' 12 validates_presence_of :name, :message => 'required'[:required] 13 validates_uniqueness_of :name, :message => 'name already in use'[:name_in_use] 14 validates_length_of :name, :maximum => 100, :message => '%d-character limit'[:character_limit] 15 15 16 16 end branches/jargon/radiant/app/views/admin/extension/index.rhtml
r405 r464 11 11 <% end -%> 12 12 13 <h1> Extensions</h1>13 <h1><%= "Extensions"[:extensions] %></h1> 14 14 15 15 <form name="extensions-form" action="<%= extension_update_url %>" method="post"> … … 17 17 <thead> 18 18 <tr> 19 <th class="extension"> Extension</th>20 <th class="website"> Website</td>21 <th class="version"> Version</th>22 <th class="enabled"> Enabled</th>19 <th class="extension"><%= "Extension"[:extension] %></th> 20 <th class="website"><%= "Website"[:website] %></td> 21 <th class="version"><%= "Version"[:version] %></th> 22 <th class="enabled"><%= "Enabled"[:enabled] %></th> 23 23 </tr> 24 24 </thead> … … 30 30 <p><%=h extension.description %></p> 31 31 </td> 32 <td class="website"><%= link_to "Website" , extension.url, :target => "_blank" unless extension.url.blank? %></td>32 <td class="website"><%= link_to "Website"[:website], extension.url, :target => "_blank" unless extension.url.blank? %></td> 33 33 <td class="version"><%=h extension.version %></td> 34 34 <td class="enabled"><input type="checkbox" name="enabled_extensions[]" value="<%= extension.extension_name %>" <%= 'checked="checked"' if extension.enabled? %> /></td> branches/jargon/radiant/app/views/admin/layout/edit.rhtml
r405 r464 1 1 <% if @layout.new_record? -%> 2 <h1> New Layout</h1>2 <h1><%= "New Layout"[:new_layout] %></h1> 3 3 <% else -%> 4 <h1> Edit Layout</h1>4 <h1><%= "Edit Layout"[:edit_layout] %></h1> 5 5 <% end -%> 6 6 … … 9 9 <div class="form-area"> 10 10 <p class="title"> 11 <label for="layout_name"> Name</label>11 <label for="layout_name"><%= "Name"[:name] %></label> 12 12 <%= text_field "layout", "name", :class => 'textbox', :maxlength => 100 %> 13 13 </p> … … 15 15 <table class="fieldset" cellpadding="0" cellspacing="0" border="0"> 16 16 <tr> 17 <td class="label"><label for="layout_content_type"> Content‑Type</label></td>17 <td class="label"><label for="layout_content_type"><%= "Content‑Type"[:content_type] %></label></td> 18 18 <td class="field"><%= text_field "layout", "content_type", :class => 'textbox', :maxlength => 40 %></td> 19 19 </tr> … … 22 22 <p> 23 23 <small> 24 <a id="more-extended-metadata" href="#" onclick="<%= toggle_javascript_for('extended-metadata') %>"<%= meta_visible(:meta_more) %>> More</a>25 <a id="less-extended-metadata" href="#" onclick="<%= toggle_javascript_for('extended-metadata') %>"<%= meta_visible(:meta_less) %>> Less</a>24 <a id="more-extended-metadata" href="#" onclick="<%= toggle_javascript_for('extended-metadata') %>"<%= meta_visible(:meta_more) %>><%= "More"[:more] %></a> 25 <a id="less-extended-metadata" href="#" onclick="<%= toggle_javascript_for('extended-metadata') %>"<%= meta_visible(:meta_less) %>><%= "Less"[:less] %></a> 26 26 </small> 27 27 </p> 28 28 <p class="content"> 29 <label for="layout_content"> Body</label>29 <label for="layout_content"><%= "Body"[:body] %></label> 30 30 <%= text_area "layout", "content", :class => "textarea", :style => "width: 100%" %> 31 31 </p> … … 33 33 </div> 34 34 <p class="buttons"> 35 <%= save_model_button(@layout) %> <%= save_model_and_continue_editing_button(@layout) %> or <%= link_to "Cancel" , layout_index_url %>35 <%= save_model_button(@layout) %> <%= save_model_and_continue_editing_button(@layout) %> or <%= link_to "Cancel"[:cancel], layout_index_url %> 36 36 </p> 37 37 </form> branches/jargon/radiant/app/views/admin/layout/index.rhtml
r405 r464 1 <h1> Layouts</h1>1 <h1><%= "Layouts"[:layouts] %></h1> 2 2 3 <p> Use layouts to apply a visual look to a Web page. Layouts can contain special tags to include3 <p><%= "Use layouts to apply a visual look to a Web page. Layouts can contain special tags to include 4 4 page content and other elements such as the header or footer. Click on a layout name below to 5 edit it or click <code>Remove</code> to delete it. </p>5 edit it or click <code>Remove</code> to delete it."[:note_layouts] %></p> 6 6 7 7 <table id="layouts" class="index" cellpadding="0" cellspacing="0" border="0"> 8 8 <thead> 9 9 <tr> 10 <th class="layout"> Layout</th>11 <th class="modify"> Modify</th>10 <th class="layout"><%= "Layout"[:layout] %></th> 11 <th class="modify"><%= "Modify"[:modify] %></th> 12 12 </tr> 13 13 </thead> … … 20 20 <%= link_to layout.name, layout_edit_url(:id => layout) %> 21 21 </td> 22 <td class="remove"><%= link_to image('remove', :alt => 'Remove Layout' ), layout_remove_url(:id => layout) %></td>22 <td class="remove"><%= link_to image('remove', :alt => 'Remove Layout'[:remove_layout]), layout_remove_url(:id => layout) %></td> 23 23 </tr> 24 24 <% end -%> 25 25 <% else -%> 26 26 <tr> 27 <td colspan="2" class="note"> No Layouts</td>27 <td colspan="2" class="note"><%= "No Layouts"[:no_layouts] %></td> 28 28 </tr> 29 29 <% end -%> … … 36 36 </script> 37 37 38 <p><%= link_to image('new-layout', :alt => 'New Layout' ), layout_new_url %></p>38 <p><%= link_to image('new-layout', :alt => 'New Layout'[:new_layout]), layout_new_url %></p> branches/jargon/radiant/app/views/admin/layout/remove.rhtml
r405 r464 1 <h1> Remove Layout</h1>2 <p> Are you sure you want to <strong class="warning">permanently remove</strong> the following layout?</p>1 <h1><%= "Remove Layout"[:remove_layout] %></h1> 2 <p><%= 'Are you sure you want to <strong class="warning">permanently remove</strong> the following layout?'[:note_remove_layout] %></p> 3 3 4 4 <table id="site-map" class="index" cellpadding="0" cellspacing="0" border="0"> … … 14 14 15 15 <form method="post"> 16 <p class="buttons"><%= submit_tag "Delete Layout" , :class => 'button' %> or <%= link_to 'Cancel', layout_index_url %></p>16 <p class="buttons"><%= submit_tag "Delete Layout"[:delete_layout], :class => 'button' %> or <%= link_to 'Cancel'[:cancel], layout_index_url %></p> 17 17 </form> branches/jargon/radiant/app/views/admin/page/_part.rhtml
r405 r464 7 7 <%= hidden_field_tag "part[#{@index - 1}][name]", @part.name %> 8 8 <p> 9 <label for="part[<%= @index - 1 %>][filter_id]"> Filter</label>10 <%= select_tag "part[#{@index - 1}][filter_id]", options_for_select([['<none>' , '']] + TextFilter.descendants.map { |s| s.filter_name }.sort, @part.filter_id) %>11 <span id="reference-links"> Reference:<span id="filter-reference-link-<%= @index-1 %>"><%= link_to_function "Filter", "load_filter_reference(#{@index - 1})" %></span> <span id="tag-reference-link-<%= @index -1 %>"><%= link_to_function 'Available Tags', "load_tag_reference(#{@index-1});" %></span></span>9 <label for="part[<%= @index - 1 %>][filter_id]"><%= "Filter:"[:filter] %></label> 10 <%= select_tag "part[#{@index - 1}][filter_id]", options_for_select([['<none>'[:none], '']] + TextFilter.descendants.map { |s| s.filter_name }.sort, @part.filter_id) %> 11 <span id="reference-links"><%= "Reference:"[:reference] %> <span id="filter-reference-link-<%= @index-1 %>"><%= link_to_function "Filter", "load_filter_reference(#{@index - 1})" %></span> <span id="tag-reference-link-<%= @index -1 %>"><%= link_to_function 'Available Tags', "load_tag_reference(#{@index-1});" %></span></span> 12 12 </p> 13 13 <div><%= text_area_tag "part[#{@index - 1}][content]", h(@part.content), :class => "textarea", :style => "width: 100%" %></div> branches/jargon/radiant/app/views/admin/page/edit.rhtml
r432 r464 103 103 <% include_javascript "tag_reference_search" %> 104 104 <% if @page.new_record? -%> 105 <h1 id="new_page"> New Page</h1>105 <h1 id="new_page"><%= "New Page"[:new_page] %></h1> 106 106 <% else -%> 107 <h1 id="edit_page"> Edit Page</h1>107 <h1 id="edit_page"><%= "Edit Page"[:edit_page] %></h1> 108 108 <% end -%> 109 109 … … 138 138 <p class="more-or-less"> 139 139 <small> 140 <a href="#" onclick="<%= toggle_javascript_for('extended-metadata') %>"<%= meta_visible(:meta_more) %> id="more-extended-metadata"> More</a>141 <a href="#" onclick="<%= toggle_javascript_for('extended-metadata') %>"<%= meta_visible(:meta_less) %> id="less-extended-metadata"> Less</a>140 <a href="#" onclick="<%= toggle_javascript_for('extended-metadata') %>"<%= meta_visible(:meta_more) %> id="more-extended-metadata"><%= "More"[:more] %></a> 141 <a href="#" onclick="<%= toggle_javascript_for('extended-metadata') %>"<%= meta_visible(:meta_less) %> id="less-extended-metadata"><%= "Less"[:less] %></a> 142 142 </small> 143 143 </p> … … 145 145 <div id="tabs" class="tabs"> 146 146 <div id="tab-toolbar"> 147 <%= link_to_function image('plus'), 'toggle_add_part_popup()', :title => 'Add Tab' %>147 <%= link_to_function image('plus'), 'toggle_add_part_popup()', :title => 'Add Tab'[:add_tab] %> 148 148 <%= link_to_function image('minus'), 'if(confirm(\'Delete the current tab?\')) { tabControl.removeTab(tabControl.selected) }', :title => 'Remove Tab' %> 149 149 </div> … … 169 169 </script> 170 170 <div class="row"> 171 <p><label for="page_layout_id"> Layout</label>172 <%= select "page", "layout_id", [['<inherit>' , '']] + Layout.find(:all).map { |s| [s.name, s.id] } %></p>173 <p><label for="page_class_name"> Page Type</label>174 <%= select "page", "class_name", [['<normal>' , 'Page']] + Page.descendants.map { |p| [p.display_name, p.name] }.sort_by { |p| p.first } %></p>175 <p><label for="page_status_id"> Status</label>171 <p><label for="page_layout_id"><%= "Layout"[:layout] %></label> 172 <%= select "page", "layout_id", [['<inherit>'[:inherit], '']] + Layout.find(:all).map { |s| [s.name, s.id] } %></p> 173 <p><label for="page_class_name"><%= "Page Type"[:page_type] %></label> 174 <%= select "page", "class_name", [['<normal>'[:normal], 'Page'[:page]]] + Page.descendants.map { |p| [p.display_name, p.name] }.sort_by { |p| p.first } %></p> 175 <p><label for="page_status_id"><%= "Status"[:status] %></label> 176 176 <%= select "page", "status_id", Status.find_all.map { |s| [s.name, s.id] } %></p> 177 177 </div> … … 202 202 <%= hidden_field_tag 'index', @index + 1, :id => 'part-index-field' %> 203 203 <%= text_field_tag "part[name]", "", :id => 'part-name-field', :maxlength => 100 %> 204 <%= submit_tag "Add Part" , :id => 'add-part-button' %>204 <%= submit_tag "Add Part"[:add_part], :id => 'add-part-button' %> 205 205 </div> 206 <p><%= link_to_function 'Close' , "Element.hide('add-part-popup')", :class => 'close-link' %></p>206 <p><%= link_to_function 'Close'[:close], "Element.hide('add-part-popup')", :class => 'close-link' %></p> 207 207 <% end %> 208 208 </div> 209 209 <div class="popup" id="tag-reference-popup" style="display:none;"> 210 <div style="float:right"> Search Tags: <input type="text" id="search-tag-reference"></div>210 <div style="float:right"><%= "Search Tags"[:search_tags] %>: <input type="text" id="search-tag-reference"></div> 211 211 <%= javascript_tag "new Form.Element.Observer('search-tag-reference', 0.5, observeTagSearch);" %> 212 212 <h3>Available Tags for <span id="page-type"><%= @page.class.display_name %></span></h3> 213 213 <div id="tag-reference"><%= tag_reference(@page.class.name) %></div> 214 <p><%= link_to_function 'Close' , "Element.hide('tag-reference-popup')", :class => 'close-link' %></p>214 <p><%= link_to_function 'Close'[:close], "Element.hide('tag-reference-popup')", :class => 'close-link' %></p> 215 215 </div> 216 216 <div class="popup" id="filter-reference-popup" style="display:none;"> 217 217 <h3><span id="filter-type"><%= default_filter_name %></span> Reference</h3> 218 218 <div id="filter-reference"><%= filter_reference(default_filter_name) %></div> 219 <p><%= link_to_function 'Close' , "Element.hide('filter-reference-popup')", :class => 'close-link' %></p>219 <p><%= link_to_function 'Close'[:close], "Element.hide('filter-reference-popup')", :class => 'close-link' %></p> 220 220 </div> 221 221 <% end -%> branches/jargon/radiant/app/views/admin/page/index.rhtml
r427 r464 1 1 <% include_javascript 'sitemap' -%> 2 2 3 <h1> Pages</h1>3 <h1><%= "Pages"[:pages] %></h1> 4 4 5 5 <table id="site-map" class="index" cellpadding="0" cellspacing="0" border="0"> 6 6 <thead> 7 7 <tr> 8 <th class="page"> Page</th>9 <th class="status"> Status</th>10 <th class="modify" colspan="2"> Modify</th>8 <th class="page"><%= "Page"[:page] %></th> 9 <th class="status"><%= "Status"[:pages] %></th> 10 <th class="modify" colspan="2"><%= "Modify"[:modify] %></th> 11 11 </tr> 12 12 </thead> … … 16 16 <% else -%> 17 17 <tr> 18 <td colspan="4" class="note"> No Pages</td>18 <td colspan="4" class="note"><%= "No Pages"[:no_pages] %></td> 19 19 </tr> 20 20 <% end -%> branches/jargon/radiant/app/views/admin/page/remove.rhtml
r84 r464 1 1 <% pages = pluralize(@page.children.count + 1, 'Page') -%> 2 2 3 <h1 id="remove_article"> Remove<%= pages %></h1>3 <h1 id="remove_article"><%= "Remove"[:remove] %> <%= pages %></h1> 4 4 <p>Are you sure you want to <strong class="warning">permanently remove</strong> the following <%= pages.downcase %>?</p> 5 5 … … 11 11 12 12 <form method="post"> 13 <p class="buttons"><%= submit_tag "Delete #{pages}", :class => 'button' %> or <%= link_to 'Cancel', page_index_url %></p>13 <p class="buttons"><%= submit_tag "Delete {pages}"[:delete_pages, { :pages => pages }], :class => 'button' %> or <%= link_to 'Cancel'[:cancel], page_index_url %></p> 14 14 </form> branches/jargon/radiant/app/views/admin/snippet/edit.rhtml
r405 r464 1 1 <% if @snippet.new_record? -%> 2 <h1> New Snippet</h1>2 <h1><%= "New Snippet"[:new_snippet] %></h1> 3 3 <% else -%> 4 <h1> Edit Snippet</h1>4 <h1><%= "Edit Snippet"[:edit_snippet] %></h1> 5 5 <% end -%> 6 6 … … 18 18 <p> 19 19 <label for="snippet_filter">Filter</label> 20 <%= select_tag "snippet[filter_id]", options_for_select([[' none', '']] + TextFilter.descendants.map { |f| f.filter_name }.sort, @snippet.filter_id) %>20 <%= select_tag "snippet[filter_id]", options_for_select([['<none>'[:none], '']] + TextFilter.descendants.map { |f| f.filter_name }.sort, @snippet.filter_id) %> 21 21 </p> 22 22 <%= updated_stamp @snippet %> 23 23 </div> 24 24 <p class="buttons"> 25 <%= save_model_button(@snippet) %> <%= save_model_and_continue_editing_button(@snippet) %> or <%= link_to "Cancel" , snippet_index_url %>25 <%= save_model_button(@snippet) %> <%= save_model_and_continue_editing_button(@snippet) %> or <%= link_to "Cancel"[:cancel], snippet_index_url %> 26 26 </p> 27 27 </form> branches/jargon/radiant/app/views/admin/snippet/index.rhtml
r405 r464 1 <h1> Snippets</h1>1 <h1><%= "Snippets"[:snippets] %></h1> 2 2 3 <p> Snippets are generally small pieces of content which are included in other pages or layouts.</p>3 <p><%= "Snippets are generally small pieces of content which are included in other pages or layouts."[:note_snippets] %></p> 4 4 5 5 <table id="snippets" class="index" cellpadding="0" cellspacing="0" border="0"> 6 6 <thead> 7 7 <tr> 8 <th class="snippet"> Snippet</th>9 <th class="modify"> Modify</th>8 <th class="snippet"><%= "Snippet"[:snippet] %></th> 9 <th class="modify"><%= "Modify"[:modify] %></th> 10 10 </tr> 11 11 </thead> … … 18 18 <%= link_to snippet.name, snippet_edit_url(:id => snippet) %></span> 19 19 </td> 20 <td class="remove"><%= link_to image('remove', :alt => 'Remove Snippet' ), snippet_remove_url(:id => snippet) %></td>20 <td class="remove"><%= link_to image('remove', :alt => 'Remove Snippet'[:remove_snippet]), snippet_remove_url(:id => snippet) %></td> 21 21 </tr> 22 22 <% end -%> 23 23 <% else -%> 24 24 <tr> 25 <td colspan="2" class="note"> No Snippets</td>25 <td colspan="2" class="note"><%= "No Snippets"[:no_snippets] %></td> 26 26 </tr> 27 27 <% end -%> branches/jargon/radiant/app/views/admin/snippet/remove.rhtml
r84 r464 1 <h1> Remove Snippet</h1>2 <p> Are you sure you want to <strong class="warning">permanently remove</strong> the following snippet?</p>1 <h1><%= "Remove Snippet"[:delete_snippet] %></h1> 2 <p><%= 'Are you sure you want to <strong class="warning">permanently remove</strong> the following snippet?'[:note_remove_snippet] %></p> 3 3 4 4 <table id="snippets" class="index" cellpadding="0" cellspacing="0" border="0"> … … 13 13 14 14 <form method="post"> 15 <p class="buttons"><%= submit_tag "Delete Snippet" , :class => 'button' %> or <%= link_to 'Cancel', snippet_index_url %></p>15 <p class="buttons"><%= submit_tag "Delete Snippet"[:delete_snippet], :class => 'button' %> or <%= link_to 'Cancel'[:cancel], snippet_index_url %></p> 16 16 </form> branches/jargon/radiant/app/views/admin/user/edit.rhtml
r405 r464 1 1 <% if @user.new_record? -%> 2 <h1> New User</h1>2 <h1><%= "New User"[:new_user] %></h1> 3 3 <% else -%> 4 <h1> Edit User</h1>4 <h1><%= "Edit User"[:edit_user] %></h1> 5 5 <% end -%> 6 6 … … 9 9 <table class="fieldset" cellpadding="0" cellspacing="0" border="0"> 10 10 <tr> 11 <td class="label"><label for="user_name"> Name</label></td>11 <td class="label"><label for="user_name"><%= "Name"[:name] %></label></td> 12 12 <td class="field"><%= text_field "user", "name", :class => 'textbox', :maxlength => 100 %></td> 13 13 <td class="help">Required.</td> 14 14 </tr> 15 15 <tr> 16 <td class="label"><label class="optional" for="user_email"> E-mail</label></td>16 <td class="label"><label class="optional" for="user_email"><%= "E-mail"[:email] %></label></td> 17 17 <td class="field"><%= text_field "user", "email", :class => 'textbox', :maxlength => 255 %></td> 18 <td class="help"> Optional. Please use a valid e-mail address.</td>18 <td class="help"><%= "Optional. Please use a valid e-mail address."[:note_valid_email] %></td> 19 19 </tr> 20 20 <tr> 21 <td class="label"><label for="user_login"> Username</label></td>21 <td class="label"><label for="user_login"><%= "Username"[:username] %></label></td> 22 22 <td class="field"><%= text_field "user", "login", :class => 'textbox', :maxlength => 40 %></td> 23 <td class="help"> At least 3 characters. Must be unique.</td>23 <td class="help"><%= "At least 3 characters. Must be unique."[:note_valid_username] %></td> 24 24 </tr> 25 25 <tr> 26 <td class="label"><label for="user_password"> Password</label></td>26 <td class="label"><label for="user_password"><%= "Password"[:password] %></label></td> 27 27 <td class="field"><%= password_field "user", "password", :class => 'textbox', :value => '', :maxlength => 40 %></td> 28 <td class="help" rowspan="2"> At least 5 characters. <% unless @user.new_record? %>Leave password blank for it to remain unchanged.<% end %></td>28 <td class="help" rowspan="2"><%= "At least 5 characters."[:note_valid_password] %> <% unless @user.new_record? %><%= "Leave password blank for it to remain unchanged."[:note_change_password] %><% end %></td> 29 29 </tr> 30 30 <tr> 31 <td class="label"><label for="user_password_confirmation"> Confirm Password</label></td>31 <td class="label"><label for="user_password_confirmation"><%= "Confirm Password"[:confirm_password] %></label></td> 32 32 <td class="field"><%= password_field "user", "password_confirmation", :class => 'textbox', :value => '', :maxlength => 40 %></td> 33 33 </tr> … … 35 35 <td class="label"><label for="user_admin">Roles</label></td> 36 36 <td class="field"> 37 <span class="checkbox"><%= check_box "user", "admin" %> Administrator</span>38 <span class="checkbox"><%= check_box "user", "developer" %> Developer</span>37 <span class="checkbox"><%= check_box "user", "admin" %> <%= "Administrator"[:administrator] %></span> 38 <span class="checkbox"><%= check_box "user", "developer" %> <%= "Developer"[:developer] %></span> 39 39 </td> 40 <td class="help"> Roles restrict user privileges and turn parts of the administrative interface on or off.</td>40 <td class="help"><%= "Roles restrict user privileges and turn parts of the administrative interface on or off."[:note_roles] %></td> 41 41 </tr> 42 42 <tr> 43 <td class="label"><label class="optional" for="user_notes"> Notes</label></td>43 <td class="label"><label class="optional" for="user_notes"><%= "Notes"[:notes] %></label></td> 44 44 <td class="field"><%= text_area "user", "notes", :size => '40x4' %></td> 45 <td class="help"> Optional.</td>45 <td class="help"><%= "Optional."[:optional] %></td> 46 46 </tr> 47 47 </table> 48 48 <%= updated_stamp @user %> 49 49 <p class="buttons"> 50 <%= save_model_button(@user) %> <%= save_model_and_continue_editing_button(@user) %> or <%= link_to "Cancel" , user_index_url %>50 <%= save_model_button(@user) %> <%= save_model_and_continue_editing_button(@user) %> or <%= link_to "Cancel"[:cancel], user_index_url %> 51 51 </p> 52 52 </form> branches/jargon/radiant/app/views/admin/user/index.rhtml
r405 r464 1 <h1> Users</h1>1 <h1><%= "Users"[:users] %></h1> 2 2 3 3 <table id="users" class="index" cellpadding="0" cellspacing="0" border="0"> 4 4 <thead> 5 5 <tr> 6 <th class="user"> Name / Login</th>7 <th class="roles"> Roles</th>8 <th class="modify"> Modify</th>6 <th class="user"><%= "Name"[:name] %> / <%= "Login"[:login] %></th> 7 <th class="roles"><%= "Roles"[:roles] %></th> 8 <th class="modify"><%= "Modify"[:modify] %></th> 9 9 </tr> 10 10 </thead> … … 25 25 %> 26 26 </td> 27 <td class="remove"><%= user.id != session['user'].id ? link_to(image('remove', :alt => 'Remove User'), user_remove_url(:id => user)) : image('remove-disabled', :alt => 'Remove' ) %></td>27 <td class="remove"><%= user.id != session['user'].id ? link_to(image('remove', :alt => 'Remove User'), user_remove_url(:id => user)) : image('remove-disabled', :alt => 'Remove'[:remove]) %></td> 28 28 </tr> 29 29 <% end -%> 30 30 <% else -%> 31 31 <tr> 32 <td colspan="3" class="note"> No Users</td>32 <td colspan="3" class="note"><%= "No Users"[:no_users] %></td> 33 33 </tr> 34 34 <% end -%> branches/jargon/radiant/app/views/admin/user/preferences.rhtml
r84 r464 4 4 <table class="fieldset" cellpadding="0" cellspacing="0" border="0"> 5 5 <tr> 6 <td class="label"><label for="user_password"> Password</label></td>6 <td class="label"><label for="user_password"><%= "Password"[:password] %></label></td> 7 7 <td class="field"><%= password_field "user", "password", :class => 'textbox', :value => '', :maxlength => 40 %></td> 8 <td class="help" rowspan="2"> At least 5 characters. <% unless @user.new_record? %>Leave password blank for it to remain unchanged.<% end %></td>8 <td class="help" rowspan="2"><%= "At least 5 characters."[:note_valid_password] %> <% unless @user.new_record? %><% "Leave password blank for it to remain unchanged."[:note_change_password] %><% end %></td> 9 9 </tr> 10 10 <tr> 11 <td class="label"><label for="user_password_confirmation"> Confirm Password</label></td>11 <td class="label"><label for="user_password_confirmation"><%= "Confirm Password"[:confirm_password] %></label></td> 12 12 <td class="field"><%= password_field "user", "password_confirmation", :class => 'textbox', :value => '', :maxlength => 40 %></td> 13 13 </tr> 14 14 <tr> 15 <td class="label"><label for="user_email"> E-mail</label></td>15 <td class="label"><label for="user_email"><%= "E-mail"[:email] %></label></td> 16 16 <td class="field"><%= text_field "user", "email", :class => 'textbox', :maxlength => 255 %></td> 17 <td class="help"> Optional.</td>17 <td class="help"><%= "Optional"[:optional] %>.</td> 18 18 </tr> 19 19 </table> 20 20 <p class="buttons"> 21 <%= submit_tag 'Save Changes' %> or <%= link_to "Cancel", admin_url %>21 <%= submit_tag 'Save Changes'[:save_changes] %> or <%= link_to "Cancel"[:cancel], admin_url %> 22 22 </p> 23 23 </form> branches/jargon/radiant/app/views/admin/user/remove.rhtml
r84 r464 1 <h1> Remove User</h1>2 <p> Are you sure you want to <strong class="warning">permanently remove</strong> the following user?</p>1 <h1><%= "Remove User"[:remove_user] %></h1> 2 <p><%= 'Are you sure you want to <strong class="warning">permanently remove</strong> the following user?'[:note_remove_user] %></p> 3 3 4 4 <table id="users" class="index" cellpadding="0" cellspacing="0" border="0"> … … 13 13 14 14 <form method="post"> 15 <p class="buttons"><%= submit_tag "Delete User" , :class => 'button' %> or <%= link_to 'Cancel', user_index_url %></p>15 <p class="buttons"><%= submit_tag "Delete User"[:delete
