anchor.diff:  <%@ taglib prefix="ur" uri="ur-tags"%>
   <%@ taglib prefix="ir" uri="ir-tags"%>
   <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
  +<%@ taglib prefix="urstb" uri="simple-ur-table-tags"%>
   
   
   <!--  document type -->
  
positive.code:     <ur:styleSheet href="page-resources/css/main_menu.css"/>
      <ur:styleSheet href="page-resources/css/global.css"/>
      <ur:styleSheet href="page-resources/css/tables.css"/>
      
      <!--  Style for dialog boxes -->
      <ur:js src="page-resources/yui/utilities/utilities.js"/>
      <ur:js src="page-resources/yui/button/button-min.js"/>
      <ur:js src="page-resources/yui/container/container-min.js"/>
   	<ur:js src="page-resources/yui/menu/menu-min.js"/>
   	
   	<ur:js src="pages/js/base_path.js"/>
   	<ur:js src="page-resources/js/util/ur_util.js"/>
   	<ur:js src="page-resources/js/menu/main_menu.js"/>
      <ur:js src="page-resources/js/admin/repository.js"/>
     
          
      </head>
  
      <body class=" yui-skin-sam">
  
negative.code:            <c:import url="/inc/header.jsp"/>
         
         
             <h3>Repository Administration - <fmt:message key="edit_repository.edit"/></h3>
             
  
             
             <div id="bd">
                
                 <div id="edit-repository-tabs" class="yui-navset">
                  
                     <ul class="yui-nav">
                         <li class="selected"><a href="#tab1"><em>Repository Information</em></a></li>
                         <li><a href="#tab2"><em>Repository Pictures</em></a></li>
                         <li><a href="#tab3"><em>Retired Licenses</em></a></li>
                     </ul>
                     
                     <div class="yui-content">
                         <!--  first tab -->
                         <div id="tab1">
                             <form method="post" name="viewRepository" action="admin/viewRepository.action">
                     
                             <table class="formTable">
                             <tr>
                                 <td class="label">  Repository Name: </td>
                                 <td class="input" colspan="2">
                                     <input size="50" name="repositoryName" value="${repository.name}"/>
                                 </td>
                             </tr>
                             <tr>
                                 <td class="label"> Institution Name: </td>
                                 <td class="input" colspan="2">
                                    <input size="50" name="institutionName" value="${repository.institutionName}"/>
                                 </td>
                             </tr>
                             <tr>
                                 <td class="label"> Default Handle Name Authority:</td>
                                 <td class="input" colspan="2">
                                     <select name="handleNameAuthorityId">
                                         <c:if test="${repository.defaultHandleNameAuthority == null}">
                                             <option selected="true" value="-1">No Naming Authority</option>
                                         </c:if>
                                         <c:if test="${repository.defaultHandleNameAuthority != null}">
                                             <option value="-1">No Naming Authority</option>
                                         </c:if>
                                         <c:forEach var="nameAuthority" items="${handleNameAuthorities}">
                                             <c:if test="${repository.defaultHandleNameAuthority.id == nameAuthority.id}">
                                                 <option selected="true" value="${nameAuthority.id}">${nameAuthority.namingAuthority}</option>
                                             </c:if>
                                             <c:if test="${repository.defaultHandleNameAuthority.id != nameAuthority.id}">
                                                 <option value="${nameAuthority.id}">${nameAuthority.namingAuthority}</option>
                                             </c:if>
                                         </c:forEach>
                                      </select>
                                  </td>
                              </tr>
                              <tr>
                                  <td class="label"> Current File Database:  </td>
                                  <td class="input" colspan="2">
                                      <select name="defaultFileDatabaseId">
                                          <c:if test="${repository.fileDatabase == null}">
                                            <option selected="true" value="-1">No File Database</option>
                                          </c:if>
                                          <c:if test="${repository.fileDatabase != null}">
                                              <option value="-1">No File Database</option>
                                          </c:if>
                                          <c:forEach var="fileDatabase" items="${fileDatabases}">
                                              <c:if test="${repository.fileDatabase.id == fileDatabase.id}">
                                                  <option selected="true" value="${fileDatabase.id}">${fileDatabase.name}</option>
                                              </c:if>
                                              <c:if test="${repository.fileDatabase.id != fileDatabase.id}">
                                                  <option value="${fileDatabase.id}">${fileDatabase.name}</option>
                                              </c:if>
                                          </c:forEach>
                                      </select>
                                  </td>
                              </tr>
                              <tr>
                                  <td class="label"> Current License:</td>
                                  <td class="input" colspan="2">
                                      <select name="defaultLicenseVersionId">
                                          <c:if test="${repository.defaultLicense == null}">
                                              <option selected="true" value="-1">No License</option>
                                          </c:if>
                                          <c:if test="${repository.defaultLicense != null}">
                                              <option value="-1">No License</option>
                                          </c:if>
                                          <c:forEach var="licenseVersion" items="${licenses}">
                                              <c:if test="${repository.defaultLicense.id == licenseVersion.id}">
                                                 <option selected="true" value="${llicenseVersion.id}">${licenseVersion.license.name} - [version&nbsp;${licenseVersion.versionNumber}]</option>
                                              </c:if>
                                              <c:if test="${repository.defaultLicense.id != licenseVersion.id}">
                                                  <option value="${licenseVersion.id}">${licenseVersion.license.name} - [version&nbsp;${licenseVersion.versionNumber}]</option>
                                              </c:if>
                                          </c:forEach>
                                      </select>
                                  </td>
                              </tr>
                              <tr>
                                      <td class="label"> Description: </td>
                                      <td class="input" colspan="2">
                                          <textarea name="repository.description" 
                                                    cols="60" rows="8">${repository.description}</textarea>
                                      </td>
                              </tr>
                              <tr>
                                      <td class="label"> Suspend Subscription Emails: </td>
                                      <td class="input" colspan="2">
                                          <input type="checkbox" name="suspendSubscriptions"  value="true" 
                                              <c:if test="${repository.suspendSuscriptionEmails}">
                                                     checked="true"
                                               </c:if>
                                           />
                                       </td>
                              </tr>
                              <tr>
                                       <td colspan="3" class="label">
                                           <h3>The index locations must be valid paths for the file system in use (Windows C:\  Unix / )</h3>
                                       </td>
                               </tr>
                               <tr>
                                       <td class="label">Name Authority Index Folder Location:</td>
                                       <td class="input" colspan="2">
                                           <input size="80" name="nameIndexFolder" value="${repository.nameIndexFolder}"/>
                                       </td>
                              </tr>
                              <tr>
                                       <td class="label">User Index Folder Location: </td>
                                       <td class="input" colspan="2">
                                           <input size="80" name="userIndexFolder" value="${repository.userIndexFolder}"/>
                                       </td>
                                   </tr>
                                   <tr>
                                       <td class="label"> Researcher Index Folder Location: </td>
                                       <td class="input" colspan="2">
                                           <input size="80" name="researcherIndexFolder" value="${repository.researcherIndexFolder}"/>
                                       </td>
                                   </tr>
                                   <tr>
                                       <td class="label"> Institutional Item Index Folder Location: </td>
                                       <td class="input" colspan="2">
                                           <input size="80" name="institutionalItemIndexFolder" value="${repository.institutionalItemIndexFolder}"/>
                                       </td>
                                   </tr>
                                   <tr>
                                       <td class="label"> User Workspace Folder Location: </td>
                                       <td class="input" colspan="2">
                                           <input size="80" name="userWorkspaceIndexFolder" value="${repository.userWorkspaceIndexFolder}"/>
                                       </td>
                                   </tr>
                                   <tr>
                                       <td class="buttons" colspan="3" >
                               
                                           <c:if test="${repository == null}">
                                               <input type="submit" name="action:createRepository" value="Create"/>
                                           </c:if>
                                           <c:if test="${repository != null}">
                                               <input type="submit" name="action:updateRepository" value="Save"/>
                                           </c:if>
                               
                                           <input type="submit"  name="action:cancelRepository" value="Cancel"/>
                                       </td>
                                   </tr>
                               </table>
                          </form>
     
                         <c:if test="${repository != null}">
                             Last subscription process email date: ${repository.lastSubscriptionProcessEmailDate}
                             <br/>
                             <br/>
                             <c:url var="reIndexItemsUrl" value="/admin/reIndexInstitutionalItems.action"/>
                                 <a href="${reIndexItemsUrl}">Re-Index Institutional Items</a>
                             <br/>
                             <br/>
                         </c:if>
  		           </div>
  	               <!--  end first tab -->
  	                  
                	   <!--  start second tab -->
                 	   <div id="tab2">
                         <c:if test="${repository != null}">
                         <c:url var="addPicture" value="/admin/addRepositoryPicture.action"/>
                
                         <a href="${addPicture}">Add Repository Picture</a>
                
                         <br/>
                         <br/>
              
                         <div id="repository_pictures">
                            <table class="simpleTable">
                                <thead>
                                    <tr>    
  	                                  <th> Thumbnail </th>
  	                                  <th> Description </th>
  	                                  <th> Created Date </th>
  	                                  <th> Created By </th>
  	                                  <th> Delete </th>
                                    </tr>
                                </thead>
                                <tbody>
                                <c:forEach var="irFile" varStatus="status" items="${repository.pictures}">
                                       <c:if test="${ (status.count % 2) == 0}">
                                           <c:set value="even" var="rowType"/>
                                       </c:if>
                                       <c:if test="${ (status.count % 2) == 1}">
                                           <c:set value="odd" var="rowType"/>
                                       </c:if>
                           
                                     <tr>
                                         <td class="${rowType}">
                                             <ir:transformUrl systemCode="PRIMARY_THUMBNAIL" download="true" irFile="${irFile}" var="url"/>
                                             <c:if test="${url != null}">
                                                 <img src="${url}"/></a>
                                             </c:if>
                                         </td>
       
                                        <td class="${rowType}">${irFile.description}</td>
                                        <td class="${rowType}">${irFile.fileInfo.createdDate}</td>
                                        <td class="${rowType}">${irFile.owner.username}</td>
                                        <td class="${rowType}">
   		                                  <button class="ur_button" 
   		                                    onmouseover="this.className='ur_buttonover';"
   		                                    onmouseout="this.className='ur_button';"
   		                                    onclick="javascript:YAHOO.ur.repository.confirmPictureDelete(${irFile.id});"
   		                                    id="showFolder">Delete Picture</button> 
  	                                  </td>
                                    </tr>
                                </c:forEach>  
                                </tbody>  
                              </table>
                          </div>
                      </c:if>
  				   </div>
  	               <!--  end tab 2 -->
  	             
                     <!--  Start third tab -->
                     <div id="tab3">
                         <div class="dataTable">
  	                       <urstb:table width="100%">
  	                           <urstb:thead>
  	                               <urstb:tr>
  					                   <urstb:td>Retired License Id</urstb:td>         
  	                                   <urstb:td>License Name</urstb:td>
  	                                   <urstb:td>Version</urstb:td>
  	                                   <urstb:td>Date Retired</urstb:td>
  	                                   <urstb:td>Retired By</urstb:td>
  	                               </urstb:tr>
  	                           </urstb:thead>
  	                           <urstb:tbody
  	                                var="retiredLicense" 
  	                                oddRowClass="odd"
  	                                evenRowClass="even"
  	                                currentRowClassVar="rowClass"
  	                                collection="${repository.retiredLicenses}">
  	                                <urstb:tr  cssClass="${rowClass}"
  	                                    onMouseOver="this.className='highlight'"
  	                                    onMouseOut="this.className='${rowClass}'">
  	                                    <urstb:td> ${retiredLicense.id} </urstb:td>
  	                                    <urstb:td> ${retiredLicense.licenseVersion.license.name}</urstb:td>
  	                                    <urstb:td> ${retiredLicense.licenseVersion.versionNumber}</urstb:td>
  	                                    <urstb:td> ${retiredLicense.dateRetired}</urstb:td>
  	                                    <urstb:td> ${retiredLicense.retiredBy.firstName}&nbsp;${retiredLicense.retiredBy.lastName}</urstb:td>
  	                               </urstb:tr>
  	                           </urstb:tbody>
  	                       </urstb:table>
                         </div>	
                     </div>
                     <!--  End third tab -->
                     
   	           </div>
  	           <!--  end content -->
  	       </div>
  	       <!--  end tabs -->
            
  
                
    
             </div>
            <!--  end bd div -->
            
  