wvulibraries / mfcs

Archival and Preservation Digital Asset Management System.
Other
8 stars 4 forks source link

Frontend: Dashboard -- modular #143

Open MichaelRBond opened 8 years ago

MichaelRBond commented 8 years ago

Currently the dashboard is extended by adding code to dashboards index.php and manually adding the panel to the HTML.

  1. Create /dashboard/modules directory.
  2. Load each file in that directory as a new "panel"
  3. the panels will be displayed as they are loaded from the file system
    • If a specific order is desired, number them.
    • Filename should only have 1 or 2 periods in it. the "Base" is between the periods.
    • naming examples:
      • foo.php
      • This_is_a_descriptive_filename.php
      • 1.Including_ordering_information.php
  4. module should contain a function that matches the file name base.
    • if the filename is 1.Including_ordering_information.php it should have a function called Including_ordering_information() in it. foo.php would contain a function called foo().
    • function should return an array on success and false otherwise.
$array['title'] = "Title to display in h2 tags on dashboard"
$array['data'] = array(
'label1' => $values,
'label2' => array(
    'label=> $value
)
);

Since label 2 is an array, it would become an "h3" and then have have the other values under it.