Compare commits
10 Commits
master
...
popravki-p
Author | SHA1 | Date |
---|---|---|
Jurij Podgoršek | 80c2eaf084 | |
Jurij Podgoršek | f01f264ad9 | |
Jurij Podgoršek | 6a80ee7d13 | |
Jurij Podgoršek | 69e4e6bca2 | |
Jurij Podgoršek | 9c4512bb45 | |
Jurij Podgoršek | f45f4743c2 | |
Jurij Podgoršek | f67a9f86b7 | |
Jurij Podgoršek | d2a6db7d27 | |
Jurij Podgoršek | 6b4cd9d784 | |
Jurij Podgoršek | ae6ce0426b |
|
@ -1,7 +1,7 @@
|
|||
name: yufu-manifest
|
||||
type: drupal10
|
||||
docroot: web
|
||||
php_version: "8.1"
|
||||
php_version: "8.2"
|
||||
webserver_type: nginx-fpm
|
||||
router_http_port: "80"
|
||||
router_https_port: "443"
|
||||
|
@ -10,12 +10,13 @@ additional_hostnames: []
|
|||
additional_fqdns: []
|
||||
database:
|
||||
type: mariadb
|
||||
version: "10.3"
|
||||
version: "10.6"
|
||||
nfs_mount_enabled: false
|
||||
mutagen_enabled: false
|
||||
use_dns_when_possible: true
|
||||
composer_version: "2"
|
||||
web_environment: []
|
||||
nodejs_version: "16"
|
||||
|
||||
# Key features of ddev's config.yaml:
|
||||
|
||||
|
@ -26,7 +27,7 @@ web_environment: []
|
|||
|
||||
# docroot: <relative_path> # Relative path to the directory containing index.php.
|
||||
|
||||
# php_version: "7.4" # PHP version to use, "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1"
|
||||
# php_version: "7.4" # PHP version to use, "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"
|
||||
|
||||
# You can explicitly specify the webimage but this
|
||||
# is not recommended, as the images are often closely tied to ddev's' behavior,
|
||||
|
@ -61,12 +62,26 @@ web_environment: []
|
|||
# see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
# For example Europe/Dublin or MST7MDT
|
||||
|
||||
# composer_root: <relative_path>
|
||||
# Relative path to the composer root directory from the project root. This is
|
||||
# the directory which contains the composer.json and where all Composer related
|
||||
# commands are executed.
|
||||
|
||||
# composer_version: "2"
|
||||
# if composer_version:"2" it will use the most recent composer v2
|
||||
# It can also be set to "1", to get most recent composer v1
|
||||
# or "" for the default v2 created at release time.
|
||||
# It can be set to any existing specific composer version.
|
||||
# After first project 'ddev start' this will not be updated until it changes
|
||||
# You can set it to "" or "2" (default) for Composer v2 or "1" for Composer v1
|
||||
# to use the latest major version available at the time your container is built.
|
||||
# It is also possible to use each other Composer version channel. This includes:
|
||||
# - 2.2 (latest Composer LTS version)
|
||||
# - stable
|
||||
# - preview
|
||||
# - snapshot
|
||||
# Alternatively, an explicit Composer version may be specified, for example "2.2.18".
|
||||
# To reinstall Composer after the image was built, run "ddev debug refresh".
|
||||
|
||||
# nodejs_version: "16"
|
||||
# change from the default system Node.js version to another supported version, like 12, 14, 17, 18.
|
||||
# Note that you can use 'ddev nvm' or nvm inside the web container to provide nearly any
|
||||
# Node.js version, including v6, etc.
|
||||
|
||||
# additional_hostnames:
|
||||
# - somename
|
||||
|
@ -82,6 +97,8 @@ web_environment: []
|
|||
|
||||
# upload_dir: custom/upload/dir
|
||||
# would set the destination path for ddev import-files to <docroot>/custom/upload/dir
|
||||
# When mutagen is enabled this path is bind-mounted so that all the files
|
||||
# in the upload_dir don't have to be synced into mutagen
|
||||
|
||||
# working_dir:
|
||||
# web: /var/www/html
|
||||
|
@ -99,11 +116,11 @@ web_environment: []
|
|||
|
||||
# nfs_mount_enabled: false
|
||||
# Great performance improvement but requires host configuration first.
|
||||
# See https://ddev.readthedocs.io/en/stable/users/performance/#using-nfs-to-mount-the-project-into-the-container
|
||||
# See https://ddev.readthedocs.io/en/latest/users/install/performance/#nfs
|
||||
|
||||
# mutagen_enabled: false
|
||||
# Experimental performance improvement using mutagen asynchronous updates.
|
||||
# See https://ddev.readthedocs.io/en/latest/users/performance/#using-mutagen
|
||||
# Performance improvement using mutagen asynchronous updates.
|
||||
# See https://ddev.readthedocs.io/en/latest/users/install/performance/#mutagen
|
||||
|
||||
# fail_on_hook_fail: False
|
||||
# Decide whether 'ddev start' should be interrupted by a failing hook
|
||||
|
@ -158,7 +175,7 @@ web_environment: []
|
|||
# If you prefer you can change this to "ddev.local" to preserve
|
||||
# pre-v1.9 behavior.
|
||||
|
||||
# ngrok_args: --subdomain mysite --auth username:pass
|
||||
# ngrok_args: --basic-auth username:pass1234
|
||||
# Provide extra flags to the "ngrok http" command, see
|
||||
# https://ngrok.com/docs#http or run "ngrok http -h"
|
||||
|
||||
|
@ -184,10 +201,57 @@ web_environment: []
|
|||
# will be available on the local network if the host firewall
|
||||
# allows it.
|
||||
|
||||
# default_container_timeout: 120
|
||||
# The default time that ddev waits for all containers to become ready can be increased from
|
||||
# the default 120. This helps in importing huge databases, for example.
|
||||
|
||||
#web_extra_exposed_ports:
|
||||
#- name: nodejs
|
||||
# container_port: 3000
|
||||
# http_port: 2999
|
||||
# https_port: 3000
|
||||
#- name: something
|
||||
# container_port: 4000
|
||||
# https_port: 4000
|
||||
# http_port: 3999
|
||||
# Allows a set of extra ports to be exposed via ddev-router
|
||||
# The port behavior on the ddev-webserver must be arranged separately, for example
|
||||
# using web_extra_daemons.
|
||||
# For example, with a web app on port 3000 inside the container, this config would
|
||||
# expose that web app on https://<project>.ddev.site:9999 and http://<project>.ddev.site:9998
|
||||
# web_extra_exposed_ports:
|
||||
# - container_port: 3000
|
||||
# http_port: 9998
|
||||
# https_port: 9999
|
||||
|
||||
#web_extra_daemons:
|
||||
#- name: "http-1"
|
||||
# command: "/var/www/html/node_modules/.bin/http-server -p 3000"
|
||||
# directory: /var/www/html
|
||||
#- name: "http-2"
|
||||
# command: "/var/www/html/node_modules/.bin/http-server /var/www/html/sub -p 3000"
|
||||
# directory: /var/www/html
|
||||
|
||||
# override_config: false
|
||||
# By default, config.*.yaml files are *merged* into the configuration
|
||||
# But this means that some things can't be overridden
|
||||
# For example, if you have 'nfs_mount_enabled: true'' you can't override it with a merge
|
||||
# and you can't erase existing hooks or all environment variables.
|
||||
# However, with "override_config: true" in a particular config.*.yaml file,
|
||||
# 'nfs_mount_enabled: false' can override the existing values, and
|
||||
# hooks:
|
||||
# post-start: []
|
||||
# or
|
||||
# web_environment: []
|
||||
# or
|
||||
# additional_hostnames: []
|
||||
# can have their intended affect. 'override_config' affects only behavior of the
|
||||
# config.*.yaml file it exists in.
|
||||
|
||||
# Many ddev commands can be extended to run tasks before or after the
|
||||
# ddev command is executed, for example "post-start", "post-import-db",
|
||||
# "pre-composer", "post-composer"
|
||||
# See https://ddev.readthedocs.io/en/stable/users/extending-commands/ for more
|
||||
# See https://ddev.readthedocs.io/en/stable/users/extend/custom-commands/ for more
|
||||
# information on the commands that can be extended and the tasks you can define
|
||||
# for them. Example:
|
||||
#hooks:
|
||||
|
|
|
@ -81,3 +81,4 @@ Razvojne kontejnerja lahko zlistamo z ukazom `ddev status`
|
|||
## Mejli
|
||||
|
||||
Mailhog za debagiranje vklopimo, kot priporoči zgornji ukaz: `ddev launch -m`
|
||||
Vmesnik najdemo na naslovu: https://yufu-manifest.ddev.site:8026
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
"drupal/content_moderation_notifications": "^3.6",
|
||||
"drupal/core-composer-scaffold": "^10.0",
|
||||
"drupal/core-project-message": "^10.0",
|
||||
"drupal/core-recommended": "^10.2.4",
|
||||
"drupal/core-recommended": "^10.0",
|
||||
"drupal/diff": "^1.1",
|
||||
"drupal/devel": "^5.1",
|
||||
"drupal/gin": "^3.0@RC",
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "6467965d60acc01165ed81a57e9cf9e9",
|
||||
"content-hash": "fc0b93f34df38e9d2834fb79a5346bdf",
|
||||
"packages": [
|
||||
{
|
||||
"name": "asm89/stack-cors",
|
||||
|
@ -331,16 +331,16 @@
|
|||
},
|
||||
{
|
||||
"name": "composer/semver",
|
||||
"version": "3.4.0",
|
||||
"version": "3.4.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/composer/semver.git",
|
||||
"reference": "35e8d0af4486141bc745f23a29cc2091eb624a32"
|
||||
"reference": "c51258e759afdb17f1fd1fe83bc12baaef6309d6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32",
|
||||
"reference": "35e8d0af4486141bc745f23a29cc2091eb624a32",
|
||||
"url": "https://api.github.com/repos/composer/semver/zipball/c51258e759afdb17f1fd1fe83bc12baaef6309d6",
|
||||
"reference": "c51258e759afdb17f1fd1fe83bc12baaef6309d6",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -392,7 +392,7 @@
|
|||
"support": {
|
||||
"irc": "ircs://irc.libera.chat:6697/composer",
|
||||
"issues": "https://github.com/composer/semver/issues",
|
||||
"source": "https://github.com/composer/semver/tree/3.4.0"
|
||||
"source": "https://github.com/composer/semver/tree/3.4.2"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -408,7 +408,7 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2023-08-31T09:50:34+00:00"
|
||||
"time": "2024-07-12T11:35:52+00:00"
|
||||
},
|
||||
{
|
||||
"name": "consolidation/annotated-command",
|
||||
|
@ -2577,26 +2577,26 @@
|
|||
},
|
||||
{
|
||||
"name": "drupal/restui",
|
||||
"version": "1.21.0",
|
||||
"version": "1.22.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://git.drupalcode.org/project/restui.git",
|
||||
"reference": "8.x-1.21"
|
||||
"reference": "8.x-1.22"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://ftp.drupal.org/files/projects/restui-8.x-1.21.zip",
|
||||
"reference": "8.x-1.21",
|
||||
"shasum": "2a67dc2c1953dced0bddaff25e5c60784ee0178c"
|
||||
"url": "https://ftp.drupal.org/files/projects/restui-8.x-1.22.zip",
|
||||
"reference": "8.x-1.22",
|
||||
"shasum": "7c9fb14c574f8a4090b77b1bcbc5be141409a383"
|
||||
},
|
||||
"require": {
|
||||
"drupal/core": "^8.7.7 || ^9 || ^10"
|
||||
"drupal/core": "^9.5 || ^10 || ^11"
|
||||
},
|
||||
"type": "drupal-module",
|
||||
"extra": {
|
||||
"drupal": {
|
||||
"version": "8.x-1.21",
|
||||
"datestamp": "1659086914",
|
||||
"version": "8.x-1.22",
|
||||
"datestamp": "1721134189",
|
||||
"security-coverage": {
|
||||
"status": "covered",
|
||||
"message": "Covered by Drupal's security advisory policy"
|
||||
|
@ -2621,8 +2621,12 @@
|
|||
"homepage": "https://www.drupal.org/user/682736"
|
||||
},
|
||||
{
|
||||
"name": "klausi",
|
||||
"homepage": "https://www.drupal.org/user/262198"
|
||||
"name": "kamkejj",
|
||||
"homepage": "https://www.drupal.org/user/81043"
|
||||
},
|
||||
{
|
||||
"name": "vipin.mittal18",
|
||||
"homepage": "https://www.drupal.org/user/319716"
|
||||
}
|
||||
],
|
||||
"description": "Provides a user interface to manage REST resources.",
|
||||
|
@ -3215,22 +3219,22 @@
|
|||
},
|
||||
{
|
||||
"name": "guzzlehttp/guzzle",
|
||||
"version": "7.8.1",
|
||||
"version": "7.8.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/guzzle.git",
|
||||
"reference": "41042bc7ab002487b876a0683fc8dce04ddce104"
|
||||
"reference": "f4152d9eb85c445fe1f992001d1748e8bec070d2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/41042bc7ab002487b876a0683fc8dce04ddce104",
|
||||
"reference": "41042bc7ab002487b876a0683fc8dce04ddce104",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/f4152d9eb85c445fe1f992001d1748e8bec070d2",
|
||||
"reference": "f4152d9eb85c445fe1f992001d1748e8bec070d2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"guzzlehttp/promises": "^1.5.3 || ^2.0.1",
|
||||
"guzzlehttp/psr7": "^1.9.1 || ^2.5.1",
|
||||
"guzzlehttp/promises": "^1.5.3 || ^2.0.3",
|
||||
"guzzlehttp/psr7": "^1.9.1 || ^2.6.3",
|
||||
"php": "^7.2.5 || ^8.0",
|
||||
"psr/http-client": "^1.0",
|
||||
"symfony/deprecation-contracts": "^2.2 || ^3.0"
|
||||
|
@ -3241,9 +3245,9 @@
|
|||
"require-dev": {
|
||||
"bamarni/composer-bin-plugin": "^1.8.2",
|
||||
"ext-curl": "*",
|
||||
"php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999",
|
||||
"guzzle/client-integration-tests": "3.0.2",
|
||||
"php-http/message-factory": "^1.1",
|
||||
"phpunit/phpunit": "^8.5.36 || ^9.6.15",
|
||||
"phpunit/phpunit": "^8.5.39 || ^9.6.20",
|
||||
"psr/log": "^1.1 || ^2.0 || ^3.0"
|
||||
},
|
||||
"suggest": {
|
||||
|
@ -3321,7 +3325,7 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/guzzle/issues",
|
||||
"source": "https://github.com/guzzle/guzzle/tree/7.8.1"
|
||||
"source": "https://github.com/guzzle/guzzle/tree/7.8.2"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -3337,20 +3341,20 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2023-12-03T20:35:24+00:00"
|
||||
"time": "2024-07-18T11:12:18+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/promises",
|
||||
"version": "2.0.2",
|
||||
"version": "2.0.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/promises.git",
|
||||
"reference": "bbff78d96034045e58e13dedd6ad91b5d1253223"
|
||||
"reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/promises/zipball/bbff78d96034045e58e13dedd6ad91b5d1253223",
|
||||
"reference": "bbff78d96034045e58e13dedd6ad91b5d1253223",
|
||||
"url": "https://api.github.com/repos/guzzle/promises/zipball/6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8",
|
||||
"reference": "6ea8dd08867a2a42619d65c3deb2c0fcbf81c8f8",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3358,7 +3362,7 @@
|
|||
},
|
||||
"require-dev": {
|
||||
"bamarni/composer-bin-plugin": "^1.8.2",
|
||||
"phpunit/phpunit": "^8.5.36 || ^9.6.15"
|
||||
"phpunit/phpunit": "^8.5.39 || ^9.6.20"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
|
@ -3404,7 +3408,7 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/promises/issues",
|
||||
"source": "https://github.com/guzzle/promises/tree/2.0.2"
|
||||
"source": "https://github.com/guzzle/promises/tree/2.0.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -3420,20 +3424,20 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2023-12-03T20:19:20+00:00"
|
||||
"time": "2024-07-18T10:29:17+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/psr7",
|
||||
"version": "2.6.2",
|
||||
"version": "2.6.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/psr7.git",
|
||||
"reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221"
|
||||
"reference": "6de29867b18790c0d2c846af4c13a24cc3ad56f3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/45b30f99ac27b5ca93cb4831afe16285f57b8221",
|
||||
"reference": "45b30f99ac27b5ca93cb4831afe16285f57b8221",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/6de29867b18790c0d2c846af4c13a24cc3ad56f3",
|
||||
"reference": "6de29867b18790c0d2c846af4c13a24cc3ad56f3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3448,8 +3452,8 @@
|
|||
},
|
||||
"require-dev": {
|
||||
"bamarni/composer-bin-plugin": "^1.8.2",
|
||||
"http-interop/http-factory-tests": "^0.9",
|
||||
"phpunit/phpunit": "^8.5.36 || ^9.6.15"
|
||||
"http-interop/http-factory-tests": "0.9.0",
|
||||
"phpunit/phpunit": "^8.5.39 || ^9.6.20"
|
||||
},
|
||||
"suggest": {
|
||||
"laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
|
||||
|
@ -3520,7 +3524,7 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/psr7/issues",
|
||||
"source": "https://github.com/guzzle/psr7/tree/2.6.2"
|
||||
"source": "https://github.com/guzzle/psr7/tree/2.6.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -3536,7 +3540,7 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2023-12-03T20:05:35+00:00"
|
||||
"time": "2024-07-18T09:59:12+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/container",
|
||||
|
@ -3689,16 +3693,16 @@
|
|||
},
|
||||
{
|
||||
"name": "mck89/peast",
|
||||
"version": "v1.16.2",
|
||||
"version": "v1.16.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/mck89/peast.git",
|
||||
"reference": "2791b08ffcc1862fe18eef85675da3aa58c406fe"
|
||||
"reference": "645ec21b650bc2aced18285c85f220d22afc1430"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/mck89/peast/zipball/2791b08ffcc1862fe18eef85675da3aa58c406fe",
|
||||
"reference": "2791b08ffcc1862fe18eef85675da3aa58c406fe",
|
||||
"url": "https://api.github.com/repos/mck89/peast/zipball/645ec21b650bc2aced18285c85f220d22afc1430",
|
||||
"reference": "645ec21b650bc2aced18285c85f220d22afc1430",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3711,7 +3715,7 @@
|
|||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.16.2-dev"
|
||||
"dev-master": "1.16.3-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
|
@ -3732,9 +3736,9 @@
|
|||
"description": "Peast is PHP library that generates AST for JavaScript code",
|
||||
"support": {
|
||||
"issues": "https://github.com/mck89/peast/issues",
|
||||
"source": "https://github.com/mck89/peast/tree/v1.16.2"
|
||||
"source": "https://github.com/mck89/peast/tree/v1.16.3"
|
||||
},
|
||||
"time": "2024-03-05T09:16:03+00:00"
|
||||
"time": "2024-07-23T14:00:32+00:00"
|
||||
},
|
||||
{
|
||||
"name": "mkalkbrenner/php-htmldiff-advanced",
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
uuid: 9576d52b-0e7a-482d-b817-5f50440b7b1f
|
||||
langcode: sl
|
||||
status: true
|
||||
dependencies:
|
||||
module:
|
||||
- yufu_admin
|
||||
theme:
|
||||
- gin
|
||||
id: gin_frontendlink
|
||||
theme: gin
|
||||
region: breadcrumb
|
||||
weight: 0
|
||||
provider: null
|
||||
plugin: yufu_admin_frontend_link
|
||||
settings:
|
||||
id: yufu_admin_frontend_link
|
||||
label: 'Frontend link'
|
||||
label_display: '0'
|
||||
provider: yufu_admin
|
||||
visibility: { }
|
|
@ -0,0 +1,20 @@
|
|||
uuid: d841654b-cd40-4ec1-827b-ec710f8dbc8f
|
||||
langcode: sl
|
||||
status: true
|
||||
dependencies:
|
||||
module:
|
||||
- yufu_admin
|
||||
theme:
|
||||
- olivero
|
||||
id: olivero_frontendlink
|
||||
theme: olivero
|
||||
region: secondary_menu
|
||||
weight: 0
|
||||
provider: null
|
||||
plugin: yufu_admin_frontend_link
|
||||
settings:
|
||||
id: yufu_admin_frontend_link
|
||||
label: 'Frontend link'
|
||||
label_display: '0'
|
||||
provider: yufu_admin
|
||||
visibility: { }
|
|
@ -6,5 +6,5 @@ _core:
|
|||
default_config_hash: zglzjmYxi0G0ag9MZ02y0LSJOdpWRwJxyP_OvFojFyo
|
||||
id: basic
|
||||
label: 'Basic block'
|
||||
revision: 0
|
||||
revision: false
|
||||
description: 'A basic block contains a title and a body.'
|
||||
|
|
|
@ -5,6 +5,7 @@ dependencies:
|
|||
config:
|
||||
- field.field.node.page.body
|
||||
- field.field.node.page.field_media
|
||||
- field.field.node.page.field_strojni_prevod
|
||||
- node.type.page
|
||||
module:
|
||||
- content_moderation
|
||||
|
@ -20,7 +21,7 @@ mode: default
|
|||
content:
|
||||
body:
|
||||
type: text_textarea_with_summary
|
||||
weight: 31
|
||||
weight: 9
|
||||
region: content
|
||||
settings:
|
||||
rows: 9
|
||||
|
@ -30,73 +31,80 @@ content:
|
|||
third_party_settings: { }
|
||||
created:
|
||||
type: datetime_timestamp
|
||||
weight: 10
|
||||
weight: 4
|
||||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
field_media:
|
||||
type: media_library_widget
|
||||
weight: 5
|
||||
weight: 3
|
||||
region: content
|
||||
settings:
|
||||
media_types: { }
|
||||
third_party_settings: { }
|
||||
field_strojni_prevod:
|
||||
type: boolean_checkbox
|
||||
weight: 12
|
||||
region: content
|
||||
settings:
|
||||
display_label: true
|
||||
third_party_settings: { }
|
||||
langcode:
|
||||
type: language_select
|
||||
weight: 2
|
||||
weight: 1
|
||||
region: content
|
||||
settings:
|
||||
include_locked: true
|
||||
third_party_settings: { }
|
||||
moderation_state:
|
||||
type: moderation_state_default
|
||||
weight: 100
|
||||
weight: 10
|
||||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
path:
|
||||
type: path
|
||||
weight: 30
|
||||
weight: 8
|
||||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
promote:
|
||||
type: boolean_checkbox
|
||||
weight: 15
|
||||
weight: 6
|
||||
region: content
|
||||
settings:
|
||||
display_label: true
|
||||
third_party_settings: { }
|
||||
status:
|
||||
type: boolean_checkbox
|
||||
weight: 120
|
||||
weight: 11
|
||||
region: content
|
||||
settings:
|
||||
display_label: true
|
||||
third_party_settings: { }
|
||||
sticky:
|
||||
type: boolean_checkbox
|
||||
weight: 16
|
||||
weight: 7
|
||||
region: content
|
||||
settings:
|
||||
display_label: true
|
||||
third_party_settings: { }
|
||||
title:
|
||||
type: string_textfield
|
||||
weight: -5
|
||||
weight: 0
|
||||
region: content
|
||||
settings:
|
||||
size: 60
|
||||
placeholder: ''
|
||||
third_party_settings: { }
|
||||
translation:
|
||||
weight: 10
|
||||
weight: 5
|
||||
region: content
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
uid:
|
||||
type: entity_reference_autocomplete
|
||||
weight: 5
|
||||
weight: 2
|
||||
region: content
|
||||
settings:
|
||||
match_operator: CONTAINS
|
||||
|
|
|
@ -5,6 +5,7 @@ dependencies:
|
|||
config:
|
||||
- field.field.node.page.body
|
||||
- field.field.node.page.field_media
|
||||
- field.field.node.page.field_strojni_prevod
|
||||
- node.type.page
|
||||
module:
|
||||
- text
|
||||
|
@ -32,6 +33,16 @@ content:
|
|||
third_party_settings: { }
|
||||
weight: 0
|
||||
region: content
|
||||
field_strojni_prevod:
|
||||
type: boolean
|
||||
label: above
|
||||
settings:
|
||||
format: default
|
||||
format_custom_false: ''
|
||||
format_custom_true: ''
|
||||
third_party_settings: { }
|
||||
weight: 104
|
||||
region: content
|
||||
links:
|
||||
settings: { }
|
||||
third_party_settings: { }
|
||||
|
|
|
@ -6,6 +6,7 @@ dependencies:
|
|||
- core.entity_view_mode.node.teaser
|
||||
- field.field.node.page.body
|
||||
- field.field.node.page.field_media
|
||||
- field.field.node.page.field_strojni_prevod
|
||||
- node.type.page
|
||||
module:
|
||||
- text
|
||||
|
@ -30,4 +31,5 @@ content:
|
|||
region: content
|
||||
hidden:
|
||||
field_media: true
|
||||
field_strojni_prevod: true
|
||||
langcode: true
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
uuid: 2958b0de-fe09-4c7b-b5e4-a92d0ee61fb3
|
||||
langcode: sl
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- field.storage.node.field_strojni_prevod
|
||||
- node.type.page
|
||||
id: node.page.field_strojni_prevod
|
||||
field_name: field_strojni_prevod
|
||||
entity_type: node
|
||||
bundle: page
|
||||
label: 'Strojni prevod?'
|
||||
description: ''
|
||||
required: false
|
||||
translatable: true
|
||||
default_value:
|
||||
-
|
||||
value: 0
|
||||
default_value_callback: ''
|
||||
settings:
|
||||
on_label: Da
|
||||
off_label: Ne
|
||||
field_type: boolean
|
|
@ -1 +0,0 @@
|
|||
label: 'Indeks pretraživanja'
|
|
@ -1 +0,0 @@
|
|||
label: Mamac
|
|
@ -1 +0,0 @@
|
|||
label: 'Stranica taksonomijskog pojma'
|
|
@ -2,7 +2,7 @@ label: 'Custom block library'
|
|||
description: 'Find and manage custom blocks.'
|
||||
display:
|
||||
default:
|
||||
display_title: Zadano
|
||||
display_title: Privzeto
|
||||
display_options:
|
||||
title: 'Custom block library'
|
||||
fields:
|
||||
|
@ -14,7 +14,6 @@ display:
|
|||
label: Operacije
|
||||
exposed_form:
|
||||
options:
|
||||
submit_button: Primjeni
|
||||
reset_button_label: Ponastavi
|
||||
exposed_sorts_label: 'Rasporedi po'
|
||||
sort_asc_label: Naraščajoče
|
||||
|
@ -27,7 +26,6 @@ display:
|
|||
expose:
|
||||
label: 'Opis bloka'
|
||||
page_1:
|
||||
display_title: Stranica
|
||||
display_options:
|
||||
menu:
|
||||
title: 'Custom block library'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
label: Komentari
|
||||
display:
|
||||
default:
|
||||
display_title: Zadano
|
||||
display_title: Privzeto
|
||||
display_options:
|
||||
title: Komentari
|
||||
fields:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
label: 'Posljednji komentari'
|
||||
display:
|
||||
default:
|
||||
display_title: Zadano
|
||||
display_title: Privzeto
|
||||
display_options:
|
||||
title: 'Posljednji komentari'
|
||||
empty:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
label: Mediji
|
||||
display:
|
||||
default:
|
||||
display_title: Zadano
|
||||
display_title: Privzeto
|
||||
display_options:
|
||||
title: Mediji
|
||||
fields:
|
||||
|
@ -12,6 +12,7 @@ display:
|
|||
uid:
|
||||
label: Avtor
|
||||
status:
|
||||
label: Status
|
||||
settings:
|
||||
format_custom_true: Objavljeno
|
||||
changed:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
display:
|
||||
default:
|
||||
display_title: Zadano
|
||||
display_title: Privzeto
|
||||
display_options:
|
||||
title: Mediji
|
||||
fields:
|
||||
|
@ -26,7 +26,6 @@ display:
|
|||
expose:
|
||||
label: Jezik
|
||||
page:
|
||||
display_title: Stranica
|
||||
display_options:
|
||||
fields:
|
||||
media_bulk_form:
|
||||
|
@ -38,10 +37,6 @@ display:
|
|||
widget:
|
||||
display_title: Widget
|
||||
display_options:
|
||||
arguments:
|
||||
bundle:
|
||||
exception:
|
||||
title: Svi
|
||||
filters:
|
||||
name:
|
||||
expose:
|
||||
|
@ -60,10 +55,6 @@ display:
|
|||
label: Avtor
|
||||
changed:
|
||||
label: Posodobljeno
|
||||
arguments:
|
||||
bundle:
|
||||
exception:
|
||||
title: Svi
|
||||
filters:
|
||||
name:
|
||||
expose:
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
label: 'Moderirane vsebine'
|
||||
display:
|
||||
default:
|
||||
display_title: Zadano
|
||||
display_title: Privzeto
|
||||
display_options:
|
||||
title: 'Moderirane vsebine'
|
||||
fields:
|
||||
title:
|
||||
label: Naslov
|
||||
type:
|
||||
label: 'Content type'
|
||||
name:
|
||||
label: Avtor
|
||||
changed:
|
||||
|
@ -24,6 +26,9 @@ display:
|
|||
title:
|
||||
expose:
|
||||
label: Naslov
|
||||
type:
|
||||
expose:
|
||||
label: 'Content type'
|
||||
langcode:
|
||||
expose:
|
||||
label: Jezik
|
||||
|
|
|
@ -1,18 +1,11 @@
|
|||
label: 'Pojam taksonomije'
|
||||
display:
|
||||
default:
|
||||
display_title: Zadano
|
||||
display_title: Privzeto
|
||||
display_options:
|
||||
exposed_form:
|
||||
options:
|
||||
submit_button: Primjeni
|
||||
reset_button_label: Ponastavi
|
||||
exposed_sorts_label: 'Rasporedi po'
|
||||
sort_asc_label: Naraščajoče
|
||||
sort_desc_label: Padajoče
|
||||
arguments:
|
||||
tid:
|
||||
exception:
|
||||
title: Svi
|
||||
page_1:
|
||||
display_title: Stranica
|
||||
|
|
|
@ -7,7 +7,7 @@ _core:
|
|||
name: Article
|
||||
type: article
|
||||
description: 'Use <em>articles</em> for time-sensitive content like news, press releases or blog posts.'
|
||||
help: ''
|
||||
help: null
|
||||
new_revision: true
|
||||
preview_mode: 1
|
||||
display_submitted: true
|
||||
|
|
|
@ -12,7 +12,7 @@ third_party_settings:
|
|||
name: Koncept
|
||||
type: concept
|
||||
description: 'Osnovni element manifesta'
|
||||
help: ''
|
||||
help: null
|
||||
new_revision: true
|
||||
preview_mode: 1
|
||||
display_submitted: true
|
||||
|
|
|
@ -7,7 +7,7 @@ _core:
|
|||
name: 'Basic page'
|
||||
type: page
|
||||
description: "Use <em>basic pages</em> for your static content, such as an 'About us' page."
|
||||
help: ''
|
||||
help: null
|
||||
new_revision: true
|
||||
preview_mode: 1
|
||||
display_submitted: false
|
||||
|
|
|
@ -3,4 +3,4 @@ _core:
|
|||
threshold:
|
||||
requirements_warning: 172800
|
||||
requirements_error: 1209600
|
||||
logging: 1
|
||||
logging: true
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
_core:
|
||||
default_config_hash: t7clj3mzmOGrXX0HuCH5usf0vEqRtnMTBFVBIEmZ5pc
|
||||
first_day: 0
|
||||
first_day: 1
|
||||
country:
|
||||
default: ''
|
||||
default: null
|
||||
timezone:
|
||||
default: UTC
|
||||
default: Europe/Ljubljana
|
||||
user:
|
||||
configurable: true
|
||||
default: 0
|
||||
|
|
|
@ -8,3 +8,4 @@ name: Tags
|
|||
vid: tags
|
||||
description: 'Use tags to group articles on similar topics into categories.'
|
||||
weight: 0
|
||||
new_revision: false
|
||||
|
|
|
@ -273,6 +273,7 @@ display:
|
|||
type: mini
|
||||
options:
|
||||
offset: 0
|
||||
pagination_heading_level: h4
|
||||
items_per_page: 50
|
||||
total_pages: null
|
||||
id: 0
|
||||
|
|
|
@ -533,6 +533,7 @@ display:
|
|||
type: full
|
||||
options:
|
||||
offset: 0
|
||||
pagination_heading_level: h4
|
||||
items_per_page: 50
|
||||
total_pages: null
|
||||
id: 0
|
||||
|
|
|
@ -19,7 +19,7 @@ base_field: nid
|
|||
display:
|
||||
default:
|
||||
id: default
|
||||
display_title: Zadano
|
||||
display_title: Privzeto
|
||||
display_plugin: default
|
||||
position: 0
|
||||
display_options:
|
||||
|
@ -427,6 +427,7 @@ display:
|
|||
pager:
|
||||
type: full
|
||||
options:
|
||||
pagination_heading_level: h4
|
||||
items_per_page: 50
|
||||
tags:
|
||||
next: 'Next ›'
|
||||
|
|
|
@ -522,6 +522,7 @@ display:
|
|||
type: full
|
||||
options:
|
||||
offset: 0
|
||||
pagination_heading_level: h4
|
||||
items_per_page: 50
|
||||
total_pages: null
|
||||
id: 0
|
||||
|
|
|
@ -139,6 +139,7 @@ display:
|
|||
type: mini
|
||||
options:
|
||||
offset: 0
|
||||
pagination_heading_level: h4
|
||||
items_per_page: 24
|
||||
total_pages: null
|
||||
id: 0
|
||||
|
|
|
@ -418,6 +418,7 @@ display:
|
|||
type: full
|
||||
options:
|
||||
offset: 0
|
||||
pagination_heading_level: h4
|
||||
items_per_page: 50
|
||||
total_pages: null
|
||||
id: 0
|
||||
|
|
|
@ -29,6 +29,7 @@ display:
|
|||
type: mini
|
||||
options:
|
||||
offset: 0
|
||||
pagination_heading_level: h4
|
||||
items_per_page: 10
|
||||
total_pages: 0
|
||||
id: 0
|
||||
|
|
|
@ -90,6 +90,72 @@ display:
|
|||
multi_type: separator
|
||||
separator: ', '
|
||||
field_api_classes: false
|
||||
vid:
|
||||
id: vid
|
||||
table: node_field_revision
|
||||
field: vid
|
||||
relationship: nid
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
entity_type: node
|
||||
entity_field: vid
|
||||
plugin_id: field
|
||||
label: 'ID stare različice'
|
||||
exclude: true
|
||||
alter:
|
||||
alter_text: false
|
||||
text: ''
|
||||
make_link: false
|
||||
path: ''
|
||||
absolute: false
|
||||
external: false
|
||||
replace_spaces: false
|
||||
path_case: none
|
||||
trim_whitespace: false
|
||||
alt: ''
|
||||
rel: ''
|
||||
link_class: ''
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
target: ''
|
||||
nl2br: false
|
||||
max_length: 0
|
||||
word_boundary: true
|
||||
ellipsis: true
|
||||
more_link: false
|
||||
more_link_text: ''
|
||||
more_link_path: ''
|
||||
strip_tags: false
|
||||
trim: false
|
||||
preserve_tags: ''
|
||||
html: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: true
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
click_sort_column: value
|
||||
type: number_integer
|
||||
settings:
|
||||
thousand_separator: ''
|
||||
prefix_suffix: true
|
||||
group_column: value
|
||||
group_columns: { }
|
||||
group_rows: true
|
||||
delta_limit: 0
|
||||
delta_offset: 0
|
||||
delta_reversed: false
|
||||
delta_first_last: false
|
||||
multi_type: separator
|
||||
separator: ', '
|
||||
field_api_classes: false
|
||||
vid_1:
|
||||
id: vid_1
|
||||
table: node_field_revision
|
||||
|
@ -156,72 +222,6 @@ display:
|
|||
multi_type: separator
|
||||
separator: ', '
|
||||
field_api_classes: false
|
||||
vid:
|
||||
id: vid
|
||||
table: node_field_revision
|
||||
field: vid
|
||||
relationship: nid
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
entity_type: node
|
||||
entity_field: vid
|
||||
plugin_id: field
|
||||
label: 'Latest Revision ID'
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
text: ''
|
||||
make_link: false
|
||||
path: ''
|
||||
absolute: false
|
||||
external: false
|
||||
replace_spaces: false
|
||||
path_case: none
|
||||
trim_whitespace: false
|
||||
alt: ''
|
||||
rel: ''
|
||||
link_class: ''
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
target: ''
|
||||
nl2br: false
|
||||
max_length: 0
|
||||
word_boundary: true
|
||||
ellipsis: true
|
||||
more_link: false
|
||||
more_link_text: ''
|
||||
more_link_path: ''
|
||||
strip_tags: false
|
||||
trim: false
|
||||
preserve_tags: ''
|
||||
html: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: true
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
click_sort_column: value
|
||||
type: number_integer
|
||||
settings:
|
||||
thousand_separator: ''
|
||||
prefix_suffix: true
|
||||
group_column: value
|
||||
group_columns: { }
|
||||
group_rows: true
|
||||
delta_limit: 0
|
||||
delta_offset: 0
|
||||
delta_reversed: false
|
||||
delta_first_last: false
|
||||
multi_type: separator
|
||||
separator: ', '
|
||||
field_api_classes: false
|
||||
title:
|
||||
id: title
|
||||
table: node_field_revision
|
||||
|
@ -287,6 +287,72 @@ display:
|
|||
multi_type: separator
|
||||
separator: ', '
|
||||
field_api_classes: false
|
||||
langcode:
|
||||
id: langcode
|
||||
table: node_field_revision
|
||||
field: langcode
|
||||
relationship: nid
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
entity_type: node
|
||||
entity_field: langcode
|
||||
plugin_id: field_language
|
||||
label: Jezik
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
text: ''
|
||||
make_link: false
|
||||
path: ''
|
||||
absolute: false
|
||||
external: false
|
||||
replace_spaces: false
|
||||
path_case: none
|
||||
trim_whitespace: false
|
||||
alt: ''
|
||||
rel: ''
|
||||
link_class: ''
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
target: ''
|
||||
nl2br: false
|
||||
max_length: 0
|
||||
word_boundary: true
|
||||
ellipsis: true
|
||||
more_link: false
|
||||
more_link_text: ''
|
||||
more_link_path: ''
|
||||
strip_tags: false
|
||||
trim: false
|
||||
preserve_tags: ''
|
||||
html: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: true
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
click_sort_column: value
|
||||
type: language
|
||||
settings:
|
||||
link_to_entity: 0
|
||||
native_language: 0
|
||||
group_column: value
|
||||
group_columns: { }
|
||||
group_rows: true
|
||||
delta_limit: 0
|
||||
delta_offset: 0
|
||||
delta_reversed: false
|
||||
delta_first_last: false
|
||||
multi_type: separator
|
||||
separator: ', '
|
||||
field_api_classes: 0
|
||||
moderation_state:
|
||||
id: moderation_state
|
||||
table: node_field_revision
|
||||
|
@ -496,6 +562,7 @@ display:
|
|||
type: mini
|
||||
options:
|
||||
offset: 0
|
||||
pagination_heading_level: h4
|
||||
items_per_page: 20
|
||||
total_pages: null
|
||||
id: 0
|
||||
|
|
|
@ -0,0 +1,259 @@
|
|||
uuid: 251e836d-f4e6-4f56-b284-0dad8b4c002c
|
||||
langcode: sl
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- node.type.concept
|
||||
module:
|
||||
- node
|
||||
- user
|
||||
id: zadnje_spremembe_2
|
||||
label: 'Zadnje spremembe 2'
|
||||
module: views
|
||||
description: ''
|
||||
tag: ''
|
||||
base_table: node_field_revision
|
||||
base_field: nid
|
||||
display:
|
||||
default:
|
||||
id: default
|
||||
display_title: Default
|
||||
display_plugin: default
|
||||
position: 0
|
||||
display_options:
|
||||
title: 'Zadnje spremembe 2'
|
||||
fields:
|
||||
changed:
|
||||
id: changed
|
||||
table: node_field_revision
|
||||
field: changed
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
entity_type: node
|
||||
entity_field: changed
|
||||
plugin_id: field
|
||||
label: ''
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
make_link: false
|
||||
absolute: false
|
||||
word_boundary: false
|
||||
ellipsis: false
|
||||
strip_tags: false
|
||||
trim: false
|
||||
html: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: true
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
click_sort_column: value
|
||||
type: timestamp
|
||||
settings:
|
||||
date_format: medium
|
||||
custom_date_format: ''
|
||||
timezone: ''
|
||||
tooltip:
|
||||
date_format: ''
|
||||
custom_date_format: ''
|
||||
time_diff:
|
||||
enabled: false
|
||||
future_format: '@interval hence'
|
||||
past_format: '@interval ago'
|
||||
granularity: 2
|
||||
refresh: 60
|
||||
group_column: value
|
||||
group_columns: { }
|
||||
group_rows: true
|
||||
delta_limit: 0
|
||||
delta_offset: 0
|
||||
delta_reversed: false
|
||||
delta_first_last: false
|
||||
multi_type: separator
|
||||
separator: ', '
|
||||
field_api_classes: false
|
||||
title:
|
||||
id: title
|
||||
table: node_field_revision
|
||||
field: title
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
entity_type: node
|
||||
entity_field: title
|
||||
plugin_id: field
|
||||
label: ''
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
make_link: false
|
||||
absolute: false
|
||||
word_boundary: false
|
||||
ellipsis: false
|
||||
strip_tags: false
|
||||
trim: false
|
||||
html: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: true
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
click_sort_column: value
|
||||
type: string
|
||||
settings:
|
||||
link_to_entity: false
|
||||
group_column: value
|
||||
group_columns: { }
|
||||
group_rows: true
|
||||
delta_limit: 0
|
||||
delta_offset: 0
|
||||
delta_reversed: false
|
||||
delta_first_last: false
|
||||
multi_type: separator
|
||||
separator: ', '
|
||||
field_api_classes: false
|
||||
pager:
|
||||
type: mini
|
||||
options:
|
||||
offset: 0
|
||||
pagination_heading_level: h4
|
||||
items_per_page: 10
|
||||
total_pages: null
|
||||
id: 0
|
||||
tags:
|
||||
next: ››
|
||||
previous: ‹‹
|
||||
expose:
|
||||
items_per_page: false
|
||||
items_per_page_label: 'Items per page'
|
||||
items_per_page_options: '5, 10, 25, 50'
|
||||
items_per_page_options_all: false
|
||||
items_per_page_options_all_label: '- All -'
|
||||
offset: false
|
||||
offset_label: Offset
|
||||
exposed_form:
|
||||
type: basic
|
||||
options:
|
||||
submit_button: Apply
|
||||
reset_button: false
|
||||
reset_button_label: Ponastavi
|
||||
exposed_sorts_label: 'Rasporedi po'
|
||||
expose_sort_order: true
|
||||
sort_asc_label: Naraščajoče
|
||||
sort_desc_label: Padajoče
|
||||
access:
|
||||
type: perm
|
||||
options:
|
||||
perm: 'view all revisions'
|
||||
cache:
|
||||
type: tag
|
||||
options: { }
|
||||
empty: { }
|
||||
sorts:
|
||||
changed:
|
||||
id: changed
|
||||
table: node_field_revision
|
||||
field: changed
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
entity_type: node
|
||||
entity_field: changed
|
||||
plugin_id: date
|
||||
order: DESC
|
||||
expose:
|
||||
label: ''
|
||||
field_identifier: ''
|
||||
exposed: false
|
||||
granularity: second
|
||||
arguments: { }
|
||||
filters:
|
||||
status:
|
||||
id: status
|
||||
table: node_field_revision
|
||||
field: status
|
||||
entity_type: node
|
||||
entity_field: status
|
||||
plugin_id: boolean
|
||||
value: '1'
|
||||
group: 1
|
||||
expose:
|
||||
operator: ''
|
||||
type:
|
||||
id: type
|
||||
table: node_field_data
|
||||
field: type
|
||||
relationship: nid
|
||||
entity_type: node
|
||||
entity_field: type
|
||||
plugin_id: bundle
|
||||
value:
|
||||
concept: concept
|
||||
style:
|
||||
type: default
|
||||
row:
|
||||
type: fields
|
||||
query:
|
||||
type: views_query
|
||||
options:
|
||||
query_comment: ''
|
||||
disable_sql_rewrite: false
|
||||
distinct: false
|
||||
replica: false
|
||||
query_tags: { }
|
||||
relationships:
|
||||
nid:
|
||||
id: nid
|
||||
table: node_field_revision
|
||||
field: nid
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: 'Get the actual content from a content revision.'
|
||||
entity_type: node
|
||||
entity_field: nid
|
||||
plugin_id: standard
|
||||
required: true
|
||||
header: { }
|
||||
footer: { }
|
||||
cache_metadata:
|
||||
max-age: -1
|
||||
contexts:
|
||||
- 'languages:language_content'
|
||||
- 'languages:language_interface'
|
||||
- url.query_args
|
||||
- 'user.node_grants:view'
|
||||
- user.permissions
|
||||
tags: { }
|
||||
page_1:
|
||||
id: page_1
|
||||
display_title: Page
|
||||
display_plugin: page
|
||||
position: 1
|
||||
display_options:
|
||||
display_extenders: { }
|
||||
path: zadnje-spremembe-2
|
||||
cache_metadata:
|
||||
max-age: -1
|
||||
contexts:
|
||||
- 'languages:language_content'
|
||||
- 'languages:language_interface'
|
||||
- url.query_args
|
||||
- 'user.node_grants:view'
|
||||
- user.permissions
|
||||
tags: { }
|
|
@ -1,25 +1,29 @@
|
|||
<script setup="setup">
|
||||
|
||||
import { ref } from 'vue'
|
||||
const nastavitveStore = useNastavitveStore()
|
||||
const { izbraniJezik } = storeToRefs(nastavitveStore)
|
||||
|
||||
const { etherpadUrl, etherpadPrefix } = useRuntimeConfig().public
|
||||
|
||||
const jezikPada = computed(() => izbraniJezik.value)
|
||||
|
||||
const props = defineProps({
|
||||
revisionId: String,
|
||||
onLoad: Function
|
||||
})
|
||||
|
||||
const embed = ref(null)
|
||||
|
||||
onMounted(() => {
|
||||
// Ce ni revisionId propertyja, se random generira.
|
||||
const uuid = props.revisionId ? props.revisionId : crypto.randomUUID()
|
||||
const padUrl = `${etherpadUrl}/p/${etherpadPrefix}${uuid}?showChat=false&showLineNumbers=false&toc=false`
|
||||
embed.value.src = padUrl
|
||||
})
|
||||
const uuid = props.revisionId ? props.revisionId : crypto.randomUUID()
|
||||
const padSrc = computed(
|
||||
() => `${etherpadUrl}/p/${etherpadPrefix}`
|
||||
+ `${izbraniJezik.value}-${uuid}`
|
||||
+ '?showChat=false&showLineNumbers=false&toc=false'
|
||||
)
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<iframe ref="embed" class="etherpad-textarea" @load="props.onLoad" />
|
||||
<iframe
|
||||
class="etherpad-textarea"
|
||||
@load="props.onLoad"
|
||||
:src="padSrc" />
|
||||
</template>
|
||||
|
|
|
@ -11,19 +11,17 @@ const route = useRoute()
|
|||
|
||||
const { izbraniJezik } = storeToRefs(nastavitveStore)
|
||||
|
||||
const routeName = computed(() => route.name)
|
||||
|
||||
const props = defineProps({
|
||||
naslov: String
|
||||
pojemid: String
|
||||
})
|
||||
|
||||
if (props.naslov && !(props.naslov in store.pojmi)) {
|
||||
if (props.pojemid && !(props.pojemid in store.pojmi)) {
|
||||
await store.naloziPojme(izbraniJezik.value)
|
||||
}
|
||||
|
||||
watch(izbraniJezik, jezik => {
|
||||
store.naloziPojme(jezik)
|
||||
})
|
||||
|
||||
const pojem = computed(() => store.pojmi[props.naslov])
|
||||
const pojem = computed(() => store.pojmi[props.pojemid])
|
||||
const revisionId = computed(() => pojem.value ? pojem.value.id : null)
|
||||
|
||||
const urejanje = ref(false)
|
||||
|
@ -34,7 +32,7 @@ const urediPojem = async () => {
|
|||
// Ustvari pad s tekstom pojma, ce se ne obstaja
|
||||
const tekstPojma = stripHtml(pojem.value.tekst).result
|
||||
const resp = await etherFetch('/createPad', {
|
||||
padID: revisionId.value,
|
||||
padID: izbraniJezik.value + '-' + revisionId.value,
|
||||
text: tekstPojma
|
||||
})
|
||||
urejanje.value = true
|
||||
|
@ -46,12 +44,12 @@ onMounted(() => {
|
|||
navigateTo(localePath('manifest') + '#skrol')
|
||||
}
|
||||
|
||||
// Link na editiranje pojma? Poskrolaj nanj + odpri editiranje
|
||||
if (route.params.guid === revisionId.value) {
|
||||
urejanje.value = true
|
||||
} else {
|
||||
// Sicer samo poskrolaj na pojem
|
||||
poskrolaj(container.value.parentNode)
|
||||
// Poskrolaj na pojem
|
||||
poskrolaj(container.value.parentNode)
|
||||
|
||||
// Link na editiranje pojma? odpri editiranje
|
||||
if (routeName.value.startsWith('pojem_uredi')) {
|
||||
urediPojem()
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -68,7 +66,7 @@ onUpdated(() => {
|
|||
<div v-if="!urejanje" class="gumb" @click="urediPojem">{{ $t('Uredi')}}</div>
|
||||
<div v-if="pojem" class="pojem">
|
||||
<h2>
|
||||
{{ naslov }}
|
||||
{{ pojem.naslov }}
|
||||
<StrojniPrevod v-if="pojem.strojni_prevod" />
|
||||
</h2>
|
||||
<div class="tekst" v-html="pojem.tekst" />
|
||||
|
@ -78,7 +76,7 @@ onUpdated(() => {
|
|||
ref="obrazec"
|
||||
:revisionId="revisionId"
|
||||
:pojem="pojem"
|
||||
:onZapri="() => { urejanje = false; store.naloziPojme() }" />
|
||||
:onZapri="() => navigateTo(localePath({ name: 'pojem_poglej', params: { pojemid: revisionId }}))" />
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
<script setup="setup">
|
||||
|
||||
const { etherFetch } = useEtherpadApi()
|
||||
const localePath = useLocalePath()
|
||||
const { t } = useI18n()
|
||||
|
||||
const store = usePojmiStore()
|
||||
const nastavitveStore = useNastavitveStore()
|
||||
|
||||
const izbraniJezik = computed(() => nastavitveStore.izbraniJezik)
|
||||
|
||||
const props = defineProps({
|
||||
revisionId: String,
|
||||
|
@ -16,43 +21,36 @@ let email = ref('')
|
|||
const oddajPredlog = async data => {
|
||||
// @TODO vsebina pada v tekst, testirat
|
||||
if (!naslov.value) {
|
||||
alert("Manjka naslov pojma!")
|
||||
alert(t("Manjka naslov pojma!"))
|
||||
return
|
||||
}
|
||||
|
||||
const starNaslov = props.pojem.naslov
|
||||
try {
|
||||
const resp = await etherFetch('/getText', { padID: `${izbraniJezik.value}-${props.revisionId}` })
|
||||
const stvarjenje = await store.ustvariPojem({
|
||||
title: naslov.value,
|
||||
email: email.value,
|
||||
text: resp.data.text,
|
||||
uuid: props.revisionId,
|
||||
language: izbraniJezik.value
|
||||
})
|
||||
alert(t("Sprememba predlagana!"))
|
||||
|
||||
const resp = await etherFetch('/getText', { padID: props.revisionId })
|
||||
const stvarjenje = store.ustvariPojem({
|
||||
title: naslov.value,
|
||||
email: email.value,
|
||||
text: resp.data.text,
|
||||
uuid: props.revisionId
|
||||
})
|
||||
console.log(stvarjenje)
|
||||
alert("sprememba predlagana!")
|
||||
|
||||
stvarjenje.then(() => {
|
||||
console.log('NOV NASLOV?', starNaslov, props.pojem.naslov)
|
||||
if (starNaslov !== props.pojem.naslov) {
|
||||
navigateTo(localePath({ name: 'pojem_poglej', params: { naslov: props.pojem.naslov }}))
|
||||
}
|
||||
})
|
||||
|
||||
props.onZapri()
|
||||
props.onZapri()
|
||||
} catch (error) {
|
||||
alert(t('Napaka pri pošiljanju.'))
|
||||
console.error(error)
|
||||
}
|
||||
}
|
||||
|
||||
// @TODO tole raje v pojmi.vue oz nov_pojem.vue - page!
|
||||
const etherNalozen = ev => {
|
||||
if (props.pojem.nov) {
|
||||
navigateTo(localePath({ name: 'pojem_dodaj', params: { guid: revisionId }}), {
|
||||
replace: true
|
||||
})
|
||||
navigateTo(localePath({ name: 'pojem_dodaj', params: { guid: revisionId }}))
|
||||
} else {
|
||||
navigateTo(localePath({ name: 'pojem_uredi', params: {
|
||||
naslov: props.pojem.naslov,
|
||||
guid: props.revisionId
|
||||
}}), { replace: true })
|
||||
pojemid: props.revisionId
|
||||
}}))
|
||||
}
|
||||
//window.location.hash = props.revisionId
|
||||
}
|
||||
|
|
|
@ -17,7 +17,10 @@ export const useUi = () => ({
|
|||
setTimeout(() => {
|
||||
if (sekcija) {
|
||||
const top = sekcija.getBoundingClientRect().top
|
||||
getScrollParent(sekcija).scrollTo({ top, behavior: 'smooth' })
|
||||
const parent = getScrollParent(sekcija)
|
||||
if (parent && top > 0) {
|
||||
parent.scrollTo({ top })
|
||||
}
|
||||
}
|
||||
}, timeout)
|
||||
}
|
||||
|
|
|
@ -7,5 +7,9 @@
|
|||
"Dodaj nov pojem": "Neues konzept hinzufügen",
|
||||
"Uredi": "Bearbeiten",
|
||||
"Predlagaj": "Vorschlag",
|
||||
"Zapri": "Schließen"
|
||||
"Zapri": "Schließen",
|
||||
"Sprememba predlagana!": "Änderung vorgeschlagen!",
|
||||
"Napaka pri pošiljanju.": "Fehler beim Senden von Vorschlägen.",
|
||||
"Manjka naslov pojma!": "Der Titel des Konzepts fehlt!",
|
||||
"strojni prevod": "übersetzung der maschine"
|
||||
}
|
||||
|
|
|
@ -6,6 +6,10 @@
|
|||
"Vsak lahko prispeva k vsebinam manifesta. Predlaga lahko nov pojem ali ureja, dopolni ali predela obstoječe.": "Anyone can add content to the manifesto. You can suggest a new concept or edit, amend or adjust an existing one.",
|
||||
"Dodaj nov pojem": "Add new concept",
|
||||
"Uredi": "Edit",
|
||||
"Predlagaj": "Suggest",
|
||||
"Zapri": "Close"
|
||||
"Predlagaj": "Propose",
|
||||
"Zapri": "Close",
|
||||
"Sprememba predlagana!": "Change proposed!",
|
||||
"Napaka pri pošiljanju.": "Error sending proposition.",
|
||||
"Manjka naslov pojma!": "Concept title missing!",
|
||||
"strojni prevod": "machine translation"
|
||||
}
|
||||
|
|
|
@ -7,5 +7,9 @@
|
|||
"Dodaj nov pojem": "Añadir nuevo concepto",
|
||||
"Uredi": "Editar",
|
||||
"Predlagaj": "Sugerencias",
|
||||
"Zapri": "Cerca"
|
||||
"Zapri": "Cerca",
|
||||
"Sprememba predlagana!": "¡Cambio propuesto!",
|
||||
"Napaka pri pošiljanju.": "Proposición de envío de errores.",
|
||||
"Manjka naslov pojma!": "¡El título del concepto está desaparecido!",
|
||||
"strojni prevod": "traducción automática"
|
||||
}
|
||||
|
|
|
@ -5,5 +5,8 @@
|
|||
"Vsak lahko prispeva k vsebinam manifesta. Predlaga lahko nov pojem ali ureja, dopolni ali predela obstoječe.": "Svatko može pridonijeti sadržaju manifesta. Predložiti može novi koncept ili urediti, dopuniti ili revidirati postojeće koncepte.",
|
||||
"Dodaj nov pojem": "Dodajte novi koncept",
|
||||
"Zapri": "Zatvori",
|
||||
"Predlagaj": "Predloži"
|
||||
"Predlagaj": "Predloži",
|
||||
"Sprememba predlagana!": "Promjena predložena!",
|
||||
"Napaka pri pošiljanju.": "Greška u slanju predloga.",
|
||||
"Manjka naslov pojma!": "Naslov koncepta nedostaje!"
|
||||
}
|
||||
|
|
|
@ -27,15 +27,15 @@ export default defineNuxtConfig({
|
|||
'pages:extend' (pages) {
|
||||
pages.push({
|
||||
name: 'pojem_poglej',
|
||||
path: '/manifest/:naslov',
|
||||
path: '/manifest/:pojemid',
|
||||
file: '~/pages/manifest/pojem.vue'
|
||||
}, {
|
||||
name: 'pojem_uredi',
|
||||
path: '/manifest/:naslov/uredi/:guid',
|
||||
path: '/manifest/:pojemid/uredi',
|
||||
file: '~/pages/manifest/pojem.vue'
|
||||
}, {
|
||||
name: 'pojem_dodaj',
|
||||
path: '/manifest/dodaj/:guid',
|
||||
path: '/manifest/dodaj/:guid?',
|
||||
file: '~/pages/manifest/dodaj.vue'
|
||||
})
|
||||
}
|
||||
|
|
|
@ -4,7 +4,6 @@ const store = usePojmiStore()
|
|||
const nastavitveStore = useNastavitveStore()
|
||||
|
||||
const { poskrolaj } = useUi()
|
||||
const { getRandomUUID } = useCrypto()
|
||||
|
||||
const { izbraniJezik } = storeToRefs(nastavitveStore)
|
||||
|
||||
|
@ -22,17 +21,17 @@ onMounted(() => {
|
|||
|
||||
<template>
|
||||
<h3 class="navodila" ref="navodila">{{ $t('Vsak lahko prispeva k vsebinam manifesta. Predlaga lahko nov pojem ali ureja, dopolni ali predela obstoječe.') }}</h3>
|
||||
<NuxtLink class="gumb" :to="localePath({ name: 'pojem_dodaj', params: { guid: getRandomUUID() }})">
|
||||
<NuxtLink class="gumb" :to="localePath({ name: 'pojem_dodaj' })">
|
||||
{{ $t('Dodaj nov pojem') }}
|
||||
</NuxtLink>
|
||||
<NuxtLink
|
||||
v-for="pojem in Object.keys(store.pojmi)"
|
||||
:naslov="pojem"
|
||||
:to="localePath({ name: 'pojem_poglej', params: { naslov: pojem }})"
|
||||
v-for="pojem in Object.values(store.pojmi)"
|
||||
:naslov="pojem.naslov"
|
||||
:to="localePath({ name: 'pojem_poglej', params: { pojemid: pojem.id }})"
|
||||
class="okvir">
|
||||
<h2>
|
||||
{{ pojem }}
|
||||
<StrojniPrevod v-if="store.pojmi[pojem].strojni_prevod" />
|
||||
{{ pojem.naslov }}
|
||||
<StrojniPrevod v-if="pojem.strojni_prevod" />
|
||||
</h2>
|
||||
</NuxtLink>
|
||||
</template>
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
<script setup="setup">
|
||||
|
||||
const { etherpadApiUrl } = useEtherpadApi()
|
||||
const { naslov } = useRoute().params
|
||||
const { pojemid } = useRoute().params
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="okvir">
|
||||
<Pojem :naslov="naslov" />
|
||||
<Pojem :pojemid="pojemid" />
|
||||
</div>
|
||||
|
||||
<NuxtLink class="gumb" :to="localePath('manifest') + '#skrol'">
|
||||
|
|
|
@ -13,7 +13,7 @@ export const usePojmiStore = defineStore('pojmi', {
|
|||
tekst: s.body ? s.body.processed : '',
|
||||
media: s.fieldMedia,
|
||||
strojni_prevod: s.fieldStrojniPrevod
|
||||
}), 'naslov')
|
||||
}), 'id')
|
||||
},
|
||||
|
||||
async ustvariPojem(data) {
|
||||
|
@ -28,7 +28,7 @@ export const usePojmiStore = defineStore('pojmi', {
|
|||
body: JSON.stringify(data)
|
||||
})
|
||||
|
||||
const resp = await req.json()
|
||||
return req
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
@ -10,3 +10,11 @@ Obveščanje preko mailov, ko se spremeni revizija koncepta.
|
|||
2. Kot urednik objavimo predlagane spremembe.
|
||||
- Fino bi bilo imet pregled (view) predlaganih in še ne objavljenih sprememb.
|
||||
3. Pogledamo v mailhog, če so se maili poslali. (ddev status)
|
||||
|
||||
## Frontend link
|
||||
|
||||
Definiramo ga v drupal nastavitvah za site:
|
||||
|
||||
```php
|
||||
$settings['yufu_frontend'] = 'http://localhost:3000';
|
||||
```
|
||||
|
|
|
@ -0,0 +1,61 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Drupal\yufu_admin\Plugin\Block;
|
||||
|
||||
use Drupal\Core\Block\BlockBase;
|
||||
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
|
||||
use Drupal\Core\Site\Settings;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
|
||||
/**
|
||||
* Provides a frontend link block.
|
||||
*
|
||||
* @Block(
|
||||
* id = "yufu_admin_frontend_link",
|
||||
* admin_label = @Translation("Frontend link"),
|
||||
* category = @Translation("yufu"),
|
||||
* )
|
||||
*/
|
||||
final class FrontendLinkBlock extends BlockBase implements ContainerFactoryPluginInterface {
|
||||
|
||||
private $frontendLink = '';
|
||||
|
||||
/**
|
||||
* Constructs the plugin instance.
|
||||
*/
|
||||
public function __construct(
|
||||
array $configuration,
|
||||
$plugin_id,
|
||||
$plugin_definition,
|
||||
private readonly Settings $settings,
|
||||
) {
|
||||
parent::__construct($configuration, $plugin_id, $plugin_definition);
|
||||
|
||||
$this->frontendLink = $settings->get('yufu_frontend', FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition): self {
|
||||
return new self(
|
||||
$configuration,
|
||||
$plugin_id,
|
||||
$plugin_definition,
|
||||
$container->get('settings'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function build(): array {
|
||||
$build['content'] = [
|
||||
'#markup' => "<a target=\"_blank\" href=\"{$this->frontendLink}\">{$this->t('Frontend')}</a>"
|
||||
];
|
||||
return $build;
|
||||
}
|
||||
|
||||
}
|
|
@ -13,3 +13,13 @@ Post request endpoint za dodajanje pojmov.
|
|||
## Posiljanje emailov
|
||||
|
||||
https://drupal.stackexchange.com/questions/235157/message-not-being-sent-in-the-body-of-the-mail
|
||||
|
||||
## Libretranslate
|
||||
|
||||
Automatic translations come from a libretranslate instance.
|
||||
You must configure two settings options, the URL and API key:
|
||||
|
||||
```php
|
||||
$settings['yufu_libretranslate_url'] = 'http[s]://<libretranslate_url>';
|
||||
$settings['yufu_libretranslate_apikey'] = '<apikey>';
|
||||
```
|
||||
|
|
|
@ -111,14 +111,20 @@ class AddConcept extends ResourceBase {
|
|||
if (!$this->currentUser->hasPermission('access content')) {
|
||||
throw new AccessDeniedHttpException();
|
||||
}
|
||||
// Fields: naslov, text, povezani pojmi, email
|
||||
// Optional fields: language, related concept.
|
||||
if (empty($data['title']) || empty($data['text']) || empty($data['uuid'])) {
|
||||
throw new MissingDataException('Title, uuid or text missing.');
|
||||
// Fields: naslov, text, email, language
|
||||
// Optional fields: email, related_concept @TODO
|
||||
if (empty($data['title']) || empty($data['text']) || empty($data['uuid']) || empty($data['language'])) {
|
||||
throw new MissingDataException('Title, uuid, text or language missing.');
|
||||
}
|
||||
$uid = $this->getUserIdByEmail($data['email'] ?? null);
|
||||
if ($concept = $this->getConceptFromUuid($data['uuid'])) {
|
||||
// Concept exists - create a new revision.
|
||||
if ($concept->hasTranslation($data['language'])) {
|
||||
$concept = $concept->getTranslation($data['language']);
|
||||
} else {
|
||||
$concept = $concept->addTranslation($data['language']);
|
||||
}
|
||||
|
||||
$concept->setNewRevision(TRUE);
|
||||
$concept->setRevisionUserId($uid);
|
||||
$concept->setRevisionCreationTime(\Drupal::time()->getRequestTime());
|
||||
|
@ -133,14 +139,14 @@ class AddConcept extends ResourceBase {
|
|||
$concept->setRevisionLogMessage('New revision by concept endpoint.');
|
||||
$concept->set('moderation_state', 'draft');
|
||||
$concept->set('status', 0);
|
||||
$concept->set('field_strojni_prevod', 0);
|
||||
$concept->save();
|
||||
$this->logger->notice('New concept @title revision @revid created by uid @uid.', [
|
||||
'@title' => $concept->getTitle(),
|
||||
'@revid' => $concept->getRevisionId(),
|
||||
'@uid' => $uid,
|
||||
]);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
// Concept does not exist - create a new node.
|
||||
$concept = [
|
||||
'type' => 'concept',
|
||||
|
@ -149,6 +155,8 @@ class AddConcept extends ResourceBase {
|
|||
'uuid' => $data['uuid'],
|
||||
'uid' => $uid,
|
||||
'moderation_state' => 'draft',
|
||||
'field_strojni_prevod' => 0,
|
||||
'language' => $data['language']
|
||||
];
|
||||
// @TODO Check if related concepts are set and add them to the concept.
|
||||
// @TODO Check language and add set it on concept if exists.
|
||||
|
|
|
@ -7,6 +7,7 @@ namespace Drupal\yufu_concept;
|
|||
use Psr\Http\Client\ClientInterface;
|
||||
use Drupal\Core\Site\Settings;
|
||||
use GuzzleHttp\Psr7\Response;
|
||||
use GuzzleHttp\Exception\BadResponseException;
|
||||
|
||||
/**
|
||||
* Ta service omogoča prevajanje preko libretranslate APIja.
|
||||
|
@ -31,18 +32,26 @@ final class Translate {
|
|||
* Prevede $besedila iz $izvorniJezik v $ciljniJezik
|
||||
*/
|
||||
public function prevedi(array $besedila, $izvorniJezik, $ciljniJezik): ?array {
|
||||
$odziv = $this->request('translate', [
|
||||
'json' => [
|
||||
'q' => $besedila,
|
||||
'source' => $izvorniJezik,
|
||||
'target' => $ciljniJezik,
|
||||
'format' => 'text'
|
||||
]
|
||||
]);
|
||||
$retry = 0;
|
||||
while ($retry < 3) {
|
||||
try {
|
||||
$odziv = $this->request('translate', [
|
||||
'json' => [
|
||||
'q' => $besedila,
|
||||
'source' => $izvorniJezik,
|
||||
'target' => $ciljniJezik,
|
||||
'format' => 'text'
|
||||
]
|
||||
]);
|
||||
|
||||
if ($odziv->getStatusCode() == 200) {
|
||||
$json = json_decode($odziv->getBody()->getContents(), true);
|
||||
return $json['translatedText'];
|
||||
if ($odziv->getStatusCode() == 200) {
|
||||
$json = json_decode($odziv->getBody()->getContents(), true);
|
||||
return $json['translatedText'];
|
||||
}
|
||||
$retry += 1;
|
||||
} catch (BadResponseException $e) {
|
||||
$retry += 1;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
|
@ -15,9 +15,10 @@ use Symfony\Component\HttpClient\HttpClient;
|
|||
*/
|
||||
function yufu_concept_node_presave(EntityInterface $entity) {
|
||||
if ($entity instanceOf NodeInterface && $entity->bundle() == 'concept') {
|
||||
// Dodaj avtorja spremembe med urednike, če še ni
|
||||
$transition = \Drupal::service('content_moderation_notifications.notification_information')->getTransition($entity);
|
||||
if ($transition->id() == 'publish') {
|
||||
// Ko je sprememba koncepta potrjena
|
||||
if ($transition->id() == 'publish' && !$entity->field_strojni_prevod->value) {
|
||||
// Dodaj avtorja spremembe med urednike, če še ni
|
||||
if ($user = $entity->uid->entity) {
|
||||
if (!$user->status->value) {
|
||||
$user->set('status', 1);
|
||||
|
@ -29,13 +30,36 @@ function yufu_concept_node_presave(EntityInterface $entity) {
|
|||
}
|
||||
}
|
||||
|
||||
// Dodaj oz. posodobi manjkajoce prevode (ampak samo ce ne gre za
|
||||
// strojni prevod!)
|
||||
// Dodaj oz. posodobi manjkajoce prevode navadnih strani
|
||||
function yufu_concept_node_insert(EntityInterface $entity) {
|
||||
uskladi_prevode($entity);
|
||||
if ($entity instanceOf NodeInterface && $entity->bundle() == 'page') {
|
||||
uskladi_prevode($entity);
|
||||
}
|
||||
|
||||
if ($entity instanceOf NodeInterface && $entity->bundle() == 'concept') {
|
||||
$transition = \Drupal::service('content_moderation_notifications.notification_information')->getTransition($entity);
|
||||
// Ko je sprememba koncepta potrjena
|
||||
if ($transition->id() == 'publish' && !$entity->field_strojni_prevod->value) {
|
||||
/* Posodobi strojne prevode */
|
||||
uskladi_prevode($entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
function yufu_concept_node_update(EntityInterface $entity) {
|
||||
uskladi_prevode($entity);
|
||||
if ($entity instanceOf NodeInterface && $entity->bundle() == 'page') {
|
||||
uskladi_prevode($entity);
|
||||
}
|
||||
|
||||
if ($entity instanceOf NodeInterface && $entity->bundle() == 'concept') {
|
||||
$transition = \Drupal::service('content_moderation_notifications.notification_information')->getTransition($entity);
|
||||
//var_dump($entity->status);die;
|
||||
// Ko je sprememba koncepta potrjena
|
||||
if ($transition->id() == 'publish' && !$entity->field_strojni_prevod->value) {
|
||||
/* Posodobi strojne prevode */
|
||||
//var_dump('uskladi prevode!');die;
|
||||
uskladi_prevode($entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function prevedi_koncept(EntityInterface $entity, EntityInterface $prevod) {
|
||||
|
@ -43,6 +67,7 @@ function prevedi_koncept(EntityInterface $entity, EntityInterface $prevod) {
|
|||
|
||||
$izvorniJezik = $entity->language()->getId();
|
||||
$ciljniJezik = $prevod->language()->getId();
|
||||
//var_dump('prevajam koncept!', $izvorniJezik, $ciljniJezik);
|
||||
|
||||
// Hrvaščina ni podprta, zato jo zamenjamo s srbščino
|
||||
if ($izvorniJezik == 'hr') {
|
||||
|
@ -66,12 +91,14 @@ function prevedi_koncept(EntityInterface $entity, EntityInterface $prevod) {
|
|||
|
||||
$prevod->set('title', $naslov);
|
||||
$prevod->set('body', $tekst);
|
||||
$prevod->setNewRevision();
|
||||
$prevod->moderation_state = 'published';
|
||||
}
|
||||
|
||||
function uskladi_prevode(EntityInterface $entity) {
|
||||
if ($entity instanceOf NodeInterface
|
||||
&& $entity->bundle() == 'concept'
|
||||
&& !$entity->field_strojni_prevod->value) {
|
||||
&& !$entity->field_strojni_prevod->value
|
||||
&& ($entity->bundle() == 'concept' || $entity->bundle() == 'page')) {
|
||||
|
||||
$vsiJeziki = array_keys(\Drupal::languageManager()->getLanguages());
|
||||
|
||||
|
@ -86,6 +113,7 @@ function uskladi_prevode(EntityInterface $entity) {
|
|||
$prevod = $entity->addTranslation($jezik, $entity->toArray());
|
||||
prevedi_koncept($entity, $prevod);
|
||||
$prevod->set('field_strojni_prevod', true);
|
||||
$prevod->setNewRevision();
|
||||
$prevod->save();
|
||||
|
||||
$ostaliJeziki = array_diff($ostaliJeziki, [$jezik]);
|
||||
|
|
Loading…
Reference in New Issue