Skip to content
This repository has been archived by the owner on Jul 8, 2022. It is now read-only.

Commit

Permalink
Merge pull request #8 from fivejars/master
Browse files Browse the repository at this point in the history
Small fixes
  • Loading branch information
anpolimus authored Jul 21, 2020
2 parents 088bbe2 + 636cb5a commit eabee17
Show file tree
Hide file tree
Showing 16 changed files with 4,291 additions and 29 deletions.
30 changes: 27 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ In order to use it you have to install Docksal.
Follow the instruction below to get the working local environment that provides
4 local websites (1 for each base theme and not yet installed Open Y):

```text
```shell script
mkdir vymca
cd vymca
git clone --branch openy-gc-builds \
Expand All @@ -59,11 +59,35 @@ for drupal core:
* _patches/OEmbed\_vimeo\_private\_videos.patch_


### JSON API patch required for Drupal 8.7

```json
{
"extra": {
"patches": {
"drupal/core": {
"JSONAPI wont install (8.7-specific)": "https://www.drupal.org/files/issues/2019-05-23/jsonapi_2996114.patch"
}
}
}
}
```

### Migration notes
If you have error:
```
TypeError: Argument 6 passed to __construct() must be an instance of EntityTypeManagerInterface
```
apply patch:
apply patch to composer.json:
```json
{
"extra": {
"patches": {
"drupal/paragraphs": {
"3079627": "https://www.drupal.org/files/issues/2019-09-06/3079627-4.paragraphs.Argument-6-passed-to-construct.patch"
}
}
}
}
```

* _patches/3079627-4.paragraphs.Argument-6-passed-to-construct.patch_
2 changes: 1 addition & 1 deletion SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
``# Table of contents
# Table of contents

* [Open Y Virtual Y content](README.md)
* [modules](modules/README.md)
Expand Down
2 changes: 1 addition & 1 deletion js/gated-content/dist/gated-content.css

Large diffs are not rendered by default.

4,208 changes: 4,190 additions & 18 deletions js/gated-content/dist/gated-content.umd.min.js

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions js/gated-content/src/components/auth/DaxkoSSO.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,20 @@ export default {
data() {
return {
error: '',
loading: true,
};
},
created() {
this.$store.commit('setLoading', true);
},
computed: {
loading() {
return this.$store.state.authDaxkoSSO.loading;
},
},
async mounted() {
await this.$store
.dispatch('daxkossoAuthorize')
.then(() => {
this.loading = false;
this.$router.push({ name: 'Home' }).catch(() => {});
})
.catch((error) => {
Expand Down
3 changes: 1 addition & 2 deletions js/gated-content/src/components/auth/DummyAuth.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
<Spinner></Spinner>
</div>
<template v-else>
<button @click.prevent="dummyLogin">Login!</button>
<pre>config: {{ config }}</pre>
<button class="gc-button" @click.prevent="dummyLogin">Enter Virtual YMCA</button>
</template>
</div>
</template>
Expand Down
2 changes: 1 addition & 1 deletion js/gated-content/src/components/blog/BlogListing.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export default {
if (this.featuredLocal) {
params.filter.field_gc_video_featured = 1;
}
params.filter.status = 1;
if (this.limit !== 0) {
params.page = {
limit: this.limit,
Expand Down
1 change: 1 addition & 0 deletions js/gated-content/src/components/event/EventListing.vue
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ export default {
params.filter.field_ls_featured = 1;
}
params.filter.status = 1;
params.sort = {
sortByDate: {
path: 'date.value',
Expand Down
2 changes: 1 addition & 1 deletion js/gated-content/src/components/video/VideoListing.vue
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export default {
if (this.featuredLocal) {
params.filter.field_gc_video_featured = 1;
}
params.filter.status = 1;
if (this.limit !== 0) {
params.page = {
limit: this.limit,
Expand Down
1 change: 1 addition & 0 deletions js/gated-content/src/scss/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

@import "variables";
@import "widgets/video-level";
@import "widgets/button";
@import "components/video-listing";
@import "components/video-teaser";
@import "components/event-teaser";
Expand Down
12 changes: 12 additions & 0 deletions js/gated-content/src/scss/widgets/button.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.gc-button {
display: block;
border: none;
background-color: $dark-blue;
color: $white;
text-transform: uppercase;
padding: 10px 20px;
border-radius: 5px;
margin-left: auto;
margin-right: auto;
margin-top: 20px;
}
5 changes: 5 additions & 0 deletions js/gated-content/src/store/modules/auth/daxkosso.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import client from '@/client';
export default {
state: {
config: null,
loading: false,
},
actions: {
async daxkossoAuthorize(context) {
Expand All @@ -18,6 +19,7 @@ export default {
context.dispatch('authorize', result.data.user);
}
});
context.commit('setLoading', false);
} else {
// Redirect user if session is not started and there are no token in get.
window.location = context.getters.getDaxkoSSOConfig.login_url;
Expand All @@ -36,6 +38,9 @@ export default {
setDaxkoSSOConfig(state, config) {
state.config = config;
},
setLoading(state, value) {
state.loading = value;
},
},
getters: {
getDaxkoSSOConfig: (state) => state.config,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ source:
-
header_content_id: virtual_y_banner_top
content:
-
content_id: wherever_you_go_y_is_there
-
content_id: virtual_y_landing_page_login_app
bottom_content:
Expand Down Expand Up @@ -107,12 +109,14 @@ process:
target_id:
plugin: migration
migration:
- virtual_y_paragraph_simple_content
- virtual_y_paragraph_gated_content
- virtual_y_paragraph_gated_content_login
source: content_id
target_revision_id:
plugin: migration
migration:
- virtual_y_paragraph_simple_content
- virtual_y_paragraph_gated_content
- virtual_y_paragraph_gated_content_login
source: content_id
Expand Down Expand Up @@ -141,4 +145,5 @@ migration_dependencies:
- virtual_y_paragraph_small_banner
- virtual_y_paragraph_gated_content
- virtual_y_paragraph_gated_content_login
- virtual_y_paragraph_simple_content
optional: { }
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
langcode: en
status: true
dependencies:
enforced:
module:
- openy_gc_demo
id: virtual_y_paragraph_simple_content
migration_tags: { }
migration_group: virtual_y
label: 'Create simple content paragraph(s) for Virtual Y'
source:
plugin: embedded_data
data_rows:
-
id: wherever_you_go_y_is_there
field_prgf_description_value: |
<p class="text-align-center">&nbsp;</p>
<h1 class="text-align-center">Access from anywhere, anytime</h1>
<p class="text-align-center"><strong>Enter your email address below
to access exclusive content made for you.</strong></p>
<p class="text-align-center"><strong>Not a member? Join today to
start experiencing the power of Virtual YMCA.</strong></p>
<p class="text-align-center">&nbsp;</p>
ids:
id:
type: string
process:
field_prgf_description/value: field_prgf_description_value
field_prgf_description/format:
plugin: default_value
default_value: full_html
destination:
plugin: 'entity:paragraph'
default_bundle: simple_content
1 change: 1 addition & 0 deletions modules/openy_gc_demo/openy_gc_demo.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ version: 0.1
core: 8.x
dependencies:
- drupal:migrate
- drupal:openy_migrate
- migrate_plus:migrate_plus
- migrate_tools:migrate_tools
- drupal:openy_demo_tcolor
Expand Down
2 changes: 2 additions & 0 deletions src/Controller/CategoriesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ public static function create(ContainerInterface $container) {
public function list() {
$query = $this->database->select('node__field_gc_video_category', 'n');
$query->leftJoin('taxonomy_term_data', 't', 't.tid = n.field_gc_video_category_target_id');
$query->leftJoin('taxonomy_term_field_data', 'tf', 't.tid = tf.tid');
$query->condition('t.vid', 'gc_category');
$query->condition('tf.status', 1);
$query->fields('t', ['uuid']);
$query->distinct(TRUE);
$result = $query->execute()->fetchCol();
Expand Down

0 comments on commit eabee17

Please sign in to comment.