All Projects → Comodolab → nova-help

Comodolab / nova-help

Licence: MIT License
A custom help/title field for Laravel Nova

Programming Languages

PHP
23972 projects - #3 most used programming language
Vue
7211 projects
SCSS
7915 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to nova-help

laravel-nova-order-nestedset-field
Laravel Nova field that make your resources orderable
Stars: ✭ 21 (-58.82%)
Mutual labels:  nova
awesome-csv
Awesome Comma-Separated Values (CSV) - What's Next? - Frequently Asked Questions (F.A.Q.s) - Libraries & Tools
Stars: ✭ 46 (-9.8%)
Mutual labels:  fields
nova-horizon-link
Smart Link for Laravel Nova to Horizon Dashboard.
Stars: ✭ 24 (-52.94%)
Mutual labels:  nova
nova-custom-dashboard-card
A Laravel Nova dashboard card that allows you to build custom dashboards.
Stars: ✭ 84 (+64.71%)
Mutual labels:  nova
nova-url-field
A URL input and link field for Laravel Nova
Stars: ✭ 96 (+88.24%)
Mutual labels:  nova
yii2-dynamic-fields
Widget for display dynamic fields, adding and removing their using Pjax.
Stars: ✭ 52 (+1.96%)
Mutual labels:  fields
blueprint-nova-addon
A Blueprint addon which generates Nova resources
Stars: ✭ 61 (+19.61%)
Mutual labels:  nova
script.elementum.nova
Multi-provider for russian tracker for Elementum. Python 2 version. Development stopped.
Stars: ✭ 33 (-35.29%)
Mutual labels:  nova
python-autoclass
A python 3 library providing functions and decorators to automatically generate class code, such as constructor body or properties getters/setters along with optional support of validation contracts on the generated setters. Its objective is to reduce the amount of copy/paste code in your classes - and hence to help reducing human mistakes :).
Stars: ✭ 30 (-41.18%)
Mutual labels:  fields
nova-filterable-cards
Add custom filters to your Nova metric cards
Stars: ✭ 57 (+11.76%)
Mutual labels:  nova
nova-horizon-stats
Nova cards for Laravel applications that use Laravel Horizon
Stars: ✭ 31 (-39.22%)
Mutual labels:  nova
nova-rtl-theme
RTL layout for Laravel Nova.
Stars: ✭ 38 (-25.49%)
Mutual labels:  nova
COA
Openstack Foundation Openstack Certified Administrator exam Preparation
Stars: ✭ 41 (-19.61%)
Mutual labels:  nova
laravel-nova-nested-form
This package allows you to include your nested relationships' forms into a parent form.
Stars: ✭ 225 (+341.18%)
Mutual labels:  nova
gravityforms-phone-extension
Extension for GravityForms (WordPress) which applies the International Phone Input (http://intl-tel-input.com) to all Phone Fields.
Stars: ✭ 24 (-52.94%)
Mutual labels:  fields
nova-mailman
Conveniently route all emails to a local mailbox.
Stars: ✭ 47 (-7.84%)
Mutual labels:  nova
Nova-Menu-Builder
A Menu Builder for Laravel Nova
Stars: ✭ 63 (+23.53%)
Mutual labels:  nova
nova-telescope-link
Smart Link for Laravel Nova to Telescope Debug Assistant.
Stars: ✭ 37 (-27.45%)
Mutual labels:  nova
nova-ohdear-tool
A Nova tool to display downtime, broken links and mixed content
Stars: ✭ 29 (-43.14%)
Mutual labels:  nova
nova-inspire
The best way to connect with your customers is by reaching out and inspiring them. ~ Me
Stars: ✭ 14 (-72.55%)
Mutual labels:  nova

Laravel Nova Help Field

A custom Nova fields which allows to show custom help messages within form, detail and index screens.

Base example

Changelog

See changelog here.

Install

Run this command in your nova project:

composer require comodolab/nova-help

Then you can use the field in your resource as follow:

use Comodolab\Nova\Fields\Help\Help;

public function fields(Request $request)
{
    return [
        Help::make('Help title', 'Help message!'),
    ];
}

Base example

Options

Nova Help Field has many options as follow:

Default templates

Help::make('title', 'message'); // Default help message
Help::success('title', 'message');
Help::info('title', 'message');
Help::warning('title', 'message');
Help::danger('title', 'message');

// There's also a special template for headings
Help::header('title', 'subtitle');

// If you prefer you can call the non static type method
Help::make('title', 'message')->type('warning'); 

Help templates:

Base example

Headings template:

Base example

Both title and message are optional

Help::make('Only title');
Help::make()->message('Only message');

Messages can also be callable

Help::make()->message(function () {
    return "{$this->name} is awesome!";
});

Icons

You can pick one of the default SVG icons (http://www.zondicons.com/) provided by Steve Schoger.

Help::make('Title')->icon('help'); // the default one
Help::make('Title')->icon('info');
Help::make('Title')->icon('warning');
Help::make('Title')->icon('danger');
// Load a custom one
Help::make('Love you')
    ->message('Yes, I love you!')
    ->icon('<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m10 3.22-.61-.6a5.5 5.5 0 0 0 -7.78 7.77l8.39 8.39 8.39-8.4a5.5 5.5 0 0 0 -7.78-7.77z"/></svg>');
// or show no icon at all
Help::make('Sad')->withoutIcon();

Base example

Render html messages

Help::make('Title', 'Message with <a >link</a>')->displayAsHtml();

From v0.2 the displayAsHtml() method applies also to the field name (unless shown as column header on index).

Full width on details screen

// Remove annoing padding in detail screen, also the default behaviour for the heading template 
Help::make('Negative margin')->showFullWidthOnDetail();

Base example

With side label

// Show a side label instead of the title on the top
Help::make('Look I\'m on the side')
    ->message('I\'m not...')
    ->withSideLabel();

Base example

Collapsible help fields

Help fields can be made collapsible using the fluent method collapsible(). Collapsible help fields are collapsed by default and toggle their state clicking on their title. Also, keep in mind that collapsible fields must define both a title and message and cannot be used with side labels.

// Collapsible field
Help::info('Click here to toggle', 'Lorem ipsum dolor sit amet...')
    ->collapsible();

Base example

Show help messages on index

/**
 * By default help messages aren't shown on index,
 * when enabled they are shown as an hoverable 
 * icon showing a plain (no html) tooltip.
 */
Help::make('Column title')
    ->message('Message with <a >link</a>') // The link code will be stripped out on index
    ->alsoOnIndex();
    
// Field icons can be shown conditionally on index
Help::make()->message(function () {
    return $this->name?"{$this->name} is awesome!":null;
})->onlyOnIndex();

Base example

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].