Sha256: 3ec0435a557409e9135a8685af063205728efc5a130759350fab8351cd6c0996

Contents?: true

Size: 793 Bytes

Versions: 3

Compression:

Stored size: 793 Bytes

Contents

module BookytProjects
  module Navigation
    def setup_bookyt_projects(navigation)
      navigation.item :projects, t_model(Project), projects_path, :if => Proc.new { user_signed_in? } do |projects|
        projects.item :project_index, t_title(:index, Project), projects_path, :highlights_on => /\/(projects|activities)($|\/[0-9]*($|\/.*))/
        projects.item :capture_hours, t_title(:new, Activity), new_activity_path
        projects.item :new_project, t_title(:new, Project), new_project_path
        projects.item :project_states, t_model(ProjectState), project_states_path, :highlights_on => /\/project_states($|\/([0-9]*|new)($|\/.*))/ 
      end
      navigation.item :capture_hours, t_title(:new, Activity), new_activity_path, :if => Proc.new { user_signed_in? }
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bookyt_projects-0.6.3 lib/bookyt_projects/navigation.rb
bookyt_projects-0.6.1 lib/bookyt_projects/navigation.rb
bookyt_projects-0.6.0 lib/bookyt_projects/navigation.rb