Changeset 497 for branches


Ignore:
Timestamp:
03/31/14 17:48:15 (5 years ago)
Author:
jls17
Message:
  • added schema-type-icon to the schema detail page
Location:
branches/work_311
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/work_311/doc/DocSchemaDetails.cpp

    r495 r497  
    6565                        //ContentHead informations 
    6666                        stringstream contHeadStrm; 
    67                         contHeadStrm << CWebUtil::LinkToSchemaIndex(rootLevel) << endl; 
     67                        contHeadStrm << CWebUtil::LinkToSchemaIndex(rootLevel, false) << endl; 
    6868                        contHeadStrm << MenuSeparator << this->pInside->LinkToSchemaTypeList(compSchema.schemaType, rootLevel) << endl; 
    69                         contHeadStrm << MenuSeparator << CWebUtil::ObjName(this->schema.GetName()); 
     69                        contHeadStrm << MenuSeparator << CWebUtil::SchemaImageTag(compSchema.schemaType, rootLevel) << CWebUtil::ObjName(this->schema.GetName()); 
    7070                        contHeadStrm << CAREnum::GetOverlayTypeString(overlayType); 
    7171 
  • branches/work_311/output/WebUtil.cpp

    r450 r497  
    141141} 
    142142 
     143string CWebUtil::SchemaImageTag(int schemaType, int rootLevel) 
     144{ 
     145        const char* image = "schema.gif"; 
     146         
     147        switch (schemaType) 
     148        { 
     149        case AR_SCHEMA_JOIN: image = "schema_join.gif"; break; 
     150        case AR_SCHEMA_VIEW: image = "schema_join.gif"; break; 
     151        case AR_SCHEMA_DIALOG: image = "schema_display.gif"; break; 
     152        case AR_SCHEMA_VENDOR: image = "schema_vendor.gif"; break; 
     153        } 
     154 
     155        return ImageTag(image, rootLevel); 
     156} 
     157 
    143158string CWebUtil::ObjName(const string& objName) 
    144159{ 
     
    315330} 
    316331 
    317 string CWebUtil::LinkToSchemaIndex(int rootLevel) 
    318 { 
    319         return LinkToSchemaIndex(-1, rootLevel); 
    320 } 
    321  
    322 string CWebUtil::LinkToSchemaIndex(int objectCount, int rootLevel) 
     332string CWebUtil::LinkToSchemaIndex(int rootLevel, bool showImage) 
     333{ 
     334        return LinkToSchemaIndex(-1, rootLevel, showImage); 
     335} 
     336 
     337string CWebUtil::LinkToSchemaIndex(int objectCount, int rootLevel, bool showImage) 
    323338{ 
    324339        string name = (objectCount > 1?"Forms":"Form"); 
    325         return LinkToHelper(name, objectCount, CPageParams(PAGE_OVERVIEW, AR_STRUCT_ITEM_XML_SCHEMA), "schema.gif", rootLevel); 
     340        return LinkToHelper(name, objectCount, CPageParams(PAGE_OVERVIEW, AR_STRUCT_ITEM_XML_SCHEMA), (showImage ? "schema.gif" : ""), rootLevel); 
    326341} 
    327342 
     
    361376} 
    362377 
    363 string CWebUtil::LinkToHelper(string name, int objectCount, const CPageParams& page, string image, int rootLevel) 
     378string CWebUtil::LinkToHelper(string name, int objectCount, const CPageParams& page, const string& image, int rootLevel) 
    364379{ 
    365380        stringstream strmTmp; 
  • branches/work_311/output/WebUtil.h

    r450 r497  
    5656                static string ObjName(const string& objName); 
    5757                static string ChkBoxInput(string nameAndValue, bool checked); 
     58                static string SchemaImageTag(int schemyType, int rootLevel); 
    5859 
    5960                static string LinkToActiveLinkIndex(int rootLevel); 
     
    8384                static string LinkToRoleIndex(int rootLevel); 
    8485                static string LinkToRoleIndex(int objectCount, int rootLevel); 
    85                 static string LinkToSchemaIndex(int rootLevel); 
    86                 static string LinkToSchemaIndex(int objectCount, int rootLevel); 
     86                static string LinkToSchemaIndex(int rootLevel, bool showImage = true); 
     87                static string LinkToSchemaIndex(int objectCount, int rootLevel, bool showImage = true); 
    8788                static string LinkToUserIndex(int rootLevel); 
    8889                static string LinkToUserIndex(int objectCount, int rootLevel); 
     
    9192                static string LinkToContainer(int objectCount, int rootLevel, int containerType); 
    9293 
    93                 static string LinkToHelper(string name, int objectCount, const CPageParams& page, string image, int rootLevel); 
     94                static string LinkToHelper(string name, int objectCount, const CPageParams& page, const string &image, int rootLevel); 
    9495                static string GetRelativeURL(int rootLevel, const CPageParams& page); 
    9596 
Note: See TracChangeset for help on using the changeset viewer.