default: context: node_name: '@node' node: complex visitor: complex_admin site: complex src: "" sql: "[%Q{SELECT nodes.* FROM nodes WHERE #{secure_scope('nodes')} AND nodes.parent_id = ? ORDER BY nodes.zip ASC}, @node.id]" res: "cskin, list of employees, jobs, courses list" assigned_jobs: context: node: roger class: Employee src: assigned_jobs res: "driver, technician" courses_assigned_to_driver_team: context: node: driver_team class: Page src: assigned_courses res: "problem formulation, information transmission" all_courses_in_driver: context: node: driver class: Employee src: assigned_courses from pages in project res: "dangerous transportations, problem formulation, information transmission, engine maintenance" all_courses_for_roger: context: node: roger class: Employee src: assigned_courses from pages in project from assigned_jobs res: "dangerous transportations, problem formulation, information transmission, engine maintenance, secure a site, how to use the winch, how to use the radio, fiber junction" all_courses_for_joe: context: node: joe class: Employee src: assigned_courses from pages in project from assigned_jobs res: "problem formulation, information transmission, secure a site, how to use the winch, how to use the radio, fiber junction" all_courses_for_mike: context: node: mike class: Employee src: assigned_courses from pages in project from assigned_jobs # TODO: optimization #sql: "[%Q{SELECT no1.*,li1.id AS link_id,links.status AS l_status,links.comment AS l_comment,links.date AS l_date FROM links,nodes,nodes AS no1,links AS li1 WHERE no1.id = li1.target_id AND li1.relation_id = 512923747 AND li1.source_id = nodes.id AND nodes.kpath LIKE 'NP%' AND nodes.project_id = links.target_id AND links.relation_id = 813976280 AND links.source_id = \#{@node.id} AND (\#{@node.secure_scope('no1')}) GROUP BY no1.id ORDER BY no1.position ASC, no1.node_name ASC}]" res: "problem formulation, information transmission, secure a site, how to use the winch, how to use the radio, fiber junction, responsabilities management, motivate your team, our vision" all_achieved_formations_for_roger: context: node: roger class: Employee src: assigned_formations where l_status eq 100 res: dtransp 2004, fiber 2003, formprobs 2006, transinfo 2001, transinfo 2002 custom_query_form_date: context: node: roger class: Employee src: emp_form_dates order by title ASC res: "dangerous transportations, engine maintenance, fiber junction, how to use the radio, how to use the winch, information transmission, problem formulation, secure a site" custom_query_form_with_where: context: node: roger class: Employee date: '2005-03-01' src: "emp_form_dates where last_date is null or (repeat_every is not null and next_date lt #{date} + 6 month)" res: "how to use the winch, secure a site, engine maintenance, information transmission, fiber junction, how to use the radio" find_employees_related_to_a_course__formulate_problems: context: node: transmit_information class: Course src: assigned_employees from jobs:project from assigned_pages res: 'Roger Ubercool, Joe Friendly, Mike Mean' find_employees_related_to_a_course__fiber_junction: context: node: fiber_junction class: Course src: assigned_employees from jobs:project from assigned_pages res: 'Roger Ubercool, Joe Friendly, Mike Mean' find_employees_related_to_a_course__vision: context: node: vision class: Course src: assigned_employees from jobs:project from assigned_pages res: 'Mike Mean' course_emp_date: context: node: transmit_information class: Course src: "course_emp_dates" res: "Joe Friendly, Mike Mean, Roger Ubercool" all_course_emp_date: src: "assigned_employees from jobs:project from assigned_pages from courses in site" res: "Roger Ubercool, Joe Friendly, Mike Mean" courses_with_rep: src: "courses where custom_a is not null in site order by title ASC" res: "dangerous transportations, engine maintenance, fiber junction, how to use the radio, how to use the winch, information transmission, motivate your team, our vision, responsabilities management, secure a site" it_should_use_alias_in_filters: src: "alias_query where event_at < now in site" sql: "%Q{SELECT (log_at + INTERVAL 6 months) AS event_at FROM nodes WHERE #{secure_scope('nodes')} AND ((log_at + INTERVAL 6 months)) < now() ORDER BY nodes.zip ASC}"