Skip to content

Various enhancements to the Yii 2 Detail View with ability to edit data and manage styles using BS3.

License

Notifications You must be signed in to change notification settings

muhammadcahya/yii2-detail-view

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yii2-detail-view

Latest Stable Version License Total Downloads Monthly Downloads Daily Downloads

An extended Yii2 DetailView with many additional features. Extends the Yii DetailView to work in both VIEW and EDIT modes. Accelerates your development by using a single configuration of attributes for both VIEW and EDIT. The extension also includes easier methods to style your detail view widget cells, data, form inputs, widgets, and columns (more specifically for Bootstrap 3). The widget by default can be styled within a Bootstrap 3 panel with a buttons toolbar to toggle modes and control your data. Refer detailed documentation and/or a complete demo.

Latest Release

The latest version of the extension is release v1.7.1. Refer the CHANGE LOG for details of various releases.

NOTE: The extension includes a BC Breaking change with v1.7.0. With this release, the template property of the yii core DetailView is not anymore supported. One can use rowOptions, labelColOptions, valueColOptions at the widget level or widget attributes level to configure advanced layout functions.

Demo

You can see detailed documentation and demonstration on usage of the extension.

Installation

The preferred way to install this extension is through composer.

Note: Check the composer.json for this extension's requirements and dependencies. Read this web tip /wiki on setting the minimum-stability settings for your application's composer.json.

Either run

$ php composer.phar require kartik-v/yii2-detail-view "dev-master"

or add

"kartik-v/yii2-detail-view": "dev-master"

to the require section of your composer.json file.

Usage

use kartik\detail\DetailView;
echo DetailView::widget([
    'model'=>$model,
    'condensed'=>true,
    'hover'=>true,
    'mode'=>DetailView::MODE_VIEW,
    'panel'=>[
        'heading'=>'Book # ' . $model->id,
        'type'=>DetailView::PANEL_INFO,
    ],
    'attributes'=>[
        'code',
        'name',
        ['attribute'=>'publish_date', 'type'=>DetailView::INPUT_DATE],
    ]
]);

License

yii2-detail-view is released under the BSD 3-Clause License. See the bundled LICENSE.md for details.

About

Various enhancements to the Yii 2 Detail View with ability to edit data and manage styles using BS3.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 86.7%
  • JavaScript 11.6%
  • CSS 1.7%