Commit 902e86c8 authored by Martin Gregor's avatar Martin Gregor
Browse files

majove posledne upravy

parent 9e34473a
......@@ -15,7 +15,8 @@ class HomepagePresenter extends BasePresenter
private $words = [];
private $words_lema = [];
private $en_words = [];
private $lematization_service = 'http://text.fiit.stuba.sk:8080/lematizer/services/lemmatizer/lemmatize/fast';
private $lematization_service = 'http://vm30.ucebne.fiit.stuba.sk:9000/lematizer/lematizer/lemmatize/fast';
// private $lematization_service = 'http://text.fiit.stuba.sk:8080/lematizer/services/lemmatizer/lemmatize/fast';
public function renderDefault()
{
......@@ -82,7 +83,7 @@ class HomepagePresenter extends BasePresenter
$form->addRadioList('sentence'.$id,$label,['correct' => 'Správne','incorrect' => 'Nesprávne']);
foreach ($sentence[1] as $position => $word)
{
$form->addText($id.'word'.$position,'Preklad '.$word,40,100)->setAttribute('placeholder','Tu prelož '.$word);
$form->addText($id.'word'.$position,'Preklad '.$word,40,100)->setAttribute('placeholder','Tu prelož '.$this->en_words[$position]->sk);
}
$form->addText('note'.$id,'Poznámka',60,500);
}
......@@ -195,7 +196,7 @@ class HomepagePresenter extends BasePresenter
private function translate($word)
{
$word_en = $this->db->query('SELECT dict_en.word as word, dict_en.rank3 as rank, dict_sk_en.type as type'.
$word_en = $this->db->query('SELECT dict_en.word as word,dict_sk.word as sk, dict_en.rank3 as rank, dict_sk_en.type as type'.
' FROM dict_sk_en LEFT JOIN dict_sk ON dict_sk_en.sk_id = dict_sk.id JOIN dict_en ON dict_en.id = dict_sk_en.en_id'.
' WHERE dict_sk.word = ? ORDER BY original_pos',$word)->fetch();
if ($word_en)
......
......@@ -33,6 +33,13 @@ table
text-align: center;
}
.label
{
color: #333;
font-size: 1em;
padding: 0;
}
......
......@@ -29,6 +29,7 @@ $(function(){
$('.translation').popover();
$('.translation').on('mouseenter',function(){
$('.popover:visible').hide();
if ($(this).next().hasClass('popover'))
{
$(this).next().show();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment