diff --git a/assets/javascripts/discourse/components/product-list.js.es6 b/assets/javascripts/discourse/components/product-list.js.es6
index 99d7ab1..bcf1d9d 100644
--- a/assets/javascripts/discourse/components/product-list.js.es6
+++ b/assets/javascripts/discourse/components/product-list.js.es6
@@ -4,6 +4,7 @@ import { isEmpty } from "@ember/utils";
import Component from "@ember/component";
export default Component.extend({
+ classNames: ["product-list"],
@discourseComputed("products")
emptyProducts(products) {
return isEmpty(products);
diff --git a/assets/javascripts/discourse/templates/components/product-list.hbs b/assets/javascripts/discourse/templates/components/product-list.hbs
index d29c018..0734a78 100644
--- a/assets/javascripts/discourse/templates/components/product-list.hbs
+++ b/assets/javascripts/discourse/templates/components/product-list.hbs
@@ -5,15 +5,20 @@
{{product.name}}
-
+
{{product.description}}
{{#if isLoggedIn}}
-
- {{#link-to "s.show" product.id disabled=product.subscribed class="btn btn-primary"}}
- {{i18n 'discourse_subscriptions.subscribe.title'}}
- {{/link-to}}
+
+ {{#if product.subscribed}}
+
✓ {{i18n 'discourse_subscriptions.subscribe.purchased'}}
+
{{I18n 'discourse_subscriptions.subscribe.go_to_billing'}}
+ {{else}}
+ {{#link-to "s.show" product.id disabled=product.subscribed class="btn btn-primary"}}
+ {{i18n 'discourse_subscriptions.subscribe.title'}}
+ {{/link-to}}
+ {{/if}}
{{/if}}
diff --git a/assets/javascripts/discourse/templates/s/index.hbs b/assets/javascripts/discourse/templates/s/index.hbs
index b5c9636..c152336 100644
--- a/assets/javascripts/discourse/templates/s/index.hbs
+++ b/assets/javascripts/discourse/templates/s/index.hbs
@@ -1,4 +1 @@
-
-
- {{product-list products=model}}
-
+{{product-list products=model}}
diff --git a/assets/stylesheets/common/layout.scss b/assets/stylesheets/common/layout.scss
index dc98ae6..1c9d259 100644
--- a/assets/stylesheets/common/layout.scss
+++ b/assets/stylesheets/common/layout.scss
@@ -35,9 +35,32 @@
}
}
-#product-list {
- padding: 40px 120px;
+.product-list {
+ display: flex;
+ flex-flow: row wrap;
+ justify-content: center;
+
.product {
- margin-bottom: 60px;
+ display: flex;
+ flex-flow: column nowrap;
+ border: 1px solid $primary-low;
+ padding: 1.5rem;
+ margin: 1rem;
+ width: calc(50% - 240px);
+
+ .product-description {
+ flex-grow: 1;
+ }
+ .product-purchase {
+ align-self: baseline;
+ display: flex;
+ flex-flow: column nowrap;
+ .purchased {
+ color: $success;
+ }
+ .billing-link {
+ font-size: $font-down-1;
+ }
+ }
}
}
diff --git a/assets/stylesheets/mobile/main.scss b/assets/stylesheets/mobile/main.scss
index e69de29..88b5a2b 100644
--- a/assets/stylesheets/mobile/main.scss
+++ b/assets/stylesheets/mobile/main.scss
@@ -0,0 +1,8 @@
+.mobile-view {
+ .product-list {
+ flex-flow: column nowrap;
+ .product {
+ width: unset;
+ }
+ }
+}
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml
index 535b496..3235b67 100644
--- a/config/locales/client.en.yml
+++ b/config/locales/client.en.yml
@@ -64,6 +64,8 @@ en:
title: Customer Details
buttons:
subscribe: Subscribe
+ purchased: Purchased
+ go_to_billing: Go to Billing
billing:
name: Full name
email: Email