Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Bug 4973 - Add "view my entries in this community" to post-entry-creatio... #332

Merged
merged 2 commits into from

4 participants

NinetyD Afuna Jen alierak
NinetyD
Collaborator

...n page for communities

http://bugs.dwscoalition.org/show_bug.cgi?id=4973
-- Add link to ?poster= on community update success page (Beta only)

NinetyD
Collaborator

1) Is there a smarter way of doing this?
2) Beta only because of 1) and wasn't sure whether I was supposed to edit /update too.

cgi-bin/DW/Controller/Entry.pm
@@ -991,6 +994,7 @@ sub _do_post {
ml_string => "/update.bml.success.links.memories" },
{ url => "$LJ::SITEROOT/edittags?journal=$juser&itemid=$ditemid",
ml_string => "/update.bml.success.links.tags" },
+ $community_entries,
);
Afuna Owner
afuna added a note

What I'd suggest is, on a separate line:

push @links, { ... } if $ju->is_community

Then you wouldn't need to edit the FOREACH loop in /entry/success.tt.

NinetyD Collaborator
ninetyd added a note

This is what I tried at first but it wouldn't compile. It doesn't like the if after the }

alierak Collaborator
alierak added a note

It does too, so long as you do it in a separate push and don't accidentally put the if inside the ); at the end of the first push.

Another approach is to push () instead of "" when you are trying to push nothing.

NinetyD Collaborator
ninetyd added a note

facepalm Thank you Alierak ! I swear I know how to read. XD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Afuna afuna commented on the diff
htdocs/update.bml.text
@@ -115,6 +115,8 @@
.success.links.memories=Add the entry to your memories
+.success.links.myentries=View all my entries in this community
Afuna Owner
afuna added a note

Hmm, should this be "view all my entries", or "view all of my entries"?

Jen Collaborator
kareila added a note

I think omitting the "of" sounds better in this case. See also "all the king's horses and all the king's men."

Afuna Owner
afuna added a note
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
NinetyD ninetyd Bug 4973 - Add "view my entries in this community" to post-entry-crea…
…tion page for communities


http://bugs.dwscoalition.org/show_bug.cgi?id=4973
-- Add link to ?poster= on community update success page (Beta only)
2a31c84
Afuna afuna commented on the diff
cgi-bin/DW/Controller/Entry.pm
@@ -993,6 +993,9 @@ sub _do_post {
ml_string => "/update.bml.success.links.tags" },
);
+ push @links, { url => $ju->journal_base . "?poster=" . $auth->{poster}->user,
Afuna Owner
afuna added a note

noting for style: parantheses around the if statement is not needed. otherwise this looks great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
NinetyD ninetyd Bug 4973 - Add "view my entries in this community" to post-entry-crea…
…tion page for communities


http://bugs.dwscoalition.org/show_bug.cgi?id=4973
-- Add link to ?poster= on community update success page (Beta only)
539f657
NinetyD
Collaborator

Updated as requested. Thanks for the advice! Here's a cat just because CAT!!!

Sans titre - 1

Afuna
Owner

Happy cat! Much appreciated, thank you!

Afuna afuna merged commit 1f10ef3 into from
NinetyD ninetyd deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 2, 2013
  1. NinetyD

    Bug 4973 - Add "view my entries in this community" to post-entry-crea…

    ninetyd authored
    …tion page for communities
    
    
    http://bugs.dwscoalition.org/show_bug.cgi?id=4973
    -- Add link to ?poster= on community update success page (Beta only)
Commits on Apr 15, 2013
  1. NinetyD

    Bug 4973 - Add "view my entries in this community" to post-entry-crea…

    ninetyd authored
    …tion page for communities
    
    
    http://bugs.dwscoalition.org/show_bug.cgi?id=4973
    -- Add link to ?poster= on community update success page (Beta only)
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 0 deletions.
  1. +3 −0  cgi-bin/DW/Controller/Entry.pm
  2. +2 −0  htdocs/update.bml.text
3  cgi-bin/DW/Controller/Entry.pm
View
@@ -993,6 +993,9 @@ sub _do_post {
ml_string => "/update.bml.success.links.tags" },
);
+ push @links, { url => $ju->journal_base . "?poster=" . $auth->{poster}->user,
Afuna Owner
afuna added a note

noting for style: parantheses around the if statement is not needed. otherwise this looks great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ ml_string => "/update.bml.success.links.myentries" } if $ju->is_community;
+
# crosspost!
my @crossposts = _queue_crosspost( $form_req,
2  htdocs/update.bml.text
View
@@ -115,6 +115,8 @@
.success.links.memories=Add the entry to your memories
+.success.links.myentries=View all my entries in this community
Afuna Owner
afuna added a note

Hmm, should this be "view all my entries", or "view all of my entries"?

Jen Collaborator
kareila added a note

I think omitting the "of" sounds better in this case. See also "all the king's horses and all the king's men."

Afuna Owner
afuna added a note
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+
.success.links.tags=Edit this entry's tags
.success.links.view=View the entry
Something went wrong with that request. Please try again.