<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="s" uri="/struts-tags" %>
<style type="text/css">
   .info{
          margin-left:0px;
          margin-bottom: 50px;
          margin-top: 30px;
          border: #212121 dashed 0px;
          width: 630px;
      }
      .gradeX{
               background:#add8e6;

      }
          thead tr{
          background: #ddd;
      }
      th{
           border: #ddd solid 2px;
           font-style: italic;
           font-weight: normal;
           max-width: 130px ;
           min-width: 130px ;

      }
      td{
           border:#87ceeb solid 2px;
           max-width: 130px ;
           min-width: 130px ;


}
     thead tr{
        background: #ddd;
    }
</style>
<div style="margin:55px 150px 0; width:630px;">
    <s:if test="%{modelsForViewList.size!=0}">

         <div style="width:630px; text-align:center;margin-bottom: 20px;font-size: 22px;font-style: italic;">
                 <s:text name="label.models" />
         </div>

         <table class="info">
            <thead>
                <tr>
                    <th><s:text name="label.model" /></th>
                    <th><s:text name="label.type" /></th>
                    <th><s:text name="label.manufacturer" /></th>
                </tr>
            </thead>
            <tbody>
                <s:iterator value="modelsForViewList" var="modelForview" status="s_modelForview">
                    <tr class="gradeX">
                        <td>
                            <s:property value="#modelForview.modelName"/>
                        </td>
                        <td>
                            <s:property value="#modelForview.typeName"/>
                        </td>
                        <td>
                            <s:property value="#modelForview.manufacturerName"/>
                        </td>
                    </tr>
                </s:iterator>
            </tbody>
         </table>

    </s:if>
    <s:else>
       <div style="width:630px;text-align:center;font-size:20px;font-style:italic;margin-top:50px;padding-top: 150px;margin-bottom: 30px;" >
           <s:text name="msg.nothaving.model" />
       </div>
    </s:else>
    <a style="color: teal;margin-left:250px;"  href="addNewModel.action">add model</a>
</div>