seminar | treenode | pridany url na jednotlive editacni operace
This commit is contained in:
		
							parent
							
								
									6846f20898
								
							
						
					
					
						commit
						e33a33eae8
					
				
					 4 changed files with 14 additions and 6 deletions
				
			
		|  | @ -16,7 +16,9 @@ dfsdfs | |||
| 
 | ||||
| {% block content %} | ||||
| 
 | ||||
| <form> | ||||
| {%with obj=tnldata depth=1 template_name="seminar/treenode_recursive.html" %} | ||||
|    {%include template_name%} | ||||
| {%endwith%} | ||||
| </form> | ||||
| {% endblock content %} | ||||
|  |  | |||
|  | @ -6,6 +6,6 @@ | |||
| 			<option value="{{chld.0}}">{{chld.1}}</option> | ||||
| 			{% endfor %} | ||||
| 		</select> | ||||
| 		<button>Přídat</button> | ||||
| 		<button action="submit" formaction="{%url 'treenode_pridat' obj.node.id%}">Přidat</button> | ||||
| 	</div> | ||||
| {% endif %}{# appendablebleChildren #} | ||||
|  |  | |||
|  | @ -4,16 +4,16 @@ | |||
| <div class="node_type"> | ||||
| 	{{obj.node}} | ||||
| 	{% if obj.node|deletable %} | ||||
| 		<button>Smazat</button> | ||||
| 		<button type="submit" formaction="{%url 'treenode_smazat' obj.node.id%}">Smazat</button> | ||||
| 	{% endif %} | ||||
| 	{% if obj.parent and  obj.parent|editableSiblings %} | ||||
| 		<button>Odvěsit na úroveň {{obj.parent.node}}</button> | ||||
| 		<button type="submit" formaction="{%url 'treenode_odvesit' obj.node.id%}">Odvěsit na úroveň {{obj.parent.node}}</button> | ||||
| 	{% endif %} | ||||
| 	{% if obj|canPodvesitPred %} | ||||
| 		<button>Podvěsit pod předchozí</button> - nejsou testovací data | ||||
| 		<button type="submit" formaction="{%url 'treenode_podvesit_predchozi' obj.node.id%}">Podvěsit pod předchozí</button> - nejsou testovací data | ||||
| 	{% endif %} | ||||
| 	{% if obj|canPodvesitZa %} | ||||
| 		<button>Podvěsit pod následující</button> - nejsou testovací data | ||||
| 		<button type="submit" formaction="{%url 'treenode_podvesit_nasledujici' obj.node.id%}">Podvěsit pod následující</button> - nejsou testovací data | ||||
| 	{% endif %} | ||||
| 
 | ||||
| 
 | ||||
|  | @ -42,7 +42,7 @@ | |||
| 			{# ----------- Prohazujeme sousedy ----------#} | ||||
| 			<div class="pink"> | ||||
| 			{% if not forloop.last and ch|editableSiblings %} | ||||
| 				<button>Prohodit ^ a v</button> | ||||
| 				<button type="submit" formaction="{%url 'treenode_prohodit' ch.node.id%}">Prohodit ^ a v</button> | ||||
| 			{% endif %} | ||||
| 			</div> | ||||
| 		{% endfor %} | ||||
|  |  | |||
|  | @ -26,6 +26,12 @@ urlpatterns = [ | |||
| 	path('cislo/<int:rocnik>.<int:cislo>/', views.CisloView.as_view(), name='seminar_cislo'), # odkomentované jenom kvůli testování archivu | ||||
| 	path('problem/<int:pk>/', views.ProblemView.as_view(), name='seminar_problem'), | ||||
| 	path('treenode/<int:pk>/', views.TreeNodeView.as_view(), name='seminar_treenode'), | ||||
| 	path('treenode/editor/pridat/<int:pk>', views.TreeNodeView.as_view(), name='treenode_pridat'), | ||||
| 	path('treenode/editor/smazat/<int:pk>', views.TreeNodeView.as_view(), name='treenode_smazat'), | ||||
| 	path('treenode/editor/odvesit/<int:pk>', views.TreeNodeView.as_view(), name='treenode_odvesit'), | ||||
| 	path('treenode/editor/podvesit/predchozi/<int:pk>', views.TreeNodeView.as_view(), name='treenode_podvesit_predchozi'), | ||||
| 	path('treenode/editor/podvesit/nasledujici/<int:pk>', views.TreeNodeView.as_view(), name='treenode_podvesit_nasledujici'), | ||||
| 	path('treenode/editor/prohodit/<int:pk>', views.TreeNodeView.as_view(), name='treenode_prohodit'), | ||||
| 	#path('problem/(?P<pk>\d+)/(?P<prispevek>\d+)/', views.PrispevekView.as_view(), name='seminar_problem_prispevek'), | ||||
| 
 | ||||
| 	# Soustredeni | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue