com web/php: Patched user notes feature from regular site into prototype with some slight adjustments.: include/shared-manual.inc styles/theme.css
| From: | Sherif Ramadan | Date: | Sun, 06 Jan 2013 13:46:40 +0000 |
| Subject: | com web/php: Patched user notes feature from regular site into prototype with some slight adjustments.: include/shared-manual.inc styles/theme.css | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-15214@lists.php.net to get a copy of this message | ||
Commit: 9f44618c52fcaa75bcb9ffc9e2b786cd1eab9828
Author: Sherif Ramadan <googleguy@php.net> Sun, 6 Jan 2013 08:46:40 -0500
Parents: c11bac9f4b989787641842e997d9cb40ad4507ae
Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=9f44618c52fcaa75bcb9ffc9e2b786cd1eab9828
Log:
Patched user notes feature from regular site into prototype with some slight adjustments.
The old manual_notes had a display for number of notes on a page. This feature was missing from
the beta site so I added to manual_notes_beta.
Changed paths:
M include/shared-manual.inc
M styles/theme.css
Diff:
diff --git a/include/shared-manual.inc b/include/shared-manual.inc
index 9630394..e07eb32 100644
--- a/include/shared-manual.inc
+++ b/include/shared-manual.inc
@@ -408,12 +408,19 @@ function manual_notes_beta() {
make_link($addnotelink, 'add a note') .
'</small>';
+ $num_notes = count($notes);
+ if ($num_notes) {
+ $num_notes = "<span class=\"count\"><strong>$num_notes
note" . ($num_notes == 1 ? '' : 's') .
"</strong></span>";
+ } else {
+ $num_notes = null;
+ }
+
echo <<<END_USERNOTE_HEADER
<section id="usernotes">
<div class="head">
<span class="action">{$addnotesnippet}</span>
- <h3 class="title">User Contributed Notes</h3>
+ <h3 class="title">User Contributed Notes {$num_notes}</h3>
</div>
END_USERNOTE_HEADER;
diff --git a/styles/theme.css b/styles/theme.css
index 408f9cd..e5ad3d2 100755
--- a/styles/theme.css
+++ b/styles/theme.css
@@ -365,6 +365,17 @@ hr {
padding-top: .801em;
}
+#usernotes .count {
+ background-color: #7F7FB2;
+ color: white;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ border-radius: 5px;
+ padding: 0.4em;
+ font-size: 0.6em;
+ vertical-align: middle;
+}
+
/* Add a note buttons. */
#usernotes .action {
display: block;