/upstream/templates/type/library/view.tmpl
Type: /type/template
body: value: $def with (page)

$ title = page.name or page.key

$var title: $title

$if ctx.user and ctx.user.is_admin():
    <div id="contentHead">
        $:macros.databarView(page)

        <div class="superNav">
            <a href="/libraries">Libraries</a> / 
            
            $if ctx.user and ctx.user.is_admin():
                <span class="adminOnly">$:link("/libraries/dashboard", _("Dashboard"))</span>
        </div>
        <h1>$page.name</h1>
            
    </div>
    <div id="contentBody">

        <table id="libraryInfo">
	    $ status = page.status or "onhold"	
	        <tr>
		    <td class="label">$_("Status")</td>
		    <td>
		        $if status == "approved":
			    <span class="largest sansserif darkgreen">LIVE</span>
			$elif status == "onhold":
			    <span class="largest sansserif red">Pending</span>
                    </td>
	        </tr>
	    <tr>
	        <td class="label">$_("Library's Website")</td>
		<td><a href="$page.website" rel="nofollow">$page.website</a></td>
	    </tr>
	    <tr>
	        <td class="label">$_("Country")</td>
		<td>$page.country</td>
	    </tr>	
	    <tr>
		<td class="label">$_("Contact Person")</td>
		<td>$page.contact_person</td>
	    </tr>
	    <tr>
		<td class="label">$_("Job Title")</td>
		<td>$page.contact_title</td>
	    </tr>
	    <tr>
		<td class="label">$_("E-mail Address")</td>
		<td>$page.contact_email</td>
	    </tr>
	    <tr>
		<td class="label">$_("Telephone")</td>
		<td>$page.telephone</td>
	    </tr>
	    <tr>
		<td class="label">$_("IP Ranges")</td>
		<td style="white-space: pre;">$page.ip_ranges</td>
	    </tr>
        </table>

        <h2>Notes</h2>
        $for note in page.notes:
                <span class="small"><i><a href="$note.author.url()">$note.author.displayname</a>, $:datestr(note.timestamp)</i></span>
                $:format(note.note)
        <div class="clearfix"></div>
        <div>
            <form name="notes" class="olform" method="POST" action="$page.url('/notes')">
                <div class="formElement">
                    <div class="label">
                        <label for="note">$_("Leave a Note")</label><br />        
                    </div>
                    <div class="input">
                        <textarea name="note" id="note" class="markdown" rows="5" cols="80" style="width:900px;"></textarea>
                    </div>
                </div>
                <div class="formElement collapse" style="position:relative;">
                    <div class="input">
                        <button type="submit" class="larger" name="" title="$_('Save')">$_("Save")</button>
                    </div>
                </div>
            </form>
        </div>
			
        $if page.addresses:
            <h3>Locations</h3>
            <table class="branches">
                <tr>
                    <th>Name</th>
                    <th>Street</th>
                    <th>City</th>
                    <th>State</th>
                    <th>Zip</th>
                    <th>Country</th>
                    <th>Phone</th>
                    <th>URL</th>
                    <th>Lat/Lon</th>
                </tr>
            $for line in page.addresses.splitlines():
                <tr>
                $:sanitize(format(''.join('<td>%s</td>' % i for i in line.split('|'))))
                </tr>
            </table>
    $:render_template("lib/history", page)

    </div>
$else:
    <div id="contentHead"><h1>Permission denied.</h1></div>
    <div id="contentBody"><p>Only site administrators can see this page.</p></div>
plugin: openlibrary
m: edit