-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathos2web_sbsys_esdh.module
85 lines (74 loc) · 3.46 KB
/
os2web_sbsys_esdh.module
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?php
/**
* @file
* This module implements SBSYS ESDH backend for use in os2web
*/
include_once('os2web_sbsys_esdh.features.inc');
define('MM_IMPORT_DIR', 'public://sbsys');
define('MM_DEFAULT_APPROVED', '11');
define('MM_DEFAULT_BANNED_CHAR', '');
/**
* Implements hook_ctools_plugin_directory().
*
* Register as provider of esdh plugins
*/
function os2web_sbsys_esdh_ctools_plugin_directory($module, $plugin) {
if ($module == 'os2web_esdh_provider') {
return "plugins/$plugin";
}
}
/**
* Implements hook_form_alter().
*
* Add configuration to the settings form.
*/
function os2web_sbsys_esdh_form_os2web_settings_settings_form_alter(&$form, &$form_state) {
// MM configuration.
$form['meetings'] = array(
'#type' => 'fieldset',
'#title' => 'Referat import',
'#description' => 'Indstillinger der vedrører importen af SBsys referater og dagsordener.',
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
$form['meetings']['os2web_sbsys_esdh_mm_path'] = array(
'#type' => 'textfield',
'#title' => 'Sti til sbsys publish folder.',
'#description' => 'Dette er stien hvor ESDH publisere .XML filer til.',
'#default_value' => variable_get('os2web_sbsys_esdh_mm_path', MM_IMPORT_DIR),
);
$form['meetings']['os2web_sbsys_esdh_approved_committees'] = array(
'#type' => 'textfield',
'#title' => 'Godkendte Udvalg',
'#maxlength' => 200,
'#description' => 'Komma sepereret liste over udvalgs-id der er godkendt til publisering.',
'#default_value' => variable_get('os2web_sbsys_esdh_approved_committees', MM_DEFAULT_APPROVED),
);
$form['meetings']['os2web_sbsys_esdh_banned_special_char'] = array(
'#type' => 'textfield',
'#title' => 'Ikke standard XML tegn der skal fjernes ved import',
'#maxlength' => 200,
'#description' => 'Komma sepereret liste over ikke standard tegn der skal fjernes ved import.',
'#default_value' => variable_get('os2web_sbsys_esdh_banned_special_char', MM_DEFAULT_BANNED_CHAR),
);
}
/**
* Implements hook_os2web_help().
*/
function os2web_sbsys_esdh_os2web_help($sections) {
// Content types.
$sections['contenttype'] .= t('<p><b>Meeting node:</b> Add <a href="@url" target="_blank">meetings</a> directly.<br /><i><a href="@sbsys" target="_blank">See the advanced documentation for the OS2web eDoc module</a>(.pdf)</i></p>', array('@url' => url('node/add/os2web_meetings_meeting'), '@sbsys' => file_create_url(drupal_get_path('module', 'os2web_sbsys_esdh') . '/os2web_sbsys_modul_setup.pdf')));
$sections['import'] .= t('<p><b>Import agenades:</b> <a href="@sbsys" target="_blank">See the advanced documentation for the OS2web eDoc module import</a>(.pdf)</i></p>', array('@url' => url('node/add/os2web_meetings_meeting'), '@sbsys' => file_create_url(drupal_get_path('module', 'os2web_sbsys_esdh') . '/os2web_sbsys_modul_setup.pdf')));
$sections['documentation'] .= t('<p><b>PDF documentation for sbsys:</b> <a href="@sbsys" target="_blank">Documentation for the OS2web eDoc module</a>(.pdf)</i></p>', array('@url' => url('node/add/os2web_meetings_meeting'), '@sbsys' => file_create_url(drupal_get_path('module', 'os2web_sbsys_esdh') . '/os2web_sbsys_modul_setup.pdf')));
return $sections;
}
/**
* Implements hook_help().
*/
function os2web_sbsys_esdh_help($path, $arg) {
switch ($path) {
case 'admin/help#os2web_sbsys_esdh':
// TODO.
return t('Se the OS2web documentation under "help" for details. If you don not have that please activate the OS2web Help module');
}
}