mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-06 21:36:06 -06:00
* #2300 Mobile App Fixes * #2245 Add points-module as payment method * #2245 Add points-module as payment method * #2220 points module
This commit is contained in:
parent
df2afcd562
commit
697ce598ba
@ -306,4 +306,10 @@ return [
|
|||||||
'and_above' => 'and above',
|
'and_above' => 'and above',
|
||||||
'and_below' => 'and below',
|
'and_below' => 'and below',
|
||||||
'clear_all' => 'Clear All',
|
'clear_all' => 'Clear All',
|
||||||
|
'balances' => 'Balances',
|
||||||
|
'packages' => 'Packages',
|
||||||
|
'dopings' => 'Dopings',
|
||||||
|
'advs' => 'Advs',
|
||||||
|
'site' => 'Site',
|
||||||
|
'subscription' => 'Subscription',
|
||||||
];
|
];
|
||||||
|
|||||||
@ -0,0 +1,23 @@
|
|||||||
|
<?php namespace Visiosoft\AdvsModule\Support\Command;
|
||||||
|
|
||||||
|
use Anomaly\Streams\Platform\Addon\Module\Contract\ModuleRepositoryInterface;
|
||||||
|
|
||||||
|
class CheckModuleInstalled
|
||||||
|
{
|
||||||
|
protected $moduleNamespace;
|
||||||
|
protected $checkEnabled;
|
||||||
|
|
||||||
|
public function __construct($moduleNamespace, $checkEnabled = true)
|
||||||
|
{
|
||||||
|
$this->moduleNamespace = $moduleNamespace;
|
||||||
|
$this->checkEnabled = $checkEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function handle(ModuleRepositoryInterface $moduleRepository)
|
||||||
|
{
|
||||||
|
if ($module = $moduleRepository->findBy('namespace', $this->moduleNamespace)) {
|
||||||
|
return $this->checkEnabled ? $module->installed && $module->enabled : boolval($module->installed);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,34 @@
|
|||||||
|
<?php namespace Visiosoft\AdvsModule\Support\Command;
|
||||||
|
|
||||||
|
class GetBuyables
|
||||||
|
{
|
||||||
|
public function handle()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'balances' => [
|
||||||
|
'name' => trans('visiosoft.module.advs::field.balances'),
|
||||||
|
'entry_type' => 'Visiosoft\BalancesModule\Balance\BalanceModel'
|
||||||
|
],
|
||||||
|
'packages' => [
|
||||||
|
'name' => trans('visiosoft.module.advs::field.packages'),
|
||||||
|
'entry_type' => 'Visiosoft\PackagesModule\Package\PackageModel'
|
||||||
|
],
|
||||||
|
'dopings' => [
|
||||||
|
'name' => trans('visiosoft.module.advs::field.dopings'),
|
||||||
|
'entry_type' => 'Anomaly\Streams\Platform\Model\Dopings\DopingsDopingsEntryModel'
|
||||||
|
],
|
||||||
|
'advs' => [
|
||||||
|
'name' => trans('visiosoft.module.advs::field.advs'),
|
||||||
|
'entry_type' => 'Visiosoft\AdvsModule\Adv\AdvModel'
|
||||||
|
],
|
||||||
|
'site' => [
|
||||||
|
'name' => trans('visiosoft.module.advs::field.site'),
|
||||||
|
'entry_type' => 'Visiosoft\SiteModule\Addon\AddonModel'
|
||||||
|
],
|
||||||
|
'subscriptions' => [
|
||||||
|
'name' => trans('visiosoft.module.advs::field.subscriptions'),
|
||||||
|
'entry_type' => 'Anomaly\Streams\Platform\Model\Users\UsersUsersEntryModel'
|
||||||
|
],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -2,9 +2,26 @@
|
|||||||
|
|
||||||
use Illuminate\Contracts\Bus\Dispatcher;
|
use Illuminate\Contracts\Bus\Dispatcher;
|
||||||
use Visiosoft\AdvsModule\Adv\Command\appendRequestURL;
|
use Visiosoft\AdvsModule\Adv\Command\appendRequestURL;
|
||||||
|
use Visiosoft\AdvsModule\Support\Command\CheckModuleInstalled;
|
||||||
|
use Visiosoft\AdvsModule\Support\Command\GetBuyables;
|
||||||
|
|
||||||
if (!function_exists('fullLink')) {
|
if (!function_exists('fullLink'))
|
||||||
|
{
|
||||||
function fullLink($request, $url, $newParameters = array()) {
|
function fullLink($request, $url, $newParameters = array()) {
|
||||||
return app(Dispatcher::class)->dispatch(new appendRequestURL($request, $url, $newParameters));
|
return app(Dispatcher::class)->dispatch(new appendRequestURL($request, $url, $newParameters));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!function_exists('is_module_installed'))
|
||||||
|
{
|
||||||
|
function is_module_installed($moduleNamespace, $checkEnabled = true) {
|
||||||
|
return dispatch_now(new CheckModuleInstalled($moduleNamespace, $checkEnabled));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!function_exists('get_buyables'))
|
||||||
|
{
|
||||||
|
function get_buyables() {
|
||||||
|
return dispatch_now(new GetBuyables());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -2,7 +2,7 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width"/>
|
<meta name="viewport" content="width=device-width"/>
|
||||||
<meta name="generator" content="{{ config_get('streams::distribution.name') }}"/>
|
<meta name="generator" content="{{ config_get('streams::distribution.name') }}"/>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, viewport-fit=cover">
|
||||||
<meta name="description"
|
<meta name="description"
|
||||||
content="{{ (template.get('meta_description') ?: setting_value('streams::description'))|slice(0,160) }}"/>
|
content="{{ (template.get('meta_description') ?: setting_value('streams::description'))|slice(0,160) }}"/>
|
||||||
<meta name="keywords" content="{{ template.get('meta_keywords') }}" />
|
<meta name="keywords" content="{{ template.get('meta_keywords') }}" />
|
||||||
|
|||||||
@ -147,13 +147,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12 text-right">
|
<div class="col-md-12 text-right">
|
||||||
<div class="form-group">
|
<div class="form-group d-flex align-items-center justify-content-end">
|
||||||
|
{{ addBlock('profile/detail/profile-detail-form/actions', {'user': user})|raw }}
|
||||||
|
|
||||||
{{ profileForm.actions|raw }}
|
{{ profileForm.actions|raw }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ profileForm.close()|raw }}
|
{{ profileForm.close()|raw }}
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-pane fade" id="nav-password" role="tabpanel" aria-labelledby="nav-password-tab">
|
<div class="tab-pane fade" id="nav-password" role="tabpanel" aria-labelledby="nav-password-tab">
|
||||||
{% set passwordForm = form('updatePassword').get() %}
|
{% set passwordForm = form('updatePassword').get() %}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user