Skip to content

Commit

Permalink
OI-71: Resolved merge conflict.
Browse files Browse the repository at this point in the history
  • Loading branch information
nvelychenko committed Aug 10, 2020
2 parents 6468fa0 + 8400e5f commit 82792a3
Show file tree
Hide file tree
Showing 24 changed files with 204 additions and 34 deletions.
20 changes: 20 additions & 0 deletions config/install/block.block.powered_by_navigation_footer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
langcode: en
status: true
dependencies:
module:
- openideal_footer
theme:
- openideal_theme
id: powered_by_navigation_footer
theme: openideal_theme
region: navigation_footer
weight: 0
provider: null
plugin: openidel_footer_powered_by
settings:
id: openidel_footer_powered_by
label: 'Powered by'
provider: openideal_footer
label_display: '0'
openideal_official_site: 'https://www.openidealapp.com/'
visibility: { }
2 changes: 2 additions & 0 deletions config/install/block.block.poweredby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ settings:
label: 'Powered by'
provider: openideal_footer
label_display: '0'
button_set: null
openideal_official_site: 'https://www.openidealapp.com/'
visibility: { }
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ dependencies:
- node.type.challenge
module:
- allowed_formats
- content_moderation
- entity_browser
- metatag
- openideal_challenge
Expand Down Expand Up @@ -49,7 +50,7 @@ content:
weight: 9
settings: { }
third_party_settings: { }
type: options_select
type: options_buttons
region: content
field_images:
weight: 7
Expand Down
8 changes: 2 additions & 6 deletions config/install/core.entity_form_display.node.idea.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,9 @@ content:
region: content
field_category:
weight: 10
settings:
match_operator: CONTAINS
match_limit: 10
size: 60
placeholder: ''
settings: { }
third_party_settings: { }
type: entity_reference_autocomplete
type: options_buttons
region: content
field_challenge:
weight: 8
Expand Down
10 changes: 1 addition & 9 deletions config/install/group.role.idea-author.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,10 @@ audience: member
group_type: idea
permissions_ui: true
permissions:
- 'access content overview'
- 'access group_node overview'
- 'administer members'
- 'create group_node:idea content'
- 'create group_node:idea entity'
- 'delete any group_node:idea entity'
- 'delete own group_node:idea entity'
- 'update any group_node:idea content'
- 'update any group_node:idea entity'
- 'update own group_node:idea content'
- 'update own group_node:idea entity'
- 'view group'
- 'view group_membership content'
- 'view group_node:idea content'
- 'view group_node:idea entity'
- 'view unpublished group_node:idea entity'
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
twitter: ''
github: 'https://github.com/istolar/openideal_distribution'
openideal_official_site: 'https://www.openidealapp.com'
2 changes: 2 additions & 0 deletions config/install/openideal_theme.settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,5 @@ bootstrap_barrio_table_hover: 0
bootstrap_barrio_table_head: ''
bootstrap_barrio_region_clean_mobile_share: 1
bootstrap_barrio_region_class_mobile_share: ''
bootstrap_barrio_region_clean_navigation_footer: 1
bootstrap_barrio_region_class_navigation_footer: ''
4 changes: 2 additions & 2 deletions config/install/views.view.challenges.yml
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ display:
type: image
settings:
image_style: thumbnail
image_link: ''
image_link: content
group_column: ''
group_columns: { }
group_rows: true
Expand Down Expand Up @@ -671,7 +671,7 @@ display:
click_sort_column: target_id
type: entity_reference_label
settings:
link: false
link: true
group_column: target_id
group_columns: { }
group_rows: true
Expand Down
2 changes: 1 addition & 1 deletion config/install/views.view.group_members.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ display:
access:
type: group_permission
options:
group_permission: 'administer members'
group_permission: 'view group'
cache:
type: tag
options: { }
Expand Down
100 changes: 100 additions & 0 deletions config/install/views.view.ideas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ dependencies:
- field.storage.node.field_challenge
- field.storage.node.field_idea_phase
- field.storage.node.field_idea_tags
- field.storage.node.field_like
- field.storage.user.field_first_name
- field.storage.user.field_last_name
- field.storage.user.user_picture
Expand All @@ -15,9 +16,12 @@ dependencies:
- image.style.thumbnail
- node.type.idea
- system.menu.main
- taxonomy.vocabulary.categories
- taxonomy.vocabulary.idea_lifecycle_phase
- taxonomy.vocabulary.tags
module:
- better_exposed_filters
- content_moderation
- flag
- image
- node
Expand All @@ -26,6 +30,7 @@ dependencies:
- text
- user
- votingapi
- votingapi_reaction
id: ideas
label: Ideas
module: views
Expand Down Expand Up @@ -958,6 +963,100 @@ display:
title: title
body: body
plugin_id: combine
field_category_target_id:
id: field_category_target_id
table: node__field_category
field: field_category_target_id
relationship: none
group_type: group
admin_label: ''
operator: or
value: { }
group: 1
exposed: true
expose:
operator_id: field_category_target_id_op
label: Category
description: ''
use_operator: false
operator: field_category_target_id_op
operator_limit_selection: false
operator_list: { }
identifier: field_category_target_id
required: false
remember: false
multiple: false
remember_roles:
authenticated: authenticated
anonymous: '0'
administrator: '0'
reduce: false
is_grouped: false
group_info:
label: ''
description: ''
identifier: ''
optional: true
widget: select
multiple: false
remember: false
default_group: All
default_group_multiple: { }
group_items: { }
reduce_duplicates: false
type: select
limit: true
vid: categories
hierarchy: false
error_message: true
plugin_id: taxonomy_index_tid
field_idea_tags_target_id:
id: field_idea_tags_target_id
table: node__field_idea_tags
field: field_idea_tags_target_id
relationship: none
group_type: group
admin_label: ''
operator: or
value: { }
group: 1
exposed: true
expose:
operator_id: field_idea_tags_target_id_op
label: Tags
description: ''
use_operator: false
operator: field_idea_tags_target_id_op
operator_limit_selection: false
operator_list: { }
identifier: field_idea_tags_target_id
required: false
remember: false
multiple: false
remember_roles:
authenticated: authenticated
anonymous: '0'
administrator: '0'
reduce: false
is_grouped: false
group_info:
label: ''
description: ''
identifier: ''
optional: true
widget: select
multiple: false
remember: false
default_group: All
default_group_multiple: { }
group_items: { }
reduce_duplicates: false
type: select
limit: true
vid: tags
hierarchy: false
error_message: true
plugin_id: taxonomy_index_tid
defaults:
filters: false
filter_groups: false
Expand Down Expand Up @@ -1559,6 +1658,7 @@ display:
- url.query_args
- 'url.query_args:sort_by'
- 'url.query_args:sort_order'
- user
- 'user.node_grants:view'
- user.permissions
tags:
Expand Down
1 change: 1 addition & 0 deletions modules/openideal_footer/openideal_footer.module
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ function openideal_footer_theme() {
'variables' => [
'links' => NULL,
'logo' => NULL,
'site_url' => NULL,
],
],
];
Expand Down
2 changes: 1 addition & 1 deletion modules/openideal_footer/openideal_footer.routing.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openideal_footer.openideal_footer_links_config_form:
path: '/admin/config/openideal_footer/social_configuration'
defaults:
_form: '\Drupal\openideal_footer\Form\OpenidealFooterLinksConfigForm'
_form: '\Drupal\openideal_footer\Form\OpenidealFooterConfigForm'
_title: 'OpenideaL Social Links Configuration'
requirements:
_permission: 'administer site configuration'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
use Drupal\Core\Form\FormStateInterface;

/**
* Class OpenidealFooterLinksConfigForm.
* Class OpenidealFooterConfigForm.
*/
class OpenidealFooterLinksConfigForm extends ConfigFormBase {
class OpenidealFooterConfigForm extends ConfigFormBase {

/**
* Default social links.
Expand All @@ -18,6 +18,11 @@ class OpenidealFooterLinksConfigForm extends ConfigFormBase {
const TWITTER = '';
const GITHUB = 'https://github.com/istolar/openideal_distribution';

/**
* The openideal official site.
*/
const OPENIDEAL_OFFICIAL_SITE = 'https://www.openidealapp.com/';

/**
* {@inheritdoc}
*/
Expand Down Expand Up @@ -54,6 +59,12 @@ public function buildForm(array $form, FormStateInterface $form_state) {
'#default_value' => $config->get('github') ?? self::GITHUB,
];

$form['openideal_official_site'] = [
'#type' => 'textfield',
'#title' => $this->t('Openideal official site'),
'#default_value' => $config->get('openideal_official_site') ?? self::OPENIDEAL_OFFICIAL_SITE,
];

return parent::buildForm($form, $form_state);
}

Expand All @@ -66,6 +77,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
$this->config('openideal_footer.openideal_footer_links_config')
->set('twitter', $form_state->getValue('twitter'))
->set('github', $form_state->getValue('github'))
->set('openideal_official_site', $form_state->getValue('openideal_official_site'))
->save();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function __construct(array $configuration,
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
return new static($configuration, $plugin_id, $plugin_definition,
$container->get('theme_handler'),
$container->get('config.factory'),
$container->get('config.factory')
);
}

Expand All @@ -66,6 +66,7 @@ public function build() {
$base_theme_path = base_path() . $path;
return [
'#theme' => 'openideal_powered_by',
'#site_url' => $config->get('openideal_official_site'),
'#logo' => $base_theme_path . '/misc/icons/logo_openideal.png',
'#links' => [
'github' => [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<div class="site-footer--wrapper">
<div class="site-footer--powered-by">
{{ 'Powered by'|t }}
<span class="site-footer--powered-by__drupal">
{{ 'OpenideaL'|t }}
</span>
<img src="{{ logo }}" alt="logo">
<a href="{{ site_url }}">
{{ 'Powered by'|t }}
<span class="site-footer--powered-by__drupal">
{{ 'OpenideaL'|t }}
</span>
<img src="{{ logo }}" alt="logo">
</a>
</div>
<div class="site-footer--links">
{% for link in links %}
Expand Down
2 changes: 1 addition & 1 deletion modules/openideal_idea/openideal_idea.module
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ function openideal_idea_menu_local_tasks_alter(&$data, $route_name, RefinableCac
'url' => Url::fromRoute('view.group_members.page_1', ['group' => $group->id()]),
'localized_options' => [],
],
'#access' => $group->hasPermission('administer members', \Drupal::currentUser()),
'#access' => $group->hasPermission('view group_membership content', \Drupal::currentUser()),
];

// The tab we're adding is dependent on a user's access to add content.
Expand Down
10 changes: 9 additions & 1 deletion themes/openideal_theme/css/style.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion themes/openideal_theme/css/style.min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions themes/openideal_theme/openideal_theme.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ libraries-override:
regions:
logo: 'Site logo'
navigation: 'Navigation'
navigation_footer: 'Navigation Footer'
user: 'User info'
highlighted: Highlighted
featured_top: 'Featured top'
Expand Down
2 changes: 1 addition & 1 deletion themes/openideal_theme/openideal_theme.libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ global-styling:
css:
component:
'//fonts.googleapis.com/css2?family=Assistant:wght@300;400;600;700&family=Roboto&display=swap': { type: external, minified: true }
css/style.css: {}
css/style.min.css: {}
dependencies:
- core/jquery
- core/drupal
Expand Down
10 changes: 10 additions & 0 deletions themes/openideal_theme/scss/regions/_footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@
align-items: center;
justify-content: center;
flex-direction: column;

a {
color: inherit;
font-size: inherit;

&:hover {
color: inherit;
text-decoration: none;
}
}
}

&--links {
Expand Down
Loading

0 comments on commit 82792a3

Please sign in to comment.