forked from omeka/plugin-SocialBookmarking
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config_form.php
59 lines (56 loc) · 2.62 KB
/
config_form.php
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
<div id="socialBookmarkingServiceSettings">
<div class="field">
<div class="two columns alpha">
<?php echo get_view()->formLabel(SocialBookmarkingPlugin::ADD_TO_OMEKA_ITEMS_OPTION, 'Add to Items'); ?>
</div>
<div class="inputs five columns omega">
<?php echo get_view()->formCheckbox(
SocialBookmarkingPlugin::ADD_TO_OMEKA_ITEMS_OPTION,
true,
array('checked' => (boolean) get_option(SocialBookmarkingPlugin::ADD_TO_OMEKA_ITEMS_OPTION))); ?>
<p class="explanation"><?php echo __(
'If checked, this plugin will add a social bookmarking toolbar at the bottom of every public item show page.'
); ?></p>
</div>
</div>
<div class="field">
<div class="two columns alpha">
<?php echo get_view()->formLabel(SocialBookmarkingPlugin::ADD_TO_OMEKA_COLLECTIONS_OPTION, 'Add to Collections'); ?>
</div>
<div class="inputs five columns omega">
<?php echo get_view()->formCheckbox(
SocialBookmarkingPlugin::ADD_TO_OMEKA_COLLECTIONS_OPTION,
true,
array('checked' => (boolean) get_option(SocialBookmarkingPlugin::ADD_TO_OMEKA_COLLECTIONS_OPTION))); ?>
<p class="explanation"><?php echo __(
'If checked, this plugin will add a social bookmarking toolbar at the bottom of every public collection show page.'
); ?></p>
</div>
</div>
<div class="field">
<div class="two columns alpha">
<p><?php echo __('Choose which social bookmarking services you would like to use on your site.'); ?></p>
</div>
<div class="inputs five columns omega">
<ul style="list-style-type:none" class="details">
<?php
$services = social_bookmarking_get_services();
$serviceSettings = social_bookmarking_get_service_settings();
foreach($services as $serviceCode => $serviceInfo):
if (array_key_exists($serviceCode, $serviceSettings)) {
$value = $serviceSettings[$serviceCode];
} else {
$value = false;
}
?>
<li>
<?php echo get_view()->formCheckbox($serviceCode, true, array('checked'=>(boolean)$value)); ?>
<span style="display:inline" class="addthis_service_icon icon_<?php echo html_escape($serviceCode); ?>"></span>
<?php echo html_escape($serviceInfo['name']); ?>
</li>
<?php endforeach; ?>
</ul>
</div>
</div>
</div>