For the ``Page`` model, redirect to the add view for the
        first page model, based on the ``ADD_PAGE_ORDER`` setting.
350752
def add_view(self, request, **kwargs):
        
        if self.model is Page:
            return HttpResponseRedirect(self.get_content_models()[0].add_url)
        return super(PageAdmin, self).add_view(request, **kwargs)
539184
def add_view(self, request, form_url='', extra_context=None):
        """"""
        extra_context = {
            'language': get_language_from_request(request),
            'page_languages': settings.PAGE_LANGUAGES,
        }
        return super(PageAdmin, self).add_view(request, form_url,
                                               extra_context)
1334071
function(page) {
      var t = this,
          newPages = t.pages.slice(0);
      newPages.push(page);
      t.tour.set('pages', newPages);
      t.tour.isDirty = true;
      t.setDirty(true);
      t.loadForm();
    }
1320932
def configure_pagination(page, options)
      page = super(page, options)
      raise ::Folio::InvalidPage unless page.current_page.is_a?(Integer)
      raise ::Folio::InvalidPage if page.out_of_bounds?
      page
    rescue ::WillPaginate::InvalidPage
      raise ::Folio::InvalidPage
    end
676584
function (page) {
            var state = this.state;
            if (state.currentPage !== page) {
                // page has changed
                state.currentPage = page;
                this.updateVisiblePages();
                scope.broadcast('pagefocus', {
                    page: state.currentPage,
                    numPages: this.numPages,
                    visiblePages: util.extend([], state.visiblePages),
                    fullyVisiblePages: util.extend([], state.fullyVisiblePages)
                });
            } else {
                // still update visible pages!
                this.updateVisiblePages();
            }
        }
1057239
def show
      if should_skip_to_first_child?
        redirect_to refinery.url_for(first_live_child.url), status: 301 and return
      elsif page.link_url.present?
        redirect_to page.link_url, status: 301 and return
      elsif should_redirect_to_friendly_url?
        redirect_to refinery.url_for(page.url), status: 301 and return
      end

      render_with_templates?
    end
82270
def order(self, field, order=None):
        
        if not order:
            order = ORDER.DESC
        self.url.order = (field, order)
        self.url.set_page(1)
        return self
78341
public function add()
    {
        $page = $this->Pages->newEntity();

        if ($this->request->is('post')) {
            $page = $this->Pages->patchEntity($page, $this->request->getData());

            if ($this->Pages->save($page)) {
                $this->Flash->success(I18N_OPERATION_OK);

                return $this->redirect(['action' => 'index']);
            }

            $this->Flash->error(I18N_OPERATION_NOT_OK);
        }

        $this->set(compact('page'));
    }
375095
def page_next(self):
        """"""
        window_start = (self.parent.value('window_start') +
                        self.parent.value('window_length'))
        self.parent.overview.update_position(window_start)
289112
async def add_line(self, *args, **kwargs):
        

        display_page = self.display_page
        page_count = self.page_count

        self.paginator.add_line(*args, **kwargs)

        new_page_count = self.page_count

        if display_page + 1 == page_count:
            # To keep position fixed on the end, update position to new last page and update message.
            self._display_page = new_page_count
            self.bot.loop.create_task(self.update())
968412
def activate_page(self, page_id):
        

        """
        if page_id == "next":
            page_keys = list(self._pages.keys())
            key_count = len(page_keys)
            if key_count > 0:
                idx = page_keys.index(self._active_page.page_id)
                if idx >= key_count-1:
                    idx = 0
                else:
                    idx += 1
                self._active_page = self._pages[page_keys[idx]]
                self._active_page._render()
                self._page_changed(self._active_page)

        elif page_id in self._pages:
            self._active_page = self._pages[page_id]
            self._page_changed(self._active_page)
        else:
            raise ValueError("Page with {page_id} not found in page list".format(page_id = page_id))
189244
public function addPage()
    {
        $this->pageN++;

        // Add a little margin to max Y "between pages"
        $this->maxY += 10;

        // If Y is still heigher by any reason...
        if ($this->maxY < $this->Y) {
            // ... update max Y
            $this->maxY = $this->Y;
        } else {
            // else update Y so that nothing will be overwritten, like images or cells...
            $this->Y = $this->maxY;
        }
    }
109360
def set_page
      title = params[:id] || params[:page_id] || params[:path]
      raise ActiveRecord::RecordNotFound, "Unknown page request" unless title

      @page = select_page(title)

      unless @page
        if user_can?(:create_page)
          return redirect_to new_page_path(title: title)
        else
          if title == "Home"
            @page = special_page("Welcome")
          else
            raise ActiveRecord::RecordNotFound, "Could not find page '#{title}'"
          end
        end
      end
    end
284490
def save_model(self, request, obj, form, change):
        
        if change and obj._old_slug != obj.slug:
            # _old_slug was set in PageAdminForm.clean_slug().
            new_slug = obj.slug or obj.generate_unique_slug()
            obj.slug = obj._old_slug
            obj.set_slug(new_slug)

        # Force parent to be saved to trigger handling of ordering and slugs.
        parent = request.GET.get("parent")
        if parent is not None and not change:
            obj.parent_id = parent
            obj.save()
        super(PageAdmin, self).save_model(request, obj, form, change)
200285
def change_view(self, request, object_id, **kwargs):
        
        page = get_object_or_404(Page, pk=object_id)
        content_model = page.get_content_model()

        kwargs.setdefault("extra_context", {})
        kwargs["extra_context"].update({
            "hide_delete_link": not content_model.can_delete(request),
            "hide_slug_field": content_model.overridden(),
        })

        return super(PageAdmin, self).change_view(request, object_id, **kwargs)
55397
function nextPage () {
    if (!ctrl.canPageForward()) { return; }

    var newOffset = MdTabsPaginationService.increasePageOffset(getElements(), ctrl.offsetLeft);

    ctrl.offsetLeft = fixOffset(newOffset);
  }
1172789
def change_view(self, request, object_id, extra_context=None):
        """"""
        language = get_language_from_request(request)
        extra_context = {
            'language': language,
            # don't see where it's used
            #'lang': current_lang,
            'page_languages': settings.PAGE_LANGUAGES,
        }
        try:
            int(object_id)
        except ValueError:
            raise Http404('The "%s" part of the location is invalid.'
                % str(object_id))
        try:
            obj = self.model.objects.get(pk=object_id)
        except self.model.DoesNotExist:
            # Don't raise Http404 just yet, because we haven't checked
            # permissions yet. We don't want an unauthenticated user to be able
            # to determine whether a given object exists.
            obj = None
        else:
            template = get_template_from_request(request, obj)
            extra_context['placeholders'] = get_placeholders(template)
            extra_context['traduction_languages'] = [l for l in
                settings.PAGE_LANGUAGES if Content.objects.get_content(obj,
                                    l[0], "title") and l[0] != language]
        extra_context['page'] = obj
        return super(PageAdmin, self).change_view(request, object_id,
                                                        extra_context=extra_context)