Skip to content

Commit

Permalink
Merge branch 'release/v0.0.1'
Browse files Browse the repository at this point in the history
* release/v0.0.1: (86 commits)
  Rename package cortex/categories from cortex/categorizable
  Apply fixes from StyleCI
  Rename package cortex/categories from cortex/categorizable
  Rename package rinvex/categories from rivnex/categorizable
  Rename package rinvex/composable to rinvex/composer
  Apply fixes from StyleCI
  Refactor access areas
  Update composer dependencies
  Disable travis email notifications
  Update datatables
  Update composer dependencies
  Update composer dependencies
  Update composer dependencies
  Update composer dependencies
  Use route patterns to constrain parameters
  Use slugs in URLs rather than IDs
  Enforce consistent language phrase placeholders
  Fix namespace folder structure
  Eliminate reset form eliminate button
  Move route model binding to service provider to support route caching
  ...
  • Loading branch information
Omranic committed Sep 9, 2017
2 parents 70916a4 + e30dc59 commit 01b43dd
Show file tree
Hide file tree
Showing 29 changed files with 831 additions and 476 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Expand Up @@ -21,6 +21,7 @@ after_script:
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover

notifications:
email: false
slack:
rooms:
- secure: TmpxlLe34dhg7HJw6yqmdWR2B4CGUEiuiUzx3UJJG9l2hl+a9/x9NKw/UhaUCEe8hB6n9++eBJftjKw5MWfbkkPWft9dkhRDuCApP5ATTxhY2J0jo4Hr5aWR+5rl+1FZdLg5svPi1mioUsG0M+uTPkfBO897bk0MU53ewDpQfSt2baRRcWKncYXvoTesS604BRCrXOW68Js9+mgXG75hbefgldHxjL8vQNVgFdeMHw4fIBaRnET21qOcPBhgzCqg1kc4DFxSkbk0mLu9FvdZM0dMPrpE4JxneAZEP3kWIrzxv57APgTbMjzaCORjhAcQFtDp6/ZWBEtjoM1t8QnPFch6AEZ42otZpOXvKkvXDZ5UXcGWlY2VRItyoYtL74/l7n5mthlrvHw4scj7ukbUBFIlyRjyAEAt9cCYt+fmuDVc+TexRKd+LvJsDRa79O+vaVnvReaebVPrPgC4yhzT/DQD5f3MAfwvqCi5idI7i0v08TS/uPTojSl49PrAHkO/oUXI0qENt553i59yDazyR+3UDkgQa8dLNG5CoX//xyiYrAYz8PYFSJSZ2K+eVLjl816zA3woDrIpeotCc2o/kvVT/b+H6hQrQyjMYam8u0DxXBBzS4irxSmFzEbjt2QlaCw63jkqo6phC9omlrcZqD/RzyFxayl5R4PsZzUU3A8=
- secure: myEJBfQDHA5eZY83YboRwCmCnxp0SOps9/FXEQsu6vvYKJQWFvCHbh9xM73MQ1Bu6vckmfYqrB/55unGSZni3GDnKuZD+7b3fvXEZwZywNxf31Yby/6j3EMTL108u8AwGcXc+d1g35MoQHlsUYnnuxPJfA/fdVRPAU9tKC9yEy9pt6B7Q74/jhoPjVF4/zfa3RwwpWCuUD4YOVonkFayEu2aG6+NNyEci2WWYjSJdaDtVzSw8IFgBTWv2Uasl2lnMPhoZyhnR51Lm9W17rhBmkB6qtP2DP1eccEHrLJGFiRCNyglWHafZcJDODTYooGzV3M3nqfTi63TtMmVoleLE1aZACGyh+noysEFOUfV7XVTn8fu9Gp0p1rXd2z9Q/XxpNxspnI1ZiP443BMyBGqQ4XVLQiiZWvwlF/4pbBkubFGvMka95vgON9Mn4tMa4upTET0sJsLsSHj9MbY9WZqla7vJ4jhCwwlFwLHlzLP/5LYjftItjLzZaZWfxk0J7dxBuoEnw22w2mkVoOKeuFLZ6Wf17CPbMhPHFsdscgqnsFSC8cLjfrGq40CBWS1DD1Whos/nInap9R+zv1Vz0oAoW/o4oaQeRRzjmoo8pFvtr6cV/lZF5JLA9hORr/K8/em0K1dgnildvACcKep1ZCbxehXIc1AsKBcYgGxkkSp0QY=
6 changes: 3 additions & 3 deletions CHANGELOG.md
@@ -1,9 +1,9 @@
# Cortex Categorizable Change Log
# Cortex Categories Change Log

All notable changes to this project will be documented in this file.

This project adheres to [Semantic Versioning](CONTRIBUTING.md).


## v0.0.1 - 2017-06-07
- Commit first draft
## v0.0.1 - 2017-09-09
- Tag first release
24 changes: 12 additions & 12 deletions README.md
@@ -1,15 +1,15 @@
# Cortex Categorizable

Cortex Categorizable is a frontend layer for the polymorphic Laravel package, for category management. You can categorize any eloquent model with ease, and utilize the power of Nested Sets, and the awesomeness of Sluggable, and Translatable models out of the box.

[![Packagist](https://img.shields.io/packagist/v/cortex/categorizable.svg?label=Packagist&style=flat-square)](https://packagist.org/packages/cortex/categorizable)
[![VersionEye Dependencies](https://img.shields.io/versioneye/d/php/cortex:categorizable.svg?label=Dependencies&style=flat-square)](https://www.versioneye.com/php/cortex:categorizable/)
[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/cortex/categorizable.svg?label=Scrutinizer&style=flat-square)](https://scrutinizer-ci.com/g/cortex/categorizable/)
[![Code Climate](https://img.shields.io/codeclimate/github/cortex/categorizable.svg?label=CodeClimate&style=flat-square)](https://codeclimate.com/github/cortex/categorizable)
[![Travis](https://img.shields.io/travis/cortex/categorizable.svg?label=TravisCI&style=flat-square)](https://travis-ci.org/cortex/categorizable)
[![SensioLabs Insight](https://img.shields.io/sensiolabs/i/01bde275-513e-4b65-a721-4d618e33b70e.svg?label=SensioLabs&style=flat-square)](https://insight.sensiolabs.com/projects/01bde275-513e-4b65-a721-4d618e33b70e)
[![StyleCI](https://styleci.io/repos/90121903/shield)](https://styleci.io/repos/90121903)
[![License](https://img.shields.io/packagist/l/cortex/categorizable.svg?label=License&style=flat-square)](https://github.com/cortex/categorizable/blob/develop/LICENSE)
# Cortex Categories

**Cortex Categories** is a frontend layer for the polymorphic Laravel package, for category management. You can categorize any eloquent model with ease, and utilize the power of Nested Sets, and the awesomeness of Sluggable, and Translatable models out of the box.

[![Packagist](https://img.shields.io/packagist/v/cortex/categories.svg?label=Packagist&style=flat-square)](https://packagist.org/packages/cortex/categories)
[![VersionEye Dependencies](https://img.shields.io/versioneye/d/php/cortex:categories.svg?label=Dependencies&style=flat-square)](https://www.versioneye.com/php/cortex:categories/)
[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/cortex/categories.svg?label=Scrutinizer&style=flat-square)](https://scrutinizer-ci.com/g/cortex/categories/)
[![Code Climate](https://img.shields.io/codeclimate/github/cortex/categories.svg?label=CodeClimate&style=flat-square)](https://codeclimate.com/github/cortex/categories)
[![Travis](https://img.shields.io/travis/cortex/categories.svg?label=TravisCI&style=flat-square)](https://travis-ci.org/cortex/categories)
[![SensioLabs Insight](https://img.shields.io/sensiolabs/i/746e5965-90c3-4eec-aa57-c340f79bc78f.svg?label=SensioLabs&style=flat-square)](https://insight.sensiolabs.com/projects/746e5965-90c3-4eec-aa57-c340f79bc78f)
[![StyleCI](https://styleci.io/repos/93621137/shield)](https://styleci.io/repos/93621137)
[![License](https://img.shields.io/packagist/l/cortex/categories.svg?label=License&style=flat-square)](https://github.com/cortex/categories/blob/develop/LICENSE)


## Installation and Usage
Expand Down
49 changes: 37 additions & 12 deletions composer.json
@@ -1,7 +1,7 @@
{
"name": "cortex/categorizable",
"name": "cortex/categories",
"type": "cortex-module",
"description": "Cortex Categorizable is a frontend layer for the polymorphic Laravel package, for category management. You can categorize any eloquent model with ease, and utilize the power of Nested Sets, and the awesomeness of Sluggable, and Translatable models out of the box.",
"description": "Cortex Categories is a frontend layer for the polymorphic Laravel package, for category management. You can categorize any eloquent model with ease, and utilize the power of Nested Sets, and the awesomeness of Sluggable, and Translatable models out of the box.",
"keywords": [
"model",
"cortex",
Expand All @@ -20,9 +20,9 @@
"homepage": "https://rinvex.com",
"support": {
"email": "help@rinvex.com",
"issues": "https://github.com/rinvex/cortex-categorizable/issues",
"source": "https://github.com/rinvex/cortex-categorizable",
"docs": "https://github.com/rinvex/cortex-categorizable/README.md"
"issues": "https://github.com/rinvex/cortex-categories/issues",
"source": "https://github.com/rinvex/cortex-categories",
"docs": "https://github.com/rinvex/cortex-categories/README.md"
},
"authors": [
{
Expand All @@ -38,28 +38,53 @@
},
{
"name": "The Generous Laravel Community",
"homepage": "https://github.com/rinvex/cortex-categorizable/contributors"
"homepage": "https://github.com/rinvex/cortex-categories/contributors"
}
],
"require": {
"php": "^7.0.0",
"laravel/framework": "~5.4.0",
"rinvex/modulable": "dev-develop",
"rinvex/composable": "dev-develop",
"rinvex/categorizable": "dev-develop"
"barryvdh/laravel-snappy": "^0.4.0",
"cortex/foundation": "dev-develop",
"davejamesmiller/laravel-breadcrumbs": "^4.0.0",
"Illuminate/auth": "~5.5.0",
"Illuminate/console": "~5.5.0",
"Illuminate/http": "~5.5.0",
"Illuminate/routing": "~5.5.0",
"Illuminate/support": "~5.5.0",
"kalnoy/nestedset": "^4.3.0",
"laravelcollective/html": "~5.5.0",
"league/fractal": "^0.16.0",
"proengsoft/laravel-jsvalidation": "^2.1.0",
"rinvex/categories": "dev-develop",
"rinvex/composer": "dev-develop",
"rinvex/fort": "dev-develop",
"rinvex/support": "dev-develop",
"spatie/laravel-activitylog": "^2.0.0",
"spatie/laravel-menu": "^3.0.0",
"yajra/laravel-datatables-fractal": "^1.0.0",
"yajra/laravel-datatables-buttons": "^3.0.0",
"yajra/laravel-datatables-html": "^3.0.0",
"yajra/laravel-datatables-oracle": "^8.0.0"
},
"autoload": {
"psr-4": {
"Cortex\\Categorizable\\": "src/"
"Cortex\\Categories\\": "src/"
}
},
"config": {
"preferred-install": "dist"
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
},
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
},
"laravel": {
"providers": [
"Cortex\\Categories\\Providers\\CategoriesServiceProvider"
]
},
"cortex-module": {
"autoinstall": false,
"icon": {
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Expand Up @@ -13,7 +13,7 @@
beStrictAboutChangesToGlobalState="true"
beStrictAboutCoversAnnotation="true">
<testsuites>
<testsuite name="Cortex Categorizable Unit Test Suite">
<testsuite name="Cortex Categories Unit Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
Expand Down
26 changes: 26 additions & 0 deletions resources/data/abilities.json
@@ -0,0 +1,26 @@
[
{
"action": "list",
"resource": "categories",
"policy": "Cortex\\Categories\\Policies\\CategoryPolicy@list",
"name": "Can List Existing Categories"
},
{
"action": "create",
"resource": "categories",
"policy": "Cortex\\Categories\\Policies\\CategoryPolicy@create",
"name": "Can Create New Categories"
},
{
"action": "update",
"resource": "categories",
"policy": "Cortex\\Categories\\Policies\\CategoryPolicy@update",
"name": "Can Update Existing Categories"
},
{
"action": "delete",
"resource": "categories",
"policy": "Cortex\\Categories\\Policies\\CategoryPolicy@delete",
"name": "Can Delete Existing Categories"
}
]
1 change: 0 additions & 1 deletion resources/lang/en/common.php
Expand Up @@ -11,7 +11,6 @@
'created_at' => 'Created At',
'updated_at' => 'Updated At',
'submit' => 'Submit',
'reset' => 'Reset',
'details' => 'Details',

'categories' => 'Categories',
Expand Down
4 changes: 2 additions & 2 deletions resources/lang/en/messages.php
Expand Up @@ -5,8 +5,8 @@
return [

'category' => [
'saved' => 'Congrats! Category [:categoryId] saved successfully.',
'deleted' => 'Done! Category [:categoryId] deleted successfully.',
'saved' => 'Congrats! Category [:slug] saved successfully.',
'deleted' => 'Done! Category [:slug] deleted successfully.',
],

];
15 changes: 0 additions & 15 deletions resources/lang/en/navigation.php

This file was deleted.

123 changes: 123 additions & 0 deletions resources/views/adminarea/forms/category.blade.php
@@ -0,0 +1,123 @@
{{-- Master Layout --}}
@extends('cortex/foundation::adminarea.layouts.default')

{{-- Page Title --}}
@section('title')
{{ config('app.name') }} » {{ trans('cortex/foundation::common.adminarea') }} » {{ trans('cortex/categories::common.categories') }} » {{ $category->exists ? $category->name : trans('cortex/categories::common.create_category') }}
@stop

@push('scripts')
{!! JsValidator::formRequest(Cortex\Categories\Http\Requests\Adminarea\CategoryFormRequest::class)->selector('#adminarea-categories-save') !!}
@endpush

{{-- Main Content --}}
@section('content')

@if($category->exists)
@include('cortex/foundation::common.partials.confirm-deletion', ['type' => 'category'])
@endif

<div class="content-wrapper">
<section class="content-header">
<h1>{{ $category->exists ? $category->name : trans('cortex/categories::common.create_category') }}</h1>
<!-- Breadcrumbs -->
{{ Breadcrumbs::render() }}
</section>

<!-- Main content -->
<section class="content">

<div class="nav-tabs-custom">
<ul class="nav nav-tabs">
<li class="active"><a href="#details-tab" data-toggle="tab">{{ trans('cortex/categories::common.details') }}</a></li>
@if($category->exists) <li><a href="{{ route('adminarea.categories.logs', ['category' => $category]) }}">{{ trans('cortex/categories::common.logs') }}</a></li> @endif
@if($category->exists && $currentUser->can('delete-categories', $category)) <li class="pull-right"><a href="#" data-toggle="modal" data-target="#delete-confirmation" data-item-href="{{ route('adminarea.categories.delete', ['category' => $category]) }}" data-item-name="{{ $category->slug }}"><i class="fa fa-trash text-danger"></i></a></li> @endif
</ul>

<div class="tab-content">

<div class="tab-pane active" id="details-tab">

@if ($category->exists)
{{ Form::model($category, ['url' => route('adminarea.categories.update', ['category' => $category]), 'method' => 'put', 'id' => 'adminarea-categories-save']) }}
@else
{{ Form::model($category, ['url' => route('adminarea.categories.store'), 'id' => 'adminarea-categories-save']) }}
@endif

<div class="row">

<div class="col-md-6">

{{-- Name --}}
<div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}">
{{ Form::label('name', trans('cortex/categories::common.name'), ['class' => 'control-label']) }}
{{ Form::text('name', null, ['class' => 'form-control', 'placeholder' => trans('cortex/categories::common.name'), 'data-slugify' => '#slug', 'required' => 'required', 'autofocus' => 'autofocus']) }}

@if ($errors->has('name'))
<span class="help-block">{{ $errors->first('name') }}</span>
@endif
</div>

</div>

<div class="col-md-6">

{{-- Slug --}}
<div class="form-group{{ $errors->has('slug') ? ' has-error' : '' }}">
{{ Form::label('slug', trans('cortex/categories::common.slug'), ['class' => 'control-label']) }}
{{ Form::text('slug', null, ['class' => 'form-control', 'placeholder' => trans('cortex/categories::common.slug'), 'required' => 'required']) }}

@if ($errors->has('slug'))
<span class="help-block">{{ $errors->first('slug') }}</span>
@endif
</div>

</div>

</div>

<div class="row">

<div class="col-md-12">

{{-- Description --}}
<div class="form-group{{ $errors->has('description') ? ' has-error' : '' }}">
{{ Form::label('description', trans('cortex/categories::common.description'), ['class' => 'control-label']) }}
{{ Form::textarea('description', null, ['class' => 'form-control', 'placeholder' => trans('cortex/categories::common.description'), 'rows' => 3]) }}

@if ($errors->has('description'))
<span class="help-block">{{ $errors->first('description') }}</span>
@endif
</div>

</div>

</div>

<div class="row">
<div class="col-md-12">

<div class="pull-right">
{{ Form::button(trans('cortex/categories::common.submit'), ['class' => 'btn btn-primary btn-flat', 'type' => 'submit']) }}
</div>

@include('cortex/foundation::adminarea.partials.timestamps', ['model' => $category])

</div>

</div>

{{ Form::close() }}

</div>

</div>

</div>


</section>

</div>

@endsection

0 comments on commit 01b43dd

Please sign in to comment.