-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/3.x'
# Conflicts: # lang/de.yml # lang/en.yml # lang/fr.yml # src/Extensions/EmailLink.php # src/Extensions/ExternalURLLink.php # src/Extensions/FileLink.php # src/Extensions/GlobalAnchorLink.php # src/Extensions/NoLink.php # src/Extensions/PhoneLink.php # src/Extensions/SiteTreeLink.php # src/Extensions/SystemLink.php # src/Model/SuperLink.php
- Loading branch information
Showing
22 changed files
with
1,586 additions
and
1,171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,53 @@ | ||
# silverstripe-superlinker | ||
|
||
Use master/v2.x (compatible with SS 4 & 5). | ||
|
||
This branch is under active development. It **will** change and break, likely including namespaces. | ||
|
||
## CMS fields testing snippets | ||
|
||
```php | ||
// for $has_one relation, testing inline fields | ||
$linkFields = SuperLink::singleton()->getCMSLinkFields('SuperLink' . HasOneEdit::FIELD_SEPARATOR); | ||
$fields->addFieldsToTab('Root.Main', $linkFields->toArray()); | ||
|
||
// for $has_one relation, testing with edit form | ||
$fields->addFieldsToTab('Root.Main', [ | ||
HasOneMiniGridField::create( | ||
'SuperLink', | ||
'SuperLink', | ||
$this | ||
) | ||
]); | ||
|
||
// for $has_many relation, testing with gridfield | ||
$linksField = MiniGridField::create( | ||
'SuperLinks', | ||
'Links', | ||
$this | ||
)->setLimit(7)->setShowLimitMessage(true); | ||
$fields->addFieldToTab('Root.Main', $linksField); | ||
|
||
// for the HasOne/MiniGridFields, currently adding these lines provides nicer UI | ||
$config = $linksField->getGridConfig()?->addComponent(new GridField_ActionMenu()); | ||
$linksField->setGridConfig($config); | ||
``` | ||
|
||
## v3 to-dos | ||
- Validations for each link type | ||
- Richer summary fields content | ||
- Update MiniGridField to use GridField_ActionMenu | ||
- Remove yml config currently in place for ease of development (convert to yml.example/readme or similar) | ||
- `DependentDropdownField`/`DependentGroupedDropdownField` no longer detect changes from `TreeDropdownField`, so the Anchors dropdown for `SiteTreeLink` is no longer working. | ||
- Modal for adding rather than `HasOneMiniGridField` | ||
- Resolve indecision around handling, naming and accessors for Title vs LinkText | ||
- Broken or empty link reporting | ||
- Proper i18n/_t()/translations | ||
- Permissions | ||
- Add awareness of link container objects for orphan reporting/pruning (& potentially expanding config to container/relation) | ||
- Migration script from v2 to v3 | ||
- Documentation/readme | ||
- Formats/themes/styles as optional extensions | ||
- Cleverer handling of settings/options | ||
- Can we integrate this with a new TinyMCE plugin/button or existing ss_link? | ||
- Apply display logic (and perhaps field sort) via yml config using linktypes x fieldnames (allowing link types to share fields rather than requiring each class to utilise its own fields) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,63 @@ | ||
--- | ||
Name: fromholdio-superlinker | ||
--- | ||
|
||
Fromholdio\SuperLinker\Model\SuperLink: | ||
extensions: | ||
- 'Fromholdio\SuperLinker\Extensions\EmailLink' | ||
- 'Fromholdio\SuperLinker\Extensions\ExternalLink' | ||
- 'Fromholdio\SuperLinker\Extensions\FileLink' | ||
- 'Fromholdio\SuperLinker\Extensions\GlobalAnchorLink' | ||
- 'Fromholdio\SuperLinker\Extensions\NullLink' | ||
- 'Fromholdio\SuperLinker\Extensions\PhoneLink' | ||
- 'Fromholdio\SuperLinker\Extensions\SiteTreeLink' | ||
- 'Fromholdio\SuperLinker\Extensions\SystemLink' | ||
disallowed_types: | ||
- nolink | ||
types: | ||
email: | ||
sort: 2 | ||
external: | ||
sort: 3 | ||
phone: | ||
sort: 4 | ||
nolink: | ||
sort: 5 | ||
globalanchor: | ||
sort: 7 | ||
system: | ||
sort: 6 | ||
sitetree: | ||
sort: 0 | ||
file: | ||
sort: 1 | ||
|
||
Fromholdio\SuperLinker\Model\VersionedSuperLink: | ||
extensions: | ||
- 'Fromholdio\SuperLinker\Extensions\EmailLink' | ||
- 'Fromholdio\SuperLinker\Extensions\ExternalLink' | ||
- 'Fromholdio\SuperLinker\Extensions\FileLink' | ||
- 'Fromholdio\SuperLinker\Extensions\GlobalAnchorLink' | ||
- 'Fromholdio\SuperLinker\Extensions\NullLink' | ||
- 'Fromholdio\SuperLinker\Extensions\PhoneLink' | ||
- 'Fromholdio\SuperLinker\Extensions\SiteTreeLink' | ||
- 'Fromholdio\SuperLinker\Extensions\SystemLink' | ||
disallowed_types: | ||
- nolink | ||
types: | ||
email: | ||
sort: 2 | ||
external: | ||
sort: 3 | ||
phone: | ||
sort: 4 | ||
nolink: | ||
sort: 5 | ||
globalanchor: | ||
sort: 7 | ||
system: | ||
sort: 6 | ||
sitetree: | ||
sort: 0 | ||
file: | ||
sort: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,47 @@ | ||
fr: | ||
Fromholdio\SuperLinker\Extensions\EmailLink: | ||
Body: 'Corps' | ||
Email: 'E-mail' | ||
EmailBCC: BCC | ||
EmailCC: CC | ||
MustProvideEmail: 'Vous devez fournir une adresse e-mail' | ||
Subject: 'Sujet' | ||
Fromholdio\SuperLinker\Extensions\ExternalURLLink: | ||
ExternalURLMustBeComplete: 'Les URL externes doivent être complètes, y compris http:// ou https://' | ||
URL: URL | ||
Body: Corps | ||
Email: E-mail | ||
Subject: Sujet | ||
Fromholdio\SuperLinker\Extensions\ExternalLink: | ||
ExternalURL: URL | ||
Fromholdio\SuperLinker\Extensions\FileLink: | ||
Behaviour: comportement | ||
DisplayInBrowser: 'Afficher le fichier dans la fenêtre du navigateur (si possible)' | ||
Download: "Télécharger le fichier directement sur l'appareil de l'utilisateur" | ||
File: Fichier | ||
FileRequired: 'Vous devez télécharger ou sélectionner un fichier à lier' | ||
Fromholdio\SuperLinker\Extensions\GlobalAnchorLink: | ||
Anchor: Ancre | ||
AnchorRequired: 'Vous devez sélectionner une ancre' | ||
Fromholdio\SuperLinker\Extensions\NoLink: | ||
NoLink: '- Pas de lien -' | ||
TitleRequired: 'Vous devez fournir un titre' | ||
GlobalAnchor: 'Ancre du site' | ||
Fromholdio\SuperLinker\Extensions\PhoneLink: | ||
Phone: Téléphone | ||
PhoneRequired: 'Vous devez fournir un numéro de téléphone' | ||
PhoneNumber: 'Numéro de téléphone' | ||
Fromholdio\SuperLinker\Extensions\SiteTreeLink: | ||
Anchor: Ancre | ||
Page: Page | ||
PageRequired: 'Vous devez sélectionner une page à lier' | ||
PageAnchorOptional: 'Ancre de page (facultatif)' | ||
PageOnThisWebsite: 'Page sur ce site' | ||
SelectAPage: 'Sélectionnez une page' | ||
SelectAnchor: 'Sélectionnez une ancre (facultatif)' | ||
SelectAnAnchor: 'Sélectionnez une ancre' | ||
Fromholdio\SuperLinker\Extensions\SuperLinkIconExtension: | ||
LinkIcon: Symbole | ||
Fromholdio\SuperLinker\Extensions\SystemLink: | ||
SystemLink: 'Lien système' | ||
SystemLinkRequired: 'Vous devez sélectionner un lien système' | ||
Fromholdio\SuperLinker\Model\SuperLink: | ||
CustomLinkText: 'Texte du lien' | ||
DoNoFollow: 'Demandez aux moteurs de recherche de ne pas suivre ce lien' | ||
DoOpenNewWindow: 'Ouvrir le lien dans une nouvelle fenêtre' | ||
NewWindow: 'Nouvelle fenêtre' | ||
OptionalWillBeGenerated: 'Facultatif. Sera généré automatiquement si laissé vide.' | ||
TabBehaviour: Comportement | ||
TabTarget: Cible | ||
URL: URL | ||
URLInvalid: 'Vous devez fournir une URL valide' | ||
URLRequired: 'Vous devez fournir une URL' | ||
PLURALNAME: Liens | ||
PLURALS: | ||
one: 'Un lien' | ||
other: '{count} liens' | ||
SINGULARNAME: Lien | ||
Fromholdio\SuperLinker\Model\SuperLinkTrait: | ||
DoNoFollow: "Demandez aux moteurs de recherche d'ignorer" | ||
DoOpenInNew: 'Ouvrir dans une nouvelle fenêtre' | ||
LinkText: Texte | ||
LinkType: Type | ||
MainTab: Base | ||
NotConfigured: 'Pas configuré' | ||
OptionalAutoGenerated: 'Facultatif. Sera généré automatiquement à partir du lien si ce champ est laissé vide.' | ||
OptionsGroup: Options | ||
SelectLinkType: 'Sélectionnez le type de lien' | ||
Fromholdio\SuperLinker\Model\VersionedSuperLink: | ||
PLURALNAME: Liens | ||
PLURALS: | ||
one: 'Un lien' | ||
other: '{count} liens' | ||
SINGULARNAME: Lien |
Oops, something went wrong.