Changeset 853
- Timestamp:
- 05/22/08 08:33:15
- Files:
-
- trunk/tracks/app/controllers/search_controller.rb (added)
- trunk/tracks/app/controllers/todos_controller.rb (modified) (1 diff)
- trunk/tracks/app/helpers/search_helper.rb (added)
- trunk/tracks/app/helpers/todos_helper.rb (modified) (1 diff)
- trunk/tracks/app/models/todo.rb (modified) (3 diffs)
- trunk/tracks/app/views/layouts/standard.html.erb (modified) (1 diff)
- trunk/tracks/app/views/notes/_notes.rhtml (modified) (1 diff)
- trunk/tracks/app/views/projects/_project.rhtml (modified) (1 diff)
- trunk/tracks/app/views/projects/_project_listing.rhtml (modified) (3 diffs)
- trunk/tracks/app/views/search (added)
- trunk/tracks/app/views/search/index.rhtml (added)
- trunk/tracks/app/views/search/results.rhtml (added)
- trunk/tracks/app/views/todos/_todo.html.erb (modified) (1 diff)
- trunk/tracks/public/images/system-search.png (added)
- trunk/tracks/public/stylesheets/standard.css (modified) (1 diff)
- trunk/tracks/test/functional/todos_controller_test.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/tracks/app/controllers/todos_controller.rb
r837 r853 68 68 format.html { redirect_to :action => "index" } 69 69 format.m do 70 @return_path=cookies[:mobile_url] 71 # todo: use function for this fixed path 72 @return_path='/mobile' if @return_path.nil? 70 73 if @saved 71 74 redirect_to mobile_abbrev_url trunk/tracks/app/helpers/todos_helper.rb
r838 r853 121 121 str = "(#{str})" unless str.blank? 122 122 else 123 if (['project', 'tag', 'stats' ].include?(parent_container_type))123 if (['project', 'tag', 'stats', 'search'].include?(parent_container_type)) 124 124 str << item_link_to_context( @todo ) 125 125 end 126 if (['context', 'tickler', 'tag', 'stats' ].include?(parent_container_type)) && @todo.project_id126 if (['context', 'tickler', 'tag', 'stats', 'search'].include?(parent_container_type)) && @todo.project_id 127 127 str << item_link_to_project( @todo ) 128 128 end trunk/tracks/app/models/todo.rb
r760 r853 9 9 acts_as_state_machine :initial => :active, :column => 'state' 10 10 11 # when entering active state, also remove completed_at date. 12 # Looks like :exitof state completed is not run, see #67911 # when entering active state, also remove completed_at date. Looks like :exit 12 # of state completed is not run, see #679 13 13 state :active, :enter => Proc.new { |t| t[:show_from], t.completed_at = nil, nil } 14 14 state :project_hidden … … 39 39 attr_protected :user 40 40 41 # Description field can't be empty, and must be < 100 bytes 42 # Notes must be <60,000 bytes (65,000 actually, but I'm being cautious)41 # Description field can't be empty, and must be < 100 bytes Notes must be < 42 # 60,000 bytes (65,000 actually, but I'm being cautious) 43 43 validates_presence_of :description 44 44 validates_length_of :description, :maximum => 100 … … 92 92 93 93 def run_initial_state_actions 94 #only run the initial state actions if the standard initial state hasn't been changed 94 # only run the initial state actions if the standard initial state hasn't 95 # been changed 95 96 if self.class.initial_state.to_sym == current_state 96 97 original_run_initial_state_actions trunk/tracks/app/views/layouts/standard.html.erb
r837 r853 60 60 <li><%= navigation_link(image_tag("menustar.gif", :size => "16X16", :border => 0), tag_path("starred"), :title => "See your starred actions" ) %></li> 61 61 <li><%= navigation_link(image_tag("stats.gif", :size => "16X16", :border => 0), {:controller => "stats", :action => "index"}, :title => "See your statistics" ) %></li> 62 <li><%= navigation_link(image_tag("system-search.png", :size => "16X16", :border => 0), {:controller => "search", :action => "index"}, :title => "Search All Items" ) %></li> 62 63 </ul> 63 64 </div> trunk/tracks/app/views/notes/_notes.rhtml
r753 r853 33 33 :update => dom_id(note, 'container'), 34 34 :complete => visual_effect(:appear, dom_id(note, 'container')) do -%> 35 <%= render :partial => "note _edit_form", :object => note %>35 <%= render :partial => "notes/note_edit_form", :object => note %> 36 36 <% end -%> 37 37 </div> trunk/tracks/app/views/projects/_project.rhtml
r848 r853 9 9 <%= in_place_editor 'project_name_in_place_editor', { :url => { :controller => 'projects', :action => 'update', :id => project.id, :field => 'name', :wants_render => false, :escape => false} , :options=>"{method:'put'}" } %> 10 10 </h2> 11 <% unless @project.description.blank? -%>12 <div class="project_description"><%= sanitize( @project.description) %></div>11 <% unless project.description.blank? -%> 12 <div class="project_description"><%= sanitize(project.description) %></div> 13 13 <% end -%> 14 14 15 <% if @project.completed? -%>15 <% if project.completed? -%> 16 16 <p class="project_completed">Project has been marked as completed</p> 17 <% elsif @project.completed? -%>17 <% elsif project.completed? -%> 18 18 <p class="project_completed">Project has been marked as hidden</p> 19 19 <% end -%> trunk/tracks/app/views/projects/_project_listing.rhtml
r668 r853 1 1 <% project = project_listing 2 suppress_drag_handle ||= false 3 suppress_edit_button ||= false 2 4 @project_listing_zindex = @project_listing_zindex.nil? ? 200 : @project_listing_zindex - 1 3 5 -%> 4 6 <div id="<%= dom_id(project, "container") %>" class="list" style="z-index:<%= @project_listing_zindex %>"> 5 7 <div id="<%= dom_id(project) %>" class="project sortable_row" style="display:''"> 6 <div class="position"> 8 <% unless suppress_drag_handle -%> 9 <div class="position"> 7 10 <span class="handle">DRAG</span> 8 </div> 11 </div> 12 <% end -%> 9 13 <div class="data"> 10 14 <%= link_to_project( project ) %><%= " (" + count_undone_todos_and_notes_phrase(project,"actions") + ")" %> … … 23 27 end 24 28 end -%> 29 <% unless suppress_edit_button -%> 25 30 <a class="edit_project_button" id="<%= dom_id(project, 'editbutton') %>" href="<%= formatted_edit_project_path(project, :js) %>" title="delete the project '<%= project.name %>'"><%= image_tag( "blank.png", :title => "Edit project", :class=>"edit_item") %></a> 26 31 <%= apply_behavior 'a.edit_project_button:click', { :prevent_default => true, :external => true } do |page, element| … … 29 34 end 30 35 -%> 36 <% end -%> 31 37 </div> 32 38 </div> trunk/tracks/app/views/todos/_todo.html.erb
r837 r853 3 3 suppress_context ||= false 4 4 suppress_project ||= false 5 suppress_edit_button ||= false 5 6 %> 6 7 <div id="<%= dom_id(todo) %>" class="item-container"> 7 8 <div id="<%= dom_id(todo, 'line') %>"> 8 9 <%= remote_delete_icon %> 9 <%= remote_edit_icon %>10 <%= remote_edit_icon unless suppress_edit_button %> 10 11 <%= remote_star_icon %> 11 12 <%= remote_toggle_checkbox unless source_view_is :deferred %> trunk/tracks/public/stylesheets/standard.css
r844 r853 610 610 margin:20px 0px 8px 13px; 611 611 } 612 613 .search-result-group h2 { 614 margin:20px 0px 8px 13px 615 } 616 612 617 div.alpha_sort { 613 618 margin-top:-20px; trunk/tracks/test/functional/todos_controller_test.rb
r837 r853 347 347 "due(1i)"=>"2007", "due(2i)"=>"1", "due(3i)"=>"2", 348 348 "show_from(1i)"=>"", "show_from(2i)"=>"", "show_from(3i)"=>"", 349 "project_id"=>"1", 350 "notes"=>"test notes", "state"=>"0"} }349 "project_id"=>"1", 350 "notes"=>"test notes", "state"=>"0"}, "tag_list"=>"test, test2"} 351 351 assert_template 'todos/new' 352 352 end
