承接 davidyell/nice-admin 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

davidyell/nice-admin

最新稳定版本:1.0.10

Composer 安装命令:

composer require davidyell/nice-admin

包简介

A roll up plugin of various bits to improve the look of admin areas index view.

README 文档

README

This plugin is designed to make admin areas baked from CakePHP look a little nicer and be easier to use and understand.

Requirements

  • CakePHP 3.x
  • PHP 5.4.16+
  • TwitterBootstrap (optional - just for styling)

What do you get in the box?

ActionButtons Helper

Helper for replacing the 'Actions' cell contents in index views with buttons rather than textual links.

StatusLights Helper

Helper for replacing a Status column in an index view with a nice coloured label based on the status_id.

Boolean Helper

This will change boolean display fields into ticks (✔) and crosses (✘) rather than 1/0.

Get the code

composer require davidyell/nice-admin:dev-master

Installation

The plugin will need to be loaded using Plugin::load('NiceAdmin') in your /config/bootstrap.php.

Usage

To use the helpers you will need to add them to your helpers array in your AppView.

$this->loadHelper('NiceAdmin.StatusLights', $options);
$this->loadHelper('NiceAdmin.Actions');
$this->loadHelper('NiceAdmin.Gravatar');
$this->loadHelper('NiceAdmin.Boolean');

Loading StatusLights Helper

You can pass in an array of options into the StatusLights helper. The key of the array is the status_id then an array of the label to display and the class of the item output.

$options = [
    1 => [
        'label'=>'Live',
        'class'=>'label label-success'
    ],
    2 => [
        'label'=>'Inactive',
        'class'=>'label label-inverse'
    ],
    3 => [
        'label'=>'Deleted',
        'class'=>'label'
    ]
);

The example here replicates the default settings in the helper. So if you are happy with the defaults, you don't need to pass these options in.

StatusLights Helper

This will convert a status link into a nice visually identifiable label.

<td>
	<?= $this->StatusLights->status($entity->id); ?>
</td>

ActionButtons Helper

You can output either buttons or icons depending on which you need. The helper will, by default, output all three links as buttons. Passing in an array of buttons you want to ouput as v,e and/or d. For 'View', 'Edit', and 'Delete'. Then you'll need to pass in the controller. The last option is either icons or buttons.

<td class="actions">
	<?php echo $this->Actions->actions($entity->id, ['e','d'], 'myController', 'icons');?>
</td>

Loading Boolean Helper

Similar to the StatusLights helper you can pass in an array of options to customise the display of the output.

$optons = 
    1 => [ // true
        'class'=>'badge badge-success',
        'display'=>'&#10004;'
    ],
    0 => [ // false
        'class'=>'badge badge-important',
        'display'=>'&#10008;'
    ]
)

Boolean Helper

<?= $this->Boolean->display(1); ?>

What's it look like?

Table row

Further development

Let me know what features you'd like or feel free to fork and create a pull request.

License

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

davidyell/nice-admin 适用场景与选型建议

davidyell/nice-admin 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3.77k 次下载、GitHub Stars 达 10, 最近一次更新时间为 2012 年 12 月 13 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 davidyell/nice-admin 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 davidyell/nice-admin 我们能提供哪些服务?
定制开发 / 二次开发

基于 davidyell/nice-admin 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 3.77k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 10
  • 点击次数: 24
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 10
  • Watchers: 4
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2012-12-13