Project: Modern Program Logo

Add Modern Program Logo to Detail Tab, Detail Page. Add Management Radio Buttons to WORC.

Start Date: January 13, 2011  
Deadline:    
Assigned by: Cass Herrin  
  1. Will have to create column in SQL table to hold Modern flag (Yes/No)
  2. Do not have to add column to SQL statement as it uses SELECT *
  3. Will have to add HTML radio buttons to FORM
  4. Will have to add code on Detail Tab to display logo
  5. Will have to add code on Detail Page to display logo

NOTE: Logging in either hangs or gives error. Going to Listings, Edit Listings sometimes gives big CF error dump.

12/19/11Start Doing Stuff
  • Created images/modernProperties.jpg and images/modernProperties_small.jpg
  • Added "Modern" to SELECT in selSoldPub_View.cfm and selPub_View.cfm
  • Added if/then blocks and graphic in Detail Tab and Detail Page
  • Set Modern to 1 on 98107, 121 NW 40th St.  ListingID = 67746862  MLS# 70039
  • Added insert, update code
  • WORC: acobb 6262 s_lloyd work
12/14/11SQL Table

Because I am making changes on DEV, will this have to be done agian in Prod?
I do not have rights to add a column to the table. Ask Neil to add column, CC: Cass.

pub_data
Premeire smallint Allow Nulls
Modern smallint Allow Nulls
12/14/11Begin

/Controllers/ListingManage/fbx_Switch.cfm

  • case:listingLookup
    • <cfset attributes.XFA.actEditListing="ListingManage.acteditListing">
      <cfset AddToQ('vListingManage.EditListing INTO COL2')>
  • case:acteditListing
    • <cfset AddToQ('mListingManage.UpdateListing')

/Models/mListingManage/fbx_Switch.cfm

  • case:UpdateListing
    • <cfset AddToQ('q.updPub_DataListing')>

/Query/upd/updPub_DataListing.cfm

  • <cfif IsDefinedValue("attributes.Premier")>
        Premier = <cfqueryparam value="#attributes.Premier#" cfsqltype="cf_sql_integer">,
    </cfif>
  • duplicate the above to create Modern UPDATE

/Query/ins/insPub_data.cfm

  • <cfif IsDefined("attributes.Premier")><cfif IncrCounter(cols)>,</cfif>
        Premier
    </cfif>
    ...) VALUES (...
    <cfif IsDefined("attributes.Premier")><cfif IncrCounter(vals)>,</cfif>
        <cfqueryparam value="#attributes.Premier#" null="#Not(LEN(attributes.Premier))#" cfsqltype="cf_sql_integer">
    </cfif>
  • duplicate the above to create Modern INSERT

/Views/vListingManage/dspEditListing.cfm

  • <form action="index.cfm?fuseaction=#attributes.XFA.actEditListing#" method="post">
  • <tr>
        <td valign="top"><font face="Geneva, Arial" size="2"><b>Premier Property:</b><BR></font></td>
        <td valign="top"><font face="Geneva, Arial" size="2">
            yes:<input type="Radio" name="premier" value="1"<cfif selPub_DataList.premier is "1">checked</cfif>>
            no:<input type="Radio" name="premier" value="0"<cfif selPub_DataList.premier is "0">checked</cfif>>
            </font>
        </td>
    </tr>
  • Copy above to create Modern Radio Buttons.

/Query/sel/selPub_DataList.cfm

  • <cfquery name="selPub_DataList" datasource="#request.winDSN#">
        SELECT *
        FROM pub_data

(Checked In 1/19/11) Revision #13435
Modified Files

Edit Listing Attributes Dialog

W/Views/vListingManage/dspEditListing.cfmForm to chose Premier Property, Premier Community and Modern Property
Added (1/19/11)
<tr>
    <td valign="top"><font face="Geneva, Arial" size="2"><b>Modern Property:</b><BR></font></td>
    <td valign="top">
        <font face="Geneva, Arial" size="2">
            yes:<input type="Radio" name="modern" value="1"<cfif selPub_DataList.modern is "1">checked</cfif>>
            no:<input type="Radio" name="modern" value="0"<cfif selPub_DataList.modern is "0">checked</cfif>>
       </font>
    </td>
</tr>

SELECT SQL Query

W/Query/sel/selPub_View.cfmSelect record in table pub_data

Added Modern to Select statement (1/19/11)

W/Query/sel/selSoldPub_View.cfmSelect record in table pub_data

Added Modern to Select statement (1/19/11)

UPDATE SQL Query

W/Query/upd/updPub_DataListing.cfmUpdate record in table pub_data

Added (1/19/11)
<cfif IsDefinedValue("attributes.Modern")>
    Modern = <cfqueryparam value="#attributes.Modern#" cfsqltype="cf_sql_integer">,
</cfif>

INSERT SQL Query

W/Query/ins/insPub_Data.cfmINSERT record into table pub_data
Added (1/19/11)
<cfif IsDefined("attributes.Modern")><cfif IncrCounter(cols)>,</cfif>
    Modern
</cfif>
<cfif IsDefined("attributes.Modern")><cfif IncrCounter(vals)>,</cfif>
    <cfqueryparam value="#attributes.Modern#" null="#Not(LEN(attributes.Modern))#" cfsqltype="cf_sql_integer">
</cfif>

Listing Detail Tab

W/View/vListing/dspPP3ListingDetailLayout.cfmRight Column Detail tab for Active listings

Added <img id="modern-logo-small" src="#request.appimages#/modernProperties_small.jpg" width="100" border="0" alt="This is a Modern property!" title="This is a Modern property!" /> (1/19/11)

W/View/vListing/dspSoldListingDetailLayout.cfmRight Column Detail tab for Active listings
Added <img id="modern-logo" src="#request.appimages#/modernProperties.jpg" width="100" border="0" alt="This is a Modern property!" title="This is a Modern property!" /> (1/19/11)

Full Listing Detail Page

W/View/vListing/dspListingDetailPublicUpdated.cfmBody of page - photo, specs and maps

Added<cfif isDefinedValue("selpub_view.modern") and selpub_view.modern eq 1><div id="modern_logo" style="text-align: center"><img src="#request.appimages#/modernProperties.jpg" border="0"></div></cfif> (1/19/11)

W/View/vListing/dspSoldListingDetailPublicUpdated.cfmBody of page - photo, specs and maps
Added<cfif isDefinedValue("selpub_view.modern") and selpub_view.modern eq 1><div id="modern_logo" style="text-align: center"><img src="#request.appimages#/modernProperties.jpg" border="0"></div></cfif> (1/19/11)

Stephen Lloyd 03/01/2011