Second pass at adding key files
This commit is contained in:
		
							
								
								
									
										47
									
								
								site/glist/templates/safe/admin_template_home.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										47
									
								
								site/glist/templates/safe/admin_template_home.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,47 @@
 | 
			
		||||
<%set set_focus = 'myform.tpl_dir'%>
 | 
			
		||||
<%set book_mark = 'template'%>
 | 
			
		||||
<form name=myform action="glist.cgi" method=post>
 | 
			
		||||
<%include include_style.txt%>
 | 
			
		||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" height="82%">
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td height="97%" colspan="3" valign="top">
 | 
			
		||||
            <table width="99%" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFFFF">
 | 
			
		||||
                <tr>
 | 
			
		||||
                    <td><img src="<%image_url%>/pics/1pixel.gif" width="1" height="3"></td>
 | 
			
		||||
                </tr>
 | 
			
		||||
                <tr bgcolor="#C5E1A3">
 | 
			
		||||
                    <td>
 | 
			
		||||
                        <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
 | 
			
		||||
                            <tr bgcolor="#C5E1A3">
 | 
			
		||||
                                <td>
 | 
			
		||||
                                    <table width="100%" border="0" cellspacing="1" cellpadding="1">
 | 
			
		||||
                                        <tr class="bold_white">
 | 
			
		||||
                                            <td bgcolor="#336600">
 | 
			
		||||
                                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
 | 
			
		||||
                                                    <tr class="bold_white">
 | 
			
		||||
                                                        <td height="20"><img src="<%image_url%>/icons/template.gif" hspace="2" vspace="0">Edit Templates</td>
 | 
			
		||||
                                                        <td align="right"><img src="<%image_url%>/icons/close.gif" width="17" height="16" border=0></td>
 | 
			
		||||
                                                    </tr>
 | 
			
		||||
                                                </table>
 | 
			
		||||
                                            </td>
 | 
			
		||||
                                        </tr>
 | 
			
		||||
                                    </table>
 | 
			
		||||
                                </td>
 | 
			
		||||
                            </tr>
 | 
			
		||||
                            <tr>
 | 
			
		||||
                                <td bgcolor="#FFFFFF">
 | 
			
		||||
                                    <%include admin_template_include_record.html%>
 | 
			
		||||
                                </td>
 | 
			
		||||
                            </tr>
 | 
			
		||||
                        </table>
 | 
			
		||||
                    </td>
 | 
			
		||||
                </tr>
 | 
			
		||||
            </table>
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
</table>
 | 
			
		||||
<input name=t type=hidden value="safe" />
 | 
			
		||||
<input name=do type=hidden value="admin_page" />
 | 
			
		||||
<input name=pg type=hidden value="admin_template_home.html" />
 | 
			
		||||
<%hidden_objects%>
 | 
			
		||||
</form>
 | 
			
		||||
							
								
								
									
										160
									
								
								site/glist/templates/safe/admin_template_include_record.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										160
									
								
								site/glist/templates/safe/admin_template_include_record.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,160 @@
 | 
			
		||||
<script language="JavaScript" src="<%static_url%>/js/overlib_mini.js"><!-- overLIB (c) Erik Bosrup --></script>
 | 
			
		||||
<script>
 | 
			
		||||
function switch_wrap() {
 | 
			
		||||
    if (document.myform.tpl_text.wrap == 'off') {
 | 
			
		||||
        document.myform.tpl_text.wrap = 'soft';
 | 
			
		||||
        document.myform.bswitch.value = 'Enable Wrap ';
 | 
			
		||||
    }
 | 
			
		||||
    else {
 | 
			
		||||
        document.myform.tpl_text.wrap = 'off';
 | 
			
		||||
        document.myform.bswitch.value = 'Disable Wrap';
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function resize() {
 | 
			
		||||
    var obj  = document.myform.tpl_text;
 | 
			
		||||
    var rows = document.myform.nrows.value;
 | 
			
		||||
    var cols = document.myform.ncols.value;
 | 
			
		||||
    if ( isNaN(rows) || isNaN(cols) ||  rows < 0 || cols < 0 ) {
 | 
			
		||||
        alert("Rows and Cols should be greater than 0")
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
    obj.cols = cols;
 | 
			
		||||
    obj.rows = rows;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function gotoLine() {
 | 
			
		||||
    var obj  = document.myform.tpl_text;
 | 
			
		||||
    var line = document.myform.line.value;
 | 
			
		||||
    if (obj.innerText) {
 | 
			
		||||
        var items = obj.innerText.split("\n");
 | 
			
		||||
        if ( ( isNaN(line) )|| ( line > items.length ) || ( line <=0 ) || !line) {
 | 
			
		||||
            alert('Please enter a number between 1 to ' + items.length); 
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
        var lineContent = items[line-1];
 | 
			
		||||
        var rangContent = '';
 | 
			
		||||
        for (var i=0; i<line; i++) rangContent += items[i];
 | 
			
		||||
 | 
			
		||||
        var items    = rangContent.split(lineContent);
 | 
			
		||||
        var numTimes = (items.length > 1) ? ( items.length-1 ) : 1;
 | 
			
		||||
 | 
			
		||||
        var txtRange = obj.createTextRange();
 | 
			
		||||
        var found    = txtRange.findText(rangContent);
 | 
			
		||||
        if (found) {
 | 
			
		||||
            var tmp = 0;
 | 
			
		||||
            while (txtRange.findText(lineContent)) {
 | 
			
		||||
                tmp++;  
 | 
			
		||||
                if ( tmp == numTimes ) {
 | 
			
		||||
                    txtRange.select();
 | 
			
		||||
                    break;
 | 
			
		||||
                }
 | 
			
		||||
                txtRange.moveStart("character",1);
 | 
			
		||||
            }
 | 
			
		||||
            txtRange.scrollIntoView();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    else alert('The content is empty!')
 | 
			
		||||
}    
 | 
			
		||||
</script>
 | 
			
		||||
<%GList::Tools::template_editor%>
 | 
			
		||||
<%if readme%><p class=body><%readme%></p><%endif%>
 | 
			
		||||
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000; width:500px"></div>
 | 
			
		||||
<table border="0" cellPadding="1" cellSpacing="1" valign="top" align=center>
 | 
			
		||||
    <tr class=body>
 | 
			
		||||
        <td class=body colspan="2"><br />
 | 
			
		||||
            <%if message%><%message%><%else%>From here you can quickly edit any of your user or admin templates.<%endif%><br /><br />
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr class=body>
 | 
			
		||||
        <td class=body width=20%>Template Set:</td>
 | 
			
		||||
        <td colspan=2>
 | 
			
		||||
            <%dir_select%>                          
 | 
			
		||||
            <input type="submit" value="Change" name="bchange" class=button />             
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr class=body>
 | 
			
		||||
        <td class=body width=20%>Available templates:</td>
 | 
			
		||||
        <td colspan=2><%file_select%>
 | 
			
		||||
            <input type="submit" value="Load" name="load" class=button /> <br />
 | 
			
		||||
            (* denotes a modified or non-standard template)
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <%if tpl_name%>    
 | 
			
		||||
    <tr class="body">
 | 
			
		||||
      <td class="body">Currently working on:</td>
 | 
			
		||||
      <td class="body" colspan="2">
 | 
			
		||||
        <a href="javascript:void(0)" onmouseover="return overlib(' \
 | 
			
		||||
          <table cellpadding="0" cellspacing="0" bgcolor="#256A19" border="0" width="100%"><tr><td> \
 | 
			
		||||
            <table border="0" cellspacing="1" cellpadding="3" width="500"> \
 | 
			
		||||
              <tr> \
 | 
			
		||||
                <td colspan="2" class="body"><font color="white"><b><u>File information:</u></b></font></td> \
 | 
			
		||||
              </tr> \
 | 
			
		||||
              <tr> \
 | 
			
		||||
                <td bgcolor="#CCCCCC" width="1%" class="body">Template path:</td> \
 | 
			
		||||
                <td bgcolor="white" class="body"><%file_path%></td> \
 | 
			
		||||
              </tr> \
 | 
			
		||||
              <tr> \
 | 
			
		||||
                <td bgcolor="#CCCCCC" class="body">File size:</td> \
 | 
			
		||||
                <td bgcolor="white" class="body"><%file_size%></td> \
 | 
			
		||||
              </tr> \
 | 
			
		||||
              <tr> \
 | 
			
		||||
                <td bgcolor="#CCCCCC" class="body">Status:</td> \
 | 
			
		||||
                <td bgcolor="white" class="body"><%if file_restore%>Modified from system default<%elseif file_local%>Custom template<%else%>System default<%endif%></td> \
 | 
			
		||||
              </tr> \
 | 
			
		||||
              <tr> \
 | 
			
		||||
                <td bgcolor="#CCCCCC" class="body">Last modified:</td> \
 | 
			
		||||
                <td bgcolor="white" class="body"><%file_mod_time%></td> \
 | 
			
		||||
              </tr> \
 | 
			
		||||
            </table> \
 | 
			
		||||
        ', FULLHTML, WIDTH, 300<%-- This doesn't actually affect the display with, but does affect the positioning --%>, CENTER);" onmouseout="return nd();"><%tpl_name%></a>
 | 
			
		||||
        <%if file_local%><input type="submit" class="button" <%if file_restore%>value="Restore" name="restore=<%tpl_name%>"<%else%>value="Delete" name="delete=<%tpl_name%>"<%endif%> /><%endif%>
 | 
			
		||||
      </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <%endif%>    
 | 
			
		||||
    <tr class=body>
 | 
			
		||||
        <td class=body>Save template as:</td>
 | 
			
		||||
        <td colspan=2>
 | 
			
		||||
            <input type="text" name="tpl_name" value="<%tpl_name%>" size="40" class=object />            
 | 
			
		||||
            <input type="submit" value="Save" name="saveas" class=button />
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>
 | 
			
		||||
    <tr>
 | 
			
		||||
        <td colspan=3>
 | 
			
		||||
            <%if is_ie or is_mozilla%>
 | 
			
		||||
            <textarea rows="<%if is_ie%>22<%else%>15<%endif%>" name="tpl_text" cols="<%if is_ie%>120<%else%>100<%endif%>" class=object wrap='soft'><%tpl_text%></textarea><br /><br />
 | 
			
		||||
            <%else%> <!-- Your browser is Netscape -->
 | 
			
		||||
            <textarea rows="<%if rows%><%rows%><%else%>18<%endif%>" name="tpl_text" cols="<%if cols%><%cols%><%else%>90<%endif%>" wrap='on'><%tpl_text%></textarea><br /><br />
 | 
			
		||||
            <%endif%>
 | 
			
		||||
        </td>
 | 
			
		||||
    </tr>    
 | 
			
		||||
    <tr class=body>
 | 
			
		||||
        <td colspan=3>
 | 
			
		||||
            <table width=100% border=0 cellPadding="0" cellSpacing="0">
 | 
			
		||||
                <tr class=body>
 | 
			
		||||
                    <td class=body>
 | 
			
		||||
                        <%if is_ie or is_mozilla%>
 | 
			
		||||
                        <input type=button class=button name=bswitch value="Enable Wrap" onclick="switch_wrap()" />
 | 
			
		||||
                        <input type=button class=button name=bresize value="Resize" onclick="resize()" />
 | 
			
		||||
                        <input type="text" name="nrows" value="<%if is_ie%>22<%else%>15<%endif%>" size="3" maxlength=3 class=object /> rows
 | 
			
		||||
                        <input type="text" name="ncols" value="<%if is_ie%>120<%else%>100<%endif%>" size="3" maxlength=3 class=object /> cols
 | 
			
		||||
                        <%else%>
 | 
			
		||||
                        <input type=submit class=button name=bresize value="Resize" />
 | 
			
		||||
                        <input type="text" name="nrows" value="<%if rows%><%rows%><%else%>18<%endif%>" size="3" maxlength=3 class=object /> rows
 | 
			
		||||
                        <input type="text" name="ncols" value="<%if cols%><%cols%><%else%>90<%endif%>" size="3" maxlength=3 class=object /> cols
 | 
			
		||||
                        <%endif%>
 | 
			
		||||
                     </td>
 | 
			
		||||
                     <td align=right class=body>
 | 
			
		||||
                        <%if is_ie%>
 | 
			
		||||
                         <script>                        
 | 
			
		||||
                            document.write("Line:<input name='line' size=3 maxlength=4 class='object' /> <input name=goto value=' Go ' type=button onclick='gotoLine()' class=button />") 
 | 
			
		||||
                        </script>
 | 
			
		||||
                     <%endif%>                    
 | 
			
		||||
                     </td>
 | 
			
		||||
                </tr>
 | 
			
		||||
            </table>
 | 
			
		||||
         </td>
 | 
			
		||||
     </tr> 
 | 
			
		||||
 </table>
 | 
			
		||||
</div>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user