'use strict';
angular.module('qrzk')

.config(function($stateProvider, $urlRouterProvider,$httpProvider) {
	
  $stateProvider
  .state('course', {
      abstract: true,
      url: "/course",
      templateUrl: "resources/app/common/top.html"
    })
  .state('course.list', {
  	url: "/list",
  	templateUrl: "resources/app/course/list.html",
  	ncyBreadcrumb: {
  		label: '课程管理'    		
  	}
  })
  .state('course.add', {
	url: "/add",
	templateUrl: "resources/app/course/add.html",
	ncyBreadcrumb: {
		label: '添加课程',
		parent: 'course.list'
	}
  })
  .state('course.edit', {
	  url: "/edit/:id",
	  params: {id:null},
	  templateUrl: "resources/app/course/add.html",
	  ncyBreadcrumb: {
		  label: '编辑课程',
		  parent: 'course.list'
	  }
  })
  .state('course.relatedBooks', {
	  url: "/relatedBooks/:id",
	  params: {id:null},
	  templateUrl: "resources/app/course/relatedBooks.html",
	  ncyBreadcrumb: {
		  label: '关联教材',
		  parent: 'course.list'
	  }
  })
   .state('course.relatedQuestionTypes', {
	  url: "/relatedQuestionTypes/:id",
	  params: {id:null},
	  templateUrl: "resources/app/course/relatedQuestionTypes.html",
	  ncyBreadcrumb: {
		  label: '关联题型',
		  parent: 'course.list'
	  }
  })
  .state('course.import', {
	  url: "/import",
	  templateUrl: "resources/app/course/import.html",
	  ncyBreadcrumb: {
		  label: '导入课程',
		  parent: 'course.list'
	  }
  })
  .state('book', {
      abstract: true,
      url: "/book",
      templateUrl: "resources/app/common/top.html"
    })
  .state('book.list', {
  	url: "/list",
  	templateUrl: "resources/app/book/list.html",
  	ncyBreadcrumb: {
  		label: '教材管理'    		
  	}
  })
  .state('book.add', {
	url: "/add",
	templateUrl: "resources/app/book/add.html",
	ncyBreadcrumb: {
		label: '添加教材',
		parent: 'book.list'
	}
  })
  .state('book.edit', {
	url: "/edit/:id",
	params: {id:null},
	templateUrl: "resources/app/book/add.html",
	ncyBreadcrumb: {
		label: '编辑教材',
		parent: 'book.list'
	}
  })
  .state('book.import', {
	  url: "/import",
	  templateUrl: "resources/app/book/import.html",
	  ncyBreadcrumb: {
		  label: '导入教材',
		  parent: 'book.list'
	  }
  })
  .state('questionType', {
      abstract: true,
      url: "/questionType",
      templateUrl: "resources/app/common/top.html"
    })
  .state('questionType.list', {
  	url: "/list",
  	templateUrl: "resources/app/questionType/list.html",
  	ncyBreadcrumb: {
  		label: '题型管理'    		
  	}
  })
  .state('questionType.add', {
	url: "/add",
	templateUrl: "resources/app/questionType/add.html",
	ncyBreadcrumb: {
		label: '添加题型',
		parent: 'questionType.list'
	}
  })
  .state('questionType.edit', {
	url: "/edit/:id",
	params: {id:null},
	templateUrl: "resources/app/questionType/add.html",
	ncyBreadcrumb: {
		label: '编辑题型',
		parent: 'questionType.list'
	}
  })
  .state('questionType.import', {
	  url: "/import",
	  templateUrl: "resources/app/questionType/import.html",
	  ncyBreadcrumb: {
		  label: '导入题型',
		  parent: 'questionType.list'
	  }
  })
  .state('questionsimilarity', {
      abstract: true,
      url: "/questionsimilarity",
      templateUrl: "resources/app/common/top.html"
    })
  .state('questionsimilarity.list', {
  	url: "/list",
  	templateUrl: "resources/app/questionsimilarity/list.html",
  	ncyBreadcrumb: {
  		label: '相似试题'    		
  	}
  })
  .state('papersimilarity', {
      abstract: true,
      url: "/papersimilarity",
      templateUrl: "resources/app/common/top.html"
    })
  .state('papersimilarity.list', {
  	url: "/list",
  	templateUrl: "resources/app/papersimilarity/list.html",
  	ncyBreadcrumb: {
  		label: '相似试卷'    		
  	}
  })
  .state('papersimilarity.paperquestion', {
  	url: "/paperquestion",
  	templateUrl: "resources/app/papersimilarity/view_paper_question.html",
  	params: {similarPaperNo:null,taskId:null,taskNo:null},
  	ncyBreadcrumb: {
  		label: '试卷比对',
  		parent: 'papersimilarity.list'
  	}
  })
  .state('backupandrestore', {
      abstract: true,
      url: "/backupandrestore",
      templateUrl: "resources/app/common/top.html"
    })
  .state('backupandrestore.list', {
  	url: "/list",
  	templateUrl: "resources/app/backupandrestore/list.html",
  	ncyBreadcrumb: {
  		label: '备份还原'	
  	}
  })
});

