Ejemplo n.º 1
0
		<th>Перевод (<?php 
    echo Yii::app()->langs->Langs[$chap->book->t_lang][Langs::FORM_INF];
    ?>
)</th>
		<th style='border-top-right-radius: 10px;'></th>
	</tr>
	</thead>
	<tbody>
	<?php 
    $user = Yii::app()->user;
    $pos = $orig_dp->pagination->currentPage * $orig_dp->pagination->pageSize;
    // Опции Translate::render() для автора версии перевода
    $tr_opts_owner = array("edit" => true, "rm" => true, "rate" => false);
    // Опции Translate::render() для всех остальных версий
    $tr_opts = array("edit" => $chap->book->membership->status == GroupMember::MODERATOR, "rm" => $chap->book->membership->status == GroupMember::MODERATOR, "rate" => $chap->can("rate"), "rate-" => $chap->book->membership->status == GroupMember::MODERATOR);
    $fixer = new OrigCountFixer();
    $to_esc = preg_quote($to);
    $can_tr_read = $chap->can("trread");
    foreach ($orig as $o) {
        $pos++;
        echo "<tr id='o{$o->id}'>";
        echo "<td class='n'>";
        if (!Yii::app()->user->isGuest) {
            if ($o->bookmark->id) {
                $title = "Закладка" . ($o->bookmark->note != "" ? ": &quot;" . CHtml::encode($o->bookmark->note) . "&quot;" : "");
                $html = "<i class='icon-star'></i>";
                $bm = "<a href='#' onclick=\"return T.bm.set({$o->id})\" class='b set' title='{$title}'>{$html}</a>";
            } else {
                $bm = "<a href='#' onclick=\"return T.bm.set({$o->id})\" class='b' title='Поставить закладку'><i class='icon-star-empty'></i></a>";
            }
        } else {
Ejemplo n.º 2
0
}
?>
        <th>
			Перевод  на <?php 
echo Yii::app()->langs->Langs[$chap->book->t_lang][Langs::FORM_INF];
?>
		</th>
        <th></th>
    </tr>
    </thead>
    <tbody>
	<?php 
if ($tableEmpty) {
    //			echo "<tr id='o0'><td class='b'></td><td class='o'><div></div></td><td class='u'></td><td class='t'></td><td class='c'></td></tr>";
} else {
    $fixer = new OrigCountFixer();
    $can_tr_read = $chap->can("trread");
    foreach ($orig as $o) {
        $o->chap = $chap;
        echo "<tr id='o{$o->id}'>";
        if (!Yii::app()->user->isGuest) {
            echo "<td class='b'>";
            if ($o->bookmark->id) {
                $title = "Закладка" . ($o->bookmark->note != "" ? ": &quot;" . CHtml::encode($o->bookmark->note) . "&quot;" : "");
                echo "<a href='#'><i class='icon-star' title='{$title}'></i></a>";
            } else {
                echo "<a href='#'><i class='i icon-star-empty'></i></a>";
            }
            // AUTOFIX. Если есть какой-нибудь фильтр на переводы, то не делаем пересчёт orig.n_trs!
            if ($filter->show != 0 && $o->n_trs != count($o->trs)) {
                $fixer->add($o->id, count($o->trs)) && Yii::app()->user->can("geek") && (print "<i class='icon-bell'></i>");
Ejemplo n.º 3
0
         echo "<a href='#' class='m'>&minus;</a> ";
     }
     echo "<span class='rate'>{$tr->rating}</span>";
     if ($chap->can("rate")) {
         echo " <a href='#' class='p'>+</a></div>";
     }
     echo "</td>";
     echo "<td class='te'>";
     if ($tr->user_id == Yii::app()->user->id || $chap->book->membership->status == GroupMember::MODERATOR) {
         echo "<a href='#' class='e'><i class='i icon-edit'></i></a> ";
         echo "<a href='#' class='x'><i class='i icon-remove'></i></a>";
     }
     echo "</td>";
 }
 $user = Yii::app()->user;
 $fixer = new OrigCountFixer();
 $can_tr_read = $chap->can("trread");
 $to_esc = preg_quote($to);
 foreach ($orig as $o) {
     $o->chap = $chap;
     // AUTOFIX. Если есть какой-нибудь фильтр на переводы, то не делаем пересчёт orig.n_trs!
     if ($show != 0 && $o->n_trs != count($o->trs)) {
         $fixer->add($o->id, count($o->trs)) && Yii::app()->user->can("geek");
     }
     if (count($o->trs) > 1) {
         $rowspan = " rowspan='" . count($o->trs) . "'";
     } else {
         $rowspan = "";
     }
     if (count($o->trs) <= 1) {
         $class = " class='last'";