[dw-free] List memory tag on jump page after adding a memory
[commit: http://hg.dwscoalition.org/dw-free/rev/42ac929d97b3]
http://bugs.dwscoalition.org/show_bug.cgi?id=4267
Add links to memory categories on memadd.bml.
* Adds a link to the categories the memory is filed under after you've
created a new one
* Adds a link returning you to all your memories after you've deleted a memory
Patch by
hotlevel4.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=4267
Add links to memory categories on memadd.bml.
* Adds a link to the categories the memory is filed under after you've
created a new one
* Adds a link returning you to all your memories after you've deleted a memory
Patch by
Files modified:
- htdocs/tools/memadd.bml
- htdocs/tools/memadd.bml.text
--------------------------------------------------------------------------------
diff -r 91b0746ca11c -r 42ac929d97b3 htdocs/tools/memadd.bml
--- a/htdocs/tools/memadd.bml Sun Jul 01 17:20:23 2012 +0800
+++ b/htdocs/tools/memadd.bml Sun Jul 01 17:59:23 2012 +0800
@@ -116,6 +116,8 @@
$body = "<?h1 $ML{'.error.deleted.title'} h1?><?p " .
BML::ml(".error.deleted.body", { 'desc' => $memory->{'des'} }) .
" p?>";
+ $body .= "<ul><li><a href='$LJ::SITEROOT/tools/memories?user=" . $memoryu->user .
+ "'>" . "$ML{'.error.deleted.next'}</a></li></ul>";
return;
} else {
$title = $ML{'Error'};
@@ -368,6 +370,7 @@
security => $sec,
}, \@kwid);
LJ::Memories::updated_keywords($memoryu) if $needflush;
+ $exist_kw = LJ::Memories::get_keywords($memoryu) if $needflush;
$title = $ML{'.title.added'};
$body .= "<?h1 $ML{'.body.added.header'} h1?>";
@@ -378,6 +381,23 @@
$body .= "<li><a href='" . $entry->url . "'>$ML{'.body.added.next.entry'}</a></li>";
$body .= "<li><a href='$LJ::SITEROOT/tools/memories?user=" . $memoryu->user . "'>"
. "$ML{'.body.added.next.view'}</a></li>";
+
+ foreach my $kwid ( @kwid ) {
+ my $kw = $exist_kw->{$kwid};
+ my $ue_kw = LJ::eurl( $kw );
+ LJ::text_out( \$kw );
+
+ if ($kw eq "*") {
+ $kw = $ML{'.uncategorized'};
+ } else {
+ $kw = LJ::ehtml( $kw );
+ }
+
+ $body .= "<li><a href=\"/tools/memories?user=" . $memoryu->user .
+ "&keyword=$ue_kw&filter=all\">" .
+ BML::ml( ".body.added.next.keywords", { 'keyword' => $kw } ) . "</a></li>";
+ }
+
$body .= "<li><a href='" . $remote->journal_base . "/read'>$ML{'.body.added.next.friends'}</a></li>";
$body .= "<li>" . BML::ml(".body.added.next.journal", { 'user' => $ju->ljuser_display }) . "</li>";
$body .= "</ul>";
diff -r 91b0746ca11c -r 42ac929d97b3 htdocs/tools/memadd.bml.text
--- a/htdocs/tools/memadd.bml.text Sun Jul 01 17:20:23 2012 +0800
+++ b/htdocs/tools/memadd.bml.text Sun Jul 01 17:59:23 2012 +0800
@@ -14,6 +14,8 @@
.body.added.next.view=View all your memorable entries
+.body.added.next.keywords=View all memorable entries saved as "[[keyword]]"
+
.body.added.text=Your list of memorable entries has been revised.
.description=Description:
@@ -30,6 +32,8 @@
.error.deleted.body=The journal entry "[[desc]]" has been removed from your list of memorable entries.
+.error.deleted.next=View all your memorable entries
+
.error.deleted.title=Memory deleted
.error.entry_deleted=Journal entry no longer exists. Memory deleted.
@@ -81,6 +85,8 @@
.title.edit_memory=Edit Memorable Entry
+.uncategorized=Uncategorized
+
.whocansee=You have the same control over your memoried entries as you do over your journal entries. Set an access level for this memory now.
.whocansee.comm=You have the same control over your memoried entries as you do over your community entries. Set an access level for this memory now.
--------------------------------------------------------------------------------

no subject