Jump to content

Ability To Override The System Information Tab In Modules


Mickey

Recommended Posts

I would like to have the ability to override the default system information tab in modules.  I have currently modified my version of Blesta to allow me to override it with a specific named tab.  It would be nice if this was a default feature in blesta so that I would not have to modify Blesta code when building modules.

Link to comment
Share on other sites

I would like to have the ability to override the default system information tab in modules.  I have currently modified my version of Blesta to allow me to override it with a specific named tab.  It would be nice if this was a default feature in blesta so that I would not have to modify Blesta code when building modules.

this has a relation with attaching modules to each others ?

Link to comment
Share on other sites

Right now the information ont he page is pretty basic.  I would like to have that page be more of an over view of their service, not just the renewal date & price etc..  Here is an example of a work-in-progress module I'm working on for proxmox.  It doesn't have all of the info I want on the page yet, and styling is still a bit rough, but you'll get the idea of the type of data I'd like to include.  Currently this is not possible without some way to override the main page, or inject data into the main page.

 

The way I went about it was name the tab overview & make a few mods to the client_services.php

$method = isset($this->get[1]) ? $this->get[1] : "overview";

and

$tabs = array();
if(!key_exists("overview", $client_tabs)) {
   $tabs [] = array(
      'name' => Language::_("ClientServices.manage.tab_service_info", true),
      'attributes' => array('href' => $this->base_uri . "services/manage/" . $service->id . "/", 'class' => "ajax"),
      'current' => empty($method)
   );
}

It's a fairly small thing, but it lets me make that a useful page.

post-10465-0-59598100-1399823847_thumb.p

Link to comment
Share on other sites

this has a relation with attaching modules to each others ?

 

No, I am currently re-writing the proxmox module to include a bunch of things it's missing (bandwidth limits for instance) & I would like to replace that tab with something with more useful info from the module itself.

Link to comment
Share on other sites

Right now the information ont he page is pretty basic.  I would like to have that page be more of an over view of their service, not just the renewal date & price etc..  Here is an example of a work-in-progress module I'm working on for proxmox.  It doesn't have all of the info I want on the page yet, and styling is still a bit rough, but you'll get the idea of the type of data I'd like to include.  Currently this is not possible without some way to override the main page, or inject data into the main page.

 

The way I went about it was name the tab overview & make a few mods to the client_services.php

$method = isset($this->get[1]) ? $this->get[1] : "overview";
and

$tabs = array();
if(!key_exists("overview", $client_tabs)) {
   $tabs [] = array(
      'name' => Language::_("ClientServices.manage.tab_service_info", true),
      'attributes' => array('href' => $this->base_uri . "services/manage/" . $service->id . "/", 'class' => "ajax"),
      'current' => empty($method)
   );
}
It's a fairly small thing, but it lets me make that a useful page.

why not to add another tab and work with it ?

Link to comment
Share on other sites

Obviously we don't think the overview tab is useless, or we wouldn't have spent time creating it. It does serve an important purpose.

That said, maybe allowing the module to display some overview info under the service overview section would make sense.

From a UX perspective, consistency is super important, so I'm very hesitant to allow modules to override the service overview.

Link to comment
Share on other sites

Obviously we don't think the overview tab is useless, or we wouldn't have spent time creating it. It does serve an important purpose.

That said, maybe allowing the module to display some overview info under the service overview section would make sense.

From a UX perspective, consistency is super important, so I'm very hesitant to allow modules to override the service overview.

 

Then it would be nice to have a standard method on a module that was called, if defined, that could inject data into the page.  Either by rendering a template, or by returning a context object that could be used in the client template for that page.

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...