Skip to content

Commit 58c1173

Browse files
committed
Initial commit
This module was previously named os2web_sbsys_esdh, module is now renamed.
0 parents  commit 58c1173

File tree

9 files changed

+1071
-0
lines changed

9 files changed

+1071
-0
lines changed

.gitignore

Whitespace-only changes.

LICENSE.txt

Lines changed: 339 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
OS2Web AGMAN ESDH Provider
2+
==============================
3+
4+
Description
5+
-----------
6+
This module provides an implementation of the AGMAN ESDH provider.
7+
8+
Dependencies
9+
-----------
10+
- os2web_esdh_provider
11+
- os2web_adlib_api
12+
- ctools
13+
14+
Installation
15+
-----------
16+
This module should reside in the modules directory of the installation,
17+
most commonly profiles/os2web/modules/, but alternativly in sites/all/modules
18+
(This could be for development purposes).
19+
20+
See https://github.com/syddjurs/os2web/wiki for further instructions.
21+
22+
This module can also be installed with drush make in your install profile.
23+
24+
Licence and copyright
25+
---------------------
26+
OS2Web is Copyright (c) 2012 Syddjurs Kommune, Denmark
27+
28+
OS2Web is free software: you can redistribute it and/or modify
29+
it under the terms of the GNU General Public License as published by
30+
the Free Software Foundation, either version 3 of the License, or
31+
(at your option) any later version.
32+
33+
OS2Web is distributed in the hope that it will be useful,
34+
but WITHOUT ANY WARRANTY; without even the implied warranty of
35+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
36+
GNU General Public License for more details.
37+
38+
You should have received a copy of the GNU General Public License
39+
along with this program. If not, see <http://www.gnu.org/licenses/>.
40+
41+
Additional Info
42+
---------------
43+
This repository should be governed using Git Flow. for more information see
44+
http://nvie.com/posts/a-successful-git-branching-model/
45+
46+
Note: This module is still dependant on modules in the full OS2Web suite
47+
(https://github.com/OS2web/os2web), as the seperation of those are still WIP.

example/Publication32.zip

92.8 KB
Binary file not shown.

example/Publication553.zip

239 KB
Binary file not shown.

os2web_agman_esdh.info

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name = OS2Web AGMAN ESDH System
2+
description = OS2Web AGMAN backend for ESDH system.
3+
4+
package = OS2Web - ESDH
5+
core = 7.x
6+
version = 7.x-1.0-beta1
7+
8+
dependencies[] = os2web_esdh_provider
9+
dependencies[] = ctools
10+
11+
files[] = plugins/mm/os2web_agman_esdh_mm.inc

os2web_agman_esdh.make

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
api = 2
2+
core = 7.x
3+
4+
;; OS2Web projects:
5+
6+
; OS2Web Modules
7+
8+
# projects[os2web_adlib_api][type] = "module"
9+
# projects[os2web_adlib_api][download][type] = "git"
10+
# projects[os2web_adlib_api][download][branch] = "master"
11+
# projects[os2web_adlib_api][download][url] = "https://github.com/OS2web/os2web_adlib_api.git"
12+
13+
# projects[os2web_esdh_provider][type] = "module"
14+
# projects[os2web_esdh_provider][download][type] = "git"
15+
# projects[os2web_esdh_provider][download][branch] = "master"
16+
# projects[os2web_esdh_provider][download][url] = "https://github.com/OS2web/os2web_esdh_provider.git"
17+
18+
;; Contrib modules below:
19+
20+
; Libraries
21+
22+
; Contrib modules
23+
24+
; Basic
25+
# projects[ctools][subdir] = "contrib"
26+
# projects[ctools][version] = "1.3"

os2web_agman_esdh.module

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
<?php
2+
/**
3+
* @file
4+
* This module implements SBSYS ESDH backend for use in os2web
5+
*/
6+
7+
define('MM_IMPORT_DIR', 'public://agman');
8+
define('MM_DEFAULT_APPROVED', '11');
9+
define('MM_DEFAULT_BANNED_CHAR', '&#xC;');
10+
define('MM_DEFAULT_BANNED_REGEX', '/&#x.*;/');
11+
12+
/**
13+
* Implements hook_ctools_plugin_directory().
14+
*
15+
* Register as provider of esdh plugins
16+
*/
17+
function os2web_agman_esdh_ctools_plugin_directory($module, $plugin) {
18+
if ($module == 'os2web_esdh_provider') {
19+
return "plugins/$plugin";
20+
}
21+
}
22+
23+
/**
24+
* Implements hook_form_alter().
25+
*
26+
* Add configuration to the settings form.
27+
*/
28+
function os2web_agman_esdh_form_os2web_settings_settings_form_alter(&$form, &$form_state) {
29+
// MM configuration.
30+
$form['meetings'] = array(
31+
'#type' => 'fieldset',
32+
'#title' => 'Referat import',
33+
'#description' => 'Indstillinger der vedrører importen af SBsys referater og dagsordener.',
34+
'#collapsible' => TRUE,
35+
'#collapsed' => FALSE,
36+
);
37+
$form['meetings']['os2web_agman_esdh_mm_path'] = array(
38+
'#type' => 'textfield',
39+
'#title' => 'Sti til AGMAN publish folder.',
40+
'#description' => 'Dette er stien hvor ESDH publisere .XML filer til.',
41+
'#default_value' => variable_get('os2web_agman_esdh_mm_path', MM_IMPORT_DIR),
42+
);
43+
$form['meetings']['os2web_agman_esdh_approved_committees'] = array(
44+
'#type' => 'textfield',
45+
'#title' => 'Godkendte Udvalg',
46+
'#maxlength' => 2000,
47+
'#description' => 'Komma sepereret liste over udvalgs-id der er godkendt til publisering.',
48+
'#default_value' => variable_get('os2web_agman_esdh_approved_committees', MM_DEFAULT_APPROVED),
49+
);
50+
$form['meetings']['os2web_agman_esdh_banned_activate_regex'] = array(
51+
'#type' => 'checkbox',
52+
'#title' => 'Aktiver regex',
53+
'#description' => t('This decides whether the regulax expression or CSV list will be used to trim out the unneeded content from XMLs.'),
54+
'#default_value' => variable_get('os2web_agman_esdh_banned_activate_regex', FALSE),
55+
);
56+
57+
$form['meetings']['os2web_agman_esdh_banned_special_char'] = array(
58+
'#type' => 'textfield',
59+
'#title' => 'Ikke standard XML tegn der skal fjernes ved import (CSV)',
60+
'#maxlength' => 200,
61+
'#description' => 'Komma sepereret liste over ikke standard tegn der skal fjernes ved import.',
62+
'#default_value' => variable_get('os2web_agman_esdh_banned_special_char', MM_DEFAULT_BANNED_CHAR),
63+
'#states' => array(
64+
'invisible' => array(
65+
':input[name="os2web_agman_esdh_banned_activate_regex"]' => array('checked' => TRUE),
66+
),
67+
),
68+
);
69+
70+
$form['meetings']['os2web_agman_esdh_banned_special_regex'] = array(
71+
'#type' => 'textfield',
72+
'#title' => 'Ikke standard XML tegn der skal fjernes ved import (regex)',
73+
'#maxlength' => 200,
74+
'#description' => 'Regular expression over ikke standard tegn der skal fjernes ved import.',
75+
'#default_value' => variable_get('os2web_agman_esdh_banned_special_regex', MM_DEFAULT_BANNED_REGEX),
76+
'#states' => array(
77+
'invisible' => array(
78+
':input[name="os2web_agman_esdh_banned_activate_regex"]' => array('checked' => FALSE),
79+
),
80+
),
81+
);
82+
}
83+
84+
/**
85+
* Implements hook_os2web_help().
86+
*/
87+
function os2web_agman_esdh_os2web_help($sections) {
88+
// TODO. Write some actual help.
89+
}
90+
91+
/**
92+
* Implements hook_help().
93+
*/
94+
function os2web_agman_esdh_help($path, $arg) {
95+
switch ($path) {
96+
case 'admin/help#os2web_agman_esdh':
97+
// TODO.
98+
return t('Se the OS2web documentation under "help" for details. If you don not have that please activate the OS2web Help module');
99+
}
100+
}

0 commit comments

Comments
 (0)