コード例 #1
0
ファイル: Uploads.php プロジェクト: s4urp8n/kohana-admin
 public function getHREF()
 {
     $dir = $this->getUploadDir();
     $dir = array_keys($dir);
     $dir = array_pop($dir);
     return AdminHREF::getDefaultAdminRouteUri('dataEdit', $this->getShortName()) . '/' . urlencode($dir) . '/?ref=' . urlencode(AdminHREF::getFullCurrentHREF());
 }
コード例 #2
0
ファイル: Users.php プロジェクト: s4urp8n/kohana-admin
 public function getActionButtons()
 {
     $buttons = parent::getActionButtons();
     $ref = urlencode(AdminHREF::getFullCurrentHREF());
     $changePass = function ($row) use($ref) {
         $href = AdminHREF::getDefaultAdminRouteUri('dataEdit', 'UsersPasswords', $row['id']) . '/?ref=' . $ref;
         $text = '<i class="fa fa-lock gc"></i>';
         return '<a title="Сменить пароль"  href="' . $href . '">' . $text . '</a>';
     };
     $changeRoles = function ($row) use($ref) {
         $href = AdminHREF::getDefaultAdminRouteUri('dataEdit', 'UsersRoles', $row['id']) . '/?ref=' . $ref;
         $text = '<i class="fa fa-user-secret gc"></i>';
         return '<a title="Роли пользователя" href="' . $href . '">' . $text . '</a>';
     };
     $loginUser = function ($row) use($ref) {
         $href = AdminHREF::getDefaultAdminRouteUri('loginuser', 'users', $row['id']);
         $text = '<i class="fa fa-sign-in gc"></i>';
         return '<a title="Войти от имени пользователя" href="' . $href . '">' . $text . '</a>';
     };
     $buttons['Роли пользователя'] = $changeRoles;
     $buttons['Сменить пароль'] = $changePass;
     $buttons['Войти'] = $loginUser;
     return $buttons;
 }
コード例 #3
0
ファイル: News.php プロジェクト: s4urp8n/kohana-admin
 public function getHREF()
 {
     return AdminHREF::getDefaultAdminRouteUri('data', $this->getShortName());
 }
コード例 #4
0
ファイル: Template.php プロジェクト: s4urp8n/kohana-admin
<div class="authFormNew">
    <form role="form" action='<?php 
echo AdminHREF::getDefaultAdminRouteUri('register');
?>
' method="post">
        <div class="form-group">
            <h4 class="text-center">
                <i class="fa fa-lock"></i>
                Регистрация
            </h4>
        </div>
        <?php 
if (!empty($error)) {
    echo AdminHTML::renderMessage($error, 'danger');
}
?>
        <div class="form-group">
            
            <label for="email" class="control-label">
                Email:
            </label>
            
            <div>
                <input type="email"
                       name="email"
                       required
                       class="form-control"
                       id="email"
                       placeholder="Введите имя пользователя..."
                       value='<?php 
echo $email;
コード例 #5
0
ファイル: Admin.php プロジェクト: s4urp8n/kohana-admin
 public function getActionButtons()
 {
     $buttons = [];
     $ref = urlencode(AdminHREF::getFullCurrentHREF());
     $edit = function ($row) use($ref) {
         $href = AdminHREF::getDefaultAdminRouteUri('dataEdit', $this->getShortName(), $row['id']) . '/?ref=' . $ref;
         $text = '<i class="fa fa-pencil gc"></i>';
         return '<a class="editHref"  title="Редактировать"  href="' . $href . '">' . $text . '</a>';
     };
     $delete = function ($row) use($ref) {
         $href = AdminHREF::getDefaultAdminRouteUri('dataDelete', $this->getShortName(), $row['id']) . '/?ref=' . $ref;
         $text = '<i class="fa fa-trash-o gc"></i>';
         return '<a class="delHref confirm" title="Удалить" confirmText="Вы уверены в удалении товара?" href="' . $href . '">' . $text . '</a>';
     };
     if ($this->isModifyingAllowed()) {
         $buttons['Редактировать'] = $edit;
     }
     if ($this->isDeletionAllowed()) {
         $buttons['Удалить'] = $delete;
     }
     return $buttons;
 }
コード例 #6
0
ファイル: Template.php プロジェクト: s4urp8n/kohana-admin
_loading);
                                                         }
                                                     },
                                                     onError: function (files, status, errMsg) {
                                                         $('#<?php 
echo $uid;
?>
_load').remove();
                                                     },
                                                     afterUploadAll: function () {
                                                         $('#<?php 
echo $uid;
?>
_load').remove();
                                                         var url = "<?php 
echo AdminHREF::getDefaultAdminRouteUri('ajaxUploadsContent', $model->getShortName(), $params['primary']) . '/?directoryIndex=' . urlencode($directoryIndex);
?>
";
                                                         $.post(url, {ref: document.location.href}, function (data) {
                                                             $('#<?php 
echo $uid;
?>
_content').children().replaceWith(data);
                                                         });
                                                     },
                                                 });
        });
    </script>
    <div id="<?php 
echo $uid;
?>
コード例 #7
0
ファイル: Admin.php プロジェクト: s4urp8n/kohana-admin
 public static function goLogout()
 {
     Common::redirect(AdminHREF::getDefaultAdminRouteUri('logout'));
 }
コード例 #8
0
ファイル: List.php プロジェクト: s4urp8n/kohana-admin
 foreach ($files as $file) {
     $descriptioning = Upload::getDescription($file);
     ?>
         <div class='upload'>
             <?php 
     $class = 'otherUpload';
     if (Admin::isImageFile($file)) {
         $class = 'imageUpload';
     } elseif (Admin::isAudioFile($file)) {
         $class = 'audioUpload';
     }
     ?>
             
             <?php 
     if ($model->isDeletionAllowed()) {
         $delHref = AdminHREF::getDefaultAdminRouteUri('ajaxUploadDelete', $model->getShortName(), $params['primary']) . '/?directoryIndex=' . urlencode($directoryIndex) . '&file=' . urlencode(basename($file));
         $deletion = '<button ' . 'type="button" ' . 'class="ajaxUploadsDelete" ' . 'confirmText="Вы уверены в удалении?" ' . 'href="' . $delHref . '">' . '<i class="fa fa-trash-o"></i> ' . 'Удалить' . '</button>';
     }
     ?>
             
             <?php 
     if ($model->isModifyingAllowed()) {
         $descriptioning = View::factory('Admin/Data/Edit/Upload/descriptionForm', ['file' => $file, 'reference' => $reference, 'modelName' => $model->getShortName()]);
         $makeFirst = View::factory('Admin/Data/Edit/Upload/makeFirstForm', ['reference' => $reference, 'file' => $file, 'modelName' => $model->getShortName()]);
     }
     ?>
             
             <?php 
     $iconFile = Admin::getFileExtension($file) . '.png';
     $iconPath = Admin::getConfig('sharedDir') . DIRECTORY_SEPARATOR . 'images' . DIRECTORY_SEPARATOR . 'exts' . DIRECTORY_SEPARATOR;
     if (!file_exists(DOCROOT . $iconPath . $iconFile)) {
コード例 #9
0
ファイル: Template.php プロジェクト: s4urp8n/kohana-admin
<div class="authFormNew">
    <form role="form"
          action='<?php 
echo AdminHREF::getDefaultAdminRouteUri('auth');
?>
?ref=<?php 
echo urlencode(AdminHREF::getFullCurrentHREF());
?>
'
          method="post">
        
        <?php 
if (!empty($embed)) {
    ?>
            <div class="alert alert-info">
                Для оформления заказа войдите на сайт или зарегистрируйтесь
            </div>
            <?php 
}
?>
        
        <?php 
if (empty($embed)) {
    ?>
            <div class="form-group">
                <h4 class="text-center">
                    <i class="fa fa-lock"></i>
                    Вход на сайт
                </h4>
            </div>
            <?php 
コード例 #10
0
ファイル: UserProfile.php プロジェクト: s4urp8n/kohana-admin
 public function getHREF()
 {
     return AdminHREF::getDefaultAdminRouteUri('dataEdit', $this->getShortName(), Auth::instance()->get_user()) . '?ref=' . urlencode(AdminHREF::getFullCurrentHREF());
 }
コード例 #11
0
ファイル: Template.php プロジェクト: s4urp8n/kohana-admin
    ?>
                    </h4>
                    
                    <p>
                        <?php 
    echo AdminHTML::renderField($columnName, $column, isset($post[$columnName]) ? $post[$columnName] : null, ['class' => 'form-control']);
    ?>
                    </p>
                </div>
                
                <?php 
}
?>
            
            <?php 
$href = AdminHREF::getDefaultAdminRouteUri('data', $model->getShortName());
if (method_exists($model, 'getInsertBackHref')) {
    $href = $model->getInsertBackHref();
}
?>
            <a href="<?php 
echo $href;
?>
" class='btn btn-default'>
                <i class="fa fa-mail-reply"></i>
                Вернуться к списку
            </a>
            
            <button type='submit' class='btn btn-warning fieldsSave'>
                <i class="fa fa-floppy-o"></i>
                Добавить
コード例 #12
0
ファイル: Fileman.php プロジェクト: s4urp8n/kohana-admin
 public function getHREF()
 {
     return AdminHREF::getDefaultAdminRouteUri('fileman', 'Fileman');
 }