Removed booklist

foo
David Bartley 16 years ago
parent c4029eeb9c
commit 4c7805010b
  1. 10
      Makefile
  2. 1
      TODO
  3. 11
      csc.dtd
  4. 1
      cscweb.xsl
  5. 6
      default.css
  6. 3
      office/Makefile
  7. 8
      office/books.xml
  8. 3
      office/books/Makefile
  9. 8
      office/books/directory.xml
  10. 63
      xsl/books.xsl

@ -1,7 +1,7 @@
INPUTS = index.xml
SUBDIRS = about events docs office news users clubs media
first: noroot events.ics books.xml members.xml menu.xml all
first: noroot events.ics members.xml menu.xml all
find ! -regex '.*/\..*' -type f ! -perm -0664 -print0 | xargs -r0 chmod u=rwX,g=rwX,o=rX || true
find ! -regex '.*/\..*' -type d ! -perm 2775 -print0 | xargs -r0 chmod 2775 || true
find ! -regex '.*/\..*' -type d ! -group www -print0 | xargs -r0 chgrp www || true
@ -15,12 +15,6 @@ members.xml:
ceoquery memberlist | sort | awk -F \| '{ name = $$1; program = $$2; userid = $$3; gsub(/&/, "\\&amp;", name); gsub(/&/, "\\&amp;", program); gsub(/"/, "\\&quot;", name); gsub(/"/, "\\&quot;", program); print "<member name=\"" name "\" program=\"" program "\" userid=\"" userid "\" />"; }' >> $@
echo '</memberlist>' >> $@
books.xml:
echo '<?xml version='\''1.0'\'' encoding="ISO-8859-1"?>' > $@
echo '<booklist>' >> $@
ceoquery booklist | awk -F \| '{ isbn = $$1; title = $$2; author = $$3; edition = $$4; published = $$5; gsub(/&/, "\\&amp;", title); gsub(/&/, "\\&amp;", author); gsub(/&/, "\\&amp;", published); gsub(/&/, "\\&amp;", edition); gsub(/"/, "\\&quot;", title); gsub(/"/, "\\&quot;", author); gsub(/"/, "\\&quot;", published); gsub(/"/, "\\&quot;", edition); print "<book isbn=\"" isbn "\" title=\"" title "\" author=\"" author "\" edition=\"" edition "\" published=\"" published "\"/>"; }' >> $@
echo '</booklist>' >> $@
events.ics:
perl scripts/xml2ics.pl events.xml > events.ics
@ -30,4 +24,4 @@ default.mk: default.mk.in
echo 'ROOT = '`pwd` > $@
cat $< >> $@
.PHONY: members.xml books.xml
.PHONY: members.xml

@ -3,7 +3,6 @@ IMO (dtbartle), keyboard thing on front page is way too big - reduce or remove.
Make RSS and ICS feeds more prominent.
Replace /events with a web-based calendar?
Replace all email addresses with generated graphics?
Remove books.xml or get it to work with koha.
Possibly rewrite web page build instructions.
On media pages, get rid of trailing comma.
Replace <br>'s with <p>'s wherever it makes sense.

@ -39,17 +39,6 @@
<!ELEMENT members-this-term EMPTY>
<!ELEMENT booklist (member*)>
<!ELEMENT book EMPTY>
<!ATTLIST book
isbn CDATA #REQUIRED
title CDATA #REQUIRED
author CDATA #REQUIRED
published CDATA ""
edition CDATA "">
<!ELEMENT all-books EMPTY>
<!ELEMENT menudefs (menuitem*)>
<!ELEMENT menuitem EMPTY>
<!ATTLIST menuitem

@ -38,7 +38,6 @@
<xsl:include href="./xsl/directory.xsl" />
<xsl:include href="./xsl/menu.xsl" />
<xsl:include href="./xsl/exec.xsl" />
<xsl:include href="./xsl/books.xsl" />
<xsl:include href="./xsl/members.xsl" />
<xsl:include href="./xsl/events.xsl" />
<xsl:include href="./xsl/news.xsl" />

@ -104,12 +104,6 @@ tr.members1 {
tr.members2 {
background: #cee6ff;
}
tr.books1 {
background: white;
}
tr.book2 {
background: #cee6ff;
}
img {
border-width: 0;

@ -1,6 +1,3 @@
SUBDIRS = books
INPUTS = index.xml staff.xml books.xml webcam.xml webcam-streaming.xml
include ../default.mk
books.html: ../books.xml

@ -4,8 +4,12 @@
<cscpage title="CSC Books">
<header />
<section title="CSC Book list">
<all-books />
<section title="CSC Books">
<p>
We are currently transitioning to our new library system, koha.
Eventually all our books will listed in this system and checkouts will
be handled through it as well.
</p>
</section>
<footer />
</cscpage>

@ -1,3 +0,0 @@
INPUTS =
include ../../default.mk

@ -1,8 +0,0 @@
<?xml version='1.0'?>
<!DOCTYPE directory SYSTEM "../../csc.dtd">
<directory title="Office" href="../index.html">
<diritem title="Staff" href="../staff.html" />
<diritem title="Books" href="../books.html" />
</directory>

@ -1,63 +0,0 @@
<?xml version='1.0'?>
<xsl:stylesheet version="2.0"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fn="http://www.w3.org/2005/xpath-functions"
xmlns:csc="http://www.csclub.uwaterloo.ca/xslt">
<xsl:template match="all-books">
<p>The books we currently own include:</p>
<table>
<tr>
<th>Title</th>
<th>Author</th>
</tr>
<xsl:for-each select="document(concat($g_root, '/books.xml'))/booklist/book">
<xsl:variable name="class">
<xsl:choose>
<xsl:when test="position() mod 2 = 0">books1</xsl:when>
<xsl:otherwise>books2</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<tr class="{$class}" >
<td>
<a href="{$pre}office/books/{translate(@isbn, ' ', '_')}.html">
<xsl:value-of select="@title" />
<xsl:if test="@edition != ''">
(<xsl:value-of select="@edition" />)
</xsl:if>
</a>
</td>
<td>
<xsl:value-of select="@author" />
</td>
</tr>
<xsl:result-document method="xml" encoding="ISO-8859-1"
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
href="{translate(concat($g_root, '/office/books/', @isbn, '.html'), ' ', '_')}">
<html>
<head>
<title>Book: <xsl:value-of select="@title" /></title>
<link rel="stylesheet" href="{$pre}default.css" type="text/css" />
</head>
<body><div>
<xsl:call-template name="header" />
<p>
<b>Title: </b> <xsl:value-of select="@title" /><br />
<b>Edition: </b> <xsl:value-of select="@edition" /><br />
<b>ISBN: </b> <xsl:value-of select="@isbn" /><br />
<b>Author: </b> <xsl:value-of select="@author" /><br />
<b>Published: </b> <xsl:value-of select="@published" /><br />
</p>
<xsl:call-template name="footer" />
</div></body>
</html>
</xsl:result-document>
</xsl:for-each>
</table>
</xsl:template>
</xsl:stylesheet>
Loading…
Cancel
Save