# -*- encoding : utf-8 -*-
# Configures your navigation
SimpleNavigation::Configuration.run do |navigation|
  
	navigation.auto_highlight = false
  
	navigation.items do |primary|




		primary.item :dahsboard, 'Dashboard', admin_root_path() do |dahsboard|
			dahsboard.item :image_files, 'Gestion des images', admin_image_files_path
			dahsboard.item :data_files, 'Gestion des fichiers', admin_data_files_path
			
			
			dahsboard.item :admins, 'liste des administrateurs du site', admin_admins_path do |sub_nav|
				sub_nav.item :edit_admins, 'Editer un administrateur',(@admin ? edit_admin_admin_path(@admin) : "")
				sub_nav.item :new_admins, 'Ajouter un administrateur',new_admin_admin_path
			end
			
			dahsboard.item :folders, 'liste des dossiers', admin_folders_path do |sub_nav|
				sub_nav.item :edit_folders, 'Editer un dossier',(@folder and @folder.id ? (@article ?  edit_admin_folder_path(:id => @folder.id, :tab => "articles") : edit_admin_folder_path(:id => @folder.id)) : "") do |folder|
					folder.item :new_articles, "Ajouter un article", (@folder ? new_admin_article_path(:folder_id => @folder.id) : "")
					folder.item :edit_articles, "Modifier un article", (@article ? edit_admin_article_path(@article) : "")
				end
				sub_nav.item :new_folders, 'Ajouter un dossier',new_admin_folder_path
			end
			
			
			dahsboard.item :menu_items, 'liste des éléments de menu', (@menu_item ? admin_menu_items_path(:menu_id => @menu_item.menu_id, :parent_id => @menu_item.parent_id) : admin_menu_items_path) do |sub_nav|
				sub_nav.item :edit_menu_items, 'Modifier un éléments de menu',(@menu_item and @menu_item.id ? edit_admin_menu_item_path(@menu_item) : "")
				sub_nav.item :new_menu_items, 'Ajouter un élément de menu',(@menu_item ? new_admin_menu_item_path(:menu_id => @menu_item.menu_id, :parent_id => @menu_item.parent_id) : "")
			end
		
			dahsboard.item :promotions, "Liste des promotions", admin_promotions_path()
			
			dahsboard.item :prescriptions, "Liste des ordonnances", admin_prescriptions_path()
			dahsboard.item :home_pages, "Gestion de la page d'accueil", admin_home_page_path(Home.find_by_slug('root'))
		
		end





	end

end
