summaryrefslogtreecommitdiff
path: root/plugins/UserFlag
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/UserFlag')
-rw-r--r--plugins/UserFlag/UserFlagPlugin.php10
-rw-r--r--plugins/UserFlag/adminprofileflag.php5
-rw-r--r--plugins/UserFlag/icon_flag.gif (renamed from plugins/UserFlag/flag.gif)bin80 -> 80 bytes
-rw-r--r--plugins/UserFlag/userflag.css4
4 files changed, 12 insertions, 7 deletions
diff --git a/plugins/UserFlag/UserFlagPlugin.php b/plugins/UserFlag/UserFlagPlugin.php
index 1f1f19957..60c0c2c0a 100644
--- a/plugins/UserFlag/UserFlagPlugin.php
+++ b/plugins/UserFlag/UserFlagPlugin.php
@@ -138,19 +138,15 @@ class UserFlagPlugin extends Plugin
function onEndShowStatusNetStyles($action)
{
- $action->elementStart('style', array('type' => 'text/css'));
- $action->raw('.entity_flag input, .entity_flag p {'.
- ' background:url('.common_path('plugins/UserFlag/flag.gif').') 5px 5px no-repeat;'.
- ' }');
- $action->elementEnd('style');
-
+ $action->cssLink(common_path('plugins/UserFlag/userflag.css'),
+ null, 'screen, projection, tv');
return true;
}
function onEndShowScripts($action)
{
$action->elementStart('script', array('type' => 'text/javascript'));
- $action->raw('/*<![CDATA[*/ SN.U.FormXHR($(".form_entity_flag")); /*]]>*/');
+ $action->raw('/*<![CDATA[*/ if ($(".form_entity_flag").length > 0) { SN.U.FormXHR($(".form_entity_flag")); } /*]]>*/');
$action->elementEnd('script');
return true;
}
diff --git a/plugins/UserFlag/adminprofileflag.php b/plugins/UserFlag/adminprofileflag.php
index 1ac76b506..20b808637 100644
--- a/plugins/UserFlag/adminprofileflag.php
+++ b/plugins/UserFlag/adminprofileflag.php
@@ -145,10 +145,15 @@ class FlaggedProfileListItem extends ProfileListItem
$this->startActions();
if (Event::handle('StartProfileListItemActionElements', array($this))) {
+ $this->out->elementStart('li', 'entity_moderation');
+ $this->out->element('p', null, _('Moderate'));
+ $this->out->elementStart('ul');
$this->showSandboxButton();
$this->showSilenceButton();
$this->showDeleteButton();
$this->showClearButton();
+ $this->out->elementEnd('ul');
+ $this->out->elementEnd('li');
Event::handle('EndProfileListItemActionElements', array($this));
}
$this->endActions();
diff --git a/plugins/UserFlag/flag.gif b/plugins/UserFlag/icon_flag.gif
index 68c8aee25..68c8aee25 100644
--- a/plugins/UserFlag/flag.gif
+++ b/plugins/UserFlag/icon_flag.gif
Binary files differ
diff --git a/plugins/UserFlag/userflag.css b/plugins/UserFlag/userflag.css
new file mode 100644
index 000000000..98da24cc9
--- /dev/null
+++ b/plugins/UserFlag/userflag.css
@@ -0,0 +1,4 @@
+.entity_flag input.submit,
+.entity_flag p {
+background:url(icon_flag.gif) 5px 5px no-repeat;
+}