Commit df72e05b authored by Sergey Shadrin's avatar Sergey Shadrin

[#124455] Added modules from Drupal CMS

parent dc530c14

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

......@@ -21,11 +21,15 @@
"require": {
"composer/installers": "^2.0",
"cweagans/composer-patches": "^1.7",
"drupal/add_content_by_bundle": "^1.2",
"drupal/address": "^2.0",
"drupal/addtocal_augment": "^1.2",
"drupal/admin_toolbar": "^3.6",
"drupal/backup_migrate": "^5.0",
"drupal/better_exposed_filters": "^7.0",
"drupal/blazy": "^3.0",
"drupal/bootstrap": "^3.35",
"drupal/bpmn_io": "^3.0",
"drupal/captcha": "^2.0",
"drupal/charts": "^5.1",
"drupal/ckeditor5_plugin_pack": "^1.3",
......@@ -41,11 +45,15 @@
"drupal/crop": "^2.4",
"drupal/csv_serialization": "^4.0",
"drupal/ctools": "^4.1",
"drupal/dashboard": "^2.0",
"drupal/devel": "^5.4",
"drupal/dropzonejs": "^2.11",
"drupal/dynamic_entity_reference": "^3.2",
"drupal/easy_email": "^3.0",
"drupal/eca": "^3.0",
"drupal/eck": "^2.1@beta",
"drupal/editor_advanced_link": "^2.2",
"drupal/editoria11y": "^2.2",
"drupal/embed": "^1.10",
"drupal/entity_browser": "^2.13",
"drupal/entity_embed": "^1.7",
......@@ -57,11 +65,15 @@
"drupal/flag": "^4.0@beta",
"drupal/flood_control": "^3.0",
"drupal/focal_point": "^2.1",
"drupal/geocoder": "^4.30",
"drupal/geofield": "^1.65",
"drupal/gin": "^3.0@RC",
"drupal/honeypot": "^2.2",
"drupal/imagick": "^1.12",
"drupal/inline_entity_form": "^3.0@RC",
"drupal/jquery_ui": "^1.7",
"drupal/klaro": "^3.0",
"drupal/leaflet": "^10.3",
"drupal/linkit": "^7.0",
"drupal/mailsystem": "^4.5",
"drupal/matomo": "^2.0@alpha",
......@@ -72,6 +84,7 @@
"drupal/media_gallery": "^3.0",
"drupal/menu_admin_per_menu": "^1.6",
"drupal/menu_item_extras": "^3.1",
"drupal/menu_link_attributes": "^1.5",
"drupal/menu_per_role": "^1.8",
"drupal/metatag": "^2.1",
"drupal/mobile_detect": "^4.0",
......@@ -85,12 +98,13 @@
"drupal/poll": "^2.0@alpha",
"drupal/rabbit_hole": "^1.0",
"drupal/rdf": "^3.0@beta",
"drupal/redirect": "^1.11",
"drupal/redirect": "^1.12",
"drupal/replicate": "^1.3",
"drupal/replicate_ui": "^1.2",
"drupal/restrict_ip": "^5.0",
"drupal/restui": "^1.22",
"drupal/route_condition": "^2.0",
"drupal/sam": "^1.3",
"drupal/scheduler": "^2.2",
"drupal/seckit": "^2.0",
"drupal/security_review": "^3.1",
......@@ -117,6 +131,7 @@
"drupal/time_field": "^2.2",
"drupal/token": "^1.15",
"drupal/translatable_config_pages": "^1.0",
"drupal/trash": "^3.0",
"drupal/twig_attributes": "^2.0",
"drupal/twig_field_value": "^2.0",
"drupal/twig_tweak": "^3.4",
......
This diff is collapsed.
BSD 3-Clause License
Copyright (c) 2019-2020, KIProtect GmbH
Copyright (c) various authors obtainable by running `git shortlog -nse` or
visiting https://github.com/KIProtect/klaro/graphs/contributors
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Klaro Distribution Files
These files are transpiled from the `src` folder, you can integrate them into your website. The following
files are available for download:
* [klaro.js](klaro.js): Minified version of Klaro, CSS included.
* [klaro-no-css.js](klaro-no-css.js): Minified version of Klaro, CSS **not** included.
* [klaro.css](klaro.css): Non-minified CSS (useful if you want to modify it yourself).
* [klaro.min.css](klaro.min.css): Minified CSS.
If you want to use Klaro with its existing styles (which you can still overwrite with more specific rules)
simply download and include [klaro.js](klaro.js). If you want to define your own styles from scratch, simply
download and include [klaro-no-css.js](klaro-no-css.js).
{
"name": "drupal/klaro_js",
"description": "Mirror of the Klaro consent manager javascript library tagged as a Drupal library.",
"type": "drupal-library",
"homepage": "https://github.com/klaro-org/klaro-js/",
"license": "BSD-3-Clause",
"extra": {
"installer-name": "klaro",
"upstream-version": "v0.7.22"
}
}
# Klaro Distribution Files
These files are transpiled from the `src` folder, you can integrate them into your website. The following
files are available for download:
* [klaro.js](klaro.js): Minified version of Klaro, CSS included.
* [klaro-no-css.js](klaro-no-css.js): Minified version of Klaro, CSS **not** included.
* [klaro.css](klaro.css): Non-minified CSS (useful if you want to modify it yourself).
* [klaro.min.css](klaro.min.css): Minified CSS.
If you want to use Klaro with its existing styles (which you can still overwrite with more specific rules)
simply download and include [klaro.js](klaro.js). If you want to define your own styles from scratch, simply
download and include [klaro-no-css.js](klaro-no-css.js).
This source diff could not be displayed because it is too large. You can view the blob instead.
// The following code is based off a toggle menu by @Bradcomp
// source: https://gist.github.com/Bradcomp/a9ef2ef322a8e8017443b626208999c1
(function() {
var burger = document.querySelector('.burger');
var menu = document.querySelector('#'+burger.getAttribute('data-target'));
burger.addEventListener('click', function() {
burger.classList.toggle('is-active');
menu.classList.toggle('is-active');
});
})();
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
/* PrismJS 1.14.0
http://prismjs.com/download.html#themes=prism-tomorrow&languages=markup+css+clike+javascript+bash */
/**
* prism.js tomorrow night eighties for JavaScript, CoffeeScript, CSS and HTML
* Based on https://github.com/chriskempson/tomorrow-theme
* @author Rose Pritchard
*/
code[class*="language-"],
pre[class*="language-"] {
color: #ccc;
background: none;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
/* Code blocks */
pre[class*="language-"] {
padding: 1em;
margin: .5em 0;
overflow: auto;
}
:not(pre) > code[class*="language-"],
pre[class*="language-"] {
background: #2d2d2d;
}
/* Inline code */
:not(pre) > code[class*="language-"] {
padding: .1em;
border-radius: .3em;
white-space: normal;
}
.token.comment,
.token.block-comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: #999;
}
.token.punctuation {
color: #ccc;
}
.token.tag,
.token.attr-name,
.token.namespace,
.token.deleted {
color: #e2777a;
}
.token.function-name {
color: #6196cc;
}
.token.boolean,
.token.number,
.token.function {
color: #f08d49;
}
.token.property,
.token.class-name,
.token.constant,
.token.symbol {
color: #f8c555;
}
.token.selector,
.token.important,
.token.atrule,
.token.keyword,
.token.builtin {
color: #cc99cd;
}
.token.string,
.token.char,
.token.attr-value,
.token.regex,
.token.variable {
color: #7ec699;
}
.token.operator,
.token.entity,
.token.url {
color: #67cdcc;
}
.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
.token.entity {
cursor: help;
}
.token.inserted {
color: green;
}
This diff is collapsed.
.container {
padding-top: 10px;
margin-bottom: 20px;
}
.camera {
position: fixed;
opacity: 0.7;
display: block;
top: 60px;
right: 28px;
z-index: 1000;
width: 40px;
border-radius: 5px;
}
.wiggle .cookie-notice .cn-body {
animation: shake 0.4s;
animation-iteration-count: 1;
}
@keyframes shake {
0% { transform: translate(0px, 0px) rotate(0deg); }
1% { transform: translate(1px, 1px) rotate(0deg); }
10% { transform: translate(-1px, -2px) rotate(-1deg); }
20% { transform: translate(-3px, 0px) rotate(1deg); }
30% { transform: translate(3px, 2px) rotate(0deg); }
40% { transform: translate(1px, -1px) rotate(1deg); }
50% { transform: translate(-1px, 2px) rotate(-1deg); }
60% { transform: translate(-3px, 1px) rotate(0deg); }
70% { transform: translate(3px, 1px) rotate(-1deg); }
80% { transform: translate(-1px, -1px) rotate(1deg); }
90% { transform: translate(1px, 2px) rotate(0deg); }
100% { transform: translate(1px, -2px) rotate(-1deg); }
}
@media(min-width: 768px){
section {
margin-bottom: 20px;
}
.container h1.title, .container h2.subtitle {
margin-top: 40px;
margin-bottom: 40px;
}
}
.container h2.subtitle {
padding-top: 20px;
padding-bottom: 8px;
border-bottom :1px solid #eee;
color: #0a4;
}
.hero-body h2.subtitle {
border-bottom: none;
}
.container p {
font-size: 18px;
}
pre {
border: 10px solid #555;
}
.button {
margin-bottom: 8px;
}
@media(max-width: 767px){
.hero-body .button {
width: 100%;
}
}
.hero-body {
padding-top: 0 !important;
padding-bottom: 0 !important;
}
.hero-body .container {
max-width: 900px;
margin-bottom: 0 !important;
padding-bottom: 0 !important;
}
.hero-body img.screenshot {
display: block;
padding-top: 20px;
}
@media(min-width: 1024px){
.hero-body img.screenshot {
max-width: 600px;
margin: 0 auto;
}
}
h1.title {
text-align: center;
padding-top: 20px;
}
.card-image.logo i {
font-size: 120px;
margin: 0 auto;
display: block;
width: 160px;
padding: 20px;
}
@media(max-width: 1088px){
.container {
padding: 10px;
}
}
.column-eq {
display: flex;
flex-direction: column;
}
.column-eq .card {
height: 100%;
}
.container.features, .container.getting-started {
margin-top: 20px;
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
var klaroI18nConfig = {
version: 2,
cookieName: 'klaro-i18n',
elementID: 'klaro',
lang: 'en',
default: true,
noNotice: true,
poweredBy:
'https://github.com/KIProtect/klaro/blob/master/dist/configs/i18n.js',
translations: {
// these values will overwrite the defaults. For a full list, have a look
// at the `src/translations` directory of this repo:
// https://github.com/KIProtect/klaro/tree/master/src/translations
zz: {
privacyPolicyUrl: '/#privacy',
},
de: {
privacyPolicyUrl: '/#datenschutz',
consentModal: {
title: 'Dies ist der Titel des Zustimmungs-Dialogs',
description:
'Dies ist die Beschreibung des Zustimmungs-Dialogs.',
privacyPolicy: {
text:
'Dies ist der Text mit einem Link zu Ihrer {privacyPolicy}.',
name: 'Datenschutzerklärung (Name)',
},
},
poweredBy: 'Konfiguration ansehen',
ok: "Los geht's!",
purposes: {
analytics: 'Besucher-Statistiken',
security: 'Sicherheit',
livechat: 'Live-Chat',
advertisting: 'Anzeigen von Werbung',
},
googleAnalytics: {
description: 'Sammeln von Besucherstatistiken',
},
mouseflow: {
description: 'Echtzeit-Benutzeranalyse',
},
},
en: {
consentModal: {
title: 'This is the title of the consent modal',
description: 'This is the description of the consent modal.',
privacyPolicy: {
text: 'This is the text with a link to your {privacyPolicy}.',
name: 'privacy policy (the name)',
},
},
poweredBy: 'view config',
ok: 'Wohoo!',
purposes: {
analytics: 'Analytics',
security: 'Security',
livechat: 'Livechat',
},
googleAnalytics: {
description: 'Collection of visitor statistics',
},
mouseflow: {
description: 'Real-time user analytics',
},
},
},
services: [
{
name: 'googleAnalytics',
title: 'Google Analytics',
purposes: ['analytics'],
},
{
name: 'mouseflow',
title: 'Mouseflow',
purposes: ['analytics'],
},
],
};
// By default, Klaro will load the config from a global "klaroConfig" variable.
// You can change this by specifying the "data-config" attribute on your
// script take, e.g. like this:
// <script src="klaro.js" data-config="myConfigVariableName" />
var klaroConfig = {
acceptAll: true,
translations: {
},
services: [
{
name: 'google-tag-manager',
required: true,
purposes: ['marketing', 'functional'],
manages: ['google-analytics'],
onAccept: `
// we notify the tag manager about all services that were accepted. You can define
// a custom event in GTM to load the service if consent was given.
for(let k of Object.keys(opts.consents)){
if (opts.consents[k]){
let eventName = 'klaro-'+k+'-accepted'
dataLayer.push({'event': eventName})
}
}
// if consent for Google Analytics was granted we enable analytics storage
if (opts.consents[opts.vars.googleAnalyticsName || 'google-analytics']){
console.log("Google analytics usage was granted")
gtag('consent', 'update', {'analytics_storage': 'granted'})
}
// if consent for Google Ads was granted we enable ad storage
if (opts.consents[opts.vars.adStorageName || 'google-ads']){
console.log("Google ads usage was granted")
gtag('consent', 'update', {'ad_storage': 'granted'})
}
`,
onInit: `
// initialization code here (will be executed only once per page-load)
window.dataLayer = window.dataLayer || [];
window.gtag = function(){dataLayer.push(arguments)}
gtag('consent', 'default', {'ad_storage': 'denied', 'analytics_storage': 'denied'})
gtag('set', 'ads_data_redaction', true)
`,
onDecline: `
// initialization code here (will be executed only once per page-load)
window.dataLayer = window.dataLayer || [];
window.gtag = function(){dataLayer.push(arguments)}
gtag('consent', 'default', {'ad_storage': 'denied', 'analytics_storage': 'denied'})
gtag('set', 'ads_data_redaction', true)
`,
vars: {
googleAnalytics: 'google-analytics'
}
},
{
// In GTM, you should define a custom event trigger named `klaro-google-analytics-accepted` which should trigger the Google Analytics integration.
name: 'google-analytics',
purposes: ['marketing'],
}
]
};
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Simple Test</title>
<!-- Google Tag Manager -->
<script data-type="application/javascript" type="text/plain" data-name="google-tag-manager">(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-MZTF9XR');</script>
<!-- End Google Tag Manager -->
<!-- here we include the Klaro config and script -->
<script defer type="text/javascript" src="gtm-config.js"></script>
<script defer type="text/javascript" src="../klaro.js"></script>
</head>
<body style="margin: 0; font-family: Arial, Helvetica, sans serif;">
<!-- Google Tag Manager (noscript) -->
<noscript><iframe data-name="google-tag-manager" data-src="https://www.googletagmanager.com/ns.html?id=GTM-MZTF9XR"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<div style="padding: 10px;">
<h1>Google Tag Manager Example</h1>
<p>
This is an example that shows how to use Klaro with Google Tag Manager.
</p>
<p>
You can review and update your consents by clicking <a href="" onClick="return klaro.show(klaroConfig, true)">here</a>.
</p>
<p>
You can reset your consents by clicking <a href="" onClick="klaro.getManager().resetConsents();location.reload()">here</a>.
</p>
<p>
<!-- this is an example of an img tag managed by Klaro -->
<img data-name="camera" data-src="../assets/Surveillance-camera-small.png" />
</p>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Simple Test</title>
<!-- here we include the Klaro config and script -->
<script defer type="text/javascript" src="../config.js"></script>
<script defer type="text/javascript" src="../klaro.js"></script>
</head>
<body style="margin: 0; font-family: Arial, Helvetica, sans serif;">
<div style="padding: 10px;">
<h1>Hello, wayward Internet traveler!</h1>
<p>
This is a page that shows how to use Klaro on your website.
Just have a look at the source to see how it's done.
</p>
<p>
You can review and update your consents by clicking <a href="" onClick="return klaro.show(klaroConfig, true)">here</a>.
</p>
<p>
You can reset your consents by clicking <a href="" onClick="klaro.getManager().resetConsents();location.reload()">here</a>.
</p>
<p>
<!-- this is an example of an img tag managed by Klaro -->
<img data-name="camera" data-src="../assets/Surveillance-camera-small.png" />
</p>
</div>
<!-- here are some examples for trackers-->
<!-- an inline JS tracking script -->
<script type="text/plain" data-type="application/javascript" data-name="inlineTracker">
console.log("This is an example of an inline tracking script.")
function setCookie(name, value, days) {
var expires = "";
if (days) {
var date = new Date();
date.setTime(date.getTime() + (days*24*60*60*1000));
expires = "; expires=" + date.toUTCString();
}
document.cookie = name + "=" + (value || "") + expires + "; path=/";
}
//we set a tracking cookie as an example
setCookie("inline-tracker", "foo", 120)
</script>
<!-- an externally loaded tracker -->
<script type="text/plain" data-src="../examples/tracker.js" data-type="application/javascript" data-name="externalTracker"></script>
<!-- our (real) Matomo tracking code -->
<script type="text/plain" data-type="application/javascript" data-name="matomo">
var _paq = _paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//analytics.7scientists.com/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', '7']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='application/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<noscript><p><img data-name="matomo" data-src="//analytics.7scientists.com/piwik.php?idsite=7&rec=1" style="border:0;" alt="" /></p></noscript>
</body>
</html>
\ No newline at end of file
console.log("This is an example of an external tracking script.")
function setCookie(name, value, days) {
var expires = "";
if (days) {
var date = new Date();
date.setTime(date.getTime() + (days*24*60*60*1000));
expires = "; expires=" + date.toUTCString();
}
document.cookie = name + "=" + (value || "") + expires + "; path=/";
}
//we set a tracking cookie as an example
setCookie("external-tracker", "foo", 120)
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
################
# DrupalCI GitLabCI template
#
# Gitlab-ci.yml to replicate DrupalCI testing for Contrib
#
# With thanks to:
# * The GitLab Acceleration Initiative participants
# * DrupalSpoons
################
################
# Guidelines
#
# This template is designed to give any Contrib maintainer everything they need to test, without requiring modification. It is also designed to keep up to date with Core Development automatically through the use of include files that can be centrally maintained.
#
# However, you can modify this template if you have additional needs for your project.
################
################
# Includes
#
# Additional configuration can be provided through includes.
# One advantage of include files is that if they are updated upstream, the changes affect all pipelines using that include.
#
# Includes can be overridden by re-declaring anything provided in an include, here in gitlab-ci.yml
# https://docs.gitlab.com/ee/ci/yaml/includes.html#override-included-configuration-values
################
include:
################
# DrupalCI includes:
# As long as you include this, any future includes added by the Drupal Association will be accessible to your pipelines automatically.
# View these include files at https://git.drupalcode.org/project/gitlab_templates/
################
- project: $_GITLAB_TEMPLATES_REPO
ref: $_GITLAB_TEMPLATES_REF
file:
- '/includes/include.drupalci.main.yml'
- '/includes/include.drupalci.variables.yml'
- '/includes/include.drupalci.workflows.yml'
################
# Pipeline configuration variables
#
# These are the variables provided to the Run Pipeline form that a user may want to override.
#
# Docs at https://git.drupalcode.org/project/gitlab_templates/-/blob/1.0.x/includes/include.drupalci.variables.yml
################
variables:
OPT_IN_TEST_PREVIOUS_MAJOR: 1
OPT_IN_TEST_PREVIOUS_MINOR: 1
OPT_IN_TEST_NEXT_MINOR: 1
###################################################################################
#
# *
# /(
# ((((,
# /(((((((
# ((((((((((*
# ,(((((((((((((((
# ,(((((((((((((((((((
# ((((((((((((((((((((((((*
# *(((((((((((((((((((((((((((((
# ((((((((((((((((((((((((((((((((((*
# *(((((((((((((((((( .((((((((((((((((((
# ((((((((((((((((((. /(((((((((((((((((*
# /((((((((((((((((( .(((((((((((((((((,
# ,(((((((((((((((((( ((((((((((((((((((
# .(((((((((((((((((((( .(((((((((((((((((
# ((((((((((((((((((((((( ((((((((((((((((/
# (((((((((((((((((((((((((((/ ,(((((((((((((((*
# .((((((((((((((/ /(((((((((((((. ,(((((((((((((((
# *(((((((((((((( ,(((((((((((((/ *((((((((((((((.
# ((((((((((((((, /(((((((((((((. ((((((((((((((,
# (((((((((((((/ ,(((((((((((((* ,(((((((((((((,
# *((((((((((((( .((((((((((((((( ,(((((((((((((
# ((((((((((((/ /((((((((((((((((((. ,((((((((((((/
# ((((((((((((( *(((((((((((((((((((((((* *((((((((((((
# ((((((((((((( ,(((((((((((((..((((((((((((( *((((((((((((
# ((((((((((((, /((((((((((((* /((((((((((((/ ((((((((((((
# ((((((((((((( /((((((((((((/ (((((((((((((* ((((((((((((
# (((((((((((((/ /(((((((((((( ,((((((((((((, *((((((((((((
# (((((((((((((( *(((((((((((/ *((((((((((((. ((((((((((((/
# *((((((((((((((((((((((((((, /(((((((((((((((((((((((((
# ((((((((((((((((((((((((( ((((((((((((((((((((((((,
# .(((((((((((((((((((((((/ ,(((((((((((((((((((((((
# ((((((((((((((((((((((/ ,(((((((((((((((((((((/
# *((((((((((((((((((((( (((((((((((((((((((((,
# ,(((((((((((((((((((((, ((((((((((((((((((((/
# ,(((((((((((((((((((((* /((((((((((((((((((((
# ((((((((((((((((((((((, ,/((((((((((((((((((((,
# ,(((((((((((((((((((((((((((((((((((((((((((((((((((
# .(((((((((((((((((((((((((((((((((((((((((((((
# .((((((((((((((((((((((((((((((((((((,.
# .,(((((((((((((((((((((((((.
#
###################################################################################
\ No newline at end of file
This diff is collapsed.
CONTENTS OF THIS FILE
---------------------
* Introduction
* Requirements
* Installation
* Configuration
* Maintainers
INTRODUCTION
------------
This module improves on core's "Empty Node Frontpage behavior" area plugin
(used in headers and footers) when used on views that show a restrictive set of
content types (e.g. one or two) by allowing a site builder to add links that
point directly to one or more forms to add content, of a specific content type
or bundle. You can also specify a class, for example to format as a button. If
you have the Form Module Control module installed, this module will also allow
you to choose a form mode to use.
The intent is to make overall site maintenance easier by providing relevant and
intuitive editorial links in context.
INSTALLATION
------------
* Install this module as you would normally install a contributed Drupal
module. Visit https://www.drupal.org/node/1897420 for further information.
REQUIREMENTS
------------
This module requires no modules outside of Drupal core.
CONFIGURATION
-------------
* To use this module, add a new element to the Header or Footer of your view.
Look for Add Content by Bundle link. Click the checkbox and click apply to
add the element.
* In the configuration screen, you have the option to specify:
- If the link should display even if the view has no results.
- Which bundle (content type, for nodes) the link should be to create.
Note that it is possible to add multiple buttons, so if your view
includes content from multiple bundles, you can add a button for each.
- The label text for the link.
- One or more CSS classes to apply to the link. The "button" class is
recommended, as this will style the link as a button, consistent with
many other actions in the Drupal interface.
- Target, whether to show the form in a separate page, or overlaid on the
view as a modal or off-screen dialog.
- If a modal or dialog is chosen, the width in pixels for the overlay.
- If the Form Mode Control module is installed and the entity type (e.g.
nodes) has more than one form mode available, you will also see an option
to specify a form mode.
MAINTAINERS
-----------
* Current Maintainer: Martin Anderson-Clutz (mandclu) - https://www.drupal.org/u/mandclu
name: 'Add Content by Bundle'
description: 'Provides a views header/footer link to add a node for a specific bundle'
package: Views
type: module
core_version_requirement: ^8 || ^9 || ^10 || ^11
dependencies:
- drupal:views
# Information added by Drupal.org packaging script on 2024-04-15
version: '1.2.2'
project: 'add_content_by_bundle'
datestamp: 1713171346
<?php
/**
* @file
* Provide views data for our Add Content by Bundle module.
*/
/**
* Implements hook_views_data().
*/
function add_content_by_bundle_views_data() {
$data['views']['add_content_by_bundle'] = [
'title' => t('Add Content by Bundle link'),
'help' => t('Provide a link to add content for a specific content type.'),
'area' => [
'id' => 'add_content_by_bundle',
],
];
return $data;
}
{
"name": "drupal/add_content_by_bundle",
"type": "drupal-module",
"description": "Add Content by Bundle Views Area Plugin",
"homepage": "https://www.drupal.org/project/add_content_by_bundle",
"license": "GPL-2.0-or-later",
"support": {
"issues": "https://www.drupal.org/project/issues/add_content_by_bundle",
"source": "https://git.drupalcode.org/project/add_content_by_bundle"
}
}
views.area.add_content_by_bundle:
type: views_area
label: 'Add Content by Bundle link'
mapping:
bundle:
type: string
label: 'The content type whose form will be linked to.'
label:
type: label
label: 'The label of the link.'
class:
type: string
label: 'A CSS class to use on the link.'
target:
type: string
label: 'Option to target a modal or off-screen dialog.'
width:
type: integer
label: 'Width to use for the dialog.'
include:
################
# DrupalCI includes:
# As long as you include this, any future includes added by the Drupal Association will be accessible to your pipelines automatically.
# View these include files at https://git.drupalcode.org/project/gitlab_templates/
################
- project: $_GITLAB_TEMPLATES_REPO
ref: $_GITLAB_TEMPLATES_REF
file:
- '/includes/include.drupalci.main.yml'
- '/includes/include.drupalci.variables.yml'
- '/includes/include.drupalci.workflows.yml'
################
# Pipeline configuration variables
#
# These are the variables provided to the Run Pipeline form that a user may want to override.
#
# Docs at https://git.drupalcode.org/project/gitlab_templates/-/blob/1.0.x/includes/include.drupalci.variables.yml
################
variables:
# Broaden test coverage.
OPT_IN_TEST_MAX_PHP: 1
OPT_IN_TEST_NEXT_MINOR: 1
OPT_IN_TEST_PREVIOUS_MINOR: 1
# Convenient, and we have no secrets.
_SHOW_ENVIRONMENT_VARIABLES: 1
# Try to track down random failures at https://www.drupal.org/node/3414252
CI_DEBUG_SERVICES: 1
This diff is collapsed.
# Address
Provides functionality for storing, validating and displaying international
postal addresses.
The Drupal 8 heir to the addressfield module, powered by the
[commerceguys/addressing](https://github.com/commerceguys/addressing) library.
## Installation
Since the module requires an external library, Composer or Ludwig must be used.
### Composer
If your site is [managed via Composer](https://www.drupal.org/node/2718229), use
Composer to download the module, which will also download the required library:
```sh
composer require "drupal/address ~2.0"
```
~2.0 downloads the latest release, use 2.x-dev to get the -dev release instead.
Use ```composer update drupal/address --with-dependencies``` to update to a new
release.
### Ludwig
Composer is recommended whenever possible. However, if you are not familiar with
Composer yet (or you want to avoid it for other reasons) you can install and use
[Ludwig](https://www.drupal.org/project/ludwig) module to manage Address module
library dependencies.
Read more at Ludwig Installation and Usage guide:
https://www.drupal.org/docs/contributed-modules/ludwig/installation-and-usage
address:
label: 'Address'
description: 'Field to store postal address values.'
name: Address
type: module
description: 'Provides functionality for handling postal addresses.'
package: Field types
core_version_requirement: ^9.5 || ^10 || ^11
config: entity.address_format.collection
dependencies:
- drupal:field
# Information added by Drupal.org packaging script on 2025-05-05
version: '2.0.4'
project: 'address'
datestamp: 1746462057
This diff is collapsed.
form:
version: VERSION
css:
theme:
css/address.form.css: {}
field-icon:
css:
theme:
css/address.field-icon.css: {}
dependencies:
- field_ui/drupal.field_ui.manage_fields
This diff is collapsed.
<?php
/**
* @file
* Contains post-update hooks for Address.
*/
declare(strict_types = 1);
use Drupal\Core\Config\Entity\ConfigEntityUpdater;
use Drupal\Core\Entity\Display\EntityFormDisplayInterface;
/**
* Add the "Wrapper type" setting to the default widget.
*/
function address_post_update_default_widget_wrapper(?array &$sandbox = NULL): void {
\Drupal::classResolver(ConfigEntityUpdater::class)->update($sandbox, 'entity_form_display', function (EntityFormDisplayInterface $form_display): bool {
$changed = FALSE;
foreach ($form_display->getComponents() as $field => $component) {
if (is_array($component)
&& array_key_exists('type', $component)
&& ($component['type'] === 'address_default')
&& !array_key_exists('wrapper_type', $component['settings'])) {
$component['settings']['wrapper_type'] = 'details';
$form_display->setComponent($field, $component);
$changed = TRUE;
}
}
return $changed;
});
}
services:
address.address_format_repository:
class: Drupal\address\Repository\AddressFormatRepository
arguments: ['@event_dispatcher']
address.country_repository:
class: Drupal\address\Repository\CountryRepository
arguments: ['@cache.data', '@language_manager']
address.subdivision_repository:
class: Drupal\address\Repository\SubdivisionRepository
arguments: ['@address.address_format_repository', '@event_dispatcher', '@cache.data']
address.postal_label_formatter:
class: CommerceGuys\Addressing\Formatter\PostalLabelFormatter
arguments: ['@address.address_format_repository', '@address.country_repository', '@address.subdivision_repository']
This diff is collapsed.
This diff is collapsed.
{
"name": "drupal/address",
"type": "drupal-module",
"description": "Provides functionality for storing, validating and displaying international postal addresses.",
"homepage": "http://drupal.org/project/address",
"license": "GPL-2.0-or-later",
"require": {
"php": "^8.0",
"commerceguys/addressing": "^2.1.1",
"drupal/core": "^9.5 || ^10 || ^11"
},
"require-dev": {
"drupal/diff": "^1",
"drupal/feeds": "^3",
"drupal/token": "^1"
}
}
This diff is collapsed.
.field-option__icon.field-icon-address {
position: relative;
height: 100%;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%2355565b' width='204px' height='204px' viewBox='0 0 576 576'%3E%3Cpath d='M528 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h480c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-352 96c35.3 0 64 28.7 64 64s-28.7 64-64 64-64-28.7-64-64 28.7-64 64-64zm112 236.8c0 10.6-10 19.2-22.4 19.2H86.4C74 384 64 375.4 64 364.8v-19.2c0-31.8 30.1-57.6 67.2-57.6h5c12.3 5.1 25.7 8 39.8 8s27.6-2.9 39.8-8h5c37.1 0 67.2 25.8 67.2 57.6v19.2zM512 312c0 4.4-3.6 8-8 8H360c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16zm0-64c0 4.4-3.6 8-8 8H360c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16zm0-64c0 4.4-3.6 8-8 8H360c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16z'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: center;
background-size: 36px;
}
.address-container-inline > .form-item {
display: inline-block; /* LTR */
margin-right: 1em; /* LTR */
}
This diff is collapsed.
{
"require": {
"doctrine/collections": {
"version": "1.8.0",
"url": "https://github.com/doctrine/collections/archive/1.8.0.zip"
},
"doctrine/deprecations": {
"version": "v1.1.1",
"url": "https://github.com/doctrine/deprecations/archive/v1.1.1.zip"
},
"commerceguys/addressing": {
"version": "v2.1.1",
"url": "https://github.com/commerceguys/addressing/archive/v2.1.1.zip"
}
}
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment