Louie Anderson (caustic_sofa) wrote in vaginapagina,
Louie Anderson
caustic_sofa
vaginapagina

Parsley 'Tea' (or other uses)

Committer: wisest-owl
LJSUP-14893: Admin Page for The New Homepage

U   trunk/site/cgi-bin/LJ/Controller/Admin/HomePage.pm
U   trunk/site/templates/Admin/HomePage/menu.tmpl
U   trunk/site/templates/Admin/HomePage/new_item.tmpl
Modified: trunk/site/cgi-bin/LJ/Controller/Admin/HomePage.pm
===================================================================
--- trunk/site/cgi-bin/LJ/Controller/Admin/HomePage.pm	2013-04-29 11:55:14 UTC (rev 30578)
+++ trunk/site/cgi-bin/LJ/Controller/Admin/HomePage.pm	2013-04-29 12:09:11 UTC (rev 30579)
@@ -84,6 +84,8 @@
 
     my @cat_list = map { $_->get_template_params() } @$all_cats;
 
+    my $pages = [ map { { page_start => $_ * $page_count + 1, page_end => ($_ + 1) * $page_count } } (0 .. 9) ];
+
     $self->need_res();
     my $time_left = time % 3600;
     return $self->template_response(
@@ -94,8 +96,10 @@
             errors              => \@errors,
             time_left           => $LJ::TOP_RATING_WAIT - $time_left > 0 ? $LJ::TOP_RATING_WAIT - $time_left : 0,
             rating_types        => [ map { { filter => $_ } } keys %{LJ::PersonalStats::Ratings->rating_filter_by_country()} ],
+            main_category       => LJ::HomePage::Category->new (id => LJ::HomePage::Category::ARCHIVE_ID())->name,
             current_rating_type => $rating_type,
             page                => 'new',
+            pages               => $pages,
             site_root           => $LJ::SITEROOT,
         }
     );

Modified: trunk/site/templates/Admin/HomePage/menu.tmpl
===================================================================
--- trunk/site/templates/Admin/HomePage/menu.tmpl	2013-04-29 11:55:14 UTC (rev 30578)
+++ trunk/site/templates/Admin/HomePage/menu.tmpl	2013-04-29 12:09:11 UTC (rev 30579)
@@ -26,7 +26,17 @@
             </li>
         </ul>
     </div>
+    <tmpl_if expr="page eq 'new'">
     <div>
         Secs left to update rating: <TMPL_VAR time_left>
     </div>
+    <div>
+        Select page: 
+        <select name="pages">
+        <tmpl_loop pages>
+            <option value="<tmpl_var page_num>"><tmpl_var page_start> .. <tmpl_var page_end></option>
+        </tmpl_loop>
+        </select>
+    </div>
+    </tmpl_if>
 </div>

Modified: trunk/site/templates/Admin/HomePage/new_item.tmpl
===================================================================
--- trunk/site/templates/Admin/HomePage/new_item.tmpl	2013-04-29 11:55:14 UTC (rev 30578)
+++ trunk/site/templates/Admin/HomePage/new_item.tmpl	2013-04-29 12:09:11 UTC (rev 30579)
@@ -25,12 +25,10 @@
             </ul>
             <div class="b-adminpost-confirmbox">
                 <label class="b-adminpost-media"><input type="checkbox" name="hide_media" <tmpl_if hide_media> checked="checked"</tmpl_if> />do not show media</label>
+                <label class="b-adminpost-media"><input type="checkbox" name="main_rating" checked="checked" /><tmpl_var main_category></label>
                 <div class="b-ljbutton b-ljbutton-submit">
                     <button value="1" data-value="submit" name="confirm" value="Confirm">Confirm</button>
                 </div>
-                <div style="left:100px;" class="b-ljbutton b-ljbutton-submit-move">
-                    <button value="1" data-value="submit_n_move" name="save_n_move" value="Confirm">Confirm and move</button>
-                </div>
             </div>
         </form>
     </div>

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 

  • 2 comments