parent
4a51f7d3c2
commit
ee24917bee
@ -1,2 +1,7 @@ |
||||
.PHONY: assets watch |
||||
|
||||
assets: |
||||
cd resources && npm run build
|
||||
|
||||
watch: |
||||
cd resources && npm run watch
|
||||
|
@ -1,222 +0,0 @@ |
||||
*, *::before, *::after { |
||||
box-sizing: border-box; |
||||
} |
||||
|
||||
html, textarea, select { |
||||
font-family: "IBM Plex", "DejaVu Sans", "Helvetica", sans-serif; |
||||
} |
||||
|
||||
.Form { |
||||
display: block; |
||||
width: 900px; |
||||
margin: 0 auto; |
||||
} |
||||
|
||||
nav.top-nav { |
||||
margin-bottom: .5rem; |
||||
border-bottom: 1px solid silver; |
||||
} |
||||
|
||||
nav.top-nav, .content { |
||||
margin: 0 auto; |
||||
width: 900px; |
||||
} |
||||
|
||||
a { |
||||
color: gray; |
||||
text-decoration: none; |
||||
} |
||||
|
||||
a:hover { |
||||
color: black; |
||||
text-decoration: underline; |
||||
} |
||||
|
||||
nav.top-nav a { |
||||
display: inline-block; |
||||
padding: .75rem; |
||||
|
||||
color: gray; |
||||
text-decoration: none; |
||||
} |
||||
|
||||
nav.top-nav a:hover { |
||||
color: black; |
||||
text-decoration: underline; |
||||
} |
||||
|
||||
.Form .Row { |
||||
display: flex; |
||||
padding: .25rem; |
||||
} |
||||
|
||||
.Form .Row.indented { |
||||
padding-left: 10.25rem; |
||||
} |
||||
|
||||
input[type="text"], |
||||
input[type="number"], |
||||
textarea, |
||||
.tag-input { |
||||
border: 1px solid silver; |
||||
padding: 0.5rem; |
||||
border-radius: 5px; |
||||
font-size: 1rem; |
||||
} |
||||
|
||||
input[type="text"]:focus, |
||||
input[type="number"]:focus, |
||||
textarea:focus, |
||||
.tag-input.active { |
||||
box-shadow: inset 0 0 0 1px #3c97ff; |
||||
border-color: #3c97ff; |
||||
outline: 0 none !important; |
||||
} |
||||
|
||||
.Form label { |
||||
flex-shrink: 0; |
||||
width: 10rem; |
||||
height: 2.1rem; |
||||
line-height: 2.1rem; |
||||
vertical-align: middle; |
||||
text-align: right; |
||||
display: inline-block; |
||||
padding-right: .5rem; |
||||
align-self: flex-start; |
||||
} |
||||
|
||||
.Form input[type="text"], |
||||
.Form input[type="number"], |
||||
.Form select { |
||||
height: 2.1rem; |
||||
width: 15rem; |
||||
} |
||||
|
||||
.Form textarea { |
||||
flex-shrink: 1; |
||||
width: 30rem; |
||||
height: 6rem; |
||||
} |
||||
|
||||
.Form label.checkbox-wrap { |
||||
width: 15rem; |
||||
padding-right: 1rem; |
||||
text-align: left !important; |
||||
} |
||||
|
||||
.tag-input { |
||||
position: relative; |
||||
width: 30rem; |
||||
padding-bottom: 0rem !important; |
||||
} |
||||
|
||||
.tag-input input, |
||||
.tag-input input:focus { |
||||
border: 0 transparent; |
||||
padding: 0; |
||||
margin: 0; |
||||
box-shadow: none; |
||||
outline: 0 none !important; |
||||
} |
||||
|
||||
/* |
||||
|
||||
.cards-table { |
||||
border-collapse: collapse; |
||||
margin: 0 auto; |
||||
margin-top: 1rem; |
||||
} |
||||
|
||||
.cards-table .actions { |
||||
font-size: 90%; |
||||
} |
||||
|
||||
.cards-table td, |
||||
.cards-table th { |
||||
padding: .5rem; |
||||
} |
||||
|
||||
.cards-table thead th { |
||||
border-bottom: 2px solid silver; |
||||
} |
||||
|
||||
.cards-table tbody td { |
||||
border-bottom: 1px solid silver; |
||||
} |
||||
|
||||
.cards-table tbody tr:last-child td { |
||||
border-bottom: 2px solid silver; |
||||
} |
||||
|
||||
.cards-table td.tags { |
||||
padding: .25rem; |
||||
} |
||||
|
||||
.cards-table .tag { |
||||
background: #E2E1DF; |
||||
font-size: 90%; |
||||
padding: 0.25rem .45rem; |
||||
border-radius: 3px; |
||||
display: inline-block; |
||||
} |
||||
|
||||
.paginate { |
||||
margin: 1rem auto; |
||||
width: 300px; |
||||
text-align: center; |
||||
white-space: nowrap; |
||||
} |
||||
|
||||
.paginate span, |
||||
.paginate a { |
||||
padding: .5rem 1rem; |
||||
border-radius: .5rem; |
||||
border: 1px solid silver; |
||||
text-decoration: none; |
||||
} |
||||
|
||||
.paginate span.num { |
||||
border: 1px solid #ccc; |
||||
color: gray; |
||||
} |
||||
|
||||
.paginate a { |
||||
cursor: pointer; |
||||
user-select: none; |
||||
} |
||||
|
||||
.paginate a:hover { |
||||
background: #ccc; |
||||
text-decoration: none; |
||||
} |
||||
|
||||
.paginate .disabled { |
||||
opacity: .5; |
||||
cursor: default; |
||||
} |
||||
|
||||
.paginate .disabled:hover { |
||||
color: gray; |
||||
background: transparent; |
||||
} |
||||
|
||||
*/ |
||||
|
||||
li { |
||||
padding-bottom: .5rem; |
||||
} |
||||
|
||||
.toast { |
||||
border: 1px solid black; |
||||
border-radius: 5px; |
||||
padding: .5rem; |
||||
margin: .5rem 0; |
||||
} |
||||
|
||||
.toast.error { |
||||
border-color: #dc143c; |
||||
} |
||||
|
||||
.toast.success { |
||||
border-color: #32cd32; |
||||
} |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,39 @@ |
||||
{% macro header_with_save_button(heading) %} |
||||
<div class="container"> |
||||
<div class="cols"> |
||||
<div class="col col-9"> |
||||
<h1>{{heading}}</h1> |
||||
</div> |
||||
<div class="col col-3 text-right"> |
||||
<button type="submit" class="btn btn-primary"> |
||||
<i class="icon icon-check"></i>Save |
||||
</button> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
{% endmacro input %} |
||||
|
||||
{% macro text(name, label, value) %} |
||||
<div class="form-group cols"> |
||||
<div class="col-3 pl-2"> |
||||
<label class="form-label" for="{{name}}">{{label}}</label> |
||||
</div> |
||||
<div class="col-9 pr-2"> |
||||
<input type="text" class="form-input input-inline" id="{{name}}" name="{{name}}" value="{{value}}" autocomplete="off"> |
||||
</div> |
||||
</div> |
||||
{% endmacro input %} |
||||
|
||||
{% macro checkbox(name, label, checked) %} |
||||
<div class="form-group cols"> |
||||
<div class="col-3 pl-2"> |
||||
<label class="form-label" for="{{name}}">{{label}}</label> |
||||
</div> |
||||
<div class="col-9 pr-2"> |
||||
<label class="form-switch input-inline"> |
||||
<input type="checkbox" id="{{name}}" name="{{name}}" value="true" autocomplete="off" {{opt(checked=checked)}}> |
||||
<i class="form-icon"></i> |
||||
</label> |
||||
</div> |
||||
</div> |
||||
{% endmacro input %} |
@ -1,27 +1,22 @@ |
||||
{% extends "_layout" %} |
||||
{% import "_form_macros" as form %} |
||||
|
||||
{% block title -%} |
||||
Define object |
||||
{%- endblock %} |
||||
|
||||
{% block nav -%} |
||||
<a href="/">Home</a> |
||||
<a href="/" class="btn btn-link"><i class="icon icon-home"></i>Home</a> |
||||
{%- endblock %} |
||||
|
||||
{% block content -%} |
||||
|
||||
<h1>Define new object model</h1> |
||||
|
||||
<form action="/model/object/create" method="POST"> |
||||
<table> |
||||
<tr> |
||||
<th><label for="name">Name:</label></th> |
||||
<td><input type="text" id="name" name="name" value="{{old.name}}" autocomplete="off"> |
||||
</td> |
||||
</tr> |
||||
</table> |
||||
{{ form::header_with_save_button(heading="Define new object model") }} |
||||
|
||||
<input type="submit" value="Save"> |
||||
<div class="form-horizontal container"> |
||||
{{ form::text(name="name", label="Name", value=old.name) }} |
||||
</div> |
||||
</form> |
||||
|
||||
{%- endblock %} |
||||
|
@ -1,38 +1,36 @@ |
||||
{% extends "_layout" %} |
||||
{% import "_form_macros" as form %} |
||||
|
||||
{% block title -%} |
||||
Edit object model |
||||
{%- endblock %} |
||||
|
||||
{% block nav -%} |
||||
<a href="/">Home</a> |
||||
<a href="/" class="btn btn-link"><i class="icon icon-home"></i>Home</a> |
||||
{%- endblock %} |
||||
|
||||
{% block content -%} |
||||
|
||||
<h1>Edit object model {{ model.name }}</h1> |
||||
|
||||
<form action="/model/object/update/{{ model.id }}" method="POST"> |
||||
<table> |
||||
<tr> |
||||
<th><label for="name">Name:</label></th> |
||||
<td><input type="text" id="name" name="name" value="{{ model.name }}" autocomplete="off"> |
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<th><label for="name_property">Name property:</label></th> |
||||
<td> |
||||
<select name="name_property" id="name_property" autocomplete="off"> |
||||
{{ form::header_with_save_button(heading="Edit object model "~model.name) }} |
||||
|
||||
<div class="form-horizontal container"> |
||||
{{ form::text(name="name", label="Name", value=model.name) }} |
||||
|
||||
<div class="form-group cols"> |
||||
<div class="col-3 pl-2"> |
||||
<label class="form-label" for="name_property">Name property</label> |
||||
</div> |
||||
<div class="col-9 pr-2"> |
||||
<select name="name_property" class="form-select input-inline" id="name_property" autocomplete="off"> |
||||
<option value=""></option> |
||||
{% for p in properties %} |
||||
<option value="{{ p.id }}" {{selected(val=old.name_property, opt=p.id)}}>{{ p.name }}</option> |
||||
{% endfor %} |
||||
</select> |
||||
</td> |
||||
</tr> |
||||
</table> |
||||
|
||||
<input type="submit" value="Save"> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</form> |
||||
|
||||
{%- endblock %} |
||||
|
@ -1,59 +1,40 @@ |
||||
{% extends "_layout" %} |
||||
{% import "_form_macros" as form %} |
||||
|
||||
{% block title -%} |
||||
Define relation |
||||
{%- endblock %} |
||||
|
||||
{% block nav -%} |
||||
<a href="/">Home</a> |
||||
<a href="/" class="btn btn-link"><i class="icon icon-home"></i>Home</a> |
||||
{%- endblock %} |
||||
|
||||
{% block content -%} |
||||
|
||||
<h1>Define new relation from "{{object.name}}"</h1> |
||||
|
||||
<form action="/model/relation/create" method="POST"> |
||||
<input type="hidden" name="object" value="{{object.id}}"> |
||||
|
||||
<table> |
||||
<tr> |
||||
<th><label for="name">Name:</label></th> |
||||
<td> |
||||
<input type="text" id="name" name="name" value="{{old.name}}" autocomplete="off"><br> |
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<th><label for="reciprocal_name">Reciprocal name:</label></th> |
||||
<td> |
||||
<input type="text" id="reciprocal_name" name="reciprocal_name" value="{{old.reciprocal_name}}" autocomplete="off"> |
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<th><label for="optional">Optional:</label></th> |
||||
<td> |
||||
<input type="checkbox" name="optional" id="optional" value="true" {{opt(checked=old.optional)}} autocomplete="off"> |
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<th><label for="multiple">Multiple:</label></th> |
||||
<td> |
||||
<input type="checkbox" name="multiple" id="multiple" value="true" {{opt(checked=old.multiple)}} autocomplete="off"> |
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<th><label for="related">Related object:</label></th> |
||||
<td> |
||||
<select name="related" id="related" autocomplete="off"> |
||||
{{ form::header_with_save_button(heading='Define new relation from "'~object.name~'"') }} |
||||
|
||||
<div class="form-horizontal container"> |
||||
{{ form::text(name="name", label="Name", value=old.name) }} |
||||
{{ form::text(name="reciprocal_name", label="Reciprocal name", value=old.reciprocal_name) }} |
||||
{{ form::checkbox(name="optional", label="Optional", checked=old.optional) }} |
||||
{{ form::checkbox(name="multiple", label="Multiple", checked=old.multiple) }} |
||||
|
||||
<div class="form-group cols"> |
||||
<div class="col-3 pl-2"> |
||||
<label class="form-label" for="related">Related object</label> |
||||
</div> |
||||
<div class="col-9 pr-2"> |
||||
<select name="related" class="form-select input-inline" id="related" autocomplete="off"> |
||||
{% for m in models %} |
||||
<option value="{{ m.id }}" {{selected(val=old.related, opt=m.id)}}>{{ m.name }}</option> |
||||
{% endfor %} |
||||
</select> |
||||
</td> |
||||
</tr> |
||||
</table> |
||||
|
||||
<input type="submit" value="Save"> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</form> |
||||
|
||||
|
||||
{%- endblock %} |
||||
|
@ -1,46 +1,27 @@ |
||||
{% extends "_layout" %} |
||||
{% import "_form_macros" as form %} |
||||
|
||||
{% block title -%} |
||||
Edit relation |
||||
{%- endblock %} |
||||
|
||||
{% block nav -%} |
||||
<a href="/">Home</a> |
||||
<a href="/" class="btn btn-link"><i class="icon icon-home"></i>Home</a> |
||||
{%- endblock %} |
||||
|
||||
{% block content -%} |
||||
|
||||
<h1>Edit relation model "{{model.name}}"</h1> |
||||
|
||||
<form action="/model/relation/update/{{model.id}}" method="POST"> |
||||
<table> |
||||
<tr> |
||||
<th><label for="name">Name:</label></th> |
||||
<td><input type="text" id="name" name="name" value="{{model.name}}" autocomplete="off"> |
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<th><label for="reciprocal_name">Reciprocal name:</label></th> |
||||
<td><input type="text" id="reciprocal_name" name="reciprocal_name" value="{{model.reciprocal_name}}" autocomplete="off"> |
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<th><label for="optional">Optional:</label> |
||||
</th> |
||||
<td><input type="checkbox" name="optional" id="optional" value="true" {{opt(checked=model.optional)}} autocomplete="off"> |
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<th><label for="multiple">Multiple:</label></th> |
||||
<td><input type="checkbox" name="multiple" id="multiple" value="true" {{opt(checked=model.multiple)}} autocomplete="off"> |
||||
</td> |
||||
</tr> |
||||
</table> |
||||
{{ form::header_with_save_button(heading='Edit relation model "'~model.name~'"') }} |
||||
|
||||
<p>The related object cannot be changed. Create a new relation if needed.</p> |
||||
<div class="form-horizontal container"> |
||||
{{ form::text(name="name", label="Name", value=model.name) }} |
||||
{{ form::text(name="reciprocal_name", label="Reciprocal name", value=model.reciprocal_name) }} |
||||
{{ form::checkbox(name="optional", label="Optional", checked=model.optional) }} |
||||
{{ form::checkbox(name="multiple", label="Multiple", checked=model.multiple) }} |
||||
</div> |
||||
|
||||
<input type="submit" value="Save"> |
||||
<p>The related object cannot be changed. Create a new relation if needed.</p> |
||||
</form> |
||||
|
||||
|
||||
{%- endblock %} |
||||
|
@ -0,0 +1,51 @@ |
||||
<!DOCTYPE html> |
||||
<html lang="en"> |
||||
<head> |
||||
<meta charset="UTF-8"> |
||||
<title>Edit object model • YOPA</title> |
||||
<script src="../static/bundle.js"></script> |
||||
<link rel="stylesheet" href="../static/style.css"> |
||||
</head> |
||||
<body> |
||||
<header class="navbar mb-2 mt-2"> |
||||
<section class="navbar-section"> |
||||
<a href="/" class="navbar-brand text-bold mr-2"> |
||||
Yopa |
||||
</a><a href="/" class="btn btn-link"><i class="icon icon-home"></i>Home</a></section> |
||||
<section class="navbar-section"> |
||||
YOPA is the best |
||||
</section> |
||||
</header> |
||||
|
||||
<div class="content"><h1>Edit object model Animal</h1> |
||||
|
||||
<form action="/model/object/update/0" method="POST"> |
||||
<table> |
||||
<tr> |
||||
<th><label for="name">Name:</label></th> |
||||
<td><input type="text" id="name" name="name" value="Animal" autocomplete="off"> |
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<th><label for="name_property">Name property:</label></th> |
||||
<td> |
||||
<select name="name_property" id="name_property" autocomplete="off"> |
||||
<option value=""></option> |
||||
|
||||
<option value="11" >carnivore</option> |
||||
|
||||
<option value="2" >Name</option> |
||||
|
||||
<option value="12" >weight</option> |
||||
|
||||
<option value="5" selected>czech name</option> |
||||
|
||||
</select> |
||||
</td> |
||||
</tr> |
||||
</table> |
||||
|
||||
<input type="submit" value="Save"> |
||||
</form></div> |
||||
</body> |
||||
</html> |
@ -0,0 +1,83 @@ |
||||
<!DOCTYPE html> |
||||
<html lang="en"> |
||||
<head> |
||||
<meta charset="UTF-8"> |
||||
<title>Edit property • YOPA</title> |
||||
<script src="../static/bundle.js"></script> |
||||
<link rel="stylesheet" href="../static/style.css"> |
||||
</head> |
||||
<body> |
||||
<header class="navbar mb-2 mt-2"> |
||||
<section class="navbar-section"> |
||||
<a href="/" class="navbar-brand text-bold mr-2"> |
||||
Yopa |
||||
</a><a href="/" class="btn btn-link"><i class="icon icon-home"></i>Home</a></section> |
||||
<section class="navbar-section"> |
||||
YOPA is the best |
||||
</section> |
||||
</header> |
||||
|
||||
<div class="content"><h1>Edit property Name</h1> |
||||
|
||||
<form action="/model/property/update/2" method="POST"> |
||||
|
||||
<table> |
||||
<tr> |
||||
<th><label for="name">Name:</label></th> |
||||
<td><input type="text" id="name" name="name" value="Name" autocomplete="off"></td> |
||||
</tr> |
||||
<tr> |
||||
<th><label for="unique">Unique:</label></th> |
||||
<td> |
||||
<input type="checkbox" name="unique" id="unique" value="true" checked autocomplete="off"> |
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<th><label for="optional">Optional:</label></th> |
||||
<td> |
||||
<input type="checkbox" name="optional" id="optional" value="true" autocomplete="off"> |
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<th><label for="multiple">Multiple:</label></th> |
||||
<td> |
||||
<input type="checkbox" name="multiple" id="multiple" value="true" autocomplete="off"> |
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<th><label for="data_type">Type:</label></th> |
||||
<td> |
||||
<select name="data_type" id="data_type" autocomplete="off"> |
||||
<option value="String" selected>String</option> |
||||
<option value="Integer" >Integer</option> |
||||
<option value="Decimal" >Decimal</option> |
||||
<option value="Boolean" >Boolean</option> |
||||
</select> |
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<th><label for="default">Default:</label></th> |
||||
<td> |
||||
<input type="text" id="default" name="default" value="" autocomplete="off"> |
||||
</td> |
||||
</tr> |
||||
</table> |
||||
|
||||
<input type="submit" value="Save"> |
||||
</form> |
||||
|
||||
<script> |
||||
(function () { |
||||
// multiple and unique are XORed. This is also enforced server-side |
||||
let multiple = document.getElementById('multiple'); |
||||
let unique = document.getElementById('unique'); |
||||
unique.addEventListener('input', function () { |
||||
multiple.checked &= !unique.checked; |
||||
}) |
||||
multiple.addEventListener('input', function () { |
||||
unique.checked &= !multiple.checked; |
||||
}) |
||||
})(); |
||||
</script></div> |
||||
</body> |
||||
</html> |
@ -0,0 +1,52 @@ |
||||
<!DOCTYPE html> |
||||
<html lang="en"> |
||||
<head> |
||||
<meta charset="UTF-8"> |
||||
<title>Edit relation • YOPA</title> |
||||
<script src="../static/bundle.js"></script> |
||||
<link rel="stylesheet" href="../static/style.css"> |
||||
</head> |
||||
<body> |
||||
<header class="navbar mb-2 mt-2"> |
||||
<section class="navbar-section"> |
||||
<a href="/" class="navbar-brand text-bold mr-2"> |
||||
Yopa |
||||
</a><a href="/" class="btn btn-link"><i class="icon icon-home"></i>Home</a></section> |
||||
<section class="navbar-section"> |
||||
YOPA is the best |
||||
</section> |
||||
</header> |
||||
|
||||
<div class="content"><h1>Edit relation model "eats"</h1> |
||||
|
||||
<form action="/model/relation/update/15" method="POST"> |
||||
<table> |
||||
<tr> |
||||
<th><label for="name">Name:</label></th> |
||||
<td><input type="text" id="name" name="name" value="eats" autocomplete="off"> |
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<th><label for="reciprocal_name">Reciprocal name:</label></th> |
||||
<td><input type="text" id="reciprocal_name" name="reciprocal_name" value="eaten by" autocomplete="off"> |
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<th><label for="optional">Optional:</label> |
||||
</th> |
||||
<td><input type="checkbox" name="optional" id="optional" value="true" checked autocomplete="off"> |
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<th><label for="multiple">Multiple:</label></th> |
||||
<td><input type="checkbox" name="multiple" id="multiple" value="true" autocomplete="off"> |
||||
</td> |
||||
</tr> |
||||
</table> |
||||
|
||||
<p>The related object cannot be changed. Create a new relation if needed.</p> |
||||
|
||||
<input type="submit" value="Save"> |
||||
</form></div> |
||||
</body> |
||||
</html> |
@ -0,0 +1,66 @@ |
||||
<!DOCTYPE html> |
||||
<html lang="en"> |
||||
<head> |
||||
<meta charset="UTF-8"> |
||||
<title>Index • YOPA</title> |
||||
<script src="../static/bundle.js"></script> |
||||
<link rel="stylesheet" href="../static/style.css"> |
||||
</head> |
||||
<body> |
||||
<header class="navbar mb-2 mt-2"> |
||||
<section class="navbar-section"> |
||||
<a href="/" class="navbar-brand text-bold mr-2"> |
||||
Yopa |
||||
</a><a href="/" class="btn btn-link"><i class="icon icon-home"></i>Home</a></section> |
||||
<section class="navbar-section"> |
||||
YOPA is the best |
||||
</section> |
||||
</header> |
||||
|
||||
<div class="content"><h1>Models</h1> |
||||
<a href="/model/object/create">New model</a> |
||||
<h2>Defined models:</h2> |
||||
<ul> |
||||
<li> |
||||
<b title="0">Animal</b><br> |
||||
<a href="/model/object/delete/0" onclick="return confirm('Delete model?')">Delete model</a> · |
||||
<a href="/model/object/update/0">Edit model</a> · |
||||
<a href="/model/relation/create/0">New relation</a> · |
||||
<a href="/model/property/create/0">New property</a> |
||||
<br> |
||||
Properties: |
||||
<ul> |
||||
<li> |
||||
Name, String, default: "" |
||||
<a href="/model/property/update/2">Edit property</a> · |
||||
<a href="/model/property/delete/2" onclick="return confirm('Delete property?')">Delete property</a> |
||||
</li> |
||||
<li> |
||||
carnivore, Boolean, default: "false" |
||||
<a href="/model/property/update/11">Edit property</a> · |
||||
<a href="/model/property/delete/11" onclick="return confirm('Delete property?')">Delete property</a> |
||||
</li> |
||||
<li> |
||||
czech name, String, default: "", OPTIONAL |
||||
<a href="/model/property/update/5">Edit property</a> · |
||||
<a href="/model/property/delete/5" onclick="return confirm('Delete property?')">Delete property</a> |
||||
</li> |
||||
<li> |
||||
weight, Decimal, default: "0" |
||||
<a href="/model/property/update/12">Edit property</a> · |
||||
<a href="/model/property/delete/12" onclick="return confirm('Delete property?')">Delete property</a> |
||||
</li> |
||||
</ul> |
||||
</li> |
||||
<li> |
||||
<b title="1">Food</b><br> |
||||
<a href="/model/object/delete/1" onclick="return confirm('Delete model?')">Delete model</a> · |
||||
<a href="/model/object/update/1">Edit model</a> · |
||||
<a href="/model/relation/create/1">New relation</a> · |
||||
<a href="/model/property/create/1">New property</a> |
||||
<br> |
||||
</li> |
||||
</ul> |
||||
</div> |
||||
</body> |
||||
</html> |
@ -0,0 +1,29 @@ |
||||
<!DOCTYPE html> |
||||
<html lang="en"> |
||||
<head> |
||||
<meta charset="UTF-8"> |
||||
<title>Create Animal • YOPA</title> |
||||
<script src="../static/bundle.js"></script> |
||||
<link rel="stylesheet" href="../static/style.css"> |
||||
</head> |
||||
<body> |
||||
<header class="navbar mb-2 mt-2"> |
||||
<section class="navbar-section"> |
||||
<a href="/" class="navbar-brand text-bold mr-2"> |
||||
Yopa |
||||
</a><a href="/" class="btn btn-link"> |
||||
<i class="icon icon-home"></i>Home</a></section> |
||||
<section class="navbar-section"> |
||||
YOPA is the best |
||||
</section> |
||||
</header> |
||||
|
||||
<div id="new-object-form"></div> |
||||
|
||||
<script> |
||||
onLoad(() => { |
||||
window.app = Yopa.newObjectForm({"model_id":0,"objects":[],"schema":{"obj_models":[{"id":0,"name":"Animal","name_property":5},{"id":1,"name":"Food","name_property":null}],"prop_models":[{"data_type":"Boolean","default":{"Boolean":false},"id":11,"multiple":false,"name":"carnivore","object":0,"optional":false,"unique":false},{"data_type":"String","default":{"String":""},"id":2,"multiple":false,"name":"Name","object":0,"optional":false,"unique":true},{"data_type":"Decimal","default":{"Decimal":0.0},"id":12,"multiple":false,"name":"weight","object":0,"optional":false,"unique":false},{"data_type":"String","default":{"String":""},"id":5,"multiple":false,"name":"czech name","object":0,"optional":true,"unique":false}],"rel_models":[{"id":15,"multiple":false,"name":"eats","object":0,"optional":true,"reciprocal_name":"eaten by","related":1}]}}) |
||||
}); |
||||
</script> |
||||
</body> |
||||
</html> |
@ -0,0 +1,74 @@ |
||||
<!DOCTYPE html> |
||||
<html lang="en"> |
||||
<head> |
||||
<meta charset="UTF-8"> |
||||
<title>Define relation • YOPA</title> |
||||
<script src="../static/bundle.js"></script> |
||||
<link rel="stylesheet" href="../static/style.css"> |
||||
</head> |
||||
<body> |
||||
<header class="navbar mb-2 mt-2"> |
||||
<section class="navbar-section"> |
||||
<a href="/" class="navbar-brand text-bold mr-2"> |
||||
Yopa |
||||
</a><a href="/" class="btn btn-link"><i class="icon icon-home"></i>Home</a></section> |
||||
<section class="navbar-section"> |
||||
YOPA is the best |
||||
</section> |
||||
</header> |
||||
|
||||
<div class="content"> |
||||
|
||||
<form action="/model/relation/create" method="POST"> |
||||
<input type="hidden" name="object" value="0"> |
||||
|
||||
<div class="container"> |
||||
<div class="cols"> |
||||
<div class="col col-9"> |
||||
<h1>Define new relation from "Animal"</h1> |
||||
</div> |
||||
<div class="col col-3 text-right"> |
||||
<button type="submit" class="btn btn-primary"> |
||||
<i class="icon icon-check"></i>Save |
||||
</button> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="form-horizontal container"> |
||||
<div class="form-group cols"> |
||||
<div class="col-3 pl-2"> |
||||
<label class="form-label" for="name">Name</label> |
||||
</div> |
||||
<div class="col-9 pr-2"> |
||||
<input type="text" class="form-input input-inline" id="name" name="name" value="" autocomplete="off"> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="form-group cols"> |
||||
<div class="col-3 pl-2"> |
||||
<label class="form-label" for="optional">Optional</label> |
||||
</div> |
||||
<div class="col-9 pr-2"> |
||||
<label class="form-switch input-inline"> |
||||
<input type="checkbox" id="optional" value="true"> |
||||
<i class="form-icon"></i> |
||||
</label> |
||||
</div> |
||||
</div> |
||||
|
||||
<div class="form-group cols"> |
||||
<div class="col-3 pl-2"> |
||||
<label class="form-label" for="related">dsfsdf</label> |
||||
</div> |
||||
<div class="col-9 pr-2"> |
||||
<select name="related" class="form-select input-inline" id="related" autocomplete="off"> |
||||
<option value="0" selected>Animal</option> |
||||
<option value="1" >Food</option> |
||||
</select> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</form></div> |
||||
</body> |
||||
</html> |
@ -0,0 +1,73 @@ |
||||
|
||||
<!DOCTYPE html> |
||||
<html lang="en"> |
||||
<head> |
||||
<meta charset="UTF-8"> |
||||
<title>kočka • YOPA</title> |
||||
<script src="../static/bundle.js"></script> |
||||
<link rel="stylesheet" href="..//static/style.css"> |
||||
</head> |
||||
<body> |
||||
<header class="navbar mb-2 mt-2"> |
||||
<section class="navbar-section"> |
||||
<a href="/" class="navbar-brand text-bold mr-2"> |
||||
Yopa |
||||
</a><a href="/" class="btn btn-link"> |
||||
<i class="icon icon-home"></i>Home</a> |
||||
|
||||
<a href="/object/update/7" class="btn btn-link"> |
||||
<i class="icon icon-edit"></i>Edit</a> |
||||
|
||||
<a href="/object/delete/7" class="btn btn-link" onclick="return confirm('Delete object?')"> |
||||
<i class="icon icon-delete"></i>Delete</a></section> |
||||
<section class="navbar-section"> |
||||
YOPA is the best |
||||
</section> |
||||
</header> |
||||
|
||||
<div class="content"><h1>Animal "kočka"</h1> |
||||
|
||||
<table class="table table-striped object-display"> |
||||
<tbody> |
||||
<tr> |
||||
<th rowspan="1"> |
||||
Name |
||||
</th> |
||||
<td title="9"> |
||||
cat |
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<th rowspan="1"> |
||||
carnivore |
||||
</th> |
||||
<td title="13"> |
||||
true |
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<th rowspan="1"> |
||||
czech name |
||||
</th> |
||||
<td title="8"> |
||||
kočka |
||||
</td> |
||||
</tr> |
||||
<tr> |
||||
<th rowspan="1"> |
||||
weight |
||||
</th> |
||||
<td title="14"> |
||||
15.5 |
||||
</td> |
||||
</tr> |
||||
</tbody> |
||||
</table> |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div> |
||||
</body> |
||||
</html> |
Loading…
Reference in new issue