Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GT-124 Make references to operational tools configurable #412

Open
wants to merge 9 commits into
base: dev
Choose a base branch
from

Conversation

rowan04
Copy link
Member

@rowan04 rowan04 commented Dec 19, 2022

  • added config options for helpdesk link, helpdesk support unit, request tracker and community documentation
  • so that different instances of gocdb can have links point directly to their tooling, instead of having general references

- added config options for helpdesk link, helpdesk support unit, request tracker and community documentation
- so that different instances of gocdb can have links point directly to their tooling, instead of having general references
- shortened variable name
- fixed href formatting
- still doen't work as planned - needs a php file rework
- this commit was made as I'm about to leave for christmas
@tofu-rocketry tofu-rocketry changed the title Make references to operational tools configurable (DRAFT TEST) GT-124 Make references to operational tools configurable (DRAFT TEST) Feb 21, 2023
- in order to have configurable links in Help_And_Contact,
- the file had to be changed from .html to .php
- so it was also moved to the static_php directory
- the operationalLinks file was made to call the config file and assign to variables
- this file is then called in Help_And_Contact
- as Help_And_Contact page was moved from a .html file to .php,
- the methods that display it on the gocdb web needed to be changed
- as it is no longer a static_html file
@rowan04
Copy link
Member Author

rowan04 commented Feb 22, 2023

Note - this currently doesn't work and the gocdb webpage doesn't have the correct links. I am still working on this

htdocs/web_portal/index.php Outdated Show resolved Hide resolved
htdocs/web_portal/index.php Outdated Show resolved Hide resolved
- changed method of ouputting the Help_And_Contact.php file
- so it now outputs the executed file, not the file contents
- meaning the php parts within the html are properly executed, and not just output
- removes unnecessary commented out code
- adds to existing comments
- fixes out of date code in search_ses.php
@rowan04 rowan04 changed the title GT-124 Make references to operational tools configurable (DRAFT TEST) GT-124 Make references to operational tools configurable Feb 22, 2023
@rowan04 rowan04 marked this pull request as ready for review February 22, 2023 12:40
@rowan04 rowan04 requested a review from a team as a code owner February 22, 2023 12:40
@gregcorbett
Copy link
Member

Hmmmmm, I wonder if moving the Help_And_Contact to be fully within the view/controller setup would be a cleaner solution than using ob_start() et al.

my_sites.php is a relatively small example of the view/controller setup in use:

So for this, you'd have to create, for example:

  • htdocs/web_portal/controllers/help_and_contact.php.
  • htdocs/web_portal/views/help_and_contact.php.

The controller is where the code in htdocs/web_portal/static_php/operationalLinks.php would go, except with the output contained in a params array.

The view is where the contents of htdocs/web_portal/static_php/Help_And_Contact.php would go, except with references to the params array, i.e. params['HelpdeskLink'] instead of $helpdeskLink.

You'd have to add an additonal case for PageType=Help_And_Contact in web_portal/index.php, similar to the My_Sites case, but it would mean less new code in index.php.

Could you give that a go?

@rowan04
Copy link
Member Author

rowan04 commented Feb 22, 2023

Hmmmmm, I wonder if moving the Help_And_Contact to be fully within the view/controller setup would be a cleaner solution than using ob_start() et al.

my_sites.php is a relatively small example of the view/controller setup in use:

So for this, you'd have to create, for example:

  • htdocs/web_portal/controllers/help_and_contact.php.
  • htdocs/web_portal/views/help_and_contact.php.

The controller is where the code in htdocs/web_portal/static_php/operationalLinks.php would go, except with the output contained in a params array.

The view is where the contents of htdocs/web_portal/static_php/Help_And_Contact.php would go, except with references to the params array, i.e. params['HelpdeskLink'] instead of $helpdeskLink.

You'd have to add an additonal case for PageType=Help_And_Contact in web_portal/index.php, similar to the My_Sites case, but it would mean less new code in index.php.

Could you give that a go?

ok

Copy link
Member

@gregcorbett gregcorbett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see my previous comment

…ad of a static_php setup

- moved static_php/Help_And_Contact.php to views/help_and_contact.php
- removed static_php/operationalLinks and replaced it with controllers/help_and_contact.php
- this was done so that there wasn't lots of new code for the static_php method in index.php
…and_contact.php

- change to menu.xml so that it uses correct index.php case
- change index.php case to use the new view/controller setup
- change search_ses.php to use the correct new link
@rowan04 rowan04 requested a review from gregcorbett March 2, 2023 10:46
- adds missed \ in search_ses.php
Copy link
Member

@gregcorbett gregcorbett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great :). I want to prepare the necassary config change, in a sandbox, at the same time I merge this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants