Merge branch 'treenode_editor' of gimli.ms.mff.cuni.cz:/akce/mam/git/mamweb into treenode_editor
This commit is contained in:
		
						commit
						c3482097a9
					
				
					 2 changed files with 17 additions and 5 deletions
				
			
		|  | @ -93,4 +93,15 @@ class ProblemViewSet(viewsets.ModelViewSet): | |||
| 
 | ||||
| 	def get_queryset(self): | ||||
| 		queryset = m.Problem.objects.all() | ||||
| 		ucel = self.request.query_params.get('ucel',None) | ||||
| 		rocnik = self.request.query_params.get('rocnik',None) | ||||
| 		tema = self.request.query_params.get('tema',None) | ||||
| 
 | ||||
| 		if rocnik is not None: | ||||
| 			queryset = queryset.filter(rocnik=rocnik) | ||||
| 
 | ||||
| 		#if tema is not None: | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 		return queryset | ||||
|  |  | |||
|  | @ -1,7 +1,8 @@ | |||
| <template> | ||||
| 	<div class="ulohavzoraknode"> | ||||
| 		<!--pre>UlohaVzorakNode {{item}} {{typeof(item)}}</pre--> | ||||
| 		<h5>Řešení {{item.node.uloha.cislo_zadani.poradi}}.{{ item.node.uloha.kod }}: {{ item.node.uloha.nazev }}</h5> | ||||
| 		<!--h5 v-if="!editorMode">Řešení {{item.node.uloha.cislo_zadani.poradi}}.{{ item.node.uloha.kod }}: {{ item.node.uloha.nazev }}</h5--> | ||||
| 		<h5>Řešení!</h5> | ||||
| 		<button v-if="editorMode" v-on:click="showSelect=!showSelect" class="upravit">Upravit</button> | ||||
| 		<div v-if="showSelect"> | ||||
| 			<form class="searchForm" v-on:submit.prevent="submitSearch"> | ||||
|  | @ -38,14 +39,14 @@ export default { | |||
| 		editorMode: Boolean, | ||||
| 	}, | ||||
| 	mounted: function(){ | ||||
| 		if (this.item.node.uloha === null){ | ||||
| 			console.log("Uloha je null!"); | ||||
| 			console.log(this.item); | ||||
| 		} | ||||
| 		if (this.create){ | ||||
| 			this.showSelect = true; | ||||
| 			console.log('Creating'); | ||||
| 		} | ||||
| 		if (this.item !== null && this.item.node.uloha === null){ | ||||
| 			console.log("Uloha je null!"); | ||||
| 			console.log(this.item); | ||||
| 		} | ||||
| 	}, | ||||
| 	methods: { | ||||
| 		submitSearch: function(){ | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Kateřina Č
						Kateřina Č