Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
Project
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
Gorodkov Denis
Project
Commits
c62384ff
Commit
c62384ff
authored
May 20, 2022
by
Gorodkov Denis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
a86088c0
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
673 additions
and
1 deletion
+673
-1
composer.json
app/composer.json
+4
-0
composer.lock
app/composer.lock
+315
-1
mymodule.install
app/docroot/modules/custom/mymodule/mymodule.install
+42
-0
mymodule.routing.yml
app/docroot/modules/custom/mymodule/mymodule.routing.yml
+6
-0
AjaxForm.php
app/docroot/modules/custom/mymodule/src/Form/AjaxForm.php
+42
-0
DrupalJedi.info.yml
app/docroot/themes/custom/DrupalJedi/DrupalJedi.info.yml
+25
-0
DrupalJedi.libraries.yml
...docroot/themes/custom/DrupalJedi/DrupalJedi.libraries.yml
+34
-0
DrupalJedi.theme
app/docroot/themes/custom/DrupalJedi/DrupalJedi.theme
+22
-0
DrupalJedi.settings.yml
.../custom/DrupalJedi/config/install/DrupalJedi.settings.yml
+19
-0
DrupalJedi.schema.yml
...mes/custom/DrupalJedi/config/schema/DrupalJedi.schema.yml
+5
-0
style.css
app/docroot/themes/custom/DrupalJedi/css/style.css
+4
-0
favicon.ico
app/docroot/themes/custom/DrupalJedi/favicon.ico
+0
-0
required.svg
app/docroot/themes/custom/DrupalJedi/images/required.svg
+1
-0
logo.svg
app/docroot/themes/custom/DrupalJedi/logo.svg
+26
-0
screenshot.png
app/docroot/themes/custom/DrupalJedi/screenshot.png
+0
-0
README.md
app/docroot/themes/custom/DrupalJedi/src/README.md
+3
-0
README.md
app/docroot/themes/custom/DrupalJedi/templates/README.md
+4
-0
bootstrap-panel.html.twig
...mes/custom/DrupalJedi/templates/bootstrap-panel.html.twig
+121
-0
No files found.
app/composer.json
View file @
c62384ff
...
@@ -16,16 +16,19 @@
...
@@ -16,16 +16,19 @@
"drupal/admin_toolbar"
:
"^3.1"
,
"drupal/admin_toolbar"
:
"^3.1"
,
"drupal/backup_migrate"
:
"^5.0"
,
"drupal/backup_migrate"
:
"^5.0"
,
"drupal/better_exposed_filters"
:
"^5.0"
,
"drupal/better_exposed_filters"
:
"^5.0"
,
"drupal/bootstrap"
:
"^3.24"
,
"drupal/config_ignore"
:
"^2.3"
,
"drupal/config_ignore"
:
"^2.3"
,
"drupal/config_pages"
:
"^2.9"
,
"drupal/config_pages"
:
"^2.9"
,
"drupal/core"
:
"^9.1"
,
"drupal/core"
:
"^9.1"
,
"drupal/core-composer-scaffold"
:
"^9"
,
"drupal/core-composer-scaffold"
:
"^9"
,
"drupal/devel"
:
"^4.1"
,
"drupal/devel"
:
"^4.1"
,
"drupal/devel_kint_extras"
:
"^1.0"
,
"drupal/devel_php"
:
"^1.5"
,
"drupal/devel_php"
:
"^1.5"
,
"drupal/entityreference_filter"
:
"^1.4"
,
"drupal/entityreference_filter"
:
"^1.4"
,
"drupal/facets"
:
"^2.0"
,
"drupal/facets"
:
"^2.0"
,
"drupal/field_group"
:
"^3.2"
,
"drupal/field_group"
:
"^3.2"
,
"drupal/fontawesome_menu_icons"
:
"^1.9"
,
"drupal/fontawesome_menu_icons"
:
"^1.9"
,
"drupal/jquery_ui_tabs"
:
"^1.1"
,
"drupal/media_library_block"
:
"^1.0"
,
"drupal/media_library_block"
:
"^1.0"
,
"drupal/media_library_form_element"
:
"^2.0"
,
"drupal/media_library_form_element"
:
"^2.0"
,
"drupal/metatag"
:
"^1.19"
,
"drupal/metatag"
:
"^1.19"
,
...
@@ -39,6 +42,7 @@
...
@@ -39,6 +42,7 @@
"drupal/redirect"
:
"^1.7"
,
"drupal/redirect"
:
"^1.7"
,
"drupal/rest_api_access_token"
:
"^1.6"
,
"drupal/rest_api_access_token"
:
"^1.6"
,
"drupal/restui"
:
"^1.20"
,
"drupal/restui"
:
"^1.20"
,
"drupal/schema"
:
"^2.0@alpha"
,
"drupal/search_api"
:
"^1.23"
,
"drupal/search_api"
:
"^1.23"
,
"drupal/search_api_autocomplete"
:
"^1.6"
,
"drupal/search_api_autocomplete"
:
"^1.6"
,
"drupal/search_api_exclude"
:
"^2.0"
,
"drupal/search_api_exclude"
:
"^2.0"
,
...
...
app/composer.lock
View file @
c62384ff
This diff is collapsed.
Click to expand it.
app/docroot/modules/custom/mymodule/mymodule.install
0 → 100644
View file @
c62384ff
<?php
/**
* Implements hook_schema().
*/
function
mymodule_schema
()
{
$schema
[
'aaaa'
]
=
array
(
// Название таблицы
'description'
=>
'Database example'
,
// Описание таблицы
'fields'
=>
array
(
// Массив с колонками таблицы
'id'
=>
array
(
// Название колонки
'description'
=>
'ID'
,
// Описание колонки
'type'
=>
'serial'
,
// Тип данных
'unsigned'
=>
TRUE
,
// Unsigned, по умолчанию FALSE
'not null'
=>
TRUE
,
// Проверка на 0
),
'uid'
=>
array
(
'description'
=>
'UID user'
,
'type'
=>
'int'
,
'unsigned'
=>
TRUE
,
'not null'
=>
TRUE
,
'default'
=>
0
,
// Значение по умолчанию
),
'text'
=>
array
(
'description'
=>
'Text'
,
'type'
=>
'varchar'
,
'length'
=>
255
,
'not null'
=>
TRUE
,
'default'
=>
''
,
),
),
'primary key'
=>
array
(
'id'
),
);
return
$schema
;
}
/**
* Implements hook_uninstall().
*/
/*function mymodule_uninstall() {
\Drupal::state()->delete('mymodule.mymodule');
}*/
app/docroot/modules/custom/mymodule/mymodule.routing.yml
View file @
c62384ff
...
@@ -11,3 +11,9 @@ mymdoule.test:
...
@@ -11,3 +11,9 @@ mymdoule.test:
_title_callback
:
'
\Drupal\Core\Entity\Controller\EntityController::title'
_title_callback
:
'
\Drupal\Core\Entity\Controller\EntityController::title'
requirements
:
requirements
:
_permission
:
'
administer
content
types'
_permission
:
'
administer
content
types'
mymodule.ajax_form
:
path
:
'
/ajax-form'
defaults
:
_form
:
'
\Drupal\mymodule\Form\AjaxForm'
requirements
:
_permission
:
'
access
content'
app/docroot/modules/custom/mymodule/src/Form/AjaxForm.php
0 → 100644
View file @
c62384ff
<?php
namespace
Drupal\mymodule\Form
;
use
Drupal\Core\Form\FormBase
;
use
Drupal\Core\Form\FormStateInterface
;
class
AjaxForm
extends
FormBase
{
public
function
getFormId
()
{
return
'mymodule_ajax_form'
;
}
public
function
buildForm
(
array
$form
,
FormStateInterface
$form_state
)
{
$form
[
'name'
]
=
array
(
'#type'
=>
'textfield'
,
'#title'
=>
'Name'
,
'#required'
=>
TRUE
);
$form
[
'email'
]
=
array
(
'#type'
=>
'email'
,
'#title'
=>
'Email'
,
'#required'
=>
TRUE
);
$form
[
'url'
]
=
array
(
'#type'
=>
'textfield'
,
'#title'
=>
'URL'
,
'#required'
=>
TRUE
);
$form
[
'submit'
]
=
array
(
'#type'
=>
'submit'
,
'#value'
=>
'Import'
);
return
$form
;
}
public
function
submitForm
(
array
&
$form
,
FormStateInterface
$form_state
)
{
}
}
app/docroot/themes/custom/DrupalJedi/DrupalJedi.info.yml
0 → 100644
View file @
c62384ff
type
:
theme
base theme
:
bootstrap
core
:
8.x
core_version_requirement
:
^8 || ^9
name
:
'
DrupalJedi'
description
:
'
A
Drupal
Bootstrap
3
based
sub-theme.'
package
:
'
Bootstrap'
regions
:
navigation
:
'
Navigation'
navigation_collapsible
:
'
Navigation
(Collapsible)'
header
:
'
Top
Bar'
highlighted
:
'
Highlighted'
help
:
'
Help'
content
:
'
Content'
sidebar_first
:
'
Primary'
sidebar_second
:
'
Secondary'
footer
:
'
Footer'
page_top
:
'
Page
top'
page_bottom
:
'
Page
bottom'
libraries-extend
:
bootstrap/framework
:
-
DrupalJedi/framework
app/docroot/themes/custom/DrupalJedi/DrupalJedi.libraries.yml
0 → 100644
View file @
c62384ff
framework
:
css
:
theme
:
css/style.css
:
{}
# Uncomment for LESS source JavaScript files.
# js:
# bootstrap/js/affix.js: {}
# bootstrap/js/alert.js: {}
# bootstrap/js/button.js: {}
# bootstrap/js/carousel.js: {}
# bootstrap/js/collapse.js: {}
# bootstrap/js/dropdown.js: {}
# bootstrap/js/modal.js: {}
# bootstrap/js/tooltip.js: {}
# bootstrap/js/popover.js: {}
# bootstrap/js/scrollspy.js: {}
# bootstrap/js/tab.js: {}
# bootstrap/js/transition.js: {}
# Uncomment for SASS source JavaScript files.
# js:
# bootstrap/assets/javascripts/bootstrap/affix.js: {}
# bootstrap/assets/javascripts/bootstrap/alert.js: {}
# bootstrap/assets/javascripts/bootstrap/button.js: {}
# bootstrap/assets/javascripts/bootstrap/carousel.js: {}
# bootstrap/assets/javascripts/bootstrap/collapse.js: {}
# bootstrap/assets/javascripts/bootstrap/dropdown.js: {}
# bootstrap/assets/javascripts/bootstrap/modal.js: {}
# bootstrap/assets/javascripts/bootstrap/tooltip.js: {}
# bootstrap/assets/javascripts/bootstrap/popover.js: {}
# bootstrap/assets/javascripts/bootstrap/scrollspy.js: {}
# bootstrap/assets/javascripts/bootstrap/tab.js: {}
# bootstrap/assets/javascripts/bootstrap/transition.js: {}
app/docroot/themes/custom/DrupalJedi/DrupalJedi.theme
0 → 100644
View file @
c62384ff
<?php
/**
* @file
* Bootstrap sub-theme.
*
* Place your custom PHP code in this file.
*/
function
DrupalJedi_preprocess_node
(
&
$variables
)
{
$node
=
$variables
[
"node"
];
// Установить для ноыд cachecontext = ['url.query_args']
}
function
DrupalJedi_preprocess
(
&
$variables
,
$hook
)
{
if
(
$hook
==
'details'
and
$variables
[
"element"
][
"#bundle"
]
==
'people'
and
$variables
[
"element"
][
"#group_name"
]
==
'group_films'
)
{
$get
=
\Drupal
::
request
()
->
query
->
get
(
'tab'
);
if
(
$get
==
'films'
)
{
$variables
[
"tab_films"
]
=
"true"
;
}
}
}
app/docroot/themes/custom/DrupalJedi/config/install/DrupalJedi.settings.yml
0 → 100644
View file @
c62384ff
# Default settings should not be located here. This file is only used to
# install initial setting values. If your theme is the one that introduces a
# new theme setting, it should use the Drupal Bootstrap base theme's
# @BootstrapSetting annotation discovery process. This ensures that sub-theme
# settings are inherited from base themes themes properly and to determine when
# a setting should be saved to config as "overridden".
#
# @see \Drupal\bootstrap\Plugin\SettingBase
# @see \Drupal\bootstrap\Plugin\SettingInterface
# @see \Drupal\bootstrap\Plugin\SettingManager
# @see \Drupal\bootstrap\Plugin\Form\SystemThemeSettings
# @see \Drupal\bootstrap\ThemeSettings
# This file cannot be empty, so install an initial empty array for "schemas".
# @see https://www.drupal.org/node/2813829
schemas
:
[]
# Disable the CDN provider so compiled source files can be used.
#cdn_provider: ''
app/docroot/themes/custom/DrupalJedi/config/schema/DrupalJedi.schema.yml
0 → 100644
View file @
c62384ff
# Schema for the theme setting configuration file of the THEMETITLE theme.
DrupalJedi.settings
:
type
:
theme_settings
label
:
'
DrupalJedi
settings'
app/docroot/themes/custom/DrupalJedi/css/style.css
0 → 100644
View file @
c62384ff
/**
* If using a CSS pre-processor, tell it to overwrite this file. If not, place
* your custom CSS modifications here.
*/
app/docroot/themes/custom/DrupalJedi/favicon.ico
0 → 100644
View file @
c62384ff
1.12 KB
app/docroot/themes/custom/DrupalJedi/images/required.svg
0 → 100644
View file @
c62384ff
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"16"
height=
"16"
><path
fill=
"#EE0000"
d=
"M0,7.562l1.114-3.438c2.565,0.906,4.43,1.688,5.59,2.35C6.398,3.553,6.237,1.544,6.22,0.447h3.511 c-0.05,1.597-0.234,3.6-0.558,6.003c1.664-0.838,3.566-1.613,5.714-2.325L16,7.562c-2.05,0.678-4.06,1.131-6.028,1.356 c0.984,0.856,2.372,2.381,4.166,4.575l-2.906,2.059c-0.935-1.274-2.041-3.009-3.316-5.206c-1.194,2.275-2.244,4.013-3.147,5.206 l-2.856-2.059c1.872-2.307,3.211-3.832,4.017-4.575C3.849,8.516,1.872,8.062,0,7.562"
/></svg>
app/docroot/themes/custom/DrupalJedi/logo.svg
0 → 100644
View file @
c62384ff
<svg
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
width=
"32px"
height=
"32px"
viewBox=
"0 0 32 32"
preserveAspectRatio=
"none"
>
<g>
<image
width=
"32"
height=
"32"
xlink:href=
"data:image/png;base64,
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJ
bWFnZVJlYWR5ccllPAAAAohJREFUeNrEl1tIVGEQx12L0BQjoXwpoRfxIQUJuhAIvVRLIRQELYj1
oKDgpQgVNQhBChQfLFDLoovVS0RQYuqLPUgFgTcQia5CSBBERUiKuv0+GGGJPd/l7Nkc+DNn98w3
8/++mXNmTigajaasp4T8Ejhx+GIWavOTkbaviRBITWBtIbgDkfT1InAGHAGDkNj2X1NAwFLU3ZgN
fATnSMezpBIgcAaqWRBPHoFLEJlNVgpWRC943D8FJiDaA3IDOQEc5aNK5Ocou3vDf3u5HgFbNEu/
gzrs7/smQKAa1BWQEfN3L06ruFcmdWCSa+A8a1acUkCAetTVf4IrqeReBIf3pPhMojbR41QDBDiO
atc4LRU9ZVk7FXKaZgLyhus2OExbS6FDAV+OV5jxTqAa7DQ4e4qzTegiBwKZoFFLAKdqZ+UGR8Pk
vwu9A7i+AU8TY6vuBNTjtcvgJB0nJyGhCvAgeO9AIBsc0hHYb+GkGDyGxG1ITHIdlmfeVop1BAoc
HJ2FxENIqBOodVhXoCOw3TGnEfVCgsQDrmcc0uBJYNVHR20S3R/EPDDvw0c+p6AK94Wl/aKOwLTP
uSIPfAHLFrYfdAReJzBZ2abvpY7ABHjrg8AcyAEbDXZL4LknAapZGdxyDD4vpPdZ2A7JC0zbC3pl
R7bSJ70+YjFNtVoNJNKObQbMcXAA7AFjhhGvA6INVvMAhgOoBkNwNQsck5Z8wxB8wGuQ9VwEiQ7U
BSmcWPkGOiXnv2QS3q0Jru6rCWrZ71BaKH0/JLXxCmd/+F8RuKkJ/gO0YNsd6IcJgcPSfI56mLxT
3RJcJ/jnoD9MNsg3oZobcqWxqGf/J/gkdTFJ4N9J/zoOSv4KMAC++teHNUg1rQAAAABJRU5ErkJg
gg==
"
/>
</g>
</svg>
app/docroot/themes/custom/DrupalJedi/screenshot.png
0 → 100644
View file @
c62384ff
19 KB
app/docroot/themes/custom/DrupalJedi/src/README.md
0 → 100644
View file @
c62384ff
This directory is used to implement various Bootstrap annotated plugins.
Please refer to the
[
Plugin System
](
<
!-- @url plugins --
>
)
topic for more info.
app/docroot/themes/custom/DrupalJedi/templates/README.md
0 → 100644
View file @
c62384ff
This directory is used to implement various core, contrib, Bootstrap and custom
templates.
Please refer to the
[
Templates
](
<
!-- @url templates --
>
)
topic for more info.
app/docroot/themes/custom/DrupalJedi/templates/bootstrap-panel.html.twig
0 → 100644
View file @
c62384ff
{#
/**
* @file
* Default theme implementation to display a Bootstrap Panel component.
*
* Available variables:
* - attributes: An array of HTML attributes intended to be added to the main
* container tag of this template.
* - id: A valid HTML ID and guaranteed to be unique.
* - body: The primary content of the panel.
* - body_attributes: (optional) Same as attributes, except applied to the body
* container that appears in the template.
* - collapsible: Flag indicating whether the panel is collapsible.
* - collapsed: Flag indicating whether the panel is collapsed.
* - description: (optional) A list of description properties containing:
* - content: (optional) A description of the form element, may not be set.
* - attributes: (optional) A list of HTML attributes to apply to the
* description content wrapper. Will only be set when description is set.
* - position: (optional) A display setting that can have these values:
* - before: The description is output before the element. This is the
* default value.
* - after: The description is output after the element.
* - invisible: The description is output after the element, hidden
* visually but available to screen readers.
* - errors: (optional) Any errors for panel, may not be set.
* - footer: (optional) Additional contents intended to be placed at the bottom.
* - footer_attributes: (optional) Same as attributes, except applied to the
* footer container that appears in the template.
* - heading: (optional) The title of the panel, may not be set.
* - heading_attributes: (optional) Same as attributes, except applied to the
* heading container that appears in the template.
* - panel_type: (optional) A contextual state. Will be one of these values:
* - danger
* - default (default value)
* - info
* - primary
* - success
* - warning
* - target: (optional) The target of the collapsible container.
*
* @ingroup templates
*/
#}
{%
set
classes
=
[
'panel'
,
errors
?
'panel-danger'
:
'panel-'
~
panel_type
|
clean_class
,
]
%}
<div
{{
attributes.addClass
(
classes
)
}}
>
{# Heading #}
{%
if
heading
%}
{%
block
heading
%}
<div
class=
"panel-heading"
>
{%
set
heading_classes
=
[
'panel-title'
,
required
?
'form-required'
:
''
,
]
%}
{%
if
collapsible
%}
<a
{{
heading_attributes.addClass
(
heading_classes
)
}}
href=
"
{{
target
}}
"
>
{{
heading
}}
</a>
{%
else
%}
<div
{{
heading_attributes.addClass
(
heading_classes
)
}}
>
{{
heading
}}
</div>
{%
endif
%}
</div>
{%
endblock
%}
{%
endif
%}
{# Body #}
{%
block
body
%}
{%
set
tab_class
=
'fade'
%}
{%
if
tab_films
==
'true'
%}
{%
set
tab_class
=
'fade in'
%}
{%
endif
%}
{%
set
body_classes
=
[
'panel-body'
,
collapsible
?
'panel-collapse'
,
collapsible
?
'collapse'
,
collapsible
?
tab_class
,
errors
or
collapsible
and
not
collapsed
?
'in'
,
]
%}
{%
set
description_classes
=
[
'help-block'
,
description
and
description.position
==
'invisible'
?
'sr-only'
,
]
%}
{%
if
errors
%}
<div
class=
"alert alert-danger"
role=
"alert"
>
<strong>
{{
errors
}}
</strong>
</div>
{%
endif
%}
<div
{{
body_attributes.addClass
(
body_classes
)
}}
>
{%
if
description
and
description.position
==
'before'
%}
<p
{{
description.attributes.addClass
(
description_classes
)
}}
>
{{
description.content
}}
</p>
{%
endif
%}
{{
body
}}
{%
if
description
and
description.position
==
'after'
or
description.position
==
'invisible'
%}
<p
{{
description.attributes.addClass
(
description_classes
)
}}
>
{{
description.content
}}
</p>
{%
endif
%}
</div>
{%
endblock
%}
{# Footer #}
{%
if
footer
%}
{%
block
footer
%}
{%
set
footer_classes
=
[
'panel-footer'
,
]
%}
<div
{{
footer_attributes.addClass
(
footer_classes
)
}}
>
{{
footer
}}
</div>
{%
endblock
%}
{%
endif
%}
</div>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment