Difference between revisions of "Admin Branches"
Robinrichm (talk | contribs) |
Robinrichm (talk | contribs) |
||
Line 88: | Line 88: | ||
{| border="1" cellspacing="1" cellpadding="2" class="wikitable" | {| border="1" cellspacing="1" cellpadding="2" class="wikitable" | ||
− | | style="border:thin solid black;vertical-align:top;" | '''Admin>>Branches>>Search <span style="color: red">BEFORE | + | | style="border:thin solid black;vertical-align:top;" | '''Admin>>Branches>>Search <span style="color: red">BEFORE</span>'''<br/> |
[[Image:admin_branches-before1.png]] | [[Image:admin_branches-before1.png]] | ||
|- | |- | ||
− | | style="border:thin solid black;vertical-align:top;" | '''Admin>>Branches>>Search <span style="color: red">AFTER | + | | style="border:thin solid black;vertical-align:top;" | '''Admin>>Branches>>Search <span style="color: red">AFTER</span>''' |
+ | New features installed by this mod: | ||
+ | # The "Add New" tab has been removed, because the "Add New" function has been integrated into the page. | ||
+ | # The new "Add New" button takes the Tree value and the search string (as the Branch ID), creates a new branch, and redirects to the Branch Edit page. The title text associated with the "Add New" button notes that the button is disabled until the user selects a tree and enters a search string. | ||
+ | # Two new columns for the four fields in the branch rule. | ||
+ | # If the count of People and/or Families records with the branch does not match the number of entries in the Branch Index table, the counts are flagged, and the count of index entries is displayed. Note that: | ||
+ | #* The counts are ''expected'' not to match if the branch name includes other branch names, and | ||
+ | #* A mod option can disable the counting of People and Families records, in which case the People and Families columns will just contain flag that indicates whether ''any'' People or Families records are in the branch. | ||
[[Image:admin_branches-after1.jpg]] | [[Image:admin_branches-after1.jpg]] | ||
+ | <br/>Features in the visualization above that are installed or enabled by other mods: | ||
+ | <ol start=5> | ||
+ | <li>Field buttons, which are enabled by the [[Field Buttons]] mod. In this visualization, | ||
+ | <ol type='a'> | ||
+ | <li>The search string has 'X' and 'R' buttons. | ||
+ | <ul><li>The 'X' button is visible because there is a value that can be cleared.</li> | ||
+ | <li>An 'R' button (which sets the field's initial value) is shaded out because the current value ''is'' the initial value of the field.</li> | ||
+ | </ul></li> | ||
+ | <li>The Result Per Page field has 'R', 'D', and 'A' buttons | ||
+ | <ul><li>The 'R' button is shaded out because the current value is the intial value</li> | ||
+ | <li>The 'D' button (which sets a default value) is shaded out because, as it turns out, the current value is the same as the default value, which is the TNG system parameter, $maxsearchresults.</li> | ||
+ | <li>The "A' button sets the Results Per Page field to 'all', which causes the results table to show all of the matching branches on one web page.</li> | ||
+ | </ul></li> | ||
+ | <li>The names in the Starting Individual column are added by the [[Add Name to PersonID]] mod, which affects several programs. The "native" TNG code displays only the Person ID in this column. | ||
+ | </li> | ||
|} | |} | ||
− | |||
{| border="1" cellspacing="1" cellpadding="2" class="wikitable" | {| border="1" cellspacing="1" cellpadding="2" class="wikitable" | ||
− | | style="border:thin solid black;vertical-align:top;" | '''Admin>>Branches>>Edit <span style="color: red">BEFORE | + | | style="border:thin solid black;vertical-align:top;" | '''Admin>>Branches>>Edit <span style="color: red">BEFORE</span>'''<br/> |
[[Image:admin_branches-before2-editbranch.png]] | [[Image:admin_branches-before2-editbranch.png]] | ||
|- | |- | ||
− | | style="border:thin solid black;vertical-align:top;" | '''Admin>>Branches>>Edit <span style="color: red">AFTER | + | | style="border:thin solid black;vertical-align:top;" | '''Admin>>Branches>>Edit <span style="color: red">AFTER</span>'''<br/> |
[[Image:admin_branches-after2-editbranch.jpg]] | [[Image:admin_branches-after2-editbranch.jpg]] | ||
|- | |- | ||
− | | style="border:thin solid black;vertical-align:top;" | '''Admin>>Branches>>Edit <span style="color: red">AFTER | + | | style="border:thin solid black;vertical-align:top;" | '''Admin>>Branches>>Edit <span style="color: red">AFTER</span>'''Showing the results of an Add Labels action<br/> |
[[Image:admin_branches-after3-addlabels.png]] | [[Image:admin_branches-after3-addlabels.png]] | ||
|} | |} |
Revision as of 13:52, 12 December 2017
Admin Branches | ||
---|---|---|
Summary | Modifies the Admin>>Branches search page to display counts of People and Families in the branch index, as well as count of People and Families records that have the branch. | |
Validation | ||
Mod Updated | {{{mod_last_update}}} | |
Download link | v11.0.0.2.zip
| |
Download stats | ||
Author(s) | Robin Richmond | |
Homepage | Robin Richmond's Genealogy Database | |
Mod Support | My Mod Support form or TNG Community Forums | |
Contact Developer | My Mod Support form | |
Latest Mod | v11.0.0.2 | |
Min TNG V | 11.0 | |
Max TNG V | at least 11.1.2 | |
Files modified | admin_branches.php, admin_editbranch.php, ajx_labels.php, cust_text.php English;
Installed files: ajx_branchcounts.php, branchcountslib.php | |
Related Mods | Branch Timestamps depends on Admin Branches. Show Mod Names is optional. | |
Notes |
Purpose of the Mod
To add information to the Admin >> Branches >> Search results table, and simplify (from the author's perspective) the Add/Remove/Delete functionality in the Edit screen.
- The Admin >> Branches >> Search page now:
- Has two columns for the branch rule parameters (with 2 values in each column):
- The number of generations of ancestors above the starting person (agen),
- The number of generations of descendants below the starting person (dgen),
- The number of generations of descendants below each ancestor (dagen), and
- The spouse flag
- Flags the People and Families columns when the index count does not match the count of Branch Labels in People and Family records. Note that the index count is expected not to match for what I call "dummy branches" whose BranchID's are incorporated into other branches. (See the visualizations)
- Uses a Mod Parameter to determine whether to show counts in the People and Families columns, or just to indicate whether there are any People or Families in the branch. This feature was added because branches in very large TNG databases can take too long to count the branch labels.
- Has a "Results Per Page" field that uses the TNG system parameter "maxsearchresults" as its default.
- Adds "Field Buttons" to the search string field and the Results Per Page field. (Field buttons are small buttons with one-letter lables that are attached to form fields, and that perform four common editing tasks: Clear a field, Restore the field's initial value, set a Default, or set an "All items" value. See the Field Buttons mod, which must installed for the field buttons to be visible.
- Has two columns for the branch rule parameters (with 2 values in each column):
- In the Branch Edit screen:
- All action buttons are now directly on the screen, in fieldsets, rather than in pop-ups. (I found the cascading pop-up forms confusing.)
- There is now a "Show names" checkbox so that when branch labels are added or cleared, the names associated with each Person and Family record in the branch are not always displayed.
Parameters
$countBranchLabels in admin_branches.php
This parameter determines whether the Admin>>Branches>>Search results will display branch label counts for each branch, or just indicate whether each branch has labels. On sites with so many records that the branch counts take too long, the administrator will want to turn off the automatic branch counts.
Files Installed
- ajx_branchcounts.php - The Branch Edit program, admin_editbranch.php, unlike most TNG edit programs, doesn't just edit the fields in a Branch record, but it also contains action buttons that
- Add branch labels (i.e. add People and Families to the branch),
- Clear labels,
- Delete records in the branch, and
- Display the branch members.
- branchcountslib.php - This PHP function library contains PHP functions that count records (People and Families) in a branch. It is used by
- The Admin >> Branches >> Search program (admin_branches.php) to display the search results table,
- The Branch edit program (admin_editbranch.php) to display counts for the current branch, and
- ajx_branchcounts.php to retrieve updated counts after admin_editbranch.php has modified a branch.
Compatibility with Other Mods
This mod is compatible with Add Name to PersonID, Tree ID Mod, TreeID-One Column, and Branch Timestamps. Is is not compatible with Branches Sort Mod. But the goal of Branches Sort Mod, to sort related branches together in the Admin Branches Search results table, is only achieved if the related branches use the common BranchID at the very beginning of their BranchIDs. A Branch Testing Application that can focus on all groups of related branches in installed by the Branch Timestamps mod.
Related Mods
- Add Name To PersonID also modifies both the Admin>>Branches search results and the Branches editor. Like Branch Timestamps, it is designed to work with Admin Branches. It adds the Person name to the PersonID
- in the Starting Individual column in the Admin>>Branches search results table, where the PersonID is already a hyperlink, and
- in the Find Person widget in the Branch Editor, where you select the Starting Individual for a branch. There, the PersonID is in a form field, and the name is a hyperlink.
- Branch Timestamps, which, like Admin Branches, adds columns to the Admin>>Branches results table, and adds options to the Branch Editor, is dependent on Admin Branches. The two mods can be installed independently, but Admin Branches installs code that implements the $summaryonly query string parameter in ajx_labels.php, and Branch Timestamps depends on that code.
- The optional Show Mod Names mod will use data saved by Admin Branches to display information about the mods that affect admin_branches.php and admin_branchedit.php if Show Mod Names is installed.
- The options Field Buttons mod displays the field buttons that are attached to the search string field and the Result Per Page field in the Branches Search page.
Requirements
- A working TNG installation.
- An installed current version of the Mod Manager.
- You should backup files listed in the panel on the right.
Installation
- Remove and delete previous version of this mod.
- Backup the files updated by this mod. They are listed in the panel at the upper right.
- Download the .zip file, and extract its .cfg file to the mods folder.
- Follow the normal automated installation for Mod Manager, as shown in the example Mod Manager - Installing Config Files.
In the event of a problem
- Try using the Mod Manager Remove capability
- Contact me through My Mod Support form.
Visualizations
Admin>>Branches>>Search BEFORE |
Admin>>Branches>>Search AFTER
New features installed by this mod:
|
Admin>>Branches>>Edit BEFORE |
Admin>>Branches>>Edit AFTER |
Admin>>Branches>>Edit AFTERShowing the results of an Add Labels action |
Mod Change History
Mod Version | TNG Versions | Date | Note |
---|---|---|---|
11.0.0.2 | 11.0+ | 12 Dec 2017 | Changes:
|
11.0.0.1a | 11.0+ | 2 Jun2017 | The new $summaryonly Query String parameter in ajx_labels.php is now implemented through this mod rather than through Branch Timestamps. As a result
|
11.0.0.1 | 11.0+ | 2 Apr 2017 | New mod in Beta status. |
Sites using this mod
If you download and install this mod, please add your site to the table below.
URL | User | Note | Mod-Version | TNG-Version | User-language |
---|---|---|---|---|---|
Robin Richmond's Genealogy Database | Robin Richmond | Mod developer | v11.0.0.1a | 11.1.1 | English |
racine d'Alsace | J-Louis Valory | Public/Private - template 1 | 11.0.0.1a | 11.1.1 | French |