Example #1
0
 public function render()
 {
     $output = '<ul>';
     foreach ($this->_items as $item) {
         $output .= '<li><a class="icon clearfix" href="' . Uri::makeUriFromId($item->slug) . '"><span class="icon ' . $item->icon . '"></span><span class="icon_text">' . __($item->text()) . '</span></a></li>';
     }
     $output .= '</ul>';
     return $output . PHP_EOL;
 }
Example #2
0
 public function render()
 {
     $output = '<div id="accordion" class="left_bar_menu">
                     <ul>';
     foreach ($this->_items as $item) {
         $output .= '<li ' . ($this->_active == $item->slug ? 'class="active"' : "") . '><a href="' . Uri::makeUriFromId($item->slug) . '">' . __($item->text()) . '</a></li>';
         if (isset($item->children)) {
             $output .= $this->subMenuRender($item->children);
         }
     }
     $output .= '</ul>
               </div>';
     return $output . PHP_EOL;
 }
Example #3
0
 /**
  * set default method and id value
  */
 public function __construct()
 {
     $uri = Uri::getPathAsArray();
     $this->setName('dashboard');
     if (isset($uri[0])) {
         $this->setName($uri[0]);
     }
     $this->setMethod(self::_list);
     if (isset($uri[1])) {
         $this->setMethod($uri[1]);
     }
     if (isset($uri[2])) {
         $this->setID($uri[2]);
     }
 }
Example #4
0
 public function getDelete()
 {
     $this->layout = false;
     $id = (int) $this->getRequestParam('id') ?: null;
     $item = LangModel::find($id);
     if (empty($item)) {
         throw new HttpException(404, json_encode(['errorMessage' => 'Incorrect Article']));
     }
     Event::fire('Admin.beforeLanguageUpdate');
     // Удаления картинки из сервера
     @unlink(ltrim(UploadFile::getImagePath($item->flag), '/'));
     $item->delete();
     Message::instance()->success('Articles has successfully deleted');
     Uri::to('/Admin/Languages');
 }
Example #5
0
                    <tbody>
                    <?php 
if ($items) {
    ?>
                        <?php 
    foreach ($items as $item) {
        ?>
                            <tr>
                                <td>
                                    <?php 
        echo $item->group;
        ?>
                                </td>
                                <td>
                                    <a href="<?php 
        echo \Helpers\Uri::makeUri('Admin/Settings') . '/' . $item->group . App::URI_EXT;
        ?>
">Edit</a>
                                </td>
                            </tr>
                        <?php 
    }
    ?>
                    <?php 
} else {
    ?>
                        <div class="alert alert-info" role="alert">
                            <p>Setting List Is Empty</p>
                        </div>
                    <?php 
}
Example #6
0
            removeClass: "btn btn-danger",
            removeLabel: "Delete",
            removeIcon: "<i class=\"glyphicon glyphicon-trash\"></i> ",
            uploadClass: "btn btn-info",
            uploadLabel: "Upload",
            uploadIcon: "<i class=\"glyphicon glyphicon-upload\"></i> ",
            allowedFileTypes: ["image"],
            previewClass: "bg-warning",
            initialPreview: [
                <?php 
echo $item->icon ? '\'<img style="height:160px" src="' . File::getImagePath($item->icon) . '">\'' : '';
?>
            ],
            initialPreviewConfig: [{
                caption: '<?php 
echo $item->firstName() . ' Icon';
?>
',
                width: "120px",
                url: '<?php 
echo Uri::makeRouteUri("back.menus.image.delete");
?>
',
                key: <?php 
echo $item->id;
?>
            }]
        });

    });
</script>
Example #7
0
 public static function renderMenuSortableNode($nodes)
 {
     $output = '';
     if (isset($nodes)) {
         foreach ($nodes as $node) {
             // Если 'status' 0 то присвоить клаас 'invisible-item' чтобы не показавыть с активноми
             $output .= '<li data-menu-id="' . $node->menu_id . '" class="menu-node-item ' . (!$node->status ? 'invisible-item' : '') . '"id="node_' . $node->id . '">';
             $output .= '<div class="node-item"><a href=""></a>
                                 <span class="glyphicon glyphicon-move move" aria-hidden="true"></span>
                                 <a href="' . Helpers\Uri::makeUriFromId("Admin/Menus/Edit/" . $node->id) . '">
                                     ' . __($node->text()) . '
                                 </a>
                                 <div class="pull-right">
                                     <a href="' . Helpers\Uri::makeUriFromId("Admin/Menus/Edit/" . $node->id) . '">
                                         <i class="glyphicon glyphicon-pencil" aria-hidden="true"></i>
                                     </a>
                                     <a class="remove-confirm" href="' . Helpers\Uri::makeUriFromId("Admin/Menus/Delete/" . $node->id) . '">
                                         <i class="glyphicon glyphicon-remove-sign"></i>
                                     </a>
                                 </div>
                             </div>';
             if (isset($node->children)) {
                 $output .= '<ol>';
                 $output .= static::renderMenuSortableNode($node->children);
                 $output .= '</ol>';
             }
             $output .= '</li>';
         }
     }
     return $output;
 }
Example #8
0
<?php

/**
 * Created by PhpStorm.
 * User: CrossComp
 * Date: 12/9/14
 * Time: 5:41 AM
 */
?>
<!--Begin Container-->
<div class="row">
    <div class="col-md-8 col-md-offset-2">
        <legend>Edit Setting</legend>
        <form method="post" action="<?php 
echo \Helpers\Uri::makeUri('/Admin/Settings/Edit') . '/' . $id . App::URI_EXT;
?>
" id="form">
            <div class="panel-body">
                <div class="group">
                    <div class="form-group col-sm-7">
                        <label for="title">Title</label>
                        <p><?php 
echo $item->title;
?>
</p>
                    </div>
                    <div class="form-group col-sm-7">
                        <label for="desc">Description</label>
                        <p><?php 
echo $item->desc;
?>
Example #9
0
foreach ($items as $item) {
    ?>
            <div class="carousel_slider_item">
                <a class="fancybox" href="<?php 
    echo Uri::makeUriFromId($item->slug);
    ?>
" title="slideshow_images" rel="gallary_b">
                    <div class="carousel_slider_images">
                        <img src="<?php 
    echo Imagefly::imagePath($item->defaultImage()->path, 'w140-q52');
    ?>
" alt="carousel_images" />
                    </div><!-- carousel_slider_images -->
                    <div class="carousel_slider_info">
                        <span><?php 
    echo $item->title;
    ?>
</span>
                    </div>
                </a>
            </div><!-- carousel_slider_item -->
        <?php 
}
?>

    </div><!-- carousel_slider -->
    <span class="all_news_link"><a href="<?php 
echo Uri::makeUriFromId('Club');
?>
">Перейти к новостям клуба</a></span>
</div>
Example #10
0
 public function subMenuRender($items)
 {
     $output = '<ul class="submenu hidden">
                     <li>
                         <div class="submenu_top clearfix">';
     $i = 0;
     foreach ($items as $item) {
         // Через каждий 3-ий пункт прикрепляет тег <ul>
         if ($i % 3 == 0) {
             if ($i != 0) {
                 $output .= '</ul>';
             }
             $output .= '<ul>';
         }
         $output .= '<li><a href="' . Uri::makeUriFromId($item->slug) . '">' . __($item->text()) . '</a></li>';
         $i++;
     }
     $output .= '</div>
                   </li>
               </ul>';
     return $output;
 }
Example #11
0
<?php

/**
 * Created by PhpStorm.
 * User: Rob
 * Date: 11/6/2015
 * Time: 3:20 PM
 */
use Helpers\Uri;
use Ivliev\Imagefly\Imagefly;
?>

<div class="container_top_slideshow content_middle_right_slideshow clearfix">
    <div class="item">
        <a href="<?php 
echo Uri::makeUriFromId('academy_squads');
?>
" title="slideshow_images" rel="gallary_d">
            <img src="<?php 
echo Imagefly::imagePath('/uploads/images/academy/capello2.jpg', 'w521-q52');
?>
" alt="container_top_slideshow_images" />
            <div class="container_top_slider_text">
                <div class="container_top_slider_text_inner">
                    Новости Академии <br>
                </div>
            </div>
        </a>
    </div>
<!--    <div class="item">-->
<!--        <a href="/media/assets/images/content_middle_right_slideshow_images1.jpg" title="slideshow_images" rel="gallary_d"><img src="/media/assets/images/content_middle_right_slideshow_images1.jpg" alt="container_top_slideshow_images" />-->
Example #12
0
 public function anyTestLangRoute()
 {
     var_dump(Lang::instance()->getCurrentLang());
     $article = (new \ArticleModel())->find(1);
     echo $article->id;
     echo "<br>";
     echo $article->title;
     echo "<br>";
     echo $article->desc;
     echo "<br>";
     echo \Helpers\Uri::makeUri('TestLangRoute.html');
     echo "<br>";
 }
Example #13
0
echo Imagefly::imagePath('/uploads/images/news_6/romanasxabadze.jpg', 'w90-c-q52');
?>
" alt="news_item_images" />
            </div><!-- news_item_images -->
            <div class="news_item_info">
                <span>
                    <?php 
echo __('topNews1');
?>
                </span>
            </div><!-- news_item_info -->
        </a>
    </div><!-- news_item -->
    <div class="news_item news_item_active clearfix">
        <a href="<?php 
echo Uri::makeUriFromId('article_banants_pyunik_1_1');
?>
">
            <div class="news_item_images">
                <img src="<?php 
echo Imagefly::imagePath('/uploads/images/news2/03.jpg', 'w90-c-q52');
?>
" alt="news_item_images" />
            </div><!-- news_item_images -->
            <div class="news_item_info">
                <span>
                    <?php 
echo __('topNews2');
?>
                </span>
            </div><!-- news_item_info -->
Example #14
0
 public function getDelete()
 {
     $this->layout = false;
     $id = (int) $this->getRequestParam('id') ?: null;
     $item = MenuItemModel::find($id);
     if (empty($item)) {
         throw new HttpException(404, json_encode(['errorMessage' => 'Incorrect Article']));
     }
     // Транзакция для Записание данных в базу
     Capsule::connection()->transaction(function () use($item) {
         foreach ($item->getDescendantsAndSelf() as $desc) {
             $a = $desc->entities();
             foreach ($a as $b) {
                 $c = $b->translations();
                 $c->delete();
                 $b->delete();
             }
             //                $desc->entities()->translations()->delete();
             $a->delete();
         }
         @unlink(ltrim(UploadFile::getImagePath($item->icon), '/'));
         //            $item->delete();
     });
     Message::instance()->success('Menu Item has successfully deleted');
     Uri::to('/Admin');
 }
Example #15
0
/**
 * Created by PhpStorm.
 * User: CrossComp
 * Date: 12/9/14
 * Time: 5:41 AM
 */
?>
<!--Begin Container-->
<div class="container">
    <div class="panel panel-primary">
        <div class="panel-heading">
            <h3 class="panel-title">Edit Language</h3>
        </div>
        <form method="post" action="<?php 
echo \Helpers\Uri::makeUri('Admin/Languages/Edit') . '/' . $item->id . App::URI_EXT;
?>
" enctype="multipart/form-data" id="form">
            <div class="panel-body">
                <div class="group">
                    <div class="form-group col-sm-7">
                        <label for="title">Name</label>
                        <input type="text" name="name" class="form-control" id="name" placeholder="Name" value="<?php 
echo $item->name;
?>
" required>
                    </div>
                    <div class="form-group col-sm-7">
                        <label for="iso">Iso 2</label>
                        <input type="text" name="iso" class="form-control" id="iso" placeholder="Iso" value="<?php 
echo $item->iso;
Example #16
0
        echo rand(1, 50);
        ?>
</span>
                                    </span><!-- news_list_watch -->
                                </div><!-- news_list_middle -->
                                <span>

                                    <?php 
        echo Strings::limitWords($item->desc, 20);
        ?>
...

                                </span>
                            </div><!-- news_list_info -->
                        </a>
                    </div><!-- news_list -->
                <?php 
    }
    ?>

            </div><!-- news_slider_item -->
        <?php 
}
?>

    </div><!-- news_slider -->
    <span class="all_news_link"><a href="<?php 
echo Uri::makeUriFromId('/club_news');
?>
">Посмотреть все новости</a></span>
</div>
Example #17
0
?>
" data-uri-ext="<?php 
echo App::URI_EXT;
?>
" data-redirect="">
    <nav class="navbar navbar-fixed-top navbar-inverse" role="navigation">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="<?php 
echo \Helpers\Uri::makeRouteUri('back.home');
?>
">FC Banants</a>
            </div>
            <div id="navbar" class="collapse navbar-collapse">
                <ul class="nav navbar-nav">
                    <li class="dropdown">
                        <a aria-expanded="false" role="button" data-toggle="dropdown" class="dropdown-toggle" href="#">Articles <span class="caret"></span></a>
                        <ul role="menu" class="dropdown-menu">
                            <li><a href="<?php 
echo Helpers\Uri::makeRouteUri('back.articles.list');
?>
">Standart</a></li>
                            <li><a href="<?php 
echo Helpers\Uri::makeRouteUri('back.articles.frontpage');
?>
Example #18
0
        ?>
                                </td>
                                <td>
                                    <?php 
        echo $item['status'] ? 'Active' : 'Inactive';
        ?>
                                </td>
                                <td>
                                    <a href="<?php 
        echo \Helpers\Uri::makeUri('Admin/Languages/Edit') . '/' . $item['id'] . App::URI_EXT;
        ?>
"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a>
                                </td>
                                <td>
                                    <a class="remove-confirm" href="<?php 
        echo \Helpers\Uri::makeUri('Admin/Languages/Delete') . '/' . $item['id'] . App::URI_EXT;
        ?>
"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span></a>
                                </td>
                            </tr>
                        <?php 
    }
    ?>
                    <?php 
} else {
    ?>
                        <div class="alert alert-info" role="alert">
                            <p>Languages List Is Empty</p>
                        </div>
                    <?php 
}
Example #19
0
 public function getDelete()
 {
     $this->layout = false;
     $id = (int) $this->getRequestParam('id') ?: null;
     $article = ArticleModel::find($id);
     if (empty($article)) {
         throw new HttpException(404, json_encode(['errorMessage' => 'Incorrect Article']));
     }
     // Транзакция для Записание данных в базу
     Capsule::connection()->transaction(function () use($article) {
         // Заодно удаляет и пункты меню привязанные к slug-у
         (new \MenuItemModel())->whereSlug($article->slug)->delete();
         foreach ($article->getDescendantsAndSelf() as $desc) {
             $desc->contents()->delete();
         }
         $article->delete();
     });
     Message::instance()->success('Articles has successfully deleted');
     Uri::to('/Admin/Categories');
 }
Example #20
0
echo Imagefly::imagePath('/media/assets/images/twitter_logo.jpg', 'w315-q52');
?>
" alt="advertisment">
        </a>
    </div>
    <div class="container_bottom_images_wrapper">
        <a href="https://www.facebook.com/fcbanantsyerevan/" target="_blank">
            <img src="<?php 
echo Imagefly::imagePath('/media/assets/images/facebook-logo.jpg', 'w315-q52');
?>
" alt="advertisment">
        </a>
    </div>
    <div class="container_bottom_images_wrapper">
        <a href="<?php 
echo Uri::makeUriFromId('sport_cafe');
?>
" target="_blank">
            <img src="<?php 
echo Imagefly::imagePath('/uploads/images/cafe/sport-cafe.jpg', 'w280-q52');
?>
" alt="advertisment">
        </a>
    </div>
    <div class="container_bottom_images_wrapper">
        <a href="http://www.horizondvp.com/" target="_blank">
            <img src="<?php 
echo Imagefly::imagePath('/uploads/images/banners/sunrise-logo.jpg', 'w252-q52');
?>
" alt="advertisment">
        </a>
Example #21
0
/**
 * Created by PhpStorm.
 * User: crosscomp
 * Date: 22.01.2015
 * Time: 11:54
 */
?>
<div class="container-fluid">
    <div class="panel panel-primary">
        <div class="panel-heading">
			<h3>Categories List</h3>
        </div>
		<div class="panel-body">
            <a class="btn btn-primary" href="<?php 
echo \Helpers\Uri::makeRouteUri('back.articles.add');
?>
">Add Article</a>
            <button name="article-node-save" class="btn btn-primary">Save</button>
            <div>
                <label for="show-invisible-items">Show Invisible Articles</label>
                <input class="checkbox-inline" type="checkbox" id="show-invisible-items"/>
            </div>
            <?php 
if ($categories->count()) {
    ?>
                <?php 
    echo $categories::getArticleSortableNode();
    ?>
            <?php 
}
Example #22
0
 * Created by PhpStorm.
 * User: Rob
 * Date: 11/6/2015
 * Time: 3:20 PM
 */
use Helpers\Uri;
use Ivliev\Imagefly\Imagefly;
?>

<div class="container_top_slideshow clearfix">
    <?php 
foreach ($items as $item) {
    ?>
        <div class="item">
            <a href="<?php 
    echo Uri::makeUriFromId($item->slug);
    ?>
" title="slideshow_images" rel="gallery">
                <img src="<?php 
    echo Imagefly::imagePath($item->defaultImage()->path, 'w640-q52');
    ?>
" alt="slideshow_images" />
                <div class="container_top_slider_text">
                    <div class="container_top_slider_text_inner">
                        <?php 
    echo $item->title;
    ?>
                    </div>
                </div>
            </a>
        </div>
Example #23
0
 * Date: 02.09.2015
 * Time: 15:41
 */
use Helpers\Uri;
Theme::drawHead();
?>
<body class="<?php 
echo Lang\Lang::instance()->getCurrentLang()['iso'];
?>
">
<div class="header">
    <div class="header_top clearfix">
        <div class="inner">
            <div class="logo_wrapper">
                <a href="<?php 
echo Uri::makeUriFromId('/');
?>
">
                    <img src="/media/assets/images/logo.png" alt="logo" />
                </a>
            </div><!-- logo_wrapper -->
            <div class="header_navigation">

                <?php 
//Theme::drawMenu('top')//todo:unused
?>

            </div><!-- header_navigation -->
        </div><!-- inner -->
    </div><!-- header_top -->
    <div class="inner">
Example #24
0
        echo $item['name'];
        ?>
                                </td>
                                <td>
                                    <?php 
        echo $item['desc'];
        ?>
                                </td>
                                <td>
                                    <?php 
        echo $item['value'];
        ?>
                                </td>
                                <td>
                                    <a href="<?php 
        echo \Helpers\Uri::makeUri('Admin/Settings/Edit') . '/' . $item['id'] . App::URI_EXT;
        ?>
"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a>
                                </td>
                            </tr>
                        <?php 
    }
    ?>
                    <?php 
} else {
    ?>
                        <div class="alert alert-info" role="alert">
                            <p>Setting List Is Empty</p>
                        </div>
                    <?php 
}
Example #25
0
        echo !$a->created_at ?: $a->created_at->toDateTimeString();
        ?>
</td>
                            <td><?php 
        echo !$a->updated_at ?: $a->updated_at->toDateTimeString();
        ?>
</td>
                            <td>
                                <a href="<?php 
        echo \Helpers\Uri::makeUri('Admin/Articles/Edit') . '/' . $a->id . App::URI_EXT;
        ?>
"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a>
                            </td>
                            <td>
                                <a class="remove-confirm" href="<?php 
        echo \Helpers\Uri::makeUri('Admin/Articles/Delete') . '/' . $a->id . App::URI_EXT;
        ?>
"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span></a>
                            </td>
                        </tr>
				    <?php 
    }
    ?>
                </table>
			</div>
		<?php 
}
?>
		</div>
	</div>
</div>
Example #26
0
        echo __($item->firstName()) . ' ' . __($item->lastName());
        ?>
</a></td>
                                <td class="second-item"><img src="<?php 
        echo $item->defaultImage()->path;
        ?>
" class="img-circle" alt="Cinque Terre"></td>
                                <td>
                                    <a href="<?php 
        echo Uri::makeUriFromId('Admin/Player/Edit/' . $item->id);
        ?>
"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></a>
                                </td>
                                <td>
                                    <a class="remove-confirm" href="<?php 
        echo Uri::makeUriFromId('Admin/Player/Delete/' . $item->id);
        ?>
"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span></a>
                                </td>
                            </tr>
                        <?php 
    }
    ?>
                    </table>
                </div>
            <?php 
}
?>
        </div>
    </div>
</div>