Giter VIP home page Giter VIP logo

odin's Introduction

Odin

is a GUI to manage model revisions.

Installation

  • package requires Laravel v5.4+

  • composer require ctf0/odin

  • (Laravel < 5.5) add the service provider

'providers' => [
    ctf0\Odin\OdinServiceProvider::class,
]
  • publish the package assets with

php artisan vendor:publish --provider="ctf0\Odin\OdinServiceProvider"

yarn add vue vuemit vue-notif vue-scrollto keycode
# or
npm install vue vuemit vue-notif vue-scrollto keycode --save

Features

  • shortcuts

    navigation keyboard mouse (click)
    go to next revision right/down * (revision date)
    go to prev revision left/up * (revision date)
    go to first revision home * (revision date)
    go to last revision end * (revision date)
    hide revision window esc * (x)
  • events "JS"

    event-name description
    odin-show when revision is showen
    odin-hide when revision is hidden

Usage

  • add Revisions trait & AuditableContract contract to your model
use ctf0\Odin\Traits\Revisions;
use Illuminate\Database\Eloquent\Model;
use OwenIt\Auditing\Contracts\Auditable as AuditableContract;

class Post extends Model implements AuditableContract
{
    use Revisions;

    // ...
}
  • inside the model view ex.post edit view add
@if (count($post->revisions))
    @include('Odin::list', ['revisions' => $post->revisions])
@endif
  • for styling we use bulma

  • add this one liner to your main js file and run npm run watch to compile your js/css files.

    • if you are having issues Check.
require('./../vendor/Odin/js/manager')

new Vue({
    el: '#app'
})

odin's People

Contributors

ctf0 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.