Skip to content

Commit 9dfd969

Browse files
committed
Added new custom hook with help text. Eg. used from os2web_help to show help text on same help page.
1 parent a33427b commit 9dfd969

File tree

1 file changed

+35
-3
lines changed

1 file changed

+35
-3
lines changed

os2web_cp_service.module

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,14 @@ function os2web_gf_service_handler($file_id) {
142142
function os2web_cp_service_alter_configuration($key, $value) {
143143
switch ($key) {
144144
case 'FileServiceURL':
145-
return variable_set('os2web_cp_service_cp_document_fileurl', $value);
146-
145+
variable_set('os2web_cp_service_cp_document_fileurl', $value);
147146
break;
148147
}
148+
return TRUE;
149149
}
150150

151151
/**
152-
* Service function for creating a case.
152+
* Service function for creating a case.x
153153
*
154154
* @param array $data
155155
* Structured array with data for the Case.
@@ -881,3 +881,35 @@ function os2web_cp_service_get_extension_from_mime($mime) {
881881
$pieces = explode('/', $mime);
882882
return array_pop($pieces);
883883
}
884+
885+
/**
886+
* Implements hook_os2web_help().
887+
*/
888+
function os2web_cp_service_os2web_help($sections) {
889+
890+
// List of content.
891+
$sections['list_of_content'] = t('<a href="#os2web_cp_service">Case Publishing Service</a><br />');
892+
893+
// Content types.
894+
$sections['contenttype'] = t('<p><b>CP Case:</b> A CP case is a contenttype which mostly are used by the automatic publishing system.<br /><i><a href="@url" target="_blank">See the advanced documentation of OS2web Case Publishing Service</a></i></p>', array('@url' => url('admin/help/os2web_borger_dk')));
895+
$sections['contenttype'] .= t('<p><b>CP Document:</b> A CP document is a contenttype which mostly are used by the automatic publishing system.<br /><i><a href="@url" target="_blank">See the advanced documentation of OS2web Case Publishing Service</a></i></p>', array('@url' => url('admin/help/os2web_borger_dk')));
896+
897+
// General about OS2web CP Service.
898+
$sections['os2web_cp_service'] = t('<h2 id="os2web_cp_service">Case Publishing System</h2>');
899+
$sections['os2web_cp_service'] .= t('<p><b>Description</b><br />The Case Publishing service handles incomming requests from an acadre esdh system. By now it is made to publish cases and documents.</p>');
900+
$sections['os2web_cp_service'] .= t('<p><i>If enabled, an search page is located at <a href="@url" target="_blank">/aaben-indsigt</a></i></p>', array('@url' => '/aaben-indsigt'));
901+
$sections['os2web_cp_service'] .= t('<p><b>CP Approved Rules:</b>(<i>taxonomy</i>)<a href="@url" target="_blank">Edit the approved rules from acadre</a> to allow them to be published. If they arent approved, they will be saved as an unpublished page.</p>', array('@url' => url('admin/help/os2web_borger_dk')));
902+
return $sections;
903+
904+
}
905+
906+
/**
907+
* Implements hook_help().
908+
*/
909+
function os2web_cp_service_help($path, $arg) {
910+
switch ($path) {
911+
case 'admin/help#os2web_cp_service':
912+
// TODO.
913+
return t('Missing documentation.');
914+
}
915+
}

0 commit comments

Comments
 (0)