madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r22009: LJSUP-12197: Change icons on "Edit Journ...

Committer: sbelyaev
LJSUP-12197: Change icons on "Edit Journal Entries" page
U   trunk/cgi-bin/LJ/DelayedEntry.pm
U   trunk/cgi-bin/LJ/Widget/EntryChooser.pm
U   trunk/htdocs/editjournal.bml
U   trunk/templates/Widgets/entry_chooser.tmpl
Modified: trunk/cgi-bin/LJ/DelayedEntry.pm
===================================================================
--- trunk/cgi-bin/LJ/DelayedEntry.pm	2012-05-21 12:39:17 UTC (rev 22008)
+++ trunk/cgi-bin/LJ/DelayedEntry.pm	2012-05-21 13:04:57 UTC (rev 22009)
@@ -285,6 +285,10 @@
     LJ::MemCache::delete($memcache_key);
 }
 
+sub original_post {
+    return;
+}
+
 sub delayedid {
     my ($self) = @_;
     return $self->{delayed_id};

Modified: trunk/cgi-bin/LJ/Widget/EntryChooser.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/EntryChooser.pm	2012-05-21 12:39:17 UTC (rev 22008)
+++ trunk/cgi-bin/LJ/Widget/EntryChooser.pm	2012-05-21 13:04:57 UTC (rev 22009)
@@ -21,7 +21,13 @@
     my @entries_display;
 
     foreach my $entry (@$entries) {
-        my $entry_id = $entry->is_delayed ? $entry->delayedid : $entry->ditemid ;
+        my $repost_entry_obj;
+        my $content =  { 'original_post_obj' => \$entry,
+                         'repost_obj'        => \$repost_entry_obj, };
+
+        my $entry_reposted = LJ::Entry::Repost->substitute_content( $entry, $content );
+
+        my $entry_id = $entry->is_delayed ? $entry->delayedid : $entry->ditemid;
         my $entry_can_edit = 
             $entry->poster->equals($remote) &&
             ! $entry->journal->is_readonly &&
@@ -101,6 +107,7 @@
             'date_display'       => $date_display,
             'entry_text_display' => $entry_text_display,
             'entry_taglist'      => $entry_taglist,
+            'entry_reposted'     => $entry_reposted,
         };
     }
 

Modified: trunk/htdocs/editjournal.bml
===================================================================
--- trunk/htdocs/editjournal.bml	2012-05-21 12:39:17 UTC (rev 22008)
+++ trunk/htdocs/editjournal.bml	2012-05-21 13:04:57 UTC (rev 22009)
@@ -180,16 +180,6 @@
                my $entry_obj 
                     = LJ::Entry->new_from_item_hash( $journal, $e_raw );
 
-               my $repost_entry_obj;
-               my $content =  { 'original_post_obj' => \$entry_obj,
-                                'repost_obj'        => \$repost_entry_obj, };
-
-               if (LJ::Entry::Repost->substitute_content( $entry_obj, $content )) {
-                   $real_entries->{$entry_obj->posterid}->{$entry_obj->jitemid} 
-                            = { 'itemid'    => $repost_entry_obj->jitemid,
-                                'journalid' => $repost_entry_obj->journalid, };
-               }
-
                push @entries, $entry_obj;
             }
         }

Modified: trunk/templates/Widgets/entry_chooser.tmpl
===================================================================
--- trunk/templates/Widgets/entry_chooser.tmpl	2012-05-21 12:39:17 UTC (rev 22008)
+++ trunk/templates/Widgets/entry_chooser.tmpl	2012-05-21 13:04:57 UTC (rev 22009)
@@ -26,7 +26,11 @@
 					<TMPL_IF entry_can_edit>
 						<a href='<TMPL_VAR edit_link ESCAPE=HTML>' class='b-editentry-edit-btn b-editentry-ctrl-btn'></a>
 					<TMPL_ELSE>
-						<a href='<TMPL_VAR delete_link ESCAPE=HTML>' class='b-editentry-del-btn b-editentry-ctrl-btn'></a>
+                        <TMPL_IF entry_reposted>
+    						<a href='<TMPL_VAR delete_link ESCAPE=HTML>' class='b-editentry-del-btn b-editentry-ctrl-btn'></a>
+                        <TMPL_ELSE>
+                            <a href='<TMPL_VAR delete_link ESCAPE=HTML>' class='b-editentry-edit-btn b-editentry-ctrl-btn'></a>
+                        </TMPL_IF>
 					</TMPL_IF>
 				</p>
 

Tags: bml, livejournal, madeon, pm, sbelyaev, tmpl
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments