Please do NOT expect all Feature Requests to be actioned automatically. Describing your proposal here will ensure the development team are aware of it, and they will give it careful consideration.
  • Page:
  • 1

TOPIC:

Add link from Place Hierarchy page to Geographic Data - edit for Unknown Place. 1 week 2 days ago #1

  • photon flip
  • photon flip's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 80
When I click on a place from the Facts and Events tab that is "unknown", I'm taken to the Place Hierarchy page where I see "The location of this place is not known".
None of the links on this page take me to the Geographic Data section in Control Panel so I can edit the Unknown Place.
This is something I always want to do but frustratingly I have to navigate away to the Control Panel - scroll to the Geographic data section - drill down to the
missing place so I can edit it.

If there was a link on the Place Hierarchy page to the Geographic Data - Edit section for the unknown place or at least the parent place, this common task would be so much simpler and quicker.
see attached images.

I have been able to accomplish part of this by adding:
<div class="col-sm-9"><a href="<?= e(route(MapDataList::class  )) ?>">
                            <?= I18N::translate('Edit Geographic data') ?>
                        </a></div>
to the place-hierarchy/sidebar.phtml 'unmapped' section. This take you to the Geographic Data top level but I can't figure out how to get a place id to link to the edit section
It's a bit of a "proof of concept" hack anyway and probably not good coding practice.

I do hope that this idea could be considered for a new feature/enhancement.

MurrayJ
Attachments:

Please Log in or Create an account to join the conversation.

Add link from Place Hierarchy page to Geographic Data - edit for Unknown Place. 1 week 2 days ago #2

  • ddrury
  • ddrury's Avatar
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 374
--
Dave

Local: Win 11 Pro, WSL2/Ubuntu20.04.4, Apache 2.4.51, PHP 7.4.26/8.1.7, MySQL 8.0.27
Production: Litespeed 8.0.1, PHP 8.1.9, MySQL 8.0.26

Please Log in or Create an account to join the conversation.

Last edit: by ddrury.

Add link from Place Hierarchy page to Geographic Data - edit for Unknown Place. 1 week 17 hours ago #3

  • photon flip
  • photon flip's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 80
Thanks Dave, I hadn't seen your Github pull request.

See github.com/fisharebest/webtrees/pull/3704

I've adapted some of the code from that and got something working to my liking.

My original idea was to only have the unknown (unmapped) message linking to the coordinates editing but I've added an "Edit map coordinates" link on every place similar to your idea.
I've also made the unknown location message into a link to the editor.
I did away with the icons. The vendor.js is different now in the later webtrees releases and besides, I think it gets a bit busy with them - I did try some others.

I've made the changes directly on the webtrees code, so I either need to work out how to make a module for it or continue to plug for it as a New Feature Request.

I wonder why did your Pull Request did not get merged into the main code? It integrates the Place Hierarchy/Geographic Data into a much more efficient tool?
Obviously your original would now need updating for the latest release but very minimal.

I'm getting to work now on a module - I still haven't come to grips with building modules. Doing this has been very educational so far.
Thank you for your help.

Below is the code I've used and attached is a screen shot.

app/Module/PlaceHierarchyListModule.php
changed as per your webtrees/pull/3704

\resources\views\modules\place-hierarchy/sidebar.phtml

line 31
<?php if ($sidebar_class === 'unmapped') : ?>
        <div class="row">
            <div class="col-sm-9">
                <a href="<?= e($geo_link)?>" title = "<?= I18N::translate('Edit map co-ordinates') ?>">
                    <i><?= I18N::translate('The location of this place is not known.') ?></i>
                </a>
            </div>
            <div class="col-sm-3 align-digits"><?= view('icons/warning') ?></div>             
        </div>


added after original line 55
<?php if($geo_link !== '') : ?>
    <div class="row">
        <div class="col-sm-9">
            <a href="<?= e($geo_link)?>" title = "<?= I18N::translate('Edit map co-ordinates') ?>">
                <i><?= I18N::translate(' Edit map co-ordinates ') ?></i>
            </a>          
        </div>
    </div>
    <?php endif ?>

MurrayJ
Attachments:

Please Log in or Create an account to join the conversation.

Add link from Place Hierarchy page to Geographic Data - edit for Unknown Place. 6 days 23 hours ago #4

  • ddrury
  • ddrury's Avatar
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 374

I wonder why did your Pull Request did not get merged into the main code?


I think Greg's priorities are fixing problems and sorting out the Gedcom tag variations rather than adding functionality at the moment
--
Dave

Local: Win 11 Pro, WSL2/Ubuntu20.04.4, Apache 2.4.51, PHP 7.4.26/8.1.7, MySQL 8.0.27
Production: Litespeed 8.0.1, PHP 8.1.9, MySQL 8.0.26

Please Log in or Create an account to join the conversation.

Add link from Place Hierarchy page to Geographic Data - edit for Unknown Place. 6 days 20 hours ago #5

  • fisharebest
  • fisharebest's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 16475
I took a quick look a this PR. I couldn't work out why it added a new edit icon, rather than use the same edit icon that is used elsewhere.

I'll take another look before I create the next release.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

Add link from Place Hierarchy page to Geographic Data - edit for Unknown Place. 6 days 19 hours ago #6

  • photon flip
  • photon flip's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 80
Greg, thanks for taking anther look at Daves PR.
Dave's solution is clean and simple, perhaps a bit subtle IMHO with only an icon for the link.
But that icon need not be from fontawesome which seems to be problematic for some.
Then there'd also be no need for the vendor.js change or the icon view addition.

For my version I put a text link at the bottom of the list but that maybe too far the other way - too intrusive.

Which ever way, this really simplifies one aspect of place management and I do hope to see it in the next release.

MurrayJ

Please Log in or Create an account to join the conversation.

Add link from Place Hierarchy page to Geographic Data - edit for Unknown Place. 6 days 4 hours ago #7

  • ddrury
  • ddrury's Avatar
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 374

I couldn't work out why it added a new edit icon, rather than use the same edit icon that is used elsewhere


I'm sure I had a good reason, but I'm blowed if I know now :-(
--
Dave

Local: Win 11 Pro, WSL2/Ubuntu20.04.4, Apache 2.4.51, PHP 7.4.26/8.1.7, MySQL 8.0.27
Production: Litespeed 8.0.1, PHP 8.1.9, MySQL 8.0.26

Please Log in or Create an account to join the conversation.

Add link from Place Hierarchy page to Geographic Data - edit for Unknown Place. 6 days 1 hour ago #8

  • fa10175
  • fa10175's Avatar
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 386
what happens if no Geolocation module is validated?

I don't use this function.
- nginx 1.18 - PHP 7.4.30- - MariaDB 10.5.15-
- Local server -
- webtrees - SVN - latest
- webtrees 2.1.7

Please Log in or Create an account to join the conversation.

Do you need a web hosting solution for your webtrees site?
If you prefer a host that specialises in webtrees, the following page lists some suppliers able to provide one for you: 

Add link from Place Hierarchy page to Geographic Data - edit for Unknown Place. 5 days 17 hours ago #9

  • photon flip
  • photon flip's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 80

what happens if no Geolocation module is validated?

I don't use this function.

Probably the question should be "What if Geolocation is enabled".
I've been successfully running the altered code for links from Place Hierarchy to Geographic Data and I don't use Geolocation either.
I can confirm that having Geolocation - GeoNames and Auto Complete enabled doesn't seem to interfere with links to Geographic Data management - which makes sense as they are quite separate process from what I can see.

MurrayJ

Please Log in or Create an account to join the conversation.

Add link from Place Hierarchy page to Geographic Data - edit for Unknown Place. 1 day 1 hour ago #10

  • fisharebest
  • fisharebest's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 16475
I've reviewed/merged Dave's PR.

To keep clutter to a minimum:

If the place has no known location, the edit link is shown in the sidebar (in place of the warning triangle).
If the place already has a known location, the edit link is shown in the popup.

It will be included in the next release.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

Add link from Place Hierarchy page to Geographic Data - edit for Unknown Place. 1 day 59 minutes ago #11

  • photon flip
  • photon flip's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 80

I've reviewed/merged Dave's PR.

To keep clutter to a minimum:

If the place has no known location, the edit link is shown in the sidebar (in place of the warning triangle).
If the place already has a known location, the edit link is shown in the popup.

It will be included in the next release.

That's great news. Sounds like a good solution.
I look forward to using that in the next release.
Thanks Greg and Dave.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum