<apex:page standardController="Opportunity" showHeader="false" sidebar="false">
<head>
<style>
    th {
        text-align: center;
        font-weight: bold;
    }
</style>
</head>
    <apex:form >
        <!-- 動的表示、前月を最後尾 -->
        <!-- 当月は必ず空白（バッチにて） -->
        <font style="font-weight:bold;">Rating History</font>
        <table border="1" width="100%" cellspacing="0" bordercolor="grey">
            <apex:outputPanel rendered="{!MONTH(TODAY())==1}" layout="none">
                <tr style="text-align:center;">
                    <th width="8%">1月</th>
                    <th width="8%">2月</th>
                    <th width="8%">3月</th>
                    <th width="8%">4月</th>
                    <th width="8%">5月</th>
                    <th width="8%">6月</th>
                    <th width="8%">7月</th>
                    <th width="8%">8月</th>
                    <th width="8%">9月</th>
                    <th width="8%">10月</th>
                    <th width="8%">11月</th>
                    <th width="8%">12月</th>
                </tr>
                <tr style="text-align:center;">
                    <td>&nbsp;</td>
                    <td>{!Opportunity.Rating02__c}&nbsp;</td>
                    <td>{!Opportunity.Rating03__c}&nbsp;</td>
                    <td>{!Opportunity.Rating04__c}&nbsp;</td>
                    <td>{!Opportunity.Rating05__c}&nbsp;</td>
                    <td>{!Opportunity.Rating06__c}&nbsp;</td>
                    <td>{!Opportunity.Rating07__c}&nbsp;</td>
                    <td>{!Opportunity.Rating08__c}&nbsp;</td>
                    <td>{!Opportunity.Rating09__c}&nbsp;</td>
                    <td>{!Opportunity.Rating10__c}&nbsp;</td>
                    <td>{!Opportunity.Rating11__c}&nbsp;</td>
                    <td>{!Opportunity.Rating12__c}&nbsp;</td>
                </tr>
            </apex:outputPanel>
            <apex:outputPanel rendered="{!MONTH(TODAY())==2}" layout="none">
                <tr style="text-align:center;">
                    <th width="8%">2月</th>
                    <th width="8%">3月</th>
                    <th width="8%">4月</th>
                    <th width="8%">5月</th>
                    <th width="8%">6月</th>
                    <th width="8%">7月</th>
                    <th width="8%">8月</th>
                    <th width="8%">9月</th>
                    <th width="8%">10月</th>
                    <th width="8%">11月</th>
                    <th width="8%">12月</th>
                    <th width="8%">1月</th>
                </tr>
                <tr style="text-align:center;">
                    <td>&nbsp;</td>
                    <td>{!Opportunity.Rating03__c}&nbsp;</td>
                    <td>{!Opportunity.Rating04__c}&nbsp;</td>
                    <td>{!Opportunity.Rating05__c}&nbsp;</td>
                    <td>{!Opportunity.Rating06__c}&nbsp;</td>
                    <td>{!Opportunity.Rating07__c}&nbsp;</td>
                    <td>{!Opportunity.Rating08__c}&nbsp;</td>
                    <td>{!Opportunity.Rating09__c}&nbsp;</td>
                    <td>{!Opportunity.Rating10__c}&nbsp;</td>
                    <td>{!Opportunity.Rating11__c}&nbsp;</td>
                    <td>{!Opportunity.Rating12__c}&nbsp;</td>
                    <td>{!Opportunity.Rating01__c}&nbsp;</td>
                </tr>
            </apex:outputPanel>
            <apex:outputPanel rendered="{!MONTH(TODAY())==3}" layout="none">
                <tr style="text-align:center;">
                    <th width="8%">3月</th>
                    <th width="8%">4月</th>
                    <th width="8%">5月</th>
                    <th width="8%">6月</th>
                    <th width="8%">7月</th>
                    <th width="8%">8月</th>
                    <th width="8%">9月</th>
                    <th width="8%">10月</th>
                    <th width="8%">11月</th>
                    <th width="8%">12月</th>
                    <th width="8%">1月</th>
                    <th width="8%">2月</th>
                </tr>
                <tr style="text-align:center;">
                    <td>&nbsp;</td>
                    <td>{!Opportunity.Rating04__c}&nbsp;</td>
                    <td>{!Opportunity.Rating05__c}&nbsp;</td>
                    <td>{!Opportunity.Rating06__c}&nbsp;</td>
                    <td>{!Opportunity.Rating07__c}&nbsp;</td>
                    <td>{!Opportunity.Rating08__c}&nbsp;</td>
                    <td>{!Opportunity.Rating09__c}&nbsp;</td>
                    <td>{!Opportunity.Rating10__c}&nbsp;</td>
                    <td>{!Opportunity.Rating11__c}&nbsp;</td>
                    <td>{!Opportunity.Rating12__c}&nbsp;</td>
                    <td>{!Opportunity.Rating01__c}&nbsp;</td>
                    <td>{!Opportunity.Rating02__c}&nbsp;</td>
                </tr>
            </apex:outputPanel>
            <apex:outputPanel rendered="{!MONTH(TODAY())==4}" layout="none">
                <tr style="text-align:center;">
                    <th width="8%">4月</th>
                    <th width="8%">5月</th>
                    <th width="8%">6月</th>
                    <th width="8%">7月</th>
                    <th width="8%">8月</th>
                    <th width="8%">9月</th>
                    <th width="8%">10月</th>
                    <th width="8%">11月</th>
                    <th width="8%">12月</th>
                    <th width="8%">1月</th>
                    <th width="8%">2月</th>
                    <th width="8%">3月</th>
                </tr>
                <tr style="text-align:center;">
                    <td>&nbsp;</td>
                    <td>{!Opportunity.Rating05__c}&nbsp;</td>
                    <td>{!Opportunity.Rating06__c}&nbsp;</td>
                    <td>{!Opportunity.Rating07__c}&nbsp;</td>
                    <td>{!Opportunity.Rating08__c}&nbsp;</td>
                    <td>{!Opportunity.Rating09__c}&nbsp;</td>
                    <td>{!Opportunity.Rating10__c}&nbsp;</td>
                    <td>{!Opportunity.Rating11__c}&nbsp;</td>
                    <td>{!Opportunity.Rating12__c}&nbsp;</td>
                    <td>{!Opportunity.Rating01__c}&nbsp;</td>
                    <td>{!Opportunity.Rating02__c}&nbsp;</td>
                    <td>{!Opportunity.Rating03__c}&nbsp;</td>
                </tr>
            </apex:outputPanel>
            <apex:outputPanel rendered="{!MONTH(TODAY())==5}" layout="none">
                <tr style="text-align:center;">
                    <th width="8%">5月</th>
                    <th width="8%">6月</th>
                    <th width="8%">7月</th>
                    <th width="8%">8月</th>
                    <th width="8%">9月</th>
                    <th width="8%">10月</th>
                    <th width="8%">11月</th>
                    <th width="8%">12月</th>
                    <th width="8%">1月</th>
                    <th width="8%">2月</th>
                    <th width="8%">3月</th>
                    <th width="8%">4月</th>
                </tr>
                <tr style="text-align:center;">
                    <td>&nbsp;</td>
                    <td>{!Opportunity.Rating06__c}&nbsp;</td>
                    <td>{!Opportunity.Rating07__c}&nbsp;</td>
                    <td>{!Opportunity.Rating08__c}&nbsp;</td>
                    <td>{!Opportunity.Rating09__c}&nbsp;</td>
                    <td>{!Opportunity.Rating10__c}&nbsp;</td>
                    <td>{!Opportunity.Rating11__c}&nbsp;</td>
                    <td>{!Opportunity.Rating12__c}&nbsp;</td>
                    <td>{!Opportunity.Rating01__c}&nbsp;</td>
                    <td>{!Opportunity.Rating02__c}&nbsp;</td>
                    <td>{!Opportunity.Rating03__c}&nbsp;</td>
                    <td>{!Opportunity.Rating04__c}&nbsp;</td>
                </tr>
            </apex:outputPanel>
            <apex:outputPanel rendered="{!MONTH(TODAY())==6}" layout="none">
                <tr style="text-align:center;">
                    <th width="8%">6月</th>
                    <th width="8%">7月</th>
                    <th width="8%">8月</th>
                    <th width="8%">9月</th>
                    <th width="8%">10月</th>
                    <th width="8%">11月</th>
                    <th width="8%">12月</th>
                    <th width="8%">1月</th>
                    <th width="8%">2月</th>
                    <th width="8%">3月</th>
                    <th width="8%">4月</th>
                    <th width="8%">5月</th>
                </tr>
                <tr style="text-align:center;">
                    <td>&nbsp;</td>
                    <td>{!Opportunity.Rating07__c}&nbsp;</td>
                    <td>{!Opportunity.Rating08__c}&nbsp;</td>
                    <td>{!Opportunity.Rating09__c}&nbsp;</td>
                    <td>{!Opportunity.Rating10__c}&nbsp;</td>
                    <td>{!Opportunity.Rating11__c}&nbsp;</td>
                    <td>{!Opportunity.Rating12__c}&nbsp;</td>
                    <td>{!Opportunity.Rating01__c}&nbsp;</td>
                    <td>{!Opportunity.Rating02__c}&nbsp;</td>
                    <td>{!Opportunity.Rating03__c}&nbsp;</td>
                    <td>{!Opportunity.Rating04__c}&nbsp;</td>
                    <td>{!Opportunity.Rating05__c}&nbsp;</td>
                </tr>
            </apex:outputPanel>
            <apex:outputPanel rendered="{!MONTH(TODAY())==7}" layout="none">
                <tr style="text-align:center;">
                    <th width="8%">7月</th>
                    <th width="8%">8月</th>
                    <th width="8%">9月</th>
                    <th width="8%">10月</th>
                    <th width="8%">11月</th>
                    <th width="8%">12月</th>
                    <th width="8%">1月</th>
                    <th width="8%">2月</th>
                    <th width="8%">3月</th>
                    <th width="8%">4月</th>
                    <th width="8%">5月</th>
                    <th width="8%">6月</th>
                </tr>
                <tr style="text-align:center;">
                    <td>&nbsp;</td>
                    <td>{!Opportunity.Rating08__c}&nbsp;</td>
                    <td>{!Opportunity.Rating09__c}&nbsp;</td>
                    <td>{!Opportunity.Rating10__c}&nbsp;</td>
                    <td>{!Opportunity.Rating11__c}&nbsp;</td>
                    <td>{!Opportunity.Rating12__c}&nbsp;</td>
                    <td>{!Opportunity.Rating01__c}&nbsp;</td>
                    <td>{!Opportunity.Rating02__c}&nbsp;</td>
                    <td>{!Opportunity.Rating03__c}&nbsp;</td>
                    <td>{!Opportunity.Rating04__c}&nbsp;</td>
                    <td>{!Opportunity.Rating05__c}&nbsp;</td>
                    <td>{!Opportunity.Rating06__c}&nbsp;</td>
                </tr>
            </apex:outputPanel>
            <apex:outputPanel rendered="{!MONTH(TODAY())==8}" layout="none">
                <tr style="text-align:center;">
                    <th width="8%">8月</th>
                    <th width="8%">9月</th>
                    <th width="8%">10月</th>
                    <th width="8%">11月</th>
                    <th width="8%">12月</th>
                    <th width="8%">1月</th>
                    <th width="8%">2月</th>
                    <th width="8%">3月</th>
                    <th width="8%">4月</th>
                    <th width="8%">5月</th>
                    <th width="8%">6月</th>
                    <th width="8%">7月</th>
                </tr>
                <tr style="text-align:center;">
                    <td>&nbsp;</td>
                    <td>{!Opportunity.Rating09__c}&nbsp;</td>
                    <td>{!Opportunity.Rating10__c}&nbsp;</td>
                    <td>{!Opportunity.Rating11__c}&nbsp;</td>
                    <td>{!Opportunity.Rating12__c}&nbsp;</td>
                    <td>{!Opportunity.Rating01__c}&nbsp;</td>
                    <td>{!Opportunity.Rating02__c}&nbsp;</td>
                    <td>{!Opportunity.Rating03__c}&nbsp;</td>
                    <td>{!Opportunity.Rating04__c}&nbsp;</td>
                    <td>{!Opportunity.Rating05__c}&nbsp;</td>
                    <td>{!Opportunity.Rating06__c}&nbsp;</td>
                    <td>{!Opportunity.Rating07__c}&nbsp;</td>
                </tr>
            </apex:outputPanel>
            <apex:outputPanel rendered="{!MONTH(TODAY())==9}" layout="none">
                <tr style="text-align:center;">
                    <th width="8%">9月</th>
                    <th width="8%">10月</th>
                    <th width="8%">11月</th>
                    <th width="8%">12月</th>
                    <th width="8%">1月</th>
                    <th width="8%">2月</th>
                    <th width="8%">3月</th>
                    <th width="8%">4月</th>
                    <th width="8%">5月</th>
                    <th width="8%">6月</th>
                    <th width="8%">7月</th>
                    <th width="8%">8月</th>
                </tr>
                <tr style="text-align:center;">
                    <td>&nbsp;</td>
                    <td>{!Opportunity.Rating10__c}&nbsp;</td>
                    <td>{!Opportunity.Rating11__c}&nbsp;</td>
                    <td>{!Opportunity.Rating12__c}&nbsp;</td>
                    <td>{!Opportunity.Rating01__c}&nbsp;</td>
                    <td>{!Opportunity.Rating02__c}&nbsp;</td>
                    <td>{!Opportunity.Rating03__c}&nbsp;</td>
                    <td>{!Opportunity.Rating04__c}&nbsp;</td>
                    <td>{!Opportunity.Rating05__c}&nbsp;</td>
                    <td>{!Opportunity.Rating06__c}&nbsp;</td>
                    <td>{!Opportunity.Rating07__c}&nbsp;</td>
                    <td>{!Opportunity.Rating08__c}&nbsp;</td>
                </tr>
            </apex:outputPanel>
            <apex:outputPanel rendered="{!MONTH(TODAY())==10}" layout="none">
                <tr style="text-align:center;">
                    <th width="8%">10月</th>
                    <th width="8%">11月</th>
                    <th width="8%">12月</th>
                    <th width="8%">1月</th>
                    <th width="8%">2月</th>
                    <th width="8%">3月</th>
                    <th width="8%">4月</th>
                    <th width="8%">5月</th>
                    <th width="8%">6月</th>
                    <th width="8%">7月</th>
                    <th width="8%">8月</th>
                    <th width="8%">9月</th>
                </tr>
                <tr style="text-align:center;">
                    <td>&nbsp;</td>
                    <td>{!Opportunity.Rating11__c}&nbsp;</td>
                    <td>{!Opportunity.Rating12__c}&nbsp;</td>
                    <td>{!Opportunity.Rating01__c}&nbsp;</td>
                    <td>{!Opportunity.Rating02__c}&nbsp;</td>
                    <td>{!Opportunity.Rating03__c}&nbsp;</td>
                    <td>{!Opportunity.Rating04__c}&nbsp;</td>
                    <td>{!Opportunity.Rating05__c}&nbsp;</td>
                    <td>{!Opportunity.Rating06__c}&nbsp;</td>
                    <td>{!Opportunity.Rating07__c}&nbsp;</td>
                    <td>{!Opportunity.Rating08__c}&nbsp;</td>
                    <td>{!Opportunity.Rating09__c}&nbsp;</td>
                </tr>
            </apex:outputPanel>
            <apex:outputPanel rendered="{!MONTH(TODAY())==11}" layout="none">
                <tr style="text-align:center;">
                    <th width="8%">11月</th>
                    <th width="8%">12月</th>
                    <th width="8%">1月</th>
                    <th width="8%">2月</th>
                    <th width="8%">3月</th>
                    <th width="8%">4月</th>
                    <th width="8%">5月</th>
                    <th width="8%">6月</th>
                    <th width="8%">7月</th>
                    <th width="8%">8月</th>
                    <th width="8%">9月</th>
                    <th width="8%">10月</th>
                </tr>
                <tr style="text-align:center;">
                    <td>&nbsp;</td>
                    <td>{!Opportunity.Rating12__c}&nbsp;</td>
                    <td>{!Opportunity.Rating01__c}&nbsp;</td>
                    <td>{!Opportunity.Rating02__c}&nbsp;</td>
                    <td>{!Opportunity.Rating03__c}&nbsp;</td>
                    <td>{!Opportunity.Rating04__c}&nbsp;</td>
                    <td>{!Opportunity.Rating05__c}&nbsp;</td>
                    <td>{!Opportunity.Rating06__c}&nbsp;</td>
                    <td>{!Opportunity.Rating07__c}&nbsp;</td>
                    <td>{!Opportunity.Rating08__c}&nbsp;</td>
                    <td>{!Opportunity.Rating09__c}&nbsp;</td>
                    <td>{!Opportunity.Rating10__c}&nbsp;</td>
                </tr>
            </apex:outputPanel>
            <apex:outputPanel rendered="{!MONTH(TODAY())==12}" layout="none">
                <tr style="text-align:center;">
                    <th width="8%">12月</th>
                    <th width="8%">1月</th>
                    <th width="8%">2月</th>
                    <th width="8%">3月</th>
                    <th width="8%">4月</th>
                    <th width="8%">5月</th>
                    <th width="8%">6月</th>
                    <th width="8%">7月</th>
                    <th width="8%">8月</th>
                    <th width="8%">9月</th>
                    <th width="8%">10月</th>
                    <th width="8%">11月</th>
                </tr>
                <tr style="text-align:center;">
                    <td>&nbsp;</td>
                    <td>{!Opportunity.Rating01__c}&nbsp;</td>
                    <td>{!Opportunity.Rating02__c}&nbsp;</td>
                    <td>{!Opportunity.Rating03__c}&nbsp;</td>
                    <td>{!Opportunity.Rating04__c}&nbsp;</td>
                    <td>{!Opportunity.Rating05__c}&nbsp;</td>
                    <td>{!Opportunity.Rating06__c}&nbsp;</td>
                    <td>{!Opportunity.Rating07__c}&nbsp;</td>
                    <td>{!Opportunity.Rating08__c}&nbsp;</td>
                    <td>{!Opportunity.Rating09__c}&nbsp;</td>
                    <td>{!Opportunity.Rating10__c}&nbsp;</td>
                    <td>{!Opportunity.Rating11__c}&nbsp;</td>
                </tr>
            </apex:outputPanel>
        </table>
    </apex:form>
</apex:page>