Compare commits
16 Commits
849aa6d5b1
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| bc4f849ff3 | |||
| a4b67569a4 | |||
| 7ecaa70768 | |||
| 9e6113b099 | |||
| 500baf2878 | |||
| cddc8b970e | |||
| b4380aeb95 | |||
| 04bc79b36d | |||
| c69bf82ecc | |||
| 431961ed8f | |||
| 9b57474dee | |||
| 966b9c19b7 | |||
| 265470f771 | |||
| 59d4ef9966 | |||
| c801608fe8 | |||
| 1ead7f5741 |
@@ -4,5 +4,5 @@ namespace App\Model\Database\Entity;
|
|||||||
|
|
||||||
abstract class AbstractEntity
|
abstract class AbstractEntity
|
||||||
{
|
{
|
||||||
|
use \Nette\SmartObject;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ trait TId
|
|||||||
* @ORM\Column(type="integer", nullable=FALSE)
|
* @ORM\Column(type="integer", nullable=FALSE)
|
||||||
* @ORM\Id
|
* @ORM\Id
|
||||||
* @ORM\GeneratedValue
|
* @ORM\GeneratedValue
|
||||||
|
*
|
||||||
|
* @property int $id
|
||||||
*/
|
*/
|
||||||
private $id;
|
private $id;
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,19 @@
|
|||||||
<?php
|
<?php declare(strict_types = 1);
|
||||||
|
|
||||||
namespace App\Model\Database\Entity;
|
namespace App\Model\Database\Entity;
|
||||||
|
|
||||||
use App\Model\Database\Entity\Attributes\TCreatedAt;
|
|
||||||
use App\Model\Database\Entity\Attributes\TId;
|
|
||||||
use App\Model\Database\Entity\Attributes\TUpdatedAt;
|
|
||||||
use App\Model\Exception\Logic\InvalidArgumentException;
|
|
||||||
use App\Model\Security\Identity;
|
|
||||||
use App\Model\Utils\DateTime;
|
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
use App\Model\Database\Entity\Attributes\TId;
|
||||||
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
|
use Doctrine\Common\Collections\Collection;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Entity
|
* @ORM\Entity(repositoryClass="App\Model\Database\Repository\DictTypeRepository")
|
||||||
|
* @ORM\HasLifecycleCallbacks
|
||||||
|
*
|
||||||
|
* @property int $id
|
||||||
|
* @property String $shortName
|
||||||
|
* @property String $fullName
|
||||||
*/
|
*/
|
||||||
class DictType extends AbstractEntity
|
class DictType extends AbstractEntity
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php declare(strict_types = 1);
|
||||||
|
|
||||||
namespace App\Model\Database\Entity;
|
namespace App\Model\Database\Entity;
|
||||||
|
|
||||||
@@ -8,7 +8,16 @@ use Doctrine\Common\Collections\ArrayCollection;
|
|||||||
use Doctrine\Common\Collections\Collection;
|
use Doctrine\Common\Collections\Collection;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Entity
|
* @ORM\Entity(repositoryClass="App\Model\Database\Repository\DictionaryRepository")
|
||||||
|
* @ORM\Table(name="`dictionary`")
|
||||||
|
* @ORM\HasLifecycleCallbacks
|
||||||
|
*
|
||||||
|
* @property int $id
|
||||||
|
* @property String $name
|
||||||
|
* @property String $fullname
|
||||||
|
* @property Term $terms
|
||||||
|
* @property Language $lang1
|
||||||
|
* @property Language $lang2
|
||||||
*/
|
*/
|
||||||
class Dictionary extends AbstractEntity
|
class Dictionary extends AbstractEntity
|
||||||
{
|
{
|
||||||
@@ -23,7 +32,7 @@ class Dictionary extends AbstractEntity
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\OneToMany(targetEntity="App\Model\Database\Entity\Translation", mappedBy="dictionary", cascade={"persist"})
|
* @ORM\OneToMany(targetEntity="\App\Model\Database\Entity\Translation", mappedBy="dictionary", cascade={"persist"})
|
||||||
* @var Collection&iterable<Translation>
|
* @var Collection&iterable<Translation>
|
||||||
*/
|
*/
|
||||||
protected Collection $translations;
|
protected Collection $translations;
|
||||||
@@ -33,6 +42,11 @@ class Dictionary extends AbstractEntity
|
|||||||
return $this->translations;
|
return $this->translations;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\OnetoMany(targetEntity="\App\Model\Database\Entity\Term", mappedBy="dictionary")
|
||||||
|
* @var Collection&iterable<Term>
|
||||||
|
*/
|
||||||
|
protected Collection $terms;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\ManyToOne(targetEntity="Language", inversedBy="dictionaries1")
|
* @ORM\ManyToOne(targetEntity="Language", inversedBy="dictionaries1")
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php declare(strict_types = 1);
|
||||||
|
|
||||||
namespace App\Model\Database\Entity;
|
namespace App\Model\Database\Entity;
|
||||||
|
|
||||||
@@ -7,7 +7,15 @@ use App\Model\Database\Entity\Attributes\TId;
|
|||||||
use Doctrine\Common\Collections\Collection;
|
use Doctrine\Common\Collections\Collection;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Entity
|
* @ORM\Entity(repositoryClass="App\Model\Database\Repository\LanguageRepository")
|
||||||
|
* @ORM\HasLifecycleCallbacks
|
||||||
|
*
|
||||||
|
* @property int $id
|
||||||
|
* @property String $name
|
||||||
|
* @property String $shortName
|
||||||
|
* @property Dictionary $dictionaries1
|
||||||
|
* @property Dictionary $dictionaries2
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
class Language extends AbstractEntity
|
class Language extends AbstractEntity
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,7 +6,14 @@ use Doctrine\ORM\Mapping as ORM;
|
|||||||
use App\Model\Database\Entity\Attributes\TId;
|
use App\Model\Database\Entity\Attributes\TId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Entity
|
* @ORM\Entity(repositoryClass="App\Model\Database\Repository\PronunciationRepository")
|
||||||
|
* @ORM\HasLifecycleCallbacks
|
||||||
|
*
|
||||||
|
* @property int $id
|
||||||
|
* @property Term $terms
|
||||||
|
* @property PronunciationType $type
|
||||||
|
* @property String $ipa
|
||||||
|
* @property String $filename
|
||||||
*/
|
*/
|
||||||
class Pronunciation extends AbstractEntity
|
class Pronunciation extends AbstractEntity
|
||||||
{
|
{
|
||||||
@@ -41,6 +48,38 @@ class Pronunciation extends AbstractEntity
|
|||||||
* @ORM\Column(type="string", nullable=true)
|
* @ORM\Column(type="string", nullable=true)
|
||||||
*/
|
*/
|
||||||
protected $filename;
|
protected $filename;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value of filename
|
||||||
|
*/
|
||||||
|
public function getFilename()
|
||||||
|
{
|
||||||
|
return $this->filename;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value of terms
|
||||||
|
*/
|
||||||
|
public function getTerms()
|
||||||
|
{
|
||||||
|
return $this->terms;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value of ipa
|
||||||
|
*/
|
||||||
|
public function getIpa()
|
||||||
|
{
|
||||||
|
return $this->ipa;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value of type
|
||||||
|
*/
|
||||||
|
public function getType()
|
||||||
|
{
|
||||||
|
return $this->type;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -6,7 +6,12 @@ use Doctrine\ORM\Mapping as ORM;
|
|||||||
use App\Model\Database\Entity\Attributes\Tid;
|
use App\Model\Database\Entity\Attributes\Tid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Entity
|
* @ORM\Entity(repositoryClass="App\Model\Database\Repository\PronunciationTypeRepository")
|
||||||
|
* @ORM\HasLifecycleCallbacks
|
||||||
|
*
|
||||||
|
* @property int $id
|
||||||
|
* @property String $name
|
||||||
|
* @property String $fullName
|
||||||
*/
|
*/
|
||||||
class PronunciationType extends AbstractEntity
|
class PronunciationType extends AbstractEntity
|
||||||
{
|
{
|
||||||
@@ -6,7 +6,11 @@ use Doctrine\ORM\Mapping as ORM;
|
|||||||
use App\Model\Database\Entity\Attributes\TId;
|
use App\Model\Database\Entity\Attributes\TId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Entity
|
* @ORM\Entity(repositoryClass="App\Model\Database\Repository\SuffixRepository")
|
||||||
|
* @ORM\HasLifecycleCallbacks
|
||||||
|
*
|
||||||
|
* @property int $id
|
||||||
|
* @property String $text
|
||||||
*/
|
*/
|
||||||
class Suffix extends AbstractEntity
|
class Suffix extends AbstractEntity
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,31 +2,44 @@
|
|||||||
|
|
||||||
namespace App\Model\Database\Entity;
|
namespace App\Model\Database\Entity;
|
||||||
|
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
|
||||||
use App\Model\Database\Entity\Attributes\TId;
|
use App\Model\Database\Entity\Attributes\TId;
|
||||||
|
use Doctrine\Common\Collections\Collection;
|
||||||
|
use Doctrine\Common\Proxy\Proxy;
|
||||||
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Entity
|
* @ORM\Entity(repositoryClass="App\Model\Database\Repository\TermRepository")
|
||||||
* @ORM\Table(indexes={@ORM\Index(columns={"string1"}, flags={"fulltext"}),
|
* @ORM\HasLifecycleCallbacks
|
||||||
@ORM\Index(columns={"string2"}, flags={"fulltext"})})
|
* @ORM\Table(indexes={@ORM\Index(columns={"string1"}, flags={"fulltext"}),@ORM\Index(columns={"string2"}, flags={"fulltext"})})
|
||||||
|
*
|
||||||
|
* @property int $id
|
||||||
|
* @property String $string1
|
||||||
|
* @property String $string2
|
||||||
|
* @property Dictionary $dictionary
|
||||||
|
* @property mixed $pronunciations
|
||||||
|
* @property Suffix $suffix1
|
||||||
|
* @property Suffix $suffix2
|
||||||
|
* @property DictType $type
|
||||||
|
* @property int $order2
|
||||||
|
* @property String $member
|
||||||
*/
|
*/
|
||||||
class Term extends AbstractEntity
|
class Term extends AbstractEntity
|
||||||
{
|
{
|
||||||
|
|
||||||
use Tid;
|
use Tid;
|
||||||
|
|
||||||
public function __construct(Dictionary $dictionary,$string)
|
public function __construct(Dictionary $dictionary, $string)
|
||||||
{
|
{
|
||||||
$this->dictionary = $dictionary;
|
$this->dictionary = $dictionary;
|
||||||
$this->string1 = $string;
|
$this->string1 = $string;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\ManyToOne(targetEntity="Dictionary", inversedBy="fullDict",cascade={"persist", "remove" })
|
* @ORM\ManyToOne(targetEntity="\App\Model\Database\Entity\Dictionary", inversedBy="terms",cascade={"persist", "remove" })
|
||||||
*/
|
*/
|
||||||
protected $dictionary;
|
protected $dictionary;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="string")
|
* @ORM\Column(type="string")
|
||||||
*/
|
*/
|
||||||
protected $string1;
|
protected $string1;
|
||||||
@@ -36,7 +49,6 @@ class Term extends AbstractEntity
|
|||||||
*/
|
*/
|
||||||
protected $string2;
|
protected $string2;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\ManyToOne(targetEntity="Suffix")
|
* @ORM\ManyToOne(targetEntity="Suffix")
|
||||||
*/
|
*/
|
||||||
@@ -47,7 +59,6 @@ class Term extends AbstractEntity
|
|||||||
*/
|
*/
|
||||||
protected $suffix2;
|
protected $suffix2;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\ManyToOne(targetEntity="DictType")
|
* @ORM\ManyToOne(targetEntity="DictType")
|
||||||
*/
|
*/
|
||||||
@@ -56,14 +67,9 @@ class Term extends AbstractEntity
|
|||||||
/**
|
/**
|
||||||
* @ORM\ManyToMany(targetEntity="Pronunciation", inversedBy="terms")
|
* @ORM\ManyToMany(targetEntity="Pronunciation", inversedBy="terms")
|
||||||
* @ORM\JoinTable(name="terms_pronunciations")
|
* @ORM\JoinTable(name="terms_pronunciations")
|
||||||
|
* @var Collection&iterable<Pronunciation>
|
||||||
*/
|
*/
|
||||||
protected $pronunciations;
|
protected Collection $pronunciations;
|
||||||
|
|
||||||
public function setType(DictType $type)
|
|
||||||
{
|
|
||||||
$this->type = $type;
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="string",nullable=true)
|
* @ORM\Column(type="string",nullable=true)
|
||||||
@@ -72,13 +78,13 @@ class Term extends AbstractEntity
|
|||||||
|
|
||||||
public function setMember($member)
|
public function setMember($member)
|
||||||
{
|
{
|
||||||
$this->member = $member;
|
$this->member = $member;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getMember()
|
public function getMember()
|
||||||
{
|
{
|
||||||
return $this->member;
|
return $this->member;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -93,28 +99,133 @@ class Term extends AbstractEntity
|
|||||||
|
|
||||||
public function getFlags()
|
public function getFlags()
|
||||||
{
|
{
|
||||||
return $this->flags;
|
return $this->flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setFlags($flags)
|
public function setFlags($flags)
|
||||||
{
|
{
|
||||||
$this->flags = $flags;
|
$this->flags = $flags;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getOrder2()
|
public function getOrder2()
|
||||||
{
|
{
|
||||||
return $this->order2;
|
return $this->order2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setOrder2($order2)
|
public function setOrder2($order2)
|
||||||
{
|
{
|
||||||
$this->order2 = $order2;
|
$this->order2 = $order2;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value of string1
|
||||||
|
*/
|
||||||
|
public function getString1()
|
||||||
|
{
|
||||||
|
return $this->string1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of string1
|
||||||
|
*
|
||||||
|
* @return self
|
||||||
|
*/
|
||||||
|
public function setString1($string1)
|
||||||
|
{
|
||||||
|
$this->string1 = $string1;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value of string2
|
||||||
|
*/
|
||||||
|
public function getString2()
|
||||||
|
{
|
||||||
|
return $this->string2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of string2
|
||||||
|
*
|
||||||
|
* @return self
|
||||||
|
*/
|
||||||
|
public function setString2($string2)
|
||||||
|
{
|
||||||
|
$this->string2 = $string2;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value of suffix1
|
||||||
|
*/
|
||||||
|
public function getSuffix1()
|
||||||
|
{
|
||||||
|
return $this->suffix1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of suffix1
|
||||||
|
*
|
||||||
|
* @return self
|
||||||
|
*/
|
||||||
|
public function setSuffix1($suffix1)
|
||||||
|
{
|
||||||
|
$this->suffix1 = $suffix1;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value of suffix2
|
||||||
|
*/
|
||||||
|
public function getSuffix2()
|
||||||
|
{
|
||||||
|
return $this->suffix2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of suffix2
|
||||||
|
*
|
||||||
|
* @return self
|
||||||
|
*/
|
||||||
|
public function setSuffix2($suffix2)
|
||||||
|
{
|
||||||
|
$this->suffix2 = $suffix2;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value of type
|
||||||
|
*/
|
||||||
|
public function getType()
|
||||||
|
{
|
||||||
|
return $this->type;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of type
|
||||||
|
*
|
||||||
|
* @return self
|
||||||
|
*/
|
||||||
|
public function setType($type)
|
||||||
|
{
|
||||||
|
$this->type = $type;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value of pronunciations
|
||||||
|
*
|
||||||
|
* @return Collection&iterable<Pronunciation>
|
||||||
|
*/
|
||||||
|
public function getPronunciations()
|
||||||
|
{
|
||||||
|
return $this->pronunciations;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
|||||||
@@ -6,7 +6,14 @@ use Doctrine\ORM\Mapping as ORM;
|
|||||||
use App\Model\Database\Entity\Attributes\TId;
|
use App\Model\Database\Entity\Attributes\TId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Entity
|
* @ORM\Entity(repositoryClass="App\Model\Database\Repository\TermFlagRepository")
|
||||||
|
* @ORM\HasLifecycleCallbacks
|
||||||
|
*
|
||||||
|
* @property int $id
|
||||||
|
* @property WordClass $class
|
||||||
|
* @property Language $language
|
||||||
|
* @property String $code
|
||||||
|
* @property String $description
|
||||||
*/
|
*/
|
||||||
class TermFlag extends AbstractEntity
|
class TermFlag extends AbstractEntity
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php declare(strict_types = 1);
|
||||||
|
|
||||||
|
|
||||||
namespace App\Model\Database\Entity;
|
namespace App\Model\Database\Entity;
|
||||||
|
|
||||||
@@ -6,7 +7,15 @@ use Doctrine\ORM\Mapping as ORM;
|
|||||||
use App\Model\Database\Entity\Attributes\TId;
|
use App\Model\Database\Entity\Attributes\TId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Entity
|
* @ORM\Entity(repositoryClass="App\Model\Database\Repository\TranslationRepository")
|
||||||
|
* @ORM\Table(name="`translation`")
|
||||||
|
* @ORM\HasLifecycleCallbacks
|
||||||
|
*
|
||||||
|
* @property int $id
|
||||||
|
* @property Dictionary $dictionary
|
||||||
|
* @property Language $lang1
|
||||||
|
* @property Language $lang2
|
||||||
|
* @property int $direction
|
||||||
*/
|
*/
|
||||||
class Translation extends AbstractEntity
|
class Translation extends AbstractEntity
|
||||||
{
|
{
|
||||||
@@ -24,7 +33,7 @@ class Translation extends AbstractEntity
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\ManyToOne(targetEntity="Dictionary", inversedBy="translations")
|
* @ORM\ManyToOne(targetEntity="App\Model\Database\Entity\Dictionary", inversedBy="translations")
|
||||||
*/
|
*/
|
||||||
protected $dictionary;
|
protected $dictionary;
|
||||||
|
|
||||||
@@ -34,12 +43,12 @@ class Translation extends AbstractEntity
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\ManyToOne(targetEntity="Language", inversedBy="translations1")
|
* @ORM\ManyToOne(targetEntity="App\Model\Database\Entity\Language", inversedBy="translations1")
|
||||||
*/
|
*/
|
||||||
protected $lang1;
|
protected $lang1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\ManyToOne(targetEntity="Language", inversedBy="translations2")
|
* @ORM\ManyToOne(targetEntity="App\Model\Database\Entity\Language", inversedBy="translations2")
|
||||||
*/
|
*/
|
||||||
protected $lang2;
|
protected $lang2;
|
||||||
|
|
||||||
@@ -48,16 +57,17 @@ class Translation extends AbstractEntity
|
|||||||
*/
|
*/
|
||||||
protected $lang_name1;
|
protected $lang_name1;
|
||||||
|
|
||||||
public function getLangName1()
|
public function getLangName1(): String
|
||||||
{
|
{
|
||||||
return $this->lang_name1;
|
return $this->lang_name1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="string")
|
* @ORM\Column(type="string")
|
||||||
*/
|
*/
|
||||||
protected $lang_name2;
|
protected $lang_name2;
|
||||||
|
|
||||||
public function getLangName2()
|
public function getLangName2(): String
|
||||||
{
|
{
|
||||||
return $this->lang_name2;
|
return $this->lang_name2;
|
||||||
}
|
}
|
||||||
@@ -67,7 +77,7 @@ class Translation extends AbstractEntity
|
|||||||
*/
|
*/
|
||||||
protected $direction;
|
protected $direction;
|
||||||
|
|
||||||
public function getDirection()
|
public function getDirection() : int
|
||||||
{
|
{
|
||||||
return $this->direction;
|
return $this->direction;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,12 +8,21 @@ use App\Model\Database\Entity\Attributes\TUpdatedAt;
|
|||||||
use App\Model\Exception\Logic\InvalidArgumentException;
|
use App\Model\Exception\Logic\InvalidArgumentException;
|
||||||
use App\Model\Security\Identity;
|
use App\Model\Security\Identity;
|
||||||
use App\Model\Utils\DateTime;
|
use App\Model\Utils\DateTime;
|
||||||
|
use App\Model\Utils\Strings;
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Entity(repositoryClass="App\Model\Database\Repository\UserRepository")
|
* @ORM\Entity(repositoryClass="App\Model\Database\Repository\UserRepository")
|
||||||
* @ORM\Table(name="`user`")
|
* @ORM\Table(name="`user`")
|
||||||
* @ORM\HasLifecycleCallbacks
|
* @ORM\HasLifecycleCallbacks
|
||||||
|
*
|
||||||
|
* @property int $id
|
||||||
|
* @property String $name
|
||||||
|
* @property String $surname
|
||||||
|
* @property String $email
|
||||||
|
* @property String $password
|
||||||
|
* @property String $role
|
||||||
|
* @property int $state
|
||||||
*/
|
*/
|
||||||
class User extends AbstractEntity
|
class User extends AbstractEntity
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,7 +6,12 @@ use Doctrine\ORM\Mapping as ORM;
|
|||||||
use App\Model\Database\Entity\Attributes\TId;
|
use App\Model\Database\Entity\Attributes\TId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Entity
|
* @ORM\Entity(repositoryClass="App\Model\Database\Repository\WordClassRepository")
|
||||||
|
* @ORM\HasLifecycleCallbacks
|
||||||
|
*
|
||||||
|
* @property int $id
|
||||||
|
* @property String $name
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
class WordClass extends AbstractEntity
|
class WordClass extends AbstractEntity
|
||||||
{
|
{
|
||||||
@@ -19,17 +24,6 @@ class WordClass extends AbstractEntity
|
|||||||
$this->name = $name;
|
$this->name = $name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setId($id)
|
|
||||||
{
|
|
||||||
$this->id = $id;
|
|
||||||
return $id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getId()
|
|
||||||
{
|
|
||||||
return $this->id;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="string")
|
* @ORM\Column(type="string")
|
||||||
*/
|
*/
|
||||||
|
|||||||
55
app/model/Database/Facade/TermFacade.php
Normal file
55
app/model/Database/Facade/TermFacade.php
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
<?php declare(strict_types = 1);
|
||||||
|
|
||||||
|
namespace App\Model\Database\Facade;
|
||||||
|
|
||||||
|
use App\Model\Database\Entity\Dictionary;
|
||||||
|
use App\Model\Database\Entity\Term;
|
||||||
|
use App\Model\Database\Entity\Translation;
|
||||||
|
use App\Model\Database\EntityManager;
|
||||||
|
|
||||||
|
|
||||||
|
class TermFacade
|
||||||
|
{
|
||||||
|
|
||||||
|
/** @var EntityManager */
|
||||||
|
private $em;
|
||||||
|
private $direction;
|
||||||
|
|
||||||
|
public function __construct(
|
||||||
|
EntityManager $em
|
||||||
|
)
|
||||||
|
{
|
||||||
|
$this->em = $em;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setDirection(int $direction)
|
||||||
|
{
|
||||||
|
$this->direction = $direction;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param mixed[] $data
|
||||||
|
*/
|
||||||
|
public function findByString(String $term,Dictionary $d,String $clen = null)
|
||||||
|
{
|
||||||
|
$query = $this->em->createQueryBuilder('t')->select('t')
|
||||||
|
->addSelect('s1')
|
||||||
|
->addSelect('s2')
|
||||||
|
->from(Term::class,'t')
|
||||||
|
->leftJoin('t.suffix1','s1')
|
||||||
|
->leftJoin('t.suffix2','s2');
|
||||||
|
if ($this->direction == 1) {
|
||||||
|
$query->where('t.string1 LIKE :str')->setParameter('str', $term."%");
|
||||||
|
$query->orderBy('t.string1,t.id','ASC');
|
||||||
|
} else if ($this->direction == 2) {
|
||||||
|
$query->where('t.string2 LIKE :str')->setParameter('str', $term."%");
|
||||||
|
$query->orderBy('t.string2','ASC');
|
||||||
|
$query->addOrderBy('t.order2','ASC');
|
||||||
|
}
|
||||||
|
$query->andWhere('t.dictionary = :dict')->setParameter(':dict',$d->id);
|
||||||
|
if ($clen)
|
||||||
|
$query->andWhere('t.member LIKE :clen')->setParameter('clen','%'.$clen.'%');
|
||||||
|
|
||||||
|
return $query->getQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -46,4 +46,41 @@ abstract class AbstractRepository extends EntityRepository
|
|||||||
}, $qb->getQuery()->getArrayResult());
|
}, $qb->getQuery()->getArrayResult());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fetches all records and returns an associative array indexed by key
|
||||||
|
*
|
||||||
|
* @param array $criteria
|
||||||
|
* @param string $key
|
||||||
|
*
|
||||||
|
* @throws \Exception|QueryException
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function findAssoc(array $criteria = [],String $key = NULL)
|
||||||
|
{
|
||||||
|
if (!is_array($criteria)) {
|
||||||
|
$key = $criteria;
|
||||||
|
$criteria = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
$qb = $this->createQueryBuilder('e')
|
||||||
|
->resetDQLPart('from')->from($this->getEntityName(), 'e', 'e.' . $key);
|
||||||
|
|
||||||
|
foreach ($criteria as $k => $v) {
|
||||||
|
if (is_array($v)) {
|
||||||
|
$qb->andWhere(sprintf('e.%s IN(:%s)', $k, $k))->setParameter($k, array_values($v));
|
||||||
|
} else {
|
||||||
|
$qb->andWhere(sprintf('e.%s = :%s', $k, $k))->setParameter($k, $v);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
return $qb->getQuery()->getResult();
|
||||||
|
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
throw $this->handleException($e, $qb);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,28 +1,65 @@
|
|||||||
|
{**
|
||||||
|
* @param string $basePath web base path
|
||||||
|
* @param array $flashes flash messages
|
||||||
|
*}
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
||||||
<link rel="shortcut icon" href="{$basePath}/favicon.ico">
|
|
||||||
|
|
||||||
<!-- Seo -->
|
<title>{ifset title}{include title|striptags} | {/ifset}Nette Sandbox</title>
|
||||||
<title>{block #title|stripHtml|trim}Webapp Skeleton{/} | Contributte</title>
|
|
||||||
|
|
||||||
<!-- Meta -->
|
<link rel="stylesheet" href="{$basePath}/css/style.css">
|
||||||
<meta name="description" n:ifset="#description" content="{include #description}">
|
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
|
||||||
<meta name="keywords" n:ifset="#keywords" content="{include #keywords}">
|
<meta name="viewport" content="width=device-width">
|
||||||
<meta name="robots" content="index,follow">
|
<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
|
||||||
<meta name="googlebot" content="snippet,archive">
|
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
|
||||||
<meta name="author" content="f3l1x">
|
{block head}{/block}
|
||||||
|
|
||||||
{block #head}{/}
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
{block #main}
|
|
||||||
<div class="container">
|
<header>
|
||||||
{include #content}
|
<hgroup>
|
||||||
</div>
|
<h1>My Dictionary</h1>
|
||||||
{/}
|
<h2>multilanguage dictionary with pronunciations</h2>
|
||||||
|
</hgroup>
|
||||||
|
<nav>
|
||||||
|
<ul>
|
||||||
|
<li><a href="{link Homepage:default}">Jednoduchý</a></li>
|
||||||
|
<li><a href="{link Homepage:ipa}">s výslovnosťou</a></li>
|
||||||
|
<li><a href="{link Homepage:interactive}">Interaktívny</a></li>
|
||||||
|
<li><a href="{link Homepage:alphabet}">Abeceda</a></li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<a href="#" title="Jaro's Solutions homepage"><img src="logo.gif" alt="Jaro's Solutions" /></a>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<article>
|
||||||
|
<h1 n:ifset="$title">{$title}</h1>
|
||||||
|
|
||||||
|
<div n:foreach="$flashes as $flash" n:class="flash, $flash->type">{$flash->message}</div>
|
||||||
|
|
||||||
|
{include content}
|
||||||
|
</article>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<h1>Slovníky</h1>
|
||||||
|
<ul>
|
||||||
|
{foreach $translations as $tr}
|
||||||
|
<li><a href="{link Homepage:select $tr["slug"] }">{$tr["lang"]}</a></li>
|
||||||
|
{/foreach}
|
||||||
|
</ul>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
<p>© 2016 Jaro's Solutions - <a href="#">Sitemap</a> </p>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
{block scripts}
|
||||||
|
<script src="https://nette.github.io/resources/js/netteForms.min.js"></script>
|
||||||
|
<script src="{$basePath}/js/nette.ajax.js"></script>
|
||||||
|
<script src="{$basePath}/js/main.js"></script>
|
||||||
|
{/block}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -3,8 +3,117 @@
|
|||||||
namespace App\Modules\Front;
|
namespace App\Modules\Front;
|
||||||
|
|
||||||
use App\Modules\Base\UnsecuredPresenter;
|
use App\Modules\Base\UnsecuredPresenter;
|
||||||
|
use Nette;
|
||||||
|
use Nette\Utils\Strings;
|
||||||
|
use Nette\Application\UI;
|
||||||
|
use Dict\OggResponse;
|
||||||
|
use Nette\Application\Responses\JsonResponse;
|
||||||
|
use AlesWita\VisualPaginator\VisualPaginator;
|
||||||
|
use AlesWita\VisualPaginator\VisualPaginatorFactory;
|
||||||
|
use App\Model\Database\EntityManager;
|
||||||
|
use App\Model\Database\Entity\Dictionary;
|
||||||
|
use App\Model\Database\Entity\Translation;
|
||||||
|
use App\Model\Database\Repository\TranslationRepository;
|
||||||
|
use App\Model\Database\Repository\TermsFullQuery;
|
||||||
|
use App\Model\Database\Repository\TermsQuickQuery;
|
||||||
|
use App\Model\Database\Facade\TermFacade;
|
||||||
|
|
||||||
abstract class BaseFrontPresenter extends UnsecuredPresenter
|
abstract class BaseFrontPresenter extends UnsecuredPresenter
|
||||||
{
|
{
|
||||||
|
/** @inject @var EntityManager */
|
||||||
|
public EntityManager $em;
|
||||||
|
/** @inject */
|
||||||
|
public VisualPaginatorFactory $visualPaginatorFactory;
|
||||||
|
/** @inject */
|
||||||
|
public TermFacade $termFacade;
|
||||||
|
|
||||||
|
/** @persistent */
|
||||||
|
public $term;
|
||||||
|
|
||||||
|
/** @persistent */
|
||||||
|
public $slug;
|
||||||
|
|
||||||
|
public $translation;
|
||||||
|
public $translations;
|
||||||
|
public $dictionaries;
|
||||||
|
public $drsSelect;
|
||||||
|
public $slugs;
|
||||||
|
|
||||||
|
protected function startup()
|
||||||
|
{
|
||||||
|
|
||||||
|
$trs = $this->em->getRepository(Translation::class)->findBy([], ['id' => 'ASC', 'direction' => 'ASC']);
|
||||||
|
$drs = $this->em->getRepository(Dictionary::class)->findPairs('id', 'name');
|
||||||
|
$select = [];
|
||||||
|
$translations = [];
|
||||||
|
foreach ($trs as $t) {
|
||||||
|
$lang1 = $t->getLangName1();
|
||||||
|
$lang2 = $t->getLangName2();
|
||||||
|
|
||||||
|
$lang = mb_substr($lang1, 0, -1);
|
||||||
|
$lang .= "o-" . $lang2;
|
||||||
|
$slug = Strings::webalize($lang);
|
||||||
|
$select[$drs[$t->getDictionary()->id]][$t->id] = $lang;
|
||||||
|
$translations[$t->id]["slug"] = $slug;
|
||||||
|
$translations[$t->id]["lang"] = $lang;
|
||||||
|
$translations[$t->id]["t"] = $t;
|
||||||
|
$slugs[$slug] = $t;
|
||||||
|
}
|
||||||
|
$this->slug= $translations[1]["slug"];
|
||||||
|
$this->translations = $translations;
|
||||||
|
$this->dictionaries = $drs;
|
||||||
|
$this->drsSelect = $select;
|
||||||
|
$this->slugs = $slugs;
|
||||||
|
|
||||||
|
parent::startup();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function handleGetInfo($id)
|
||||||
|
{
|
||||||
|
$term = $this->repoTerms->find($id);
|
||||||
|
$termFlags = $this->repoTermFlags->findAssoc([], 'id');
|
||||||
|
|
||||||
|
$dictionary = $term->dictionary;
|
||||||
|
|
||||||
|
$query = new TermsFullQuery($dictionary, $term->string1, 1, false);
|
||||||
|
$result = $this->repoTerms->fetch($query);
|
||||||
|
|
||||||
|
$this->template->result = $result;
|
||||||
|
$this->template->termFlags = $termFlags;
|
||||||
|
|
||||||
|
$this->setView('info');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function beforeRender()
|
||||||
|
{
|
||||||
|
$dicttypes = $this->em->getDictTypeRepository()->findAssoc([], 'id');
|
||||||
|
$this->template->dicttypes = $dicttypes;
|
||||||
|
$this->template->dictionaries = $this->dictionaries;
|
||||||
|
$this->template->translations = $this->translations;
|
||||||
|
// $this->template->paginator = $this->paginator;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function createComponentSearchForm()
|
||||||
|
{
|
||||||
|
$form = new UI\Form;
|
||||||
|
$form->addText('string', 'Výraz')
|
||||||
|
->setRequired('Zadajte výray');
|
||||||
|
$form->addSelect('translation', 'Preklad', $this->drsSelect)
|
||||||
|
->setDefaultValue(1)
|
||||||
|
->setRequired('Vyberte slovnik');
|
||||||
|
$form->addText('clen', 'Clen', 5);
|
||||||
|
$form->addSubmit('search', 'Vyhaľadaj');
|
||||||
|
$form->onSuccess[] = array($this, 'searchFormSucceeded');
|
||||||
|
return $form;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function searchFormSucceeded(UI\Form $form, $values)
|
||||||
|
{
|
||||||
|
$translation = $values->translation;
|
||||||
|
$clen = $values->clen;
|
||||||
|
$term = $values->string;
|
||||||
|
|
||||||
|
$this->redirect('Search:default',$translation,$term,$clen);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
4
app/modules/Front/Home/@layout.latte
Normal file
4
app/modules/Front/Home/@layout.latte
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{layout '../templates/@layout.latte'}
|
||||||
|
{block #content}
|
||||||
|
{block form}
|
||||||
|
{/block}
|
||||||
@@ -14,261 +14,128 @@ use App\Model\Database\EntityManager;
|
|||||||
use App\Model\Database\Entity\Dictionary;
|
use App\Model\Database\Entity\Dictionary;
|
||||||
use App\Model\Database\Entity\Translation;
|
use App\Model\Database\Entity\Translation;
|
||||||
use App\Model\Database\Repository\TranslationRepository;
|
use App\Model\Database\Repository\TranslationRepository;
|
||||||
|
use App\Model\Database\Repository\TermsFullQuery;
|
||||||
|
use App\Model\Database\Repository\TermsQuickQuery;
|
||||||
|
use App\Model\Database\Facade\TermFacade;
|
||||||
|
|
||||||
final class HomePresenter extends BaseFrontPresenter
|
final class HomePresenter extends BaseFrontPresenter
|
||||||
{
|
{
|
||||||
|
|
||||||
|
public function searchFormSucceededIpa(UI\Form $form, $values)
|
||||||
/** @inject @var \App\Model\Database\EntityManager */
|
|
||||||
public $em;
|
|
||||||
|
|
||||||
private $translations;
|
|
||||||
private $dictionaries;
|
|
||||||
private $drsSelect;
|
|
||||||
private $slugs;
|
|
||||||
public $translation;
|
|
||||||
|
|
||||||
/** @persistent */
|
|
||||||
public $term;
|
|
||||||
/** @persistent */
|
|
||||||
public $slug;
|
|
||||||
|
|
||||||
protected function startup()
|
|
||||||
{
|
|
||||||
$trs = $this->em->getRepository(Translation::class)->findBy([],['id' => 'ASC','direction'=>'ASC']);
|
|
||||||
$drs = $this->em->getRepository(Dictionary::class)->findPairs([],'name',[],'id');
|
|
||||||
$select = [];
|
|
||||||
foreach ($trs as $t) {
|
|
||||||
$lang1 = $t->langName1;
|
|
||||||
$lang2 = $t->langName2;
|
|
||||||
|
|
||||||
$lang = mb_substr($lang1,0,-1);
|
|
||||||
$lang .= "o-".$lang2;
|
|
||||||
$slug = Strings::webalize($lang);
|
|
||||||
$select[$drs[$t->dictionary->id]][$t->id] = $lang;
|
|
||||||
$translations[$t->id]["slug"] = $slug;
|
|
||||||
$translations[$t->id]["lang"] = $lang;
|
|
||||||
$translations[$t->id]["t"] = $t;
|
|
||||||
$slugs[$slug] = $t;
|
|
||||||
|
|
||||||
}
|
|
||||||
$this->translations = $translations;
|
|
||||||
$this->dictionaries = $drs;
|
|
||||||
$this->drsSelect = $select;
|
|
||||||
$this->slugs = $slugs;
|
|
||||||
|
|
||||||
parent::startup();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function doSearch($query,$translation,$term,$clen = null,$paginate = true)
|
|
||||||
{
|
|
||||||
$t = $this->em->getTranslationRepository()->find($translation);
|
|
||||||
|
|
||||||
if ($term) $this->term = $term;
|
|
||||||
if ($translation) $this->translation = $translation;
|
|
||||||
$this->slug = $this->translations[$translation]["slug"];
|
|
||||||
|
|
||||||
$query = new $query($t->dictionary,$this->term,$t->direction);
|
|
||||||
|
|
||||||
if ($clen) $query->withClen($clen);
|
|
||||||
$result = $this->repoTerms->fetch($query)->setFetchJoinCollection(FALSE);
|
|
||||||
|
|
||||||
if ($paginate) {
|
|
||||||
$this["paginator"]->setItemCount($result->getTotalCount());
|
|
||||||
$result->applyPaginator($paginator);
|
|
||||||
$offset = $this['paginator']->getOffset();
|
|
||||||
$itemsPerPage = $this['paginator']->getItemsPerPage();
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->template->translation = $t;
|
|
||||||
|
|
||||||
return $result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return AlesWita\Components\VisualPaginator
|
|
||||||
*/
|
|
||||||
protected function createComponentPaginator(): VisualPaginator
|
|
||||||
{
|
{
|
||||||
$paginator = $this->visualPaginatorFactory->create();
|
$translation = $values->translation;
|
||||||
|
$term = $values->string;
|
||||||
|
$clen = $values->clen;
|
||||||
|
|
||||||
$paginator->ajax = false;
|
$result = $this->doSearch('TermsFullQuery', $translation, $term, $clen);
|
||||||
$paginator->canSetItemsPerPage = true;
|
|
||||||
//$paginator->templateFile = __DIR__ . '/my_awesome_template.latte';
|
|
||||||
|
|
||||||
return $paginator;
|
$this->template->result = $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function createComponentSearchForm()
|
public function searchFormSucceededInteractive(UI\Form $form, $values)
|
||||||
{
|
{
|
||||||
$form = new UI\Form;
|
$term = $values->string;
|
||||||
$form->addText('string', 'Výraz')
|
$translation = $values->translation;
|
||||||
->setRequired('Zadajte výray');
|
|
||||||
$form->addSelect('translation', 'Preklad', $this->drsSelect)
|
|
||||||
->setDefaultValue(1)
|
|
||||||
->setRequired('Vyberte slovnik');
|
|
||||||
$form->addText('clen','Clen',5);
|
|
||||||
$form->addSubmit('search', 'Vyhaľadaj');
|
|
||||||
return $form;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function searchFormSucceeded(UI\Form $form,$values)
|
$result = $this->doSearch('TermsFullQuery', $translation, $term, null);
|
||||||
{
|
|
||||||
$translation = $values->translation;
|
|
||||||
$clen = $values->clen;
|
|
||||||
$term = $values->string;
|
|
||||||
|
|
||||||
$result = $this->doSearch('\\App\\Model\\Database\\Repository\\TermsQuery',$translation,$term,$clen);
|
$this->template->result = $result;
|
||||||
|
|
||||||
$this->template->result = $result;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function searchFormSucceededIpa(UI\Form $form,$values)
|
|
||||||
{
|
|
||||||
$translation = $values->translation;
|
|
||||||
$term = $values->string;
|
|
||||||
$clen = $values->clen;
|
|
||||||
|
|
||||||
$result = $this->doSearch('\\App\\TermsFullQuery',$translation,$term,$clen);
|
|
||||||
|
|
||||||
$this->template->result = $result;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function searchFormSucceededInteractive(UI\Form $form,$values)
|
|
||||||
{
|
|
||||||
$term = $values->string;
|
|
||||||
$translation = $values->translation;
|
|
||||||
|
|
||||||
$result = $this->doSearch('\\App\\TermsFullQuery',$translation,$term,null);
|
|
||||||
|
|
||||||
$this->template->result = $result;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function actionPlay($id = null)
|
|
||||||
{
|
|
||||||
$pron = $this->em->getPronunciationRepository()->find(['id'=>$id]);
|
|
||||||
$basepath = $this->getHttpRequest()->url->basePath . "/media";
|
|
||||||
$oggResp = new OggResponse($id,$pron->filename);
|
|
||||||
return $this->sendResponse($oggResp);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public function beforeRender()
|
|
||||||
{
|
|
||||||
$dicttypes = $this->repoDictTypes->findAssoc([],'id');
|
|
||||||
$this->template->dicttypes = $dicttypes;
|
|
||||||
$this->template->dictionaries = $this->dictionaries;
|
|
||||||
$this->template->translations = $this->translations;
|
|
||||||
// $this->template->paginator = $this->paginator;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function actionDefault()
|
|
||||||
{
|
|
||||||
if ($this->getRequest()->isMethod('GET') && $this->term) {
|
|
||||||
$this['searchForm']['string']->setValue($this->term);
|
|
||||||
$t = $this->slugs[$this->slug];
|
|
||||||
$result = $this->doSearch('\\App\\Model\\Database\\Repository\\TermsQuery',$t->id,$this->term);
|
|
||||||
if ($result) $this->template->result = $result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this['searchForm']->onSuccess[] = array($this, 'searchFormSucceeded');
|
public function actionPlay($id = null)
|
||||||
}
|
{
|
||||||
|
$pron = $this->em->getPronunciationRepository()->find(['id' => $id]);
|
||||||
|
$basepath = $this->getHttpRequest()->url->basePath . "/media";
|
||||||
|
$oggResp = new OggResponse($id, $pron->filename);
|
||||||
|
return $this->sendResponse($oggResp);
|
||||||
|
}
|
||||||
|
|
||||||
public function actionSelect($slug,$term = null)
|
|
||||||
{
|
public function actionDefault()
|
||||||
$this['searchForm']->onSuccess[] = array($this, 'searchFormSucceededIpa');
|
{
|
||||||
if ($this->getRequest()->isMethod('GET')) {
|
if ($this->getRequest()->isMethod('GET') && $this->term) {
|
||||||
if (isset($this->slugs[$slug])) {
|
$this['searchForm']['string']->setValue($this->term);
|
||||||
$t = $this->slugs[$slug];
|
$t = $this->slugs[$this->slug];
|
||||||
$this['searchForm']['translation']->setValue($t->id);
|
$result = $this->doSearch('TermsQuery',$t->id,$this->term);
|
||||||
$translation = $t;
|
if ($result) $this->template->result = $result;
|
||||||
|
} else {
|
||||||
|
$this->term = $this['searchForm']['string']->getValue();
|
||||||
}
|
}
|
||||||
} else {
|
$this['searchForm']->onSuccess[] = array($this, 'searchFormSucceeded');
|
||||||
$id = $this['searchForm']['translation']->value;
|
}
|
||||||
if (isset($this->translations[$id])) {
|
|
||||||
$t = $this->translations[$id];
|
public function actionSelect($slug, $term = null)
|
||||||
$this->redirect('Homepage:select',$t["slug"],$this['searchForm']['string']->value);
|
{
|
||||||
|
$this['searchForm']->onSuccess[] = array($this, 'searchFormSucceededIpa');
|
||||||
|
if ($this->getRequest()->isMethod('GET')) {
|
||||||
|
if (isset($this->slugs[$slug])) {
|
||||||
|
$t = $this->slugs[$slug];
|
||||||
|
$this['searchForm']['translation']->setValue($t->id);
|
||||||
|
$translation = $t;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
|
||||||
|
$id = $this['searchForm']['translation']->value;
|
||||||
|
if (isset($this->translations[$id])) {
|
||||||
|
$t = $this->translations[$id];
|
||||||
|
$this->redirect('Front:Home:select', $t["slug"], $this['searchForm']['string']->value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
if ($term) {
|
||||||
if ($term) {
|
$query = new TermsFullQuery($translation->dictionary, $term, $translation->direction);
|
||||||
$query = new \App\TermsFullQuery($translation->dictionary,$term,$translation->direction);
|
$result = $this->repoTerms->fetch($query);
|
||||||
$result = $this->repoTerms->fetch($query);
|
|
||||||
|
|
||||||
$this->template->result = $result;
|
$this->template->result = $result;
|
||||||
$this->template->translation = $translation;
|
$this->template->translation = $translation;
|
||||||
}
|
}
|
||||||
$this->setView('ipa');
|
$this->setView('ipa');
|
||||||
}
|
|
||||||
|
|
||||||
public function handleGetInfo($id)
|
|
||||||
{
|
|
||||||
$term = $this->repoTerms->find($id);
|
|
||||||
$termFlags = $this->repoTermFlags->findAssoc([],'id');
|
|
||||||
|
|
||||||
$dictionary = $term->dictionary;
|
|
||||||
|
|
||||||
$query = new \App\TermsFullQuery($dictionary,$term->string1,1,false);
|
|
||||||
$result = $this->repoTerms->fetch($query);
|
|
||||||
|
|
||||||
$this->template->result = $result;
|
|
||||||
$this->template->termFlags = $termFlags;
|
|
||||||
|
|
||||||
$this->setView('info');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function renderDefault()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public function actionIpa()
|
|
||||||
{
|
|
||||||
if ($this->getRequest()->isMethod('GET')) {
|
|
||||||
if ($this->term) {
|
|
||||||
$this['searchForm']['string']->setValue($this->term);
|
|
||||||
$result = $this->doSearch('\\App\\TermsFullQuery',$this->slugs[$this->slug]->id,$this->term);
|
|
||||||
if ($result) $this->template->result = $result;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this['searchForm']->onSuccess[] = array($this, 'searchFormSucceededIpa');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function actionInteractive()
|
|
||||||
{
|
public function renderDefault()
|
||||||
if ($this->getRequest()->isMethod('GET')) {
|
{
|
||||||
if ($this->term) {
|
|
||||||
$this['searchForm']['string']->setValue($this->term);
|
|
||||||
$result = $this->doSearch('\\App\\TermsFullQuery',$this->slugs[$this->slug]->id,$this->term);
|
|
||||||
if ($result) $this->template->result = $result;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this['searchForm']->onSuccess[] = array($this, 'searchFormSucceededInteractive');
|
public function actionIpa()
|
||||||
}
|
{
|
||||||
|
if ($this->term)
|
||||||
|
$this->redirect('Search:ipa',$this->translation,$this->term);
|
||||||
|
}
|
||||||
|
|
||||||
public function renderAutocomplete($whichData, $typedText = '',$translation = 1)
|
public function actionInteractive()
|
||||||
{
|
{
|
||||||
$translation = $this->repoTranslations->find($translation);
|
if ($this->getRequest()->isMethod('GET')) {
|
||||||
|
if ($this->term) {
|
||||||
|
$this['searchForm']['string']->setValue($this->term);
|
||||||
|
$result = $this->doSearch('TermsFullQuery', $this->slugs[$this->slug]->id, $this->term);
|
||||||
|
if ($result) $this->template->result = $result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$query = new \App\TermsQuickQuery($translation->dictionary,$typedText,$translation->direction);
|
$this['searchForm']->onSuccess[] = array($this, 'searchFormSucceededInteractive');
|
||||||
$result = $this->repoTerms->fetch($query);
|
}
|
||||||
|
|
||||||
$map = [];
|
public function renderAutocomplete($whichData, $typedText = '', $translation = 1)
|
||||||
foreach ($result as $str) {
|
{
|
||||||
$map[] = $str["string1"];
|
$translation = $this->repoTranslations->find($translation);
|
||||||
}
|
|
||||||
|
|
||||||
return $this->sendResponse(new JsonResponse($map));
|
$query = new TermsQuickQuery($translation->dictionary, $typedText, $translation->direction);
|
||||||
}
|
$result = $this->repoTerms->fetch($query);
|
||||||
|
|
||||||
public function renderIpa()
|
$map = [];
|
||||||
{
|
foreach ($result as $str) {
|
||||||
|
$map[] = $str["string1"];
|
||||||
|
}
|
||||||
|
|
||||||
}
|
return $this->sendResponse(new JsonResponse($map));
|
||||||
|
}
|
||||||
|
|
||||||
public function renderMerge()
|
public function renderIpa()
|
||||||
{
|
{
|
||||||
|
}
|
||||||
|
|
||||||
}
|
public function renderMerge()
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
205
app/modules/Front/Home/templates/alphabet.latte
Normal file
205
app/modules/Front/Home/templates/alphabet.latte
Normal file
@@ -0,0 +1,205 @@
|
|||||||
|
{layout ../@layout.latte}
|
||||||
|
|
||||||
|
{block content}
|
||||||
|
<table class="trans">
|
||||||
|
<tbody><tr>
|
||||||
|
<th>písmeno</th>
|
||||||
|
<th>PSP</th>
|
||||||
|
<th>alt.</th>
|
||||||
|
<th>IPA</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="/wiki/B" title="B">B</a> b</td>
|
||||||
|
<td>bé</td>
|
||||||
|
<td> </td>
|
||||||
|
<td><span title="Zápis v Medzinárodnej fonetickej abecede (IPA)" class="IPA">/b/</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="/wiki/C" title="C">C</a> c</td>
|
||||||
|
<td>cé</td>
|
||||||
|
<td> </td>
|
||||||
|
<td><span title="Zápis v Medzinárodnej fonetickej abecede (IPA)" class="IPA">/t͡s/</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="/wiki/%C4%8C" title="Č">Č</a> č</td>
|
||||||
|
<td>čé</td>
|
||||||
|
<td> </td>
|
||||||
|
<td><span title="Zápis v Medzinárodnej fonetickej abecede (IPA)" class="IPA">/t͡ʃ/</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="/wiki/D" title="D">D</a> d</td>
|
||||||
|
<td>dé</td>
|
||||||
|
<td> </td>
|
||||||
|
<td><span title="Zápis v Medzinárodnej fonetickej abecede (IPA)" class="IPA">/d/</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="/wiki/%C4%8E" title="Ď">Ď</a> ď</td>
|
||||||
|
<td>ďé</td>
|
||||||
|
<td>mäkké dé</td>
|
||||||
|
<td><span title="Zápis v Medzinárodnej fonetickej abecede (IPA)" class="IPA">/ɟ/</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>DZ dz</td>
|
||||||
|
<td>dzé</td>
|
||||||
|
<td> </td>
|
||||||
|
<td><span title="Zápis v Medzinárodnej fonetickej abecede (IPA)" class="IPA">/d͡z/</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>DŽ dž</td>
|
||||||
|
<td>džé</td>
|
||||||
|
<td> </td>
|
||||||
|
<td><span title="Zápis v Medzinárodnej fonetickej abecede (IPA)" class="IPA">/d͡ʒ/</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="/wiki/F" title="F">F</a> f</td>
|
||||||
|
<td>ef</td>
|
||||||
|
<td> </td>
|
||||||
|
<td><span title="Zápis v Medzinárodnej fonetickej abecede (IPA)" class="IPA">/f/</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="/wiki/G" title="G">G</a> g</td>
|
||||||
|
<td>gé</td>
|
||||||
|
<td> </td>
|
||||||
|
<td><span title="Zápis v Medzinárodnej fonetickej abecede (IPA)" class="IPA">/ɡ/</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="/wiki/H" title="H">H</a> h</td>
|
||||||
|
<td>há</td>
|
||||||
|
<td> </td>
|
||||||
|
<td><span title="Zápis v Medzinárodnej fonetickej abecede (IPA)" class="IPA">/ɦ/</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="/wiki/CH" class="mw-disambig" title="CH">CH</a> ch</td>
|
||||||
|
<td>chá</td>
|
||||||
|
<td> </td>
|
||||||
|
<td><span title="Zápis v Medzinárodnej fonetickej abecede (IPA)" class="IPA">/x/</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="/wiki/J" title="J">J</a> j</td>
|
||||||
|
<td>jé</td>
|
||||||
|
<td> </td>
|
||||||
|
<td><span title="Zápis v Medzinárodnej fonetickej abecede (IPA)" class="IPA">/j/</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="/wiki/K" title="K">K</a> k</td>
|
||||||
|
<td>ká</td>
|
||||||
|
<td> </td>
|
||||||
|
<td><span title="Zápis v Medzinárodnej fonetickej abecede (IPA)" class="IPA">/k/</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="/wiki/L" title="L">L</a> l</td>
|
||||||
|
<td>el</td>
|
||||||
|
<td> </td>
|
||||||
|
<td><span title="Zápis v Medzinárodnej fonetickej abecede (IPA)" class="IPA">/l/</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="/wiki/%C4%B9" title="Ĺ">Ĺ</a> ĺ</td>
|
||||||
|
<td>dlhé el</td>
|
||||||
|
<td> </td>
|
||||||
|
<td><span title="Zápis v Medzinárodnej fonetickej abecede (IPA)" class="IPA">/lː/</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="/wiki/%C4%BD" title="Ľ">Ľ</a> ľ</td>
|
||||||
|
<td>eľ</td>
|
||||||
|
<td>mäkké el</td>
|
||||||
|
<td><span title="Zápis v Medzinárodnej fonetickej abecede (IPA)" class="IPA">/ʎ/</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="/wiki/M" title="M">M</a> m</td>
|
||||||
|
<td>em</td>
|
||||||
|
<td> </td>
|
||||||
|
<td><span title="Zápis v Medzinárodnej fonetickej abecede (IPA)" class="IPA">/m/</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="/wiki/N" title="N">N</a> n</td>
|
||||||
|
<td>en</td>
|
||||||
|
<td> </td>
|
||||||
|
<td><span title="Zápis v Medzinárodnej fonetickej abecede (IPA)" class="IPA">/n/</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="/wiki/%C5%87" title="Ň">Ň</a> ň</td>
|
||||||
|
<td>eň</td>
|
||||||
|
<td>mäkké en</td>
|
||||||
|
<td><span title="Zápis v Medzinárodnej fonetickej abecede (IPA)" class="IPA">/ɲ/</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="/wiki/P" title="P">P</a> p</td>
|
||||||
|
<td>pé</td>
|
||||||
|
<td> </td>
|
||||||
|
<td><span title="Zápis v Medzinárodnej fonetickej abecede (IPA)" class="IPA">/p/</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="/wiki/Q" title="Q">Q</a> q</td>
|
||||||
|
<td>kvé</td>
|
||||||
|
<td> </td>
|
||||||
|
<td><span title="Zápis v Medzinárodnej fonetickej abecede (IPA)" class="IPA">/kv/</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="/wiki/R" title="R">R</a> r</td>
|
||||||
|
<td>er</td>
|
||||||
|
<td> </td>
|
||||||
|
<td><span title="Zápis v Medzinárodnej fonetickej abecede (IPA)" class="IPA">/r/</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="/wiki/%C5%94" title="Ŕ">Ŕ</a> ŕ</td>
|
||||||
|
<td>dlhé er</td>
|
||||||
|
<td> </td>
|
||||||
|
<td><span title="Zápis v Medzinárodnej fonetickej abecede (IPA)" class="IPA">/rː/</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="/wiki/S" title="S">S</a> s</td>
|
||||||
|
<td>es</td>
|
||||||
|
<td> </td>
|
||||||
|
<td><span title="Zápis v Medzinárodnej fonetickej abecede (IPA)" class="IPA">/s/</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="/wiki/%C5%A0" title="Š">Š</a> š</td>
|
||||||
|
<td>eš</td>
|
||||||
|
<td> </td>
|
||||||
|
<td><span title="Zápis v Medzinárodnej fonetickej abecede (IPA)" class="IPA">/ʃ/</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="/wiki/T" title="T">T</a> t</td>
|
||||||
|
<td>té</td>
|
||||||
|
<td> </td>
|
||||||
|
<td><span title="Zápis v Medzinárodnej fonetickej abecede (IPA)" class="IPA">/t/</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="/wiki/%C5%A4" title="Ť">Ť</a> ť</td>
|
||||||
|
<td>ťé</td>
|
||||||
|
<td>mäkké té</td>
|
||||||
|
<td><span title="Zápis v Medzinárodnej fonetickej abecede (IPA)" class="IPA">/c/</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="/wiki/V" title="V">V</a> v</td>
|
||||||
|
<td>vé</td>
|
||||||
|
<td> </td>
|
||||||
|
<td><span title="Zápis v Medzinárodnej fonetickej abecede (IPA)" class="IPA">/v/</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="/wiki/W" title="W">W</a> w</td>
|
||||||
|
<td>dvojité vé</td>
|
||||||
|
<td> </td>
|
||||||
|
<td><span title="Zápis v Medzinárodnej fonetickej abecede (IPA)" class="IPA">/v/</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="/wiki/X" title="X">X</a> x</td>
|
||||||
|
<td>iks</td>
|
||||||
|
<td> </td>
|
||||||
|
<td><span title="Zápis v Medzinárodnej fonetickej abecede (IPA)" class="IPA">/ks/</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="/wiki/Z" title="Z">Z</a> z</td>
|
||||||
|
<td>zé</td>
|
||||||
|
<td>zet</td>
|
||||||
|
<td><span title="Zápis v Medzinárodnej fonetickej abecede (IPA)" class="IPA">/z/</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><a href="/wiki/%C5%BD" title="Ž">Ž</a> ž</td>
|
||||||
|
<td>žé</td>
|
||||||
|
<td>žet</td>
|
||||||
|
<td><span title="Zápis v Medzinárodnej fonetickej abecede (IPA)" class="IPA">/ʒ/</span></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
{/block}
|
||||||
@@ -1,2 +1 @@
|
|||||||
{block #content}
|
{block #content}
|
||||||
Welcome
|
|
||||||
|
|||||||
26
app/modules/Front/Home/templates/info.latte
Normal file
26
app/modules/Front/Home/templates/info.latte
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<table class="trans1">
|
||||||
|
{var $last = ''}
|
||||||
|
{foreach $result as $term}
|
||||||
|
{if ($last != $term->string1 && $last != '') }
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{/if}
|
||||||
|
{if $last != $term->string1}
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<span class="term">{$term->string1}</span>
|
||||||
|
{foreach $term->pronunciations as $pron}
|
||||||
|
<span class="ipa-{$pron->type->id}">[{$pron->ipa}]</span>
|
||||||
|
<img n:if="$pron->filename" class="sound-ipa ajax" src="/images/sound.png" alt="Prehraj" style="vertical-align: middle;" data-sound-id="{$pron->id}" ></image>
|
||||||
|
{/foreach}
|
||||||
|
<br/>
|
||||||
|
<div style="margin-left: 20px;" class="translations">
|
||||||
|
{/if}
|
||||||
|
{$last == $term->string1 && trim($last2) != '' && trim($term->string2) != '' ? ', ' : ''}{$term->string2}{foreach $term->flags as $flag} <span class="flag">{$termFlags[$flag]->code}</span>{/foreach}{ifset $term->type->id}<span class="type"> ({$dicttypes[$term->type->id]->fullName|lower})</span>{/ifset}{**
|
||||||
|
Nutne kvoli newline
|
||||||
|
**}
|
||||||
|
{? $last = $term->string1}
|
||||||
|
{? $last2 = $term->string2}
|
||||||
|
{/foreach}
|
||||||
|
</table>
|
||||||
1
app/modules/Front/Home/templates/interactive.latte
Normal file
1
app/modules/Front/Home/templates/interactive.latte
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{block #content}
|
||||||
1
app/modules/Front/Home/templates/ipa.latte
Normal file
1
app/modules/Front/Home/templates/ipa.latte
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{block #content}
|
||||||
85
app/modules/Front/Search/SearchPresenter.php
Normal file
85
app/modules/Front/Search/SearchPresenter.php
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
<?php //declare(strict_types = 1);
|
||||||
|
|
||||||
|
namespace App\Modules\Front\Search;
|
||||||
|
|
||||||
|
use App\Modules\Front\BaseFrontPresenter;
|
||||||
|
use Nette;
|
||||||
|
use Nette\Utils\Strings;
|
||||||
|
use Nette\Application\UI;
|
||||||
|
use Dict\OggResponse;
|
||||||
|
use Nette\Application\Responses\JsonResponse;
|
||||||
|
use AlesWita\VisualPaginator\VisualPaginator;
|
||||||
|
use AlesWita\VisualPaginator\VisualPaginatorFactory;
|
||||||
|
use App\Model\Database\EntityManager;
|
||||||
|
use App\Model\Database\Entity\Dictionary;
|
||||||
|
use App\Model\Database\Entity\Translation;
|
||||||
|
use App\Model\Database\Repository\TranslationRepository;
|
||||||
|
use App\Model\Database\Repository\TermsFullQuery;
|
||||||
|
use App\Model\Database\Repository\TermsQuickQuery;
|
||||||
|
use App\Model\Database\Facade\TermFacade;
|
||||||
|
|
||||||
|
class SearchPresenter extends BaseFrontPresenter
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
protected function doSearch($query, $translation, $term, $clen = null, $paginate = true)
|
||||||
|
{
|
||||||
|
$t = $this->em->getTranslationRepository()->find($translation);
|
||||||
|
|
||||||
|
if ($term) $this->term = $term;
|
||||||
|
if ($translation) $this->translation = $translation;
|
||||||
|
$this->slug = $this->translations[$translation]["slug"];
|
||||||
|
|
||||||
|
$this->termFacade->setDirection(1);
|
||||||
|
$q = $this->termFacade->findByString($term, $t->dictionary, $clen);
|
||||||
|
|
||||||
|
if ($paginate) {
|
||||||
|
$paginator = new \Doctrine\ORM\Tools\Pagination\Paginator($q);
|
||||||
|
$count = count($paginator);
|
||||||
|
$this["paginator"]->setItemCount($count);
|
||||||
|
$offset = $this["paginator"]->getOffset();
|
||||||
|
$itemsPerPage = $this['paginator']->getItemsPerPage();
|
||||||
|
$q->setFirstResult($offset)->setMaxResults($itemsPerPage);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$this->template->translation = $t;
|
||||||
|
|
||||||
|
return $q->getResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function renderDefault($translation,$term,$clen = '',$paginate = true)
|
||||||
|
{
|
||||||
|
$this['searchForm']['string']->setValue($this->term);
|
||||||
|
$this->template->result = $this->doSearch('TermQuery',$translation,$term,$clen,$paginate);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function renderIpa($translation,$term,$clen='',$paginate=true)
|
||||||
|
{
|
||||||
|
$this['searchForm']['string']->setValue($this->term);
|
||||||
|
$result = $this->doSearch('TermsFullQuery', $this->slugs[$this->slug]->id, $this->term);
|
||||||
|
if ($result) $this->template->result = $result;
|
||||||
|
|
||||||
|
$this['searchForm']->onSuccess[] = array($this, 'searchFormSucceededIpa');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return AlesWita\Components\VisualPaginator
|
||||||
|
*/
|
||||||
|
protected function createComponentPaginator(): VisualPaginator
|
||||||
|
{
|
||||||
|
$paginator = $this->visualPaginatorFactory->create();
|
||||||
|
|
||||||
|
$paginator->ajax = false;
|
||||||
|
$paginator->canSetItemsPerPage = true;
|
||||||
|
$paginator->setItemsPerPage(20);
|
||||||
|
|
||||||
|
$paginator->templateFile = __DIR__.'/templates/bootstrap4.latte';
|
||||||
|
|
||||||
|
return $paginator;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
39
app/modules/Front/Search/templates/bootstrap4.latte
Normal file
39
app/modules/Front/Search/templates/bootstrap4.latte
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
{templateType AlesWita\VisualPaginator\Template}
|
||||||
|
|
||||||
|
{php $linkClass = $ajax ? 'page-link ajax' : 'page-link'}
|
||||||
|
|
||||||
|
<ul class="pagination">
|
||||||
|
<li n:class="$paginator->isFirst() ? 'page-item disabled' : 'page-item'">
|
||||||
|
<a n:href="paginate!, page => $paginator->page - 1" class="{$linkClass}">«</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
{foreach $steps as $step}
|
||||||
|
<li n:class="$step === $paginator->page ? 'page-item active' : 'page-item'">
|
||||||
|
<a n:href="paginate!, page => $step" class="{$linkClass}">{$step}</a>
|
||||||
|
</li>
|
||||||
|
{if $iterator->nextValue > $step + 1}
|
||||||
|
<li class="page-item disabled">
|
||||||
|
<span class="page-link">…</span>
|
||||||
|
</li>
|
||||||
|
{/if}
|
||||||
|
{/foreach}
|
||||||
|
|
||||||
|
<li n:class="$paginator->isLast() ? 'page-item disabled' : 'page-item'">
|
||||||
|
<a n:href="paginate!, page => $paginator->page + 1" class="{$linkClass}">»</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
{if $itemsPerPage}
|
||||||
|
{form itemsPerPage, class => $ajax ? 'form-inline ajax' : 'form-inline'}
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text" id="basic-addon1">{label itemsPerPage /}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{input itemsPerPage, class => "form-control"}
|
||||||
|
<div class="input-group-append">
|
||||||
|
{input send, class => "btn btn-outline-secondary"}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/form}
|
||||||
|
{/if}
|
||||||
64
app/modules/Front/Search/templates/default.latte
Normal file
64
app/modules/Front/Search/templates/default.latte
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
{block head}
|
||||||
|
<script>
|
||||||
|
$( document ).ready(function() {
|
||||||
|
console.log( "ready!" );
|
||||||
|
$("tr[id*='term']").on("click",function () {
|
||||||
|
var id = this.id + '-info';
|
||||||
|
if ($('#' + id).length == 0) {
|
||||||
|
$(this).after('<tr id=' + '"' + id + '"></tr>');
|
||||||
|
console.log('Append ' + id);
|
||||||
|
$.ajax({
|
||||||
|
url: $(this).attr('data-url'),
|
||||||
|
context: $('#' + id)
|
||||||
|
}).done(function (response) {
|
||||||
|
console.log(response);
|
||||||
|
$(this).html("<td colspan='4'>" + response + "</td>");
|
||||||
|
$("img.ajax").on("click", function (event) {
|
||||||
|
event.preventDefault();
|
||||||
|
id = $(this).attr("data-sound-id");
|
||||||
|
var audioElement = document.createElement('audio');
|
||||||
|
var link = {link Home:play 1234567};
|
||||||
|
audioElement.setAttribute('src', link.replace('1234567',id));
|
||||||
|
console.log("Play sound:" + id);
|
||||||
|
audioElement.play();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{/block}
|
||||||
|
{block content}
|
||||||
|
|
||||||
|
|
||||||
|
<div class="boxes">
|
||||||
|
|
||||||
|
{ifset $result}
|
||||||
|
|
||||||
|
<table class="e-table" n:snippet="termsComnainer">
|
||||||
|
<tr>
|
||||||
|
<th>Vyraz</th><th>Preklad</th><th>Typ</th><th>Member</th>
|
||||||
|
</tr>
|
||||||
|
{foreach $result as $term}
|
||||||
|
|
||||||
|
<tr data-url="{link getInfo! $term->id}" n:snippet="term-$term->id">
|
||||||
|
{if $translation->getDirection() == 1}
|
||||||
|
<td>{$term->string1}{if $term->suffix1} {$term->suffix1->text}{/if}</td>
|
||||||
|
<td>{$term->string2}{if $term->suffix2} {$term->suffix2->text}{/if}</td>
|
||||||
|
{else}
|
||||||
|
<td>{$term->string2}{if $term->suffix2} {$term->suffix2->text}{/if}</td>
|
||||||
|
<td>{$term->string1}{if $term->suffix1} {$term->suffix1->text}{/if}</td>
|
||||||
|
{/if}
|
||||||
|
<td n:attr="title => $term->type ? $dicttypes[$term->type->id]->fullName : null">{$term->type ? $dicttypes[$term->type->id]->shortName : ''}</td>
|
||||||
|
<td>{$term->member}</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
{/foreach}
|
||||||
|
</table>
|
||||||
|
{control paginator}
|
||||||
|
{/ifset}
|
||||||
|
</div>
|
||||||
|
{/block}
|
||||||
|
|
||||||
|
|
||||||
104
app/modules/Front/Search/templates/interactive.latte
Normal file
104
app/modules/Front/Search/templates/interactive.latte
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
{block title}Slovnik{/block}
|
||||||
|
{block head}
|
||||||
|
<script>
|
||||||
|
$( document ).ready(function() {
|
||||||
|
$("img.ajax").on("click", function (event) {
|
||||||
|
event.preventDefault();
|
||||||
|
id = $(this).attr("data-sound-id");
|
||||||
|
var audioElement = document.createElement('audio');
|
||||||
|
audioElement.setAttribute('src', {link Home:play} + "/" + id);
|
||||||
|
console.log("Play sound:" + id);
|
||||||
|
audioElement.play();
|
||||||
|
});
|
||||||
|
|
||||||
|
$(function() {
|
||||||
|
var select_name = "string";
|
||||||
|
$("input[name=" + select_name + "]").autocomplete({
|
||||||
|
source: function( request, response ) {
|
||||||
|
$.ajax({
|
||||||
|
url: {!$presenter->link('autocomplete')},
|
||||||
|
data: {
|
||||||
|
whichData: select_name,
|
||||||
|
typedText: request.term,
|
||||||
|
translation: $("select[name=translation]").val()
|
||||||
|
},
|
||||||
|
success: function( data ) {
|
||||||
|
response( $.map( data, function( item ) {
|
||||||
|
return { label: item, value: item }
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
minLength: 3,
|
||||||
|
open: function() {
|
||||||
|
$(this).removeClass("ui-corner-all").addClass("ui-corner-top");
|
||||||
|
},
|
||||||
|
close: function() {
|
||||||
|
$(this).removeClass("ui-corner-top").addClass("ui-corner-all");
|
||||||
|
},
|
||||||
|
select: function(e, ui) {
|
||||||
|
$("#frm-searchForm-string").val(ui.item.value);
|
||||||
|
$("#frm-searchForm").submit();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{/block}
|
||||||
|
|
||||||
|
{block content}
|
||||||
|
|
||||||
|
<div class="boxes">
|
||||||
|
{form searchForm}
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th>{label string /}</th><th>{label translation /}</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{input string}</td><td>{input translation}</td><td>{input search}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
{ifset $result}
|
||||||
|
<table id="searchBox">
|
||||||
|
|
||||||
|
</table>
|
||||||
|
<table class="trans">
|
||||||
|
<tr>
|
||||||
|
<th>Preklad</th>
|
||||||
|
</tr>
|
||||||
|
{var $last = ''}
|
||||||
|
{foreach $result as $term}
|
||||||
|
{if ($last != $term->string1 && $last != '') }
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{/if}
|
||||||
|
{if $last != $term->string1}
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<span class="term">{$term->string1}</span>
|
||||||
|
{foreach $term->pronunciations as $pron}
|
||||||
|
<span class="ipa-{$pron->type->id}">[{$pron->ipa}]</span>
|
||||||
|
<img n:if="$pron->filename" class="sound-ipa ajax" src="/images/sound.png" alt="Prehraj" style="vertical-align: middle;" data-sound-id="{$pron->id}" ></image>
|
||||||
|
{/foreach}
|
||||||
|
<br/>
|
||||||
|
<div style="margin-left: 20px;" class="translations">
|
||||||
|
{/if}
|
||||||
|
{$last == $term->string1 && trim($last2) != '' && trim($term->string2) != '' ? ', ' : ''}{$term->string2}{**
|
||||||
|
Nutne kvoli newline
|
||||||
|
**}
|
||||||
|
{var $last = $term->string1}
|
||||||
|
{var $last2 = $term->string2}
|
||||||
|
{/foreach}
|
||||||
|
</table>
|
||||||
|
{/ifset}
|
||||||
|
{/form}
|
||||||
|
{control paginator}
|
||||||
|
</div>
|
||||||
|
{/block}
|
||||||
|
|
||||||
|
|
||||||
54
app/modules/Front/Search/templates/ipa.latte
Normal file
54
app/modules/Front/Search/templates/ipa.latte
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
{block title}Slovnik{/block}
|
||||||
|
{block head}
|
||||||
|
<script>
|
||||||
|
$( document ).ready(function() {
|
||||||
|
$("img.ajax").on("click", function (event) {
|
||||||
|
event.preventDefault();
|
||||||
|
id = $(this).attr("data-sound-id");
|
||||||
|
var audioElement = document.createElement('audio');
|
||||||
|
var link = {link Home:play 123456 };
|
||||||
|
audioElement.setAttribute('src', link.replace('123456',id));
|
||||||
|
console.log("Play sound:" + id);
|
||||||
|
audioElement.play();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{/block}
|
||||||
|
|
||||||
|
|
||||||
|
{block content}
|
||||||
|
{ifset $result}
|
||||||
|
<table class="trans">
|
||||||
|
<tr>
|
||||||
|
<th>Preklad</th>
|
||||||
|
</tr>
|
||||||
|
{var $last = ''}
|
||||||
|
{foreach $result as $term}
|
||||||
|
{if ($last != $term->string1 && $last != '') }
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{/if}
|
||||||
|
{if $last != $term->string1}
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<span class="term">{$term->string1}</span>
|
||||||
|
{foreach $term->pronunciations as $pron}
|
||||||
|
<span class="ipa-{$pron->type->id}">[{$pron->ipa}]</span>
|
||||||
|
<img n:if="$pron->filename" class="sound-ipa ajax" src="/assets/images/sound.png" alt="Prehraj" style="vertical-align: middle;" data-sound-id="{$pron->id}" ></image>
|
||||||
|
{/foreach}
|
||||||
|
<br/>
|
||||||
|
<div style="margin-left: 20px;" class="translations">
|
||||||
|
{/if}
|
||||||
|
{$last == $term->string1 && trim($last2) != '' && trim($term->string2) != '' ? ', ' : ''}{$term->string2}{**
|
||||||
|
Nutne kvoli newline
|
||||||
|
**}
|
||||||
|
{var $last = $term->string1}
|
||||||
|
{var $last2 = $term->string2}
|
||||||
|
{/foreach}
|
||||||
|
</table>
|
||||||
|
{/ifset}
|
||||||
|
{control paginator}
|
||||||
|
</div>
|
||||||
|
{/block}
|
||||||
|
|
||||||
@@ -1,38 +1,76 @@
|
|||||||
{layout '../../Base/templates/@layout.latte'}
|
{**
|
||||||
|
* @param string $basePath web base path
|
||||||
|
* @param array $flashes flash messages
|
||||||
|
*}
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
|
||||||
{block #head}
|
<title>{ifset title}{include title|striptags} | {/ifset}Nette Sandbox</title>
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/css/bootstrap.min.css" defer/>
|
|
||||||
<link rel="stylesheet" href="{$basePath}/assets/front.css" defer/>
|
|
||||||
<script src="{$basePath}/assets/front.js" defer></script>
|
|
||||||
{/}
|
|
||||||
|
|
||||||
{block #main}
|
<link rel="stylesheet" href="{$basePath}/assets/css/style.css">
|
||||||
<div class="cover-container d-flex w-100 h-100 p-3 mx-auto flex-column">
|
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
|
||||||
<header class="masthead mb-auto">
|
<meta name="viewport" content="width=device-width">
|
||||||
<div class="inner">
|
<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
|
||||||
<h3 class="masthead-brand">Webapp</h3>
|
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
|
||||||
<nav class="nav nav-masthead justify-content-center">
|
{block head}{/block}
|
||||||
<a n:class="$presenter->isLinkCurrent(':Front:Home:') ? active, nav-link" n:href=":Front:Home:">Home</a>
|
</head>
|
||||||
<a n:class="$presenter->isLinkCurrent(':Admin:Home:') ? active, nav-link" n:href=":Admin:Home:">Admin</a>
|
|
||||||
<a n:class="$presenter->isLinkCurrent(':Pdf:Home:') ? active, nav-link" n:href=":Pdf:Home:">PDF example</a>
|
|
||||||
</nav>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<main role="main" class="inner cover">
|
<body>
|
||||||
<h1 class="cover-heading">Webapp skeleton.</h1>
|
|
||||||
<p class="lead">This is example project based on <a href="https://nette.org">Nette Framework</a></p>
|
|
||||||
<p class="lead">And also many <a href="https://contributte.org">Contributte + Nettrine</a> packages.</p>
|
|
||||||
<div class="lead">
|
|
||||||
<a href="https://github.com/contributte/webapp-skeleton" class="btn btn-lg btn-secondary">Learn more in docs</a>
|
|
||||||
</div>
|
|
||||||
</main>
|
|
||||||
|
|
||||||
<footer class="mastfoot mt-auto">
|
<header>
|
||||||
<div class="inner">
|
<hgroup>
|
||||||
<p>Cover template for <a href="https://getbootstrap.com/">Bootstrap</a>, by
|
<h1>My Dictionary</h1>
|
||||||
<a href="https://twitter.com/mdo">@mdo</a>.</p>
|
<h2>multilanguage dictionary with pronunciations</h2>
|
||||||
</div>
|
</hgroup>
|
||||||
</footer>
|
<nav>
|
||||||
</div>
|
<ul>
|
||||||
{/}
|
<li><a href="{link Home:default}">Jednoduchý</a></li>
|
||||||
|
<li><a href="{link Home:ipa}">s výslovnosťou</a></li>
|
||||||
|
<li><a href="{link Home:interactive}">Interaktívny</a></li>
|
||||||
|
<li><a href="{link Home:alphabet}">Abeceda</a></li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<a href="#" title="Jaro's Solutions homepage"><img src="logo.gif" alt="Jaro's Solutions" /></a>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<article>
|
||||||
|
<h1 n:ifset="$title">{$title}</h1>
|
||||||
|
|
||||||
|
<div n:foreach="$flashes as $flash" n:class="flash, $flash->type">{$flash->message}</div>
|
||||||
|
<div id="content">
|
||||||
|
{block form}
|
||||||
|
<h2>Zadaj vyhladavany vyraz.</h2>
|
||||||
|
{form searchForm}
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th>{label string /}</th><th>{label translation /}</th><th>{label clen /}</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{input string}</td><td>{input translation}</td><td>{input clen}</td><td>{input search}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
{/form}
|
||||||
|
{/block}
|
||||||
|
{include content}
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<h1>Slovníky</h1>
|
||||||
|
<ul>
|
||||||
|
{foreach $translations as $tr}
|
||||||
|
<li><a href="{link Home:select $tr["slug"] }">{$tr["lang"]}</a></li>
|
||||||
|
{/foreach}
|
||||||
|
</ul>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
<p>© 2022 Jaro's Solutions - <a href="#">Sitemap</a> </p>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
{block scripts}
|
||||||
|
{/block}
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|||||||
@@ -40,7 +40,8 @@
|
|||||||
"nettrine/migrations": "^0.7.0",
|
"nettrine/migrations": "^0.7.0",
|
||||||
"nettrine/fixtures": "^0.6.0",
|
"nettrine/fixtures": "^0.6.0",
|
||||||
"contributte/pdf": "^6.1",
|
"contributte/pdf": "^6.1",
|
||||||
"aleswita/visualpaginator": "^4.0"
|
"aleswita/visualpaginator": "^4.0",
|
||||||
|
"contributte/nextras-orm-query-object": "^0.5.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"ninjify/qa": "^0.13",
|
"ninjify/qa": "^0.13",
|
||||||
|
|||||||
147
composer.lock
generated
147
composer.lock
generated
@@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "c8eeafe21edd871737d5947f6972f640",
|
"content-hash": "67e07b326406b0442c4d943d193336b5",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "aleswita/visualpaginator",
|
"name": "aleswita/visualpaginator",
|
||||||
@@ -1201,6 +1201,74 @@
|
|||||||
},
|
},
|
||||||
"time": "2020-12-20T15:17:11+00:00"
|
"time": "2020-12-20T15:17:11+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "contributte/nextras-orm-query-object",
|
||||||
|
"version": "v0.5.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/contributte/nextras-orm-query-object.git",
|
||||||
|
"reference": "6b19a11fed7d8b5fdaf07665096a99231f1051a5"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/contributte/nextras-orm-query-object/zipball/6b19a11fed7d8b5fdaf07665096a99231f1051a5",
|
||||||
|
"reference": "6b19a11fed7d8b5fdaf07665096a99231f1051a5",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"nextras/dbal": "^4.0.0",
|
||||||
|
"php": ">=7.2"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"mockery/mockery": "^1.3.0",
|
||||||
|
"nette/di": "^3.0.1",
|
||||||
|
"nextras/orm": "^4.0.0",
|
||||||
|
"ninjify/nunjuck": "^0.4",
|
||||||
|
"ninjify/qa": "^0.13",
|
||||||
|
"phpstan/phpstan": "^1.0.0",
|
||||||
|
"phpstan/phpstan-deprecation-rules": "^1.0.0",
|
||||||
|
"phpstan/phpstan-nette": "^1.0.0",
|
||||||
|
"phpstan/phpstan-strict-rules": "^1.0.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "0.5.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Contributte\\Nextras\\Orm\\QueryObject\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Milan Felix Šulc",
|
||||||
|
"homepage": "https://f3l1x.io"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "QueryObjects for Nextras ORM",
|
||||||
|
"homepage": "https://github.com/contributte/nextras-orm-query-object",
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/contributte/nextras-orm-query-object/issues",
|
||||||
|
"source": "https://github.com/contributte/nextras-orm-query-object/tree/v0.5.0"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://contributte.org/partners.html",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/f3l1x",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2022-01-04T19:52:26+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "contributte/pdf",
|
"name": "contributte/pdf",
|
||||||
"version": "v6.1.0",
|
"version": "v6.1.0",
|
||||||
@@ -4713,6 +4781,83 @@
|
|||||||
},
|
},
|
||||||
"time": "2021-08-13T12:31:10+00:00"
|
"time": "2021-08-13T12:31:10+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "nextras/dbal",
|
||||||
|
"version": "v4.0.4",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/nextras/dbal.git",
|
||||||
|
"reference": "05c44e728bd9362699c7a0b65ed458fcb62d02ac"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/nextras/dbal/zipball/05c44e728bd9362699c7a0b65ed458fcb62d02ac",
|
||||||
|
"reference": "05c44e728bd9362699c7a0b65ed458fcb62d02ac",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=7.1"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"mockery/mockery": "~1.3.0",
|
||||||
|
"nette/caching": "~3.0",
|
||||||
|
"nette/di": "~3.0",
|
||||||
|
"nette/finder": "~2.5",
|
||||||
|
"nette/neon": "~3.0",
|
||||||
|
"nette/tester": "~2.3.1",
|
||||||
|
"nette/utils": "~3.0",
|
||||||
|
"phpstan/extension-installer": "1.0.5",
|
||||||
|
"phpstan/phpstan": "1.0.0",
|
||||||
|
"phpstan/phpstan-deprecation-rules": "1.0.0",
|
||||||
|
"phpstan/phpstan-strict-rules": "1.0.0",
|
||||||
|
"symfony/config": "~4.4 || ~5.0",
|
||||||
|
"symfony/dependency-injection": "~4.4 || ~5.0",
|
||||||
|
"symfony/http-kernel": "~4.4 || ~5.0",
|
||||||
|
"tracy/tracy": "~2.7"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "4.0-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Nextras\\Dbal\\": "src/"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"srcCompat/compatibility.php"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Nextras Project",
|
||||||
|
"homepage": "https://github.com/nextras/dbal/graphs/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Nextras database abstraction layer",
|
||||||
|
"homepage": "https://github.com/nextras/dbal",
|
||||||
|
"keywords": [
|
||||||
|
"database",
|
||||||
|
"dbal",
|
||||||
|
"nextras"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/nextras/dbal/issues",
|
||||||
|
"source": "https://github.com/nextras/dbal/tree/v4.0.4"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://github.com/hrach",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2022-01-09T20:39:43+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "paragonie/random_compat",
|
"name": "paragonie/random_compat",
|
||||||
"version": "v9.99.100",
|
"version": "v9.99.100",
|
||||||
|
|||||||
@@ -46,6 +46,9 @@ services:
|
|||||||
# Paginator ===============
|
# Paginator ===============
|
||||||
- AlesWita\VisualPaginator\VisualPaginatorFactory
|
- AlesWita\VisualPaginator\VisualPaginatorFactory
|
||||||
|
|
||||||
|
# Facades =================
|
||||||
|
- App\Model\Database\Facade\TermFacade
|
||||||
|
|
||||||
latte:
|
latte:
|
||||||
macros:
|
macros:
|
||||||
- App\Model\Latte\Macros::register
|
- App\Model\Latte\Macros::register
|
||||||
|
|||||||
@@ -38,11 +38,12 @@ services:
|
|||||||
database:
|
database:
|
||||||
image: dockette/postgres:10
|
image: dockette/postgres:10
|
||||||
environment:
|
environment:
|
||||||
|
- "POSTGRES_HOST_AUTH_METHOD=trust"
|
||||||
- POSTGRES_PASSWORD=webapp
|
- POSTGRES_PASSWORD=webapp
|
||||||
- POSTGRES_USER=webapp
|
- POSTGRES_USER=webapp
|
||||||
# - POSTGRES_DB=webapp
|
# - POSTGRES_DB=webapp
|
||||||
volumes:
|
volumes:
|
||||||
- ../../data/postgres10:/var/lib/postgresql/data
|
- /data/postgres10:/var/lib/postgresql/data
|
||||||
adminer:
|
adminer:
|
||||||
image: dockette/adminer:dg
|
image: dockette/adminer:dg
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
2
log/syslog-2022-01-19.log
Normal file
2
log/syslog-2022-01-19.log
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
[2022-01-19T15:39:37.075330+01:00] default.ERROR: Error: Unknown named parameter $mappedBy in /var/www/html/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php:944 {"exception":"[object] (Error(code: 0): Unknown named parameter $mappedBy at /var/www/html/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php:944)"} {"file":"/var/www/html/vendor/tracy/tracy/src/Bridges/Psr/PsrToTracyLoggerAdapter.php","line":57,"class":"Tracy\\Bridges\\Psr\\PsrToTracyLoggerAdapter","function":"log","memory_peak_usage":"10 MB","process_id":3638}
|
||||||
|
[2022-01-19T15:42:54.831344+01:00] default.ERROR: Error: Unknown named parameter $mappedBy in /var/www/html/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php:944 {"exception":"[object] (Error(code: 0): Unknown named parameter $mappedBy at /var/www/html/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php:944)"} {"file":"/var/www/html/vendor/tracy/tracy/src/Bridges/Psr/PsrToTracyLoggerAdapter.php","line":57,"class":"Tracy\\Bridges\\Psr\\PsrToTracyLoggerAdapter","function":"log","memory_peak_usage":"10 MB","process_id":3663}
|
||||||
510
www/assets/css/style.css
Normal file
510
www/assets/css/style.css
Normal file
@@ -0,0 +1,510 @@
|
|||||||
|
body {
|
||||||
|
font-size: 15px;
|
||||||
|
line-height: 1.6;
|
||||||
|
color: #333;
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
color: #3484D2;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ajax-spinner {
|
||||||
|
margin: 15px 0 0 15px;
|
||||||
|
padding: 13px;
|
||||||
|
background: white url('../images/spinner.gif') no-repeat 50% 50%;
|
||||||
|
font-size: 0;
|
||||||
|
z-index: 123456;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.flash {
|
||||||
|
color: black;
|
||||||
|
background: #FFF9D7;
|
||||||
|
border: 1px solid #E2C822;
|
||||||
|
padding: 1em;
|
||||||
|
margin: 1em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
a[href^="#error:"] {
|
||||||
|
background: red;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
form th, form td {
|
||||||
|
vertical-align: top;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
form th {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
form .required label {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
form .error {
|
||||||
|
color: #D00;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.trans {
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.trans th, table.trans td {
|
||||||
|
text-align: left;
|
||||||
|
padding: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.trans tr:nth-child(even){background-color: #f2f2f2}
|
||||||
|
|
||||||
|
table.trans th {
|
||||||
|
background-color: #4CAF50;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.e-table {
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
font-family: Arial;
|
||||||
|
font-style: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.e-table td, .e-table th {
|
||||||
|
padding: 10px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.e-table th {
|
||||||
|
color: #363636;
|
||||||
|
text-align: left;
|
||||||
|
font-family: "Open Sans";
|
||||||
|
font-weight: bold;
|
||||||
|
background: #1d9bd4 none repeat scroll 0 0;
|
||||||
|
border-bottom: 1px solid #146a91;
|
||||||
|
color: #fff;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.e-table td {
|
||||||
|
text-align: left;
|
||||||
|
font-family: "Open Sans";
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.e-table td:first-child {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.e-table tr {
|
||||||
|
border-bottom: 1px solid #b8b8b8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.e-table tr:nth-child(2n+1) {
|
||||||
|
background: #fff none repeat scroll 0 0;
|
||||||
|
}
|
||||||
|
.e-table tr:nth-child(2n) {
|
||||||
|
background: #d9d9d9 none repeat scroll 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.e-table i.icon-check {
|
||||||
|
color: #1d9bd4;
|
||||||
|
}
|
||||||
|
.e-table i.icon-missing {
|
||||||
|
color: #e40137;
|
||||||
|
}
|
||||||
|
.e-table .e-centered {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.e-table.left-align td {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.term {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
span.ipa-1 {
|
||||||
|
color: black;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.ipa-2 {
|
||||||
|
color: red;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.ipa-3 {
|
||||||
|
color: blue;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.flag {
|
||||||
|
color: red;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.type {
|
||||||
|
color: blue;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.trans tr td {
|
||||||
|
border-bottom: 1px solid #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.trans1 tr td {
|
||||||
|
border-bottom: 0px solid #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
background:#fbfdf6;
|
||||||
|
font-family:"Myriad Pro", Myriad, Helvetica, Arial, sans-serif;
|
||||||
|
font-size:90%;
|
||||||
|
color:#968765;
|
||||||
|
margin:20px auto;
|
||||||
|
text-align:center;
|
||||||
|
line-height:1.4em;
|
||||||
|
width:960px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h2, h3, h4, h5, h6 {
|
||||||
|
font-family:Helvetica, Arial, sans-serif;
|
||||||
|
font-size:1.5em;
|
||||||
|
letter-spacing:-0.06em;
|
||||||
|
text-transform:uppercase;
|
||||||
|
font-weight:normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:link, a:visited {
|
||||||
|
font-family:georgia, times, serif;
|
||||||
|
font-weight:bold;
|
||||||
|
color:#c17086;
|
||||||
|
text-decoration:none;
|
||||||
|
border-bottom:1px solid #91476c;
|
||||||
|
font-size:.8em;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
border-bottom:1px dotted #91476c;
|
||||||
|
}
|
||||||
|
|
||||||
|
a img {
|
||||||
|
border:none;
|
||||||
|
}
|
||||||
|
|
||||||
|
header, section, article, footer {
|
||||||
|
padding:10px 20px 20px;
|
||||||
|
margin:10px;
|
||||||
|
border:1px solid #e7e2d7;
|
||||||
|
border-radius:8px;
|
||||||
|
-webkit-border-radius:.8em;
|
||||||
|
-moz-border-radius:.8em;
|
||||||
|
background:#fff url(../images/sprites.png) repeat-x 0px -120px;
|
||||||
|
}
|
||||||
|
|
||||||
|
header {
|
||||||
|
display:block;
|
||||||
|
position:relative;
|
||||||
|
text-align:left;
|
||||||
|
}
|
||||||
|
|
||||||
|
header img {
|
||||||
|
position:absolute;
|
||||||
|
left:20px;
|
||||||
|
top:18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
header h1 {
|
||||||
|
font-size:2.3em;
|
||||||
|
text-transform:none;
|
||||||
|
letter-spacing:0em;
|
||||||
|
text-align:center;
|
||||||
|
}
|
||||||
|
|
||||||
|
header h2 {
|
||||||
|
margin:-10px 0px 20px;
|
||||||
|
font-size:1.3em;
|
||||||
|
text-align:center
|
||||||
|
}
|
||||||
|
|
||||||
|
nav {
|
||||||
|
text-align:center;
|
||||||
|
display:block;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav ul {
|
||||||
|
padding:0px;
|
||||||
|
list-style-type:none;
|
||||||
|
display:inline;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav li {
|
||||||
|
margin:0px 10px;
|
||||||
|
padding:0px;
|
||||||
|
list-style-type:none;
|
||||||
|
display:inline;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav a:link, nav a:visited {
|
||||||
|
font-size:1.4em;
|
||||||
|
font-weight:normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
section {
|
||||||
|
float:left;
|
||||||
|
width:178px;
|
||||||
|
text-align:left;
|
||||||
|
}
|
||||||
|
|
||||||
|
section h1, section h2, section h3, section h4, section h5, section h6 {
|
||||||
|
background:transparent url(../images/sprites.png) no-repeat 0px -80px;
|
||||||
|
color:#fff;
|
||||||
|
padding:9px 10px 10px 10px;
|
||||||
|
margin:13px -10px;
|
||||||
|
text-shadow:0 1px 0 #403232;
|
||||||
|
}
|
||||||
|
|
||||||
|
section ul {
|
||||||
|
padding:0px;
|
||||||
|
list-style:none;
|
||||||
|
border-top:1px solid #e7e2d7;
|
||||||
|
margin:14px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
section li {
|
||||||
|
margin:0px;
|
||||||
|
padding:0px;
|
||||||
|
list-style:none;
|
||||||
|
}
|
||||||
|
|
||||||
|
section li a:link, section li a:visited {
|
||||||
|
float:left;
|
||||||
|
width:96%;
|
||||||
|
padding:3px 1%;
|
||||||
|
border-bottom:1px solid #e7e2d7;
|
||||||
|
}
|
||||||
|
|
||||||
|
section li a:hover {
|
||||||
|
background:#f2f1ec;
|
||||||
|
}
|
||||||
|
|
||||||
|
article {
|
||||||
|
float:right;
|
||||||
|
width:658px;
|
||||||
|
text-align:left;
|
||||||
|
}
|
||||||
|
|
||||||
|
article h1 {
|
||||||
|
background:transparent url(../images/sprites.png) no-repeat 0px 0px;
|
||||||
|
color:#fff;
|
||||||
|
padding:7px 10px 12px 30px;
|
||||||
|
margin-left:-30px;
|
||||||
|
text-shadow:0 1px 0 #403232;
|
||||||
|
}
|
||||||
|
|
||||||
|
article h2, article h3, article h4, article h5, article h6 {
|
||||||
|
background:transparent url(../images/sprites.png) no-repeat 0px -40px;
|
||||||
|
color:#fff;
|
||||||
|
padding:7px 10px 12px 30px;
|
||||||
|
margin-left:-30px;
|
||||||
|
text-shadow:0 1px 0 #913951;
|
||||||
|
}
|
||||||
|
|
||||||
|
article p:first-of-type {
|
||||||
|
font-family:Helvetica, Arial, serif;
|
||||||
|
text-transform:uppercase;
|
||||||
|
border-top:1px dotted #968765;
|
||||||
|
border-bottom:1px dotted #968765;
|
||||||
|
padding:10px 0px;
|
||||||
|
color:#c17086;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
display:block;
|
||||||
|
clear:both !important;
|
||||||
|
width:898px;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer a {
|
||||||
|
margin:0px 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-autocomplete {
|
||||||
|
max-height: 400px;
|
||||||
|
overflow-y: auto;
|
||||||
|
/* prevent horizontal scrollbar */
|
||||||
|
overflow-x: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
#searchBox {
|
||||||
|
max-height: 400px;
|
||||||
|
overflow-y: auto;
|
||||||
|
/* prevent horizontal scrollbar */
|
||||||
|
overflow-x: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
ul.ui-autocomplete li.ui-menu-item{text-align:left;}
|
||||||
|
*/
|
||||||
|
|
||||||
|
.ui-autocomplete {
|
||||||
|
position: absolute;
|
||||||
|
top: 100%;
|
||||||
|
left: 0;
|
||||||
|
z-index: 1000;
|
||||||
|
float: left;
|
||||||
|
display: none;
|
||||||
|
min-width: 160px;
|
||||||
|
padding: 4px 0;
|
||||||
|
margin: 0 0 10px 25px;
|
||||||
|
list-style: none;
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-color: #ccc;
|
||||||
|
border-color: rgba(0, 0, 0, 0.2);
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 1px;
|
||||||
|
-webkit-border-radius: 5px;
|
||||||
|
-moz-border-radius: 5px;
|
||||||
|
border-radius: 5px;
|
||||||
|
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
|
||||||
|
-moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
|
||||||
|
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
|
||||||
|
-webkit-background-clip: padding-box;
|
||||||
|
-moz-background-clip: padding;
|
||||||
|
background-clip: padding-box;
|
||||||
|
*border-right-width: 2px;
|
||||||
|
*border-bottom-width: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-menu-item > a.ui-corner-all {
|
||||||
|
display: block;
|
||||||
|
padding: 3px 15px;
|
||||||
|
clear: both;
|
||||||
|
font-weight: normal;
|
||||||
|
line-height: 18px;
|
||||||
|
color: #555555;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-state-hover, .ui-state-active {
|
||||||
|
color: #ffffff;
|
||||||
|
text-decoration: none;
|
||||||
|
background-color: #0088cc;
|
||||||
|
border-radius: 0px;
|
||||||
|
-webkit-border-radius: 0px;
|
||||||
|
-moz-border-radius: 0px;
|
||||||
|
background-image: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pagination {
|
||||||
|
height: 36px;
|
||||||
|
margin: 18px 0;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.pagination ul {
|
||||||
|
display: inline-block;
|
||||||
|
*display: inline;
|
||||||
|
/* IE7 inline-block hack */
|
||||||
|
|
||||||
|
*zoom: 1;
|
||||||
|
margin-left: 0;
|
||||||
|
margin-bottom: 0;
|
||||||
|
-webkit-border-radius: 3px;
|
||||||
|
-moz-border-radius: 3px;
|
||||||
|
border-radius: 3px;
|
||||||
|
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||||
|
-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||||
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||||
|
}
|
||||||
|
.pagination li {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
.pagination a {
|
||||||
|
float: left;
|
||||||
|
padding: 0 14px;
|
||||||
|
line-height: 34px;
|
||||||
|
text-decoration: none;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
border-left-width: 0;
|
||||||
|
}
|
||||||
|
.pagination a:hover,
|
||||||
|
.pagination .active a {
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
}
|
||||||
|
.pagination .active a {
|
||||||
|
color: #999999;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
.pagination .disabled span,
|
||||||
|
.pagination .disabled a,
|
||||||
|
.pagination .disabled a:hover {
|
||||||
|
color: #999999;
|
||||||
|
background-color: transparent;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
.pagination li:first-child a {
|
||||||
|
border-left-width: 1px;
|
||||||
|
-webkit-border-radius: 3px 0 0 3px;
|
||||||
|
-moz-border-radius: 3px 0 0 3px;
|
||||||
|
border-radius: 3px 0 0 3px;
|
||||||
|
}
|
||||||
|
.pagination li:last-child a {
|
||||||
|
-webkit-border-radius: 0 3px 3px 0;
|
||||||
|
-moz-border-radius: 0 3px 3px 0;
|
||||||
|
border-radius: 0 3px 3px 0;
|
||||||
|
}
|
||||||
|
.pagination-centered {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.pagination-right {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
.pager {
|
||||||
|
margin-left: 0;
|
||||||
|
margin-bottom: 18px;
|
||||||
|
list-style: none;
|
||||||
|
text-align: center;
|
||||||
|
*zoom: 1;
|
||||||
|
}
|
||||||
|
.pager:before,
|
||||||
|
.pager:after {
|
||||||
|
display: table;
|
||||||
|
content: "";
|
||||||
|
}
|
||||||
|
.pager:after {
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
.pager li {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
.pager a {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 5px 14px;
|
||||||
|
background-color: #fff;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
-webkit-border-radius: 15px;
|
||||||
|
-moz-border-radius: 15px;
|
||||||
|
border-radius: 15px;
|
||||||
|
}
|
||||||
|
.pager a:hover {
|
||||||
|
text-decoration: none;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
}
|
||||||
|
.pager .next a {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
.pager .previous a {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
.pager .disabled a,
|
||||||
|
.pager .disabled a:hover {
|
||||||
|
color: #999999;
|
||||||
|
background-color: #fff;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
BIN
www/assets/images/images/sound.png
Normal file
BIN
www/assets/images/images/sound.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
BIN
www/assets/images/images/spinner.gif
Normal file
BIN
www/assets/images/images/spinner.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 737 B |
BIN
www/assets/images/images/sprites.png
Normal file
BIN
www/assets/images/images/sprites.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
BIN
www/assets/images/sound.png
Normal file
BIN
www/assets/images/sound.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
BIN
www/assets/images/spinner.gif
Normal file
BIN
www/assets/images/spinner.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 737 B |
BIN
www/assets/images/sprites.png
Normal file
BIN
www/assets/images/sprites.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
Reference in New Issue
Block a user