// Copyright 1999 (c) by Perforce Software, Inc. All rights reserved. // // p4wUserView: // The user view. // ------------------------------------- // Includes // #include <stdlib.h> #include <string.h> #include <p4wp4.h> #include "p4wView.h" #include "p4wUserView.h" #include "p4wMenuPane.h" #include "p4wUserPane.h" #include "p4wRSSUserPane.h" #include "p4wStrBuf.h" // // ------------------------------------- // Constructors and destructor. // p4wUserView::p4wUserView(p4wRequest & Request) : p4wView(Request) { // // Set the short and the long versions of the title fShortTitle.Set( "User Detail" ); fFullTitle << "User " << fRequest.GetURL(); } p4wUserView::~p4wUserView() { } // ------------------------------------- // Control item render functions. // void p4wUserView::RenderContent() { // // Send the user view pane. p4wUserPane userPane(*this, fRequest, 0); if( fRequest.GetURL().Length() == 0 ) { const char *userPaneArgs[] = { "-o" }; fRequest.p4("user", 1, userPaneArgs, &userPane); } else { const char *userPaneArgs[] = { "-o", fRequest.GetURL().Text() }; fRequest.p4("user", 2, userPaneArgs, &userPane); } // // Wait for the user spec from the server fRequest.p4Wait(); } void p4wUserView::RenderMenu() { // // Draw the menu bar p4wMenuPane menuPane(*this, fRequest, "user"); menuPane.Render(NULL); } void p4wUserView::RenderRssHdrLink( p4wHtml *htm ) { StrBuf user; if( fRequest.GetURL().Length() == 0 ) { user << fRequest.GetUser().Text(); } else { user << fRequest.GetURL().Text(); } StrBuf feedTitle; p4wURL urlMaker; p4wStrBuf userURL; feedTitle << "JobView for "; feedTitle << user; urlMaker.ConstructURL( userURL, user.Text(), AC_RSSJOBVIEW, fRequest.GetDynArgs() ); userURL << RSSEXT; htm->rssHeaderLink( feedTitle.Text(), userURL.Text() ); feedTitle.Clear(); userURL.Clear(); feedTitle << "Reviews for "; feedTitle << user; urlMaker.ConstructURL( userURL, user.Text(), AC_RSSUSER, fRequest.GetDynArgs() ); userURL << RSSEXT; htm->rssHeaderLink( feedTitle.Text(), userURL.Text() ); }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 12234 | Matt Attaway |
Rejigger P4Web project in preparation for official sunsetting The bin directory contains the last official builds of P4Web from the Perforce download site. P4Web is soon to be completely sunsetted; these builds are here for folks who don't want to build their own. To better handle the archived builds the source code has been moved into a separate src directory. |
||
//guest/perforce_software/p4web/Views/p4wUserView.cpp | |||||
#1 | 8914 | Matt Attaway | Initial add of the P4Web source code |