git.schokokeks.org
Repositories
Help
Report an Issue
fs-draft.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
5da1fdb
Branches
Tags
master
midgard
vorlage
fs-draft.git
source
content
correlatives.html.php
included developer-notes; altered correlative (ing -> ni)
Christian Fraß
commited
5da1fdb
at 2016-08-21 23:49:52
correlatives.html.php
Blame
History
Raw
<?php include_once("source/logic/server/data.php"); include_once("source/logic/server/table.php"); include_once("source/logic/server/misc.php"); include_once("source/logic/server/sql.php"); ?> <section class="subsection" id="correlatives"> <header>Correlatives</header> <?php proposal(); ?> <?php $data_correlatives = read_json("source/data/correlatives.json"); $data = $data_correlatives["words"]; { { $data = sql_cross($data, $data_correlatives["domains"]); $data = sql_select($data, function ($row) {return ($row["domain_id"] == $row["id"]);}); $data = sql_delete($data, ["domain_id", "id"]); $data = sql_rename($data, "name", "domain_name"); } { $data = sql_cross($data, $data_correlatives["types"]); $data = sql_select($data, function ($row) {return ($row["type_id"] == $row["id"]);}); $data = sql_delete($data, ["type_id", "id"]); $data = sql_rename($data, "name", "type_name"); } } $table = new class_table ( [ new class_column("Language", "language_id"), new class_column("Domain", "domain_name"), new class_column("Type", "type_name"), new class_column("Words", "words", function ($x) {return json_encode($x);}), ], $data ); $table = $table->snap ( [ "label_vertical" => function ($column) {return "";}, "columns_vertical" => [ $table->columns_get()[1], ], "label_horizontal" => function ($column, $value) {return $value;}, "columns_horizontal" => [ $table->columns_get()[2], ], "columns_data" => [ $table->columns_get()[3], ], "data_aggregator" => function ($values) { return $values; }, "data_formatter" => function ($value) { return ( _bar("word") ( [ "original" => $value[0]["words"], "translated" => $value[1]["words"], ] ) ); return json_encode($value); }, ] ); $table->generate(); ?> <div class="note note_information"> <span class="note_content"> <p>Some of these words are very unlikely to ever get used (e.g. <span class="word lang_fs">ni slag</span>). Nevertheless they exist and are listed for completeness.</p> </span> </div> </section>