Drupal Configuration

Mica Drupal Client is a set of modules that can be enabled/disabled in Drupal’s Administration > Modules configuration page.

Note

Before disabling an OBiBa Drupal module make sure you know exactly what it does, disabling an important module can render Mica Client unusable.

The following modules can be considered as extensions and disabling them does not affect the core functionality of Mica Drupal Client:

OBiBa Mica Data Access Adds data access request and amendments capability (the latter must be enabled in Mica server).
OBiBa Mica Analysis Adds entity counts, variable cross-tabulation and statistics capability.
OBiBa Mica Research Project Adds research project management capability.
OBiBa Mica Sets Adds variable document set capability enabling users to save their search results in an anonymous set (cart).

OBiBa Mica Settings

The settings under Administration > Configuration > OBiBa Mica are required to make Mica Drupal Client communicate with Mica Server and enables the administrator to customize the Mica Drupal interface and module functionality.

Graphic Settings

Administrators can enable/disable Graphics in Drupal blocks or Mica Drupal pages as well as several interface related settings such as colors and captions.

Settings

The settings listed below are essential to make the communicate between Mica Drupal Client and Mica Server possible:

Field Description
Mica address The URL of Mica Server
Anonymous user name The Anonymous user has read permission upon the content that has been published on Mica server. Here, you enter the name of the anonymous user as know by Mica Server.
Anonymous user password Self-explanatory.
Copyright Notice Text A copyright notice to be included if a user download a list of data.
Number of items per server response page Determines the how many items that must be displayed in a server response page. For instance, this parameter affects the number of variables listed in a page.
Minimum number of items per server response page Determines the minimum number of items that must to be displayed in a server response page. This parameter affects the number of studies, networks or datasets listed on a page.

Cache Image settings

The option for time image timeout is supposed to be clear. Now, you also have a button to clear the image cache. This might be useful as, for instance, logo of studies (or networks) don’t tend to change much, so the image cache timeout tends to be long. If, however, you change an image, you can clear the cache right away.

Content Settings

Each content setting has specific configuration related to their web page interface and functionality. Visit each setting section for detailed usage.

Analysis Settings

The only setting here is the title of the Entities Count page.

Search Settings

Configuration related to the Search web page interface and functionality. Visit each setting section for detailed usage.

Mica Drupal Client Template Overriding

We will examine two distinct ways: sub-theme and custom module.

Dependencies

First of all, you need to get:

Further, see the Drupal Bootstrap Documentation.

Overriding Templates via a new Sub-Theme

Overriding a template is useful if one wants to determine the way the information is displayed in a page and have a better control over the design. Thus, for every page to display in Mica Drupal Client, there is a file (or a set of) template file(s) located in the corresponding template repository of each OBiBa module.

It is not recommended to modify these files directly as the modifications will be overwritten the next time OBiBa Modules are updated, hence the idea of template overriding.

Note

The list of templates that we can override can be seen in the template.php file of obiba_bootstrap.

You may do template overriding as follow:

  • First, create a sub-template as described in the links provided above.
  • Define obiba_bootstrap as the base theme in the .info file of that sub-theme.

Once the sub-theme is set, you can override each view generated by a module as shown below:

cp /site/all/modules/obiba_mica/<module to override>/templates/<template to override> <drupal>/sites/all/themes/<Sub_theme_bootstrap>/templates

Overriding Templates via Custom Module

If you want to use default template obiba_bootstrap, which entails making smaller edits to the design, you may override the templates in a custom module that you can install in your instance of Mica Drupal Client:

  • Copy the template that you want to override in the folder Template of the custom module,
  • Use the hook_theme() function to override the templates.

For instance, you can use the following in a .module file:

/*
* hook_theme()
*/
function MYMODULE_theme($existing, $type, $theme, $path){
 $theme = array();
      $theme['obiba_mica_dataset-detail'] = array(
        'template' => 'obiba_mica_dataset-detail',
        'path' => drupal_get_path('module', 'MYMODULE') . '/templates',
       );
      return $theme;
}