# default rules
homepage:
  url:   /
  param: { module: homepage, action: index }
  
loginUser:
  url: /connexion
  param: { module: account, action: loginUser}

logoutUser:
  url: /deconnexion
  param: { module: account, action: logoutUser}

openidLogin:
  url: /open-id/connexion
  param: { module: account, action: openidLogin}

########  
#SEGMENT EDITOR
########  
editor:
  url:   /editeur/:ref/:film_slug
  param: { module: editor, action: index }
  requirements: {ref: \d+}
  
addFilmSegment:
  url: /segments/:ref/:film_slug/ajout-segment
  param: { module: editor, action: addFilmSegment}
  requirements: {ref: \d+}
  
segmentListJson:
  url: /segments/:ref/:film_slug/list-segment
  param: { module: editor, action: segmentListJson}
  requirements: {ref: \d+}
  


  
########
# SEARCH
########

search:
  url: /recherche/:filter/:page_nb
  param: { module: search, action: index, filter: all, page_nb: 1 }
  requirements: { page_nb: \d+ }
  
  
########
# TAGGING
########  

tagging:
  url: /tagging/:tag/:page_nb
  param: { module: tag, action: index, tag: all, page_nb: 1 }
  requirements: { page_nb: \d+ }
  
########
# FILMS
########

viewFilmList:
  url:   /films/:page/:page_nb
  param: { module: films, action: viewFilmList, page: page, page_nb: 1 }
  requirements: { page_nb: \d+ }
  
viewTopFilmList:
  url:   /top-des-films/:page/:page_nb
  param: { module: films, action: viewTopFilmList, page: page, page_nb: 1 }
  
 
#########
# REFLEXONOMIES
#########

searchReflex:
  url: /reflex/:film_uniqueid/:tag/:direction/:distance
  param: { module: reflex, action: index, tag: all, direction: more, distance: 5 }
  requirements: { direction: more|less, distance: \d+ }   
    


default_index:
  url:   /:module
  param: { action: index }

default:
  url:   /:module/:action/*