Skip to content

Commit

Permalink
fix conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
刘俊涛 committed Mar 1, 2017
2 parents e0b87a4 + b021cab commit 4031b06
Show file tree
Hide file tree
Showing 10 changed files with 329 additions and 207 deletions.
11 changes: 0 additions & 11 deletions backend/config/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,6 @@
'basePath' => dirname(__DIR__),
'controllerNamespace' => 'backend\controllers',
'controllerMap'=>[
'file-manager-elfinder' => [
'class' => 'mihaildev\elfinder\Controller',
'disabledCommands' => ['netmount'],
'roots' => [
[
'baseUrl' => '@storageUrl',
'basePath' => '@storagePath',
'path' => '/',
]
]
],
'upload' => \common\actions\UploadController::className()
],
'components' => [
Expand Down
19 changes: 16 additions & 3 deletions backend/models/MediaItem.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
<?php

namespace backend\models;

/**
* HassCMS (http:https://www.hassium.org/)
*
* @link http:https://github.com/hasscms for the canonical source repository
* @copyright Copyright (c) 2016-2099 Hassium Software LLC.
* @license http:https://opensource.org/licenses/gpl-license.php GNU Public License
*/
namespace backend\models;
use common\models\Attachment;

/**
*
* @package hass\package_name
* @author zhepama <[email protected]>
* @since 0.1.0
*
*/
class MediaItem
{
const TYPE_FILE = 'file';
Expand Down Expand Up @@ -72,8 +86,7 @@ public function __construct($path, $size, $lastModified, $type, $publicUrl)
*/
public static function createFromAttachment($attachment)
{
$file = $attachment->getFile();
$item = new static($attachment->getAbsolutePath(),$file->getSize(),$file->getTimestamp(),$file->getType(),$attachment->url);
$item = new static($attachment->path,$attachment->size, $attachment->updated_at, 'file', $attachment->url);
return $item;
}

Expand Down
11 changes: 11 additions & 0 deletions backend/views/layouts/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@
<?php $this->beginBody() ?>
<style>
.content-wrapper, .right-side, .main-footer {margin-left:0!important;}
.btn-refresh {
position: fixed;
bottom: 100px;
right: 2px;
padding: 3px 8px;
font-size: 24px;
border:1px solid #ccc;
border-radius:4px;
cursor: pointer;
}
</style>
<div class="content-wrapper">
<section class="content-header">
Expand Down Expand Up @@ -52,6 +62,7 @@
<?= $content ?>
</section>
</div>
<?= Html::a(Html::icon('refresh'), 'javascript:;', ['class' => 'btn btn-success btn-refresh', 'onclick' => 'location.reload()']) ?>
<?php $this->endBody() ?>
<?php if (isset($this->blocks['js'])): ?>
<?= $this->blocks['js'] ?>
Expand Down
177 changes: 0 additions & 177 deletions common/actions/UploadAction.php

This file was deleted.

Loading

0 comments on commit 4031b06

Please sign in to comment.