Skip to content

Commit

Permalink
Merge branch 'feature/craft-3.4' into craft-3
Browse files Browse the repository at this point in the history
  • Loading branch information
engram-design committed Jan 29, 2020
2 parents 9d706cc + edcfca5 commit d9e146b
Show file tree
Hide file tree
Showing 14 changed files with 49 additions and 141 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
}
],
"require": {
"craftcms/cms": "^3.3.0"
"craftcms/cms": "^3.4.0-RC1",
"verbb/base": "^1.0.0"
},
"autoload": {
"psr-4": {
Expand Down
32 changes: 17 additions & 15 deletions config.codekit3
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"uuidString": "ECE3F09A-2816-43C6-9715-3F4A30BD28C5"
}
],
"creatorBuild": "31491",
"creatorBuild": "31934",
"files": {
"/.github": {
"ft": 65536,
Expand Down Expand Up @@ -496,19 +496,6 @@
"sC": 0,
"tS": 0
},
"/src/resources/src/scss/_base.scss": {
"aP": 1,
"bl": 0,
"dP": 10,
"dS": 0,
"ft": 4,
"ma": 0,
"oA": 1,
"oAP": "/src/resources/dist/css/_base.css",
"oF": 0,
"oS": 3,
"uL": 1
},
"/src/resources/src/scss/workflow.scss": {
"aP": 1,
"bl": 0,
Expand Down Expand Up @@ -1017,6 +1004,7 @@
"flagValue": -1
}
},
"environmentVariablesString": "NODE_ENV:::production",
"esLintConfigFileHandlingType": 0,
"esLintECMAVersion": 7,
"esLintEnvironmentsMask": 1,
Expand Down Expand Up @@ -1121,6 +1109,10 @@
"active": 0,
"optionString": ""
},
"default-param-last": {
"active": 0,
"optionString": ""
},
"dot-location": {
"active": 0,
"optionString": "'object'"
Expand Down Expand Up @@ -1469,6 +1461,10 @@
"active": 0,
"optionString": ""
},
"no-import-assign": {
"active": 1,
"optionString": ""
},
"no-inline-comments": {
"active": 0,
"optionString": ""
Expand Down Expand Up @@ -1893,6 +1889,10 @@
"active": 0,
"optionString": "{'allowEmptyReject': false}"
},
"prefer-regex-literals": {
"active": 0,
"optionString": ""
},
"prefer-rest-params": {
"active": 0,
"optionString": ""
Expand Down Expand Up @@ -2501,7 +2501,6 @@
"autoOutputPathStyle": 0,
"createSourceMap": 0,
"enableJavascript": 0,
"ieCompatibility": 1,
"mathStyle": 0,
"outputStyle": 1,
"rewriteURLStyle": 0,
Expand Down Expand Up @@ -2641,6 +2640,9 @@
"npmTargetDependencyListType": 1,
"overrideExternalServerCSS": 0,
"previewPathAddition": "",
"rollupExternals": "",
"rollupReplacements": "process.env.NODE_ENV:::$NODE_ENV,,,ENVIRONMENT:::$NODE_ENV",
"rollupTreeshakingEnabled": 1,
"skippedFoldersString": "log, _logs, logs, _cache, cache, /storage/framework/sessions, node_modules, /src/models, /src/tasks, /src/elements, /src/helpers, /src/migrations, /src/data, /src/templates, /src/records, /src/controllers, /src/assetbundles, /src/base, /src/fields, /src/services, /src/variables, /src/resources/dist, /.github",
"sourceFolderName": "source",
"susyVersion": 3,
Expand Down
3 changes: 3 additions & 0 deletions src/assetbundles/WorkflowAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
use craft\web\AssetBundle;
use craft\web\assets\cp\CpAsset;

use verbb\base\assetbundles\CpAsset as VerbbCpAsset;

class WorkflowAsset extends AssetBundle
{
// Public Methods
Expand All @@ -15,6 +17,7 @@ public function init()
$this->sourcePath = "@verbb/workflow/resources/dist";

$this->depends = [
VerbbCpAsset::class,
CpAsset::class,
];

Expand Down
28 changes: 18 additions & 10 deletions src/base/PluginTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

use yii\log\Logger;

use verbb\base\BaseHelper;

trait PluginTrait
{
// Static Properties
Expand All @@ -31,12 +33,28 @@ public function getSubmissions()
return $this->get('submissions');
}

public static function log($message)
{
Craft::getLogger()->log($message, Logger::LEVEL_INFO, 'workflow');
}

public static function error($message)
{
Craft::getLogger()->log($message, Logger::LEVEL_ERROR, 'workflow');
}


// Private Methods
// =========================================================================

private function _setPluginComponents()
{
$this->setComponents([
'service' => Service::class,
'submissions' => Submissions::class,
]);

BaseHelper::registerModule();
}

private function _setLogging()
Expand All @@ -47,14 +65,4 @@ private function _setLogging()
]);
}

public static function log($message)
{
Craft::getLogger()->log($message, Logger::LEVEL_INFO, 'workflow');
}

public static function error($message)
{
Craft::getLogger()->log($message, Logger::LEVEL_ERROR, 'workflow');
}

}
2 changes: 1 addition & 1 deletion src/resources/dist/css/workflow.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

76 changes: 0 additions & 76 deletions src/resources/src/scss/_base.scss

This file was deleted.

3 changes: 0 additions & 3 deletions src/resources/src/scss/workflow.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

// ==========================================================================

@import "base";



// ==========================================================================
Expand All @@ -31,7 +29,6 @@

.workflow-pane {
margin: 0;
border-radius: 0;
}

.workflow-pane .btngroup {
Expand Down
2 changes: 1 addition & 1 deletion src/templates/_layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<div class="credit-pill">
<div class="credit-mask">
<div class="credit-wrap">
{% include 'workflow/_svg/verbb-logo.svg' %}
{% include 'verbb-base/_svg/verbb-logo.svg' %}
</div>
</div>
</div>
Expand Down
8 changes: 0 additions & 8 deletions src/templates/_macros/index.html

This file was deleted.

17 changes: 0 additions & 17 deletions src/templates/_svg/verbb-logo.svg

This file was deleted.

2 changes: 1 addition & 1 deletion src/templates/settings/_panes/general.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% import '_includes/forms' as forms %}
{% import 'workflow/_macros' as macros %}
{% import 'verbb-base/_macros' as macros %}

{% set groups = [{ label: "None" | t('workflow'), value: '' }] %}
{% for group in craft.app.userGroups.getAllGroups() %}
Expand Down
2 changes: 1 addition & 1 deletion src/templates/settings/_panes/notifications.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% import '_includes/forms' as forms %}
{% import 'workflow/_macros' as macros %}
{% import 'verbb-base/_macros' as macros %}

{{ forms.lightswitchField({
label: 'Editor Notifications' | t('workflow'),
Expand Down
2 changes: 1 addition & 1 deletion src/templates/settings/_panes/permissions.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% import '_includes/forms' as forms %}
{% import 'workflow/_macros' as macros %}
{% import 'verbb-base/_macros' as macros %}

{% set sections = [] %}
{% for section in craft.app.sections.getAllSections() %}
Expand Down
10 changes: 4 additions & 6 deletions src/templates/settings/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,21 @@

{% set crumbs = [
{ label: 'Workflow' | t('workflow'), url: url('workflow') },
{ label: 'Settings' | t('workflow'), url: url('workflow/settings') },
{ label: 'Settings' | t('app'), url: url('workflow/settings') },
] %}

{% set selectedTab = 'settings' %}

{% set fullPageForm = true %}

{% set navItems = {
'general': { title: 'General Settings' | t('workflow') },
'notifications': { title: 'Notifications' | t('workflow') },
'permissions': { title: 'Permissions' | t('workflow') },
} %}

{% set selectedTab = 'settings' %}
{% set selectedItem = 'general' %}
{% set fullPageForm = true %}

{% block sidebar %}
<nav class="workflow-settings-tabs" id="tabs">
<nav class="workflow-settings-tabs" data-vui-tabs>
<ul>
{% for id, item in navItems %}
{% if item.heading is defined %}
Expand Down

0 comments on commit d9e146b

Please sign in to comment.