diff --git a/public/img/modules/save30arrow3.png b/public/img/modules/save30arrow3.png new file mode 100644 index 000000000..156c72d4a Binary files /dev/null and b/public/img/modules/save30arrow3.png differ diff --git a/resources/lang/en-GB/modules.php b/resources/lang/en-GB/modules.php index 6dce6e04b..f6c10851a 100644 --- a/resources/lang/en-GB/modules.php +++ b/resources/lang/en-GB/modules.php @@ -9,13 +9,23 @@ return [ 'new' => 'New', 'top_free' => 'Top Free', 'free' => 'FREE', + 'monthly' => 'Monthly', + 'yearly' => 'Yearly', + 'yearly_pricing' => 'Yearly Pricing', + 'monthly_price' => 'from :price', + 'per_month' => 'per month', + 'billed_yearly' => 'Billed Yearly', + 'billed_monthly' => 'Billed Monthly', + 'save_year' => 'You save :price a year!', + 'if_paid_year' => 'Or :price/mo if paid yearly', + 'information_monthly' => 'This option is valid only for Cloud Service', 'install' => 'Install', 'buy_now' => 'Buy Now', 'get_api_key' => 'Click here to get your API key.', 'no_apps' => 'There are no apps in this category, yet.', 'become_developer' => 'Are you a developer? Here you can learn how to create an app and start selling today!', 'recommended_apps' => 'Recommended Apps', - 'can_not_install' => 'You can not install :app app.
Beacuse monthly subscription just support cloud', + 'can_not_install' => 'Monthly subscriptions are available only on Cloud service. Learn more.', 'about' => 'About', diff --git a/resources/views/modules/item/show.blade.php b/resources/views/modules/item/show.blade.php index 585d46b19..04b25061a 100644 --- a/resources/views/modules/item/show.blade.php +++ b/resources/views/modules/item/show.blade.php @@ -15,7 +15,7 @@
-

{{ $module->name }}

+

{!! $module->name !!}

@@ -39,6 +39,7 @@ {{ trans('general.description') }} + @if ($module->installation) @endif + @if ($module->faq) @endif + @if ($module->changelog) @endif + @@ -75,7 +79,7 @@ {!! $module->description !!} @if($module->screenshots || $module->video) - video) @php if (strpos($module->video->link, '=') !== false) { @@ -259,71 +263,15 @@

{{ trans_choice('general.actions', 1) }}

+ @include('partials.modules.show.actions_header') +
-
- -
- @if ($module->price == '0.0000') - {{ trans('modules.free') }} - @else - {!! $module->price_prefix !!} - - @if (isset($module->special_price)) - {{ $module->price }} - {{ $module->special_price }} - @else - {{ $module->price }} - @endif - {!! $module->price_suffix !!} - @endif -
-
-
+ @include('partials.modules.show.price')
@@ -338,24 +286,28 @@ {{ $module->vendor_name }} @endif + @if ($module->version) {{ trans('footer.version') }} {{ $module->version }} @endif + @if ($module->created_at) {{ trans('modules.added') }} @date($module->created_at) @endif + @if ($module->updated_at) {{ trans('modules.updated') }} {{ Date::parse($module->updated_at)->diffForHumans() }} @endif + @if ($module->categories) {{ trans_choice('general.categories', (count($module->categories) > 1) ? 2 : 1) }} @@ -366,6 +318,7 @@ @endif + {{ trans('modules.documentation') }} @if ($module->documentation) @@ -373,7 +326,7 @@ {{ trans('modules.view') }} @else - {{ trans('general.na') }} + {{ trans('general.na') }} @endif @@ -411,6 +364,16 @@ @push('scripts_start') diff --git a/resources/views/partials/modules/item.blade.php b/resources/views/partials/modules/item.blade.php index 4a4d53910..e4481c38e 100644 --- a/resources/views/partials/modules/item.blade.php +++ b/resources/views/partials/modules/item.blade.php @@ -2,9 +2,27 @@

- {{ $module->name }} + {!! $module->name !!}

+ @if (!empty($module->subscription_type)) + + @php $subscription_color = 'bg-info'; @endphp + + @if ($module->subscription_type == 'monthly') + @php $subscription_color = 'bg-warning'; @endphp + @endif + + + @if ($module->subscription_type == 'yearly') + {{ trans('modules.yearly') }} + @else + {{ trans('modules.monthly') }} + @endif + + + @endif + @if (isset($installed[$module->slug])) @php $color = 'bg-green'; @endphp @@ -12,8 +30,10 @@ @php $color = 'bg-warning'; @endphp @endif - - {{ trans('modules.badge.installed') }} + + + {{ trans('modules.badge.installed') }} + @endif
@@ -38,7 +58,7 @@ @if ($module->total_review) - ({{ $module->total_review }}) + ({{ $module->total_review }}) @endif
@@ -49,14 +69,7 @@ @if ($module->price == '0.0000') {{ trans('modules.free') }} @else - {!! $module->price_prefix !!} - @if (isset($module->special_price)) - {{ $module->price }} - {{ $module->special_price }} - @else - {{ $module->price }} - @endif - {!! $module->price_suffix !!} + {{ trans('modules.monthly_price', ['price' => $module->yearly_per_monthly_price]) }} @endif diff --git a/resources/views/partials/modules/pre_sale.blade.php b/resources/views/partials/modules/pre_sale.blade.php index ae36c26a1..1e8d3b01e 100644 --- a/resources/views/partials/modules/pre_sale.blade.php +++ b/resources/views/partials/modules/pre_sale.blade.php @@ -2,7 +2,7 @@

- {{ $module->name }} + {!! $module->name !!}

@@ -31,14 +31,15 @@ @if ($module->price == '0.0000') {{ trans('modules.free') }} @else - {!! $module->price_prefix !!} - @if (isset($module->special_price)) - {{ $module->price }} - {{ $module->special_price }} - @else - {{ $module->price }} - @endif - {!! $module->price_suffix !!} + @if ($module->is_discount) + + {!! $module->yearly_price !!} + + + {!! $module->yearly_special_price !!} + @else + {!! $module->yearly_price !!} + @endif @endif diff --git a/resources/views/partials/modules/show/actions_header.blade.php b/resources/views/partials/modules/show/actions_header.blade.php new file mode 100644 index 000000000..0107e8a5a --- /dev/null +++ b/resources/views/partials/modules/show/actions_header.blade.php @@ -0,0 +1,23 @@ +@if ($module->price != '0.0000') + + {{ trans('modules.yearly_pricing') }} + +@endif + +@if ($module->price != '0.0000') + +@endif diff --git a/resources/views/partials/modules/show/buttons.blade.php b/resources/views/partials/modules/show/buttons.blade.php new file mode 100644 index 000000000..5e3128876 --- /dev/null +++ b/resources/views/partials/modules/show/buttons.blade.php @@ -0,0 +1,51 @@ +@if ($installed) + @can('delete-modules-item') + + {{ trans('modules.button.uninstall') }} + + @endcan + + @can('update-modules-item') + @if ($enable) + + {{ trans('modules.button.disable') }} + + @else + + {{ trans('modules.button.enable') }} + + @endif + @endcan +@else + @can('create-modules-item') + @if ($module->install) + @if (!empty($module->isPurchase) && (!empty($module->purchase_type) && $module->purchase_type == 'monthly')) + +
{!! trans('modules.can_not_install') !!}
+ + +
+ @else + + @endif + @else + + {{ trans('modules.buy_now') }} + + @endif + @endcan +@endif + +@if (!empty($module->purchase_desc)) +
+ {!! $module->purchase_desc !!} +
+@endif diff --git a/resources/views/partials/modules/show/price.blade.php b/resources/views/partials/modules/show/price.blade.php new file mode 100644 index 000000000..5b0f329b4 --- /dev/null +++ b/resources/views/partials/modules/show/price.blade.php @@ -0,0 +1,73 @@ +@if ($module->price != '0.0000') +
+
+
+ +
+ @if ($module->price == '0.0000') + {{ trans('modules.free') }} + @else + {!! $module->yearly_per_monthly_price !!} {{ trans('modules.per_month') }} + @endif +
+
+
+ +
+ + {{ trans('modules.billed_yearly') }} + +
+ +
+ + {!! trans('modules.save_year', ['price' => '$' . $module->raw_monthly_price * 4]) !!} + +
+ +
+ +
+
+ +
+
+ +
+ @if ($module->price == '0.0000') + {{ trans('modules.free') }} + @else + {!! $module->monthly_price !!} {{ trans('modules.per_month') }} + @endif +
+
+
+ +
+ + {{ trans('modules.billed_monthly') }} + +
+ +
+ + {!! trans('modules.if_paid_year', ['price' => $module->yearly_per_monthly_price]) !!} + +
+ +
+ + * {!! trans('modules.information_monthly') !!} + +
+
+
+@else +
+ +
+ {{ trans('modules.free') }} +
+
+
+@endif