# You can find more information about this file on the symfony website:
# http://www.symfony-project.org/reference/1_4/en/10-Routing

# default rules
homepage:
  url:   /
  param: { module: home, action: index }
home-index:
  url:   /home
  param: { module: home, action: index }
home-pieces:
  url:   /home/pieces
  param: { module: home, action: pieces }
home-questions:
  url:   /home/questions
  param: { module: home, action: questions }
home-months:
  url:   /home/months
  param: { module: home, action: months }
home-players:
  url:   /home/players
  param: { module: home, action: players }

scheduled-report:
  url:   /home/scheduledReportIndex
  param: { module: home, action: scheduledReportIndex }
scheduled-report-new-edit:
  url:   /home/scheduledReportNewEdit
  param: { module: home, action: scheduledReportNewEdit }
  requirements: { sf_method: post }
scheduled-report-get-id:
  url:   /home/scheduledReportGetId
  param: { module: home, action: scheduledReportGetId }
  requirements: { sf_method: post }
scheduled-report-delete:
  url:   /home/scheduledReportDelete
  param: { module: home, action: scheduledReportDelete }
  requirements: { sf_method: post }

404:
  url:   /404
  param: { module: default, action: error404 }
secure:
  url:   /secure
  param: { module: default, action: secure }
about:
  url:   /about
  param: { module: default, action: index }

single-signon:
  url:          /single-signon/:data
  param:        { module: login, action: singleSignon, data: "" }
  requirements: { sf_method: get, data: .+ }

indexDocument:
  url:   /indexDocument
  param: { module: documentation, action: index }
saveDocument:
  url:   /saveDocument
  param: { module: documentation, action: save }
newDocument:
  url:   /newDocument
  param: { module: documentation, action: new }
deleteDocument:
  url:   /deleteDocument/:id
  param: { module: documentation, action: delete, id: 0 }

instructions:
  url:   /instructions
  param: { module: instructions, action: index }
saveInstruction:
  url:   /saveInstruction
  param: { module: instructions, action: save }
newInstruction:
  url:   /newInstruction
  param: { module: instructions, action: new }
deleteInstruction:
  url:   /deleteInstruction/:id
  param: { module: instructions, action: delete, id: 0 }

welcome:
  url:   /welcome
  param: { module: welcome, action: index }
saveWelcome:
  url:   /saveWelcome
  param: { module: welcome, action: save }
newWelcome:
  url:   /newWelcome
  param: { module: welcome, action: new }
deleteWelcome:
  url:   /deleteWelcome/:id
  param: { module: welcome, action: delete, id: 0 }

newUsers:
  url:   /newUsers
  param: { module: user, action: newUsers }
importUsers:
  url:   /importUsers
  param: { module: user, action: importUsers }
importUsersExcel:
  url:   /importUsersExcel
  param: { module: user, action: importUsersExcel }
uploadUsers:
  url:   /uploadUsers
  param: { module: user, action: upload }

importQuestions:
  url:   /importQuestions
  param: { module: default, action: import }
uploadQuestions:
  url:   /uploadQuestions
  param: { module: default, action: upload }
downloadQuestions:
  url:   /downloadQuestions
  param: { module: default, action: download }
saveQuestions:
  url:   /saveQuestions
  param: { module: default, action: save }
preguntasEjemplos:
  url:   /preguntasEjemplos
  param: { module: default, action: ejemplos }
resetPreguntas:
  url:   /resetPreguntas
  param: { module: default, action: borrar }

login:
  url:          /login
  param:        { module: login, action: index }
  requirements: { sf_method: [get, post] }
logout:
  url:          /logout
  param:        { module: login, action: logout }
  requirements: { sf_method: get }


question:
  class: sfDoctrineRouteCollection
  options:
    model:                Question
    module:               question
    prefix_path:          /question
    column:               id
    param:                { id: "" }
    with_wildcard_routes: true
    with_show:            true
    object_actions:
      preDelete:          get
      optionNew:          [get, post]
      duplicate:          [post]
    collection_actions:
      export:             get
question:
  url:   /question
  param: { module: question, action: question }
question_show:
  url:   /question/show
  param: { module: home, action: question }
question-question-resumen:
  url:  /question/question/resumen
  param: { module: question, action: questionsResumen }  
question-question-edit:
  url:  /question/question/edit/:id
  param: { module: question, action: questionsEdit, id: 0 }
question-question-save:
  url:  /question/question/save
  param: { module: question, action: questionsSave }  
question-question-delete:
  url:  /question/question/delete/:id
  param: { module: question, action: questionsDelete, id: 0 } 
question-question-add:
  url:  /question/question/add
  param: { module: question, action: questionsAdd }   
###      
question-packs:
  url:   /question/packs
  param: { module: question, action: packs }
question-packs-resumen:
  url:  /question/packs/resumen
  param: { module: question, action: packsResumen }  
question-packs-edit:
  url:  /question/packs/edit/:id
  param: { module: question, action: packsEdit, id: 0 }
question-packs-save:
  url:  /question/packs/save
  param: { module: question, action: packsSave }
question-packs-delete:
  url:  /question/packs/delete/:id
  param: { module: question, action: packsDelete, id: 0 }    
question-packs-add:
  url:  /question/packs/add
  param: { module: question, action: packsAdd }     
###
question-categorias:
  url:   /question/categorias
  param: { module: question, action: categorias }
question-categorias-resumen:
  url:  /question/categorias/resumen
  param: { module: question, action: categoriasResumen }
question-categorias-edit:
  url:  /question/categorias/edit/:id
  param: { module: question, action: categoriasEdit, id: 0 }
question-categorias-save:
  url:  /question/categorias/save
  param: { module: question, action: categoriasSave }  
question-categorias-delete:
  url:  /question/categorias/delete/:id
  param: { module: question, action: categoriasDelete, id: 0 }   
question-categorias-add:
  url:  /question/categorias/add
  param: { module: question, action: categoriasAdd }   
###
question-respuestas:
  url:   /question/respuestas
  param: { module: question, action: respuestas }
question-respuestas-resumen:
  url:  /question/respuestas/resumen
  param: { module: question, action: respuestasResumen }
question-respuestas-edit:
  url:  /question/respuestas/edit/:id
  param: { module: question, action: respuestasEdit, id: 0 }
question-respuestas-save:
  url:  /question/respuestas/save
  param: { module: question, action: respuestasSave }
question-respuestas-delete:
  url:  /question/respuestas/delete/:id
  param: { module: question, action: respuestasDelete, id: 0 } 
question-respuestas-add:
  url:  /question/respuestas/add
  param: { module: question, action: respuestasAdd } 

question-feedbacks:
  url:   /question/feedbacks
  param: { module: question, action: feedbacks }
question-feedbacks-add:
  url:  /question/feedbacks/add
  param: { module: question, action: feedbacksAdd }
question-feedbacks-edit:
  url:  /question/feedbacks/edit/:id
  param: { module: question, action: feedbacksEdit, id: 0 }
question-feedbacks-save:
  url:  /question/feedbacks/save
  param: { module: question, action: feedbacksSave }
question-feedback-delete:
  url:  /question/feedbacks/delete/:id
  param: { module: question, action: feedbacksDelete, id: 0 }

questionOption_edit:
  url:          /question-option/:id
  class:        sfDoctrineRoute
  options:      { model: QuestionOption, type: object }
  param:        { module: question, action: optionEdit }
  requirements: { sf_method: [get, post] }
questionOption_delete:
  url:          /question-option/:id/delete
  class:        sfDoctrineRoute
  options:      { model: QuestionOption, type: object }
  param:        { module: question, action: optionDelete }
  requirements: { sf_method: delete }
variables:
  url:  /variables
  param: { module: variables, action: variables }
variables-add:
  url:  /variables/add
  param: { module: variables, action: variablesAdd }
variables-edit:
  url:  /variables/edit/:id
  param: { module: variables, action: variablesEdit , id: 0 } 
variables-save:
  url:  /variables/save
  param: { module: variables, action: variablesSave } 
variables-delete:
  url:  /variables/delete/:id
  param: { module: variables, action: variablesDelete, id: 0 } 
#multimedia:
#  class: sfDoctrineRouteCollection
# options:
#    model:                Multimedia
#    module:               multimedia
#    prefix_path:          /multimedia
#    column:               id
#    param:                { id: "" }
#    with_wildcard_routes: true
#    with_show:            true
#    object_actions:
#      preDelete:          get
#      duplicate:          [post]
multimedia:
  url:  /multimedia
  param: { module: multimedia, action: multimedia } 

multimedia-edit:
  url:  /multimedia/edit/:id
  param: { module: multimedia, action: multimediaEdit, id: 0 } 
multimedia-delete:
  url:  /multimedia/delete/:id
  param: { module: multimedia, action: multimediaDelete, id: 0 } 
multimedia-save:
  url:  /multimedia/save
  param: { module: multimedia, action: multimediaSave } 
multimedia-add:
  url:  /multimedia/add
  param: { module: multimedia, action: multimediaAdd } 
# player:
#   class: sfDoctrineRouteCollection
#   options:
#     model:                Player
#     module:               player
#     prefix_path:          /player
#     column:               id
#     param:                { id: "" }
#     with_wildcard_routes: true
#     with_show:            true
#     object_actions:
#      preDelete:          get
#      estart:            [get, post]
#     collection_actions:
#     export:             get

game:
  url:  /game
  param: { module: game, action: game }
game_export:
  url:  /game/export
  param: { module: game, action: export }
game-delete:
  url:  /game/delete/:id
  param: { module: game, action: gameDelete, id: 0 }
game-resumen:
  url:  /game/resumen/:id/:ranking
  param: { module: game, action: gameResumen, id: 0 , ranking: 0}
player_game:
  url:          /player/:id/game/:gameid
  class:        sfDoctrineRoute
  options:      { model: Player, type: object }
  param:        { module: player, action: game, gameid: "" }
  requirements: { sf_method: get }

user:
  url:  /user
  param: { module: user, action: user }    
user-delete:
  url:  /user/delete/:id
  param: { module: user, action: userDelete, id: 0 } 
user-add:
  url:  /user/add
  param: { module: user, action: userAdd }   
user-new2:
  url:  /user/new
  param: { module: user, action: userNew }   
user-save:
  url:  /user/save
  param: { module: user, action: userSave }  
user-edit:
  url:  /user/:id
  param: { module: user, action: userEdit, id: 0 }  
event:
  class: sfDoctrineRouteCollection
  options:
    model:                Event
    module:               event
    prefix_path:          /evento
    column:               id
    param:                { id: "" }
    with_wildcard_routes: true
    with_show:            true
    object_actions:
      preDelete:          get

answer:
  class: sfDoctrineRouteCollection
  options:
    model:                Answer
    module:               answer
    prefix_path:          /answer
    column:               id
    param:                { id: "" }
    with_wildcard_routes: true
    with_show:            true
answer_question:
  url:          /answer/question/:id
  class:        sfDoctrineRoute
  options:      { model: Question, type: object }
  param:        { module: answer, action: question }
  requirements: { sf_method: get }

category:
  class: sfDoctrineRouteCollection
  options:
    model:                Category
    module:               category
    prefix_path:          /product
    column:               id
    param:                { id: "" }
    with_wildcard_routes: true
    with_show:            true
    object_actions:
      preDelete:          get

administrator:
  class: sfDoctrineRouteCollection
  options:
    model:                Administrator
    module:               administrator
    prefix_path:          /administrador
    column:               id
    with_wildcard_routes: true
    with_show:            true
    object_actions:
      sessions:       get
      editPassword:   [get, post]
      toggleIsActive: post
      preDelete:      get

administrator-clear-cache:
  url:          /administrador/clear-cache
  param:        { module: administrator, action: clearCache }
  requirements: { sf_method: [get, post] }

#game:
#  class: sfDoctrineRouteCollection
#  options:
#    model:                Game
#    module:               game
#    prefix_path:          /game
#    column:               id
#    param:                { id: "" }
#    with_wildcard_routes: true
#    with_show:            true
#    collection_actions:
#      export:               get
#game:
#  url:   /game
#  param: { module: game, action: index }
#game_export:
#  url:   /game/export
#  param: { module: game, action: export }
#game_show:
#  url:   /game/show/:id
#  param: { module: game, action: show, id: 0 }


configuration:
  class: sfDoctrineRouteCollection
  options:
    model:                Configuration
    module:               configuration
    prefix_path:          /configuration
    column:               id
    with_wildcard_routes: true
    with_show:            true

custom1:
  class: sfDoctrineRouteCollection
  options:
    model:                Custom1
    module:               custom1
    prefix_path:          /custom1
    column:               id
    param:                { id: "" }
    with_wildcard_routes: true
    with_show:            true
    object_actions:
      preDelete:          get

custom2:
  class: sfDoctrineRouteCollection
  options:
    model:                Custom2
    module:               custom2
    prefix_path:          /custom2
    column:               id
    param:                { id: "" }
    with_wildcard_routes: true
    with_show:            true
    object_actions:
      preDelete:          get

custom3:
  class: sfDoctrineRouteCollection
  options:
    model:                Custom3
    module:               custom3
    prefix_path:          /custom3
    column:               id
    param:                { id: "" }
    with_wildcard_routes: true
    with_show:            true
    object_actions:
      preDelete:          get

# generic rules
# please, remove them by adding more specific rules
#default_index:
#  url:   /:module
#  param: { action: index }
#
#default:
#  url:   /:module/:action/*
