-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
9,942 additions
and
1 deletion.
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
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Composer | ||
/vendor/ | ||
|
||
# npm | ||
/node_modules/ | ||
|
||
# build products | ||
/resources/css/ | ||
/resources/images/ | ||
/resources/js/ | ||
mix-manifest.json | ||
|
||
# Eclipse | ||
.metadata | ||
.project | ||
/bin/ | ||
/tmp/ | ||
*.tmp | ||
*.bak | ||
*.swp | ||
*~.nib | ||
local.properties | ||
.settings/ | ||
.loadpath | ||
.recommenders | ||
|
||
# External tool builders | ||
.externalToolBuilders/ | ||
/build/ | ||
|
||
# Locally stored "Eclipse launch configurations" | ||
*.launch | ||
|
||
# PDT-specific (PHP Development Tools) | ||
.buildpath | ||
|
||
# Visual Studio Code | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
*.code-workspace | ||
|
||
# Local History for Visual Studio Code | ||
.history/ | ||
|
||
# dotenv environment variables file | ||
.env | ||
.env.test | ||
|
||
/*.txt |
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 |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<?php | ||
|
||
/** | ||
* MyArtJaub Entry Helper module | ||
* | ||
* @package MyArtJaub\Webtrees | ||
* @subpackage EntryHelper | ||
* @author Jonathan Jaubart <[email protected]> | ||
* @copyright Copyright (c) 2024, Jonathan Jaubart | ||
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 | ||
*/ | ||
|
||
//phpcs:disable PSR1.Files.SideEffects.FoundWithSymbols | ||
|
||
declare(strict_types=1); | ||
|
||
namespace MyArtJaub\Webtrees\Module\EntryHelper; | ||
|
||
use Fisharebest\Webtrees\I18N; | ||
use Fisharebest\Webtrees\Module\AbstractModule; | ||
use Fisharebest\Webtrees\Module\ModuleGlobalInterface; | ||
use Fisharebest\Webtrees\Module\ModuleGlobalTrait; | ||
use MyArtJaub\Webtrees\Module\ModuleMyArtJaubInterface; | ||
use MyArtJaub\Webtrees\Module\ModuleMyArtJaubTrait; | ||
|
||
/** | ||
* EntryHelper Module | ||
*/ | ||
class EntryHelperModule extends AbstractModule implements | ||
ModuleMyArtJaubInterface, | ||
ModuleGlobalInterface | ||
{ | ||
use ModuleMyArtJaubTrait; | ||
use ModuleGlobalTrait; | ||
|
||
/** | ||
* {@inheritDoc} | ||
* @see \Fisharebest\Webtrees\Module\AbstractModule::title() | ||
*/ | ||
public function title(): string | ||
{ | ||
return I18N::translate('Data entry helper'); | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
* @see \Fisharebest\Webtrees\Module\AbstractModule::description() | ||
*/ | ||
public function description(): string | ||
{ | ||
return I18N::translate('Provides assistance when entering genealogical data.'); | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
* @see \Fisharebest\Webtrees\Module\ModuleCustomInterface::customModuleVersion() | ||
*/ | ||
public function customModuleVersion(): string | ||
{ | ||
return '2.1.20-v.1'; | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
* @see \Fisharebest\Webtrees\Module\ModuleGlobalInterface::bodyContent() | ||
*/ | ||
public function bodyContent(): string | ||
{ | ||
$translations = [ | ||
'citationLabel' => e(I18N::translate('Source citation')), | ||
'citationCopy' => e(I18N::translate('Copy source citation')), | ||
'citationPaste' => e(I18N::translate('Fill source citation from last copy')) | ||
]; | ||
|
||
return '<script>const MAJ_ENTRYHELPER_TRANSLATIONS = ' . json_encode($translations) . ';</script>' . | ||
'<script src="' . $this->assetUrl('js/entryhelper.min.js') . '"></script>'; | ||
} | ||
} | ||
|
||
return app(EntryHelperModule::class); |
Oops, something went wrong.