]> git.andy128k.dev Git - ipf.git/commitdiff
admin style refactor
authoravl <alex.litovchenko@gmail.com>
Sat, 1 Nov 2008 18:26:48 +0000 (20:26 +0200)
committeravl <alex.litovchenko@gmail.com>
Sat, 1 Nov 2008 18:26:48 +0000 (20:26 +0200)
45 files changed:
ipf.php
ipf/admin/media/css/base.css [new file with mode: 0644]
ipf/admin/media/css/changelists.css
ipf/admin/media/css/dashboard.css [new file with mode: 0644]
ipf/admin/media/css/forms.css [new file with mode: 0644]
ipf/admin/media/css/global.css
ipf/admin/media/css/layout.css [new file with mode: 0644]
ipf/admin/media/css/login.css [new file with mode: 0644]
ipf/admin/media/css/null.css [new file with mode: 0644]
ipf/admin/media/css/patch-iewin.css
ipf/admin/media/css/rtl.css [new file with mode: 0644]
ipf/admin/media/css/style.css [deleted file]
ipf/admin/media/css/widgets.css [new file with mode: 0644]
ipf/admin/media/img/breadcrubms-bg.gif [new file with mode: 0644]
ipf/admin/media/img/changelist-bg_rtl.gif [new file with mode: 0644]
ipf/admin/media/img/default-bg-reverse.gif
ipf/admin/media/img/default-bg.gif
ipf/admin/media/img/deleted-overlay.gif [new file with mode: 0644]
ipf/admin/media/img/icon-unknown.gif [new file with mode: 0644]
ipf/admin/media/img/inline-delete-8bit.png [new file with mode: 0644]
ipf/admin/media/img/inline-delete.png [new file with mode: 0644]
ipf/admin/media/img/inline-restore-8bit.png [new file with mode: 0644]
ipf/admin/media/img/inline-restore.png [new file with mode: 0644]
ipf/admin/media/img/inline-splitter-bg.gif [new file with mode: 0644]
ipf/admin/media/img/topbg.gif
ipf/admin/model.php
ipf/admin/templates/admin/add.html [deleted file]
ipf/admin/templates/admin/base-simple.html [deleted file]
ipf/admin/templates/admin/base.html
ipf/admin/templates/admin/change.html
ipf/admin/templates/admin/changepassword.html
ipf/admin/templates/admin/delete.html
ipf/admin/templates/admin/index.html
ipf/admin/templates/admin/items.html
ipf/admin/templates/admin/login.html
ipf/admin/templates/admin/logout.html
ipf/admin/views.php
ipf/auth/forms/changepassword.php
ipf/auth/forms/profile.php
ipf/auth/models/User.php
ipf/form.php
ipf/form/widget/htmlinput.php
ipf/form/widget/selectmultipleinput.php
ipf/orm/pager/layoutarrows.php
ipf/template/compiler.php

diff --git a/ipf.php b/ipf.php
index eb627562f52afe3e8ef1cbd9a546f433ee2001a4..faf936319ecfef7d10365ed1ca6f7efe820b730a 100644 (file)
--- a/ipf.php
+++ b/ipf.php
@@ -63,6 +63,10 @@ final class IPF{
             IPF::$settings['debug'] = false;
         }
 
+        if (!isset(IPF::$settings['admin_title'])){
+            IPF::$settings['admin_title'] = 'IPF Administration';
+        }
+
         if (!isset(IPF::$settings['app_base'])){
             IPF::$settings['app_base'] = '/index.php';
         }
diff --git a/ipf/admin/media/css/base.css b/ipf/admin/media/css/base.css
new file mode 100644 (file)
index 0000000..9760d67
--- /dev/null
@@ -0,0 +1,14 @@
+/*
+    DJANGO Admin
+    by Wilson Miner wilson@lawrence.com
+*/
+
+/* Block IE 5 */
+@import "null.css?\"\{";
+
+/* Import other styles */
+@import url('global.css');
+@import url('layout.css');
+
+/* Import patch for IE 6 Windows */
+/*\*/ @import "patch-iewin.css"; /**/
index f79a8ce3619203923dc8ba93caaa0bf5f8accc68..a156c54e82219db39edfb660349b018035320d55 100644 (file)
@@ -1,17 +1,19 @@
-#changelist { position:relative;}
-#changelist table{ width:100%;}
+@import url('base.css');
+
+/* CHANGELISTS */
+#changelist { position:relative; width:100%; }
+#changelist table { width:100%; }
 .change-list .filtered table { border-right:1px solid #ddd;  }
-.change-list .filtered { min-height:400px; _height:400px; }
+.change-list .filtered { min-height:400px; }
 .change-list .filtered { background:white url(../img/changelist-bg.gif) top right repeat-y !important; }
 .change-list .filtered table, .change-list .filtered .paginator, .filtered #toolbar, .filtered div.xfull { margin-right:160px !important; width:auto !important; }
-.change-list .filtered table tbody th { padding-right:10px; }
+.change-list .filtered table tbody th { padding-right:1em; }
 #changelist .toplinks { border-bottom:1px solid #ccc !important; }
 #changelist .paginator { color:#666; border-top:1px solid #eee; border-bottom:1px solid #eee; background:white url(../img/nav-bg.gif) 0 180% repeat-x; overflow:hidden; }
 .change-list .filtered .paginator { border-right:1px solid #ddd; }
 
 /*  CHANGELIST TABLES  */
-#changelist table {border-collapse:collapse; border:1px solid #ABB0BE;}
-#changelist table thead th { white-space:nowrap; font-weight:bold; color:#666; padding:2px 5px; font-size:11px; background:url(../img/hbg.gif) top left repeat-x; border-left:1px solid #ABB0BE; border-bottom:1px solid #ABB0BE; }
+#changelist table thead th { white-space:nowrap; }
 #changelist table tbody td { border-left: 1px solid #ddd; }
 #changelist table tfoot { color: #666; }
 
@@ -25,7 +27,7 @@
 #changelist-filter { position:absolute; top:0; right:0; z-index:1000; width:160px; border-left:1px solid #ddd; background:#efefef; margin:0; }
 #changelist-filter h2 { font-size:11px; padding:2px 5px; border-bottom:1px solid #ddd; }
 #changelist-filter h3 { font-size:12px; margin-bottom:0; }
-#changelist-filter ul { padding-left:0;margin-left:10px;_margin-right:-10px; }
+#changelist-filter ul { padding-left:0;margin-left:10px; }
 #changelist-filter li { list-style-type:none; margin-left:0; padding-left:0; }
 #changelist-filter a { color:#999; }
 #changelist-filter a:hover { color:#036; }
 #changelist-filter li.selected a { color:#5b80b2 !important; }
 
 /*  DATE DRILLDOWN  */
-.change-list ul.toplinks { display:block; background:white url(../img/nav-bg-reverse.gif) 0 -10px repeat-x; border-top:1px solid white; float:left;  padding:0 !important;  margin:0 !important; }
+.change-list ul.toplinks { display:block; background:white url(../img/nav-bg-reverse.gif) 0 -10px repeat-x; border-top:1px solid white; float:left;  padding:0 !important;  margin:0 !important; width:100%; }
 .change-list ul.toplinks li { float: left; width: 9em; padding:3px 6px; font-weight: bold; list-style-type:none; }
 .change-list ul.toplinks .date-back a { color:#999; }
 .change-list ul.toplinks .date-back a:hover { color:#036; }
 
-/*  INLINE TABULAR  */
-fieldset.inlineTabular {margin-top:5px; padding-top:5px;}
-fieldset.inlineTabular legend{font-size:11pt; color:#888;}
-fieldset.inlineTabular table{width:auto;}
-fieldset.inlineTabular table th{font-weight:bold; color:#666; padding:2px 5px; font-size:11px; background:url(../img/hbg.gif) top left repeat-x; border:1px solid #ABB0BE;}
-fieldset.inlineTabular table td{border:1px solid #DDD;}
+/* PAGINATOR */
+.paginator { font-size:11px; padding-top:10px; padding-bottom:10px; line-height:22px; margin:0; border-top:1px solid #ddd; }
+.paginator a:link, .paginator a:visited { padding:2px 6px; border:solid 1px #ccc; background:white; text-decoration:none; }
+.paginator a.showall { padding:0 !important; border:none !important; }
+.paginator a.showall:hover { color:#036 !important; background:transparent !important; }
+.paginator .end { border-width:2px !important; margin-right:6px; }
+.paginator .this-page { padding:2px 6px; font-weight:bold; font-size:13px; vertical-align:top; }
+.paginator a:hover { color:white; background:#5b80b2; border-color:#036; }
diff --git a/ipf/admin/media/css/dashboard.css b/ipf/admin/media/css/dashboard.css
new file mode 100644 (file)
index 0000000..d277973
--- /dev/null
@@ -0,0 +1,10 @@
+@import url('base.css');
+
+/* DASHBOARD */
+.dashboard .module table th { width:100%; }
+.dashboard .module table td { white-space:nowrap; }
+.dashboard .module table td a { display:block; padding-right:.6em; }
+
+/*  RECENT ACTIONS MODULE  */
+.module ul.actionlist { margin-left:0; }
+ul.actionlist li { list-style-type:none; }
\ No newline at end of file
diff --git a/ipf/admin/media/css/forms.css b/ipf/admin/media/css/forms.css
new file mode 100644 (file)
index 0000000..fb8a1ae
--- /dev/null
@@ -0,0 +1,61 @@
+@import url('base.css');
+@import url('widgets.css');
+
+/* FORM ROWS */
+.form-row { overflow:hidden; padding:8px 12px; font-size:11px; border-bottom:1px solid #eee; }
+.form-row img, .form-row input { vertical-align:middle; }
+form .form-row p { padding-left:0; font-size:11px; }
+
+/* FORM LABELS */
+form h4 { margin:0 !important; padding:0 !important; border:none !important; }
+label { font-weight:normal !important; color:#666; font-size:12px; }
+label.inline { margin-left:20px; }
+.required label, label.required { font-weight:bold !important; color:#333 !important; }
+
+/* RADIO BUTTONS */
+form ul.radiolist li { list-style-type:none; }
+form ul.radiolist label { float:none; display:inline; }
+form ul.inline { margin-left:0; padding:0; }
+form ul.inline li { float:left; padding-right:7px; }
+
+/* ALIGNED FIELDSETS */
+.aligned label { display:block; padding:0 1em 3px 0; float:left; width:8em; }
+.aligned label.inline { display:inline; float:none; }
+.colMS .aligned .vLargeTextField, .colMS .aligned .vXMLLargeTextField { width:350px; }
+form .aligned p, form .aligned ul { margin-left:7em; padding-left:30px; }
+form .aligned table p { margin-left:0; padding-left:0; }
+form .aligned p.help { padding-left:38px; }
+.aligned .vCheckboxLabel { float:none !important; display:inline; padding-left:4px; }
+.colM .aligned .vLargeTextField, .colM .aligned .vXMLLargeTextField { width:610px; }
+.checkbox-row p.help { margin-left:0; padding-left:0 !important; }
+
+/* WIDE FIELDSETS */
+.wide label { width:15em !important; }
+form .wide p { margin-left:15em; }
+form .wide p.help { padding-left:38px; }
+.colM fieldset.wide .vLargeTextField, .colM fieldset.wide .vXMLLargeTextField { width:450px; }
+
+/* COLLAPSED FIELDSETS */
+fieldset.collapsed * { display:none; }
+fieldset.collapsed h2, fieldset.collapsed { display:block !important; }
+fieldset.collapsed h2 { background-image:url(../img/nav-bg.gif); background-position:bottom left; color:#999; }
+fieldset.collapsed .collapse-toggle { padding:3px 5px !important; background:transparent; display:inline !important;}
+
+/* MONOSPACE TEXTAREAS */
+fieldset.monospace textarea { font-family:"Bitstream Vera Sans Mono",Monaco,"Courier New",Courier,monospace; }
+
+/* SUBMIT ROW */
+.submit-row { padding:5px 7px; text-align:right; background:white url(../img/nav-bg.gif) 0 100% repeat-x; border:1px solid #ccc; margin:5px 0; }
+.submit-row input { margin:0 0 0 5px; }
+.submit-row p { margin-top:0.3em; }
+.submit-row .deletelink { background:url(../img/icon_deletelink.gif) 0 50% no-repeat; padding-left:14px; }
+
+/* CUSTOM FORM FIELDS */
+.vSelectMultipleField { vertical-align:top !important; }
+.vCheckboxField { border:none; }
+.vDateField, .vTimeField { margin-right:2px; }
+.vURLField { width:30em; }
+.vLargeTextField, .vXMLLargeTextField { width:48em; }
+.flatpages-flatpage #id_content { height:40.2em; }
+.module table .vPositiveSmallIntegerField { width:2.2em; }
+
index 716509fdb8ff22a6537c2497ea74b4955b13fbed..72b1d7400ec2d4ec3b558515dcec030e65667008 100644 (file)
@@ -1,19 +1,22 @@
-body{ margin:0; padding:0; font-family:"Lucida Grande","Bitstream Vera Sans",Verdana,Arial,sans-serif; color:#333; background:url('../img/topbg.gif') left top repeat-x; }
-body.simple { margin:10; padding:10; font-family:"Lucida Grande","Bitstream Vera Sans",Verdana,Arial,sans-serif; color:#333; }
+body { margin:0; padding:0; font-size:12px; font-family:"Lucida Grande","DejaVu Sans","Bitstream Vera Sans",Verdana,Arial,sans-serif; color:#333; background:#fff; }
 
-a:link, a:visited { color: #005681; text-decoration:none; }
-a:hover { color: #444444; text-decoration:underline; }
+/* LINKS */
+a:link, a:visited { color:#006A95; text-decoration:none; }
+a:hover { color: #036; }
 a img { border:none; }
 
-p, ol, ul, dl { margin:.2em 0 .8em 0; font-size:12px; }
+/* GLOBAL DEFAULTS */
+p, ol, ul, dl { margin:.2em 0 .8em 0; }
 p { padding:0; line-height:140%; }
+
 h1,h2,h3,h4,h5 { font-weight:bold; }
-h1 { font-weight:normal; font-size:18px; color:#666; padding:0 6px 0 0; margin:0 0 .2em 0; }
+h1 { font-size:18px; color:#666; padding:0 6px 0 0; margin:0 0 .2em 0; }
 h2 { font-size:16px; margin:1em 0 .5em 0; }
 h2.subhead { font-weight:normal;margin-top:0; }
 h3 { font-size:14px; margin:.8em 0 .3em 0; color:#666; font-weight:bold; }
 h4 { font-size:12px; margin:1em 0 .8em 0; padding-bottom:3px; }
 h5 { font-size:10px; margin:1.5em 0 .5em 0; color:#666; text-transform:uppercase; letter-spacing:1px; }
+
 ul li { list-style-type:square; padding:1px 0; }
 ul.plainlist { margin-left:0 !important; }
 ul.plainlist li { list-style-type:none; }
@@ -21,182 +24,109 @@ li ul { margin-bottom:0; }
 li, dt, dd { font-size:11px; line-height:14px; }
 dt { font-weight:bold; margin-top:4px; }
 dd { margin-left:0; }
+
 form { margin:0; padding:0; }
 fieldset { margin:0; padding:0; }
+
 blockquote { font-size:11px; color:#777; margin-left:2px; padding-left:10px; border-left:5px solid #ddd; }
 code, pre { font-family:"Bitstream Vera Sans Mono", Monaco, "Courier New", Courier, monospace; background:inherit; color:#666; font-size:11px; }
 pre.literal-block { margin:10px; background:#eee; padding:6px 8px; }
-code strong    { color:#930; }
+code strong { color:#930; }
 hr { clear:both; color:#eee; background-color:#eee; height:1px; border:none; margin:0; padding:0; font-size:1px; line-height:1px; }
 
+/* TEXT STYLES & MODIFIERS */
+.small { font-size:11px; }
+.tiny { font-size:10px; }
+p.tiny { margin-top:-2px; }
+.mini { font-size:9px; }
+p.mini { margin-top:-3px; }
+.help, p.help { font-size:10px !important; color:#999; }
+p img, h1 img, h2 img, h3 img, h4 img, td img { vertical-align:middle; }
+.quiet, a.quiet:link, a.quiet:visited { color:#999 !important;font-weight:normal !important; }
+.quiet strong { font-weight:bold !important; }
+.float-right { float:right; }
+.float-left { float:left; }
+.clear { clear:both; }
+.align-left { text-align:left; }
+.align-right { text-align:right; }
+.example { margin:10px 0; padding:5px 10px; background:#efefef; }
+.nowrap { white-space:nowrap; }
 
-
-/*  PAGE STRUCTURE  */
-#ipfcontainer { position:relative; min-width:760px; }
-#ipfcontent { margin:10px 10px; }
-#ipfheader { width:100%;}
-#ipfcontent-main { float:left; width:100%; }
-#ipfcontent-related { float:right; width:220px; position:relative; margin-right:-230px; }
-#ipffooter     { clear:both; padding:10px; }
-#ipfver {margin-left:10px; font-size:.8em; color:#999;}
-
-/*  COLUMN TYPES  */
-.colMS { margin-right:245px !important; }
-.colSM { margin-left:245px !important; }
-.colSM #ipfcontent-related { float:left; margin-right:0; margin-left:-230px; }
-.colSM #ipfcontent-main { float:right; }
-.popup .colM { width:95%; }
-.subcol { float:left; width:46%; margin-right:15px; }
-.index {width:500px;}
-
-/*  HEADER  */
-#ipfheader     { overflow:hidden; height:43px; }
-/* #417690 #ffc #33436a*/
-#ipfheader a:hover { text-decoration:underline; }
-#ipfbranding h1 { padding:10px 10px 0 10px; font-size:18px; margin:0; font-weight:normal; color:#444444; }
-#ipfuser-tools { position:absolute; top:0; right:0; padding:1.2em 10px; font-size:11px; text-align:right; }
-
-/*  SIDEBAR  */
-#ipfcontent-related h3 { font-size:12px; color:#666; margin-bottom:3px; }
-#ipfcontent-related h4 { font-size:11px; }
-
-/*  TABLES  */
-table { border-collapse:collapse; border-color:#ABB0BE; }
+/* TABLES */
+table { border-collapse:collapse; border-color:#ccc; }
 td, th { font-size:11px; line-height:13px; border-bottom:1px solid #eee; vertical-align:top; padding:5px; font-family:"Lucida Grande", Verdana, Arial, sans-serif; }
-th { text-align:left; font-size:12px; }
-thead th       { font-weight:bold; color:#666; padding:2px 5px; font-size:11px; background:url(../img/hbg.gif) top left repeat-x; border-left:1px solid #ABB0BE; border-bottom:1px solid #ABB0BE; }
-thead th:first-child { border-left:none !important; }
-.superwide table th, .superwide table td, .superwide table input, .superwide table select { font-size:10px; }
-.module { width:100%;}
-.module table { border-collapse: collapse; width:100%;}
-.module table th{ width:90%;}
+th { text-align:left; font-size:12px; font-weight:bold; }
+thead th, 
+tfoot td { color:#666; padding:2px 5px; font-size:11px; background:#e1e1e1 url(../img/nav-bg.gif) top left repeat-x; border-left:1px solid #ddd; border-bottom:1px solid #ddd; }
+tfoot td { border-bottom:none; border-top:1px solid #ddd; }
+thead th:first-child, 
+tfoot td:first-child { border-left:none !important; }
 thead th.optional { font-weight:normal !important; }
-#ipfhome-page table.module tr:hover { background:#EDF3FE; }
-fieldset { border:1px solid #eee; }
-fieldset table { width:100%; }
-fieldset table th{ width:100px; }
+fieldset table { border-right:1px solid #eee; }
 tr.row-label td { font-size:9px; padding-top:2px; padding-bottom:0; border-bottom:none; color:#666; margin-top:-1px; }
 tr.alt { background:#f6f6f6; }
 .row1 { background:#EDF3FE; }
 .row2 { background:white; }
-table#ipfchange-history { width:100%; }
-table#ipfchange-history tbody th { width:16em; }
 
-/*  TABLE SORTING  */
+/* SORTABLE TABLES */
 thead th a:link, thead th a:visited { color:#666; display:block; }
 table thead th.sorted { background-position:bottom left !important; }
 table thead th.sorted a { padding-right:13px; }
 table thead th.ascending a { background:url(../img/arrow-down.gif) right .4em no-repeat; }
 table thead th.descending a { background:url(../img/arrow-up.gif) right .4em no-repeat; }
 
-/*  MODULES  */
-.module        { border:1px solid #ABB0BE; margin-bottom:5px; border-top:none; }
-.module p, .module ul, .module h3, .module h4, .module dl, .module pre { padding-left:10px; padding-right:10px; }
-.module blockquote { margin-left:12px; }
-.module ul, .module ol { margin-left:1.5em; }
-.module h2, .module caption { border-bottom:1px solid #ABB0BE; border-top:1px solid #ABB0BE; margin:0; padding:2px 5px 3px 5px; font-size:11px; text-align:left; background:url(../img/hbg.gif) left top repeat-x; color:#444444; font-weight:bold; }
-.module caption        { border:1px solid #ABB0BE; }
-.module h3 { margin-top:.6em; }
-#ipfcontent-related .module h2 { background:#eee url(../img/nav-bg.gif) bottom left repeat-x; color:#666; }
-#ipfcontent-main .verbose .actionlist { float:right; font-size:10px; width:17em; position:relative; top:-1.6em; margin:0 8px; }
-
-/* DASHBOARD */
-
-.dashboard .module table th { width:100%;}
-.dashboard .module table td { white-space:nowrap;}
-.dashboard .module table td a { display:block; padding-right:.6em; }
-
-/*  RECENT ACTIONS MODULE  */
-.module ul.actionlist { margin-left:0; }
-ul.actionlist li { list-style-type:none; }
+/* ORDERABLE TABLES */
+table.orderable tbody tr td:hover { cursor:move; }
+table.orderable tbody tr td:first-child { padding-left:14px; background-image:url(../img/nav-bg-grabber.gif); background-repeat:repeat-y; }
+table.orderable-initalized .order-cell, body>tr>td.order-cell { display:none; }
 
-/*  FORM DEFAULTS  */
-input, textarea, select        { margin:2px 0; padding:2px 3px; vertical-align:middle; border:1px solid #ABB0BE; font-family:"Lucida Grande", Verdana, Arial, sans-serif; font-weight:normal; font-size:11px; }
+/* FORM DEFAULTS */
+input, textarea, select { margin:2px 0; padding:2px 3px; vertical-align:middle; font-family:"Lucida Grande", Verdana, Arial, sans-serif; font-weight:normal; font-size:11px; }
 textarea { vertical-align:top !important; }
-input[type=checkbox], input[type=radio] { border:none; }
+input[type=text], input[type=password], textarea, select, .vTextField { border:1px solid #ccc; }
 
 /*  FORM BUTTONS  */
-input[type=submit], input[type=button], .submit-row input { background:white url(../img/nav-bg.gif) bottom repeat-x; padding:2px; color:black; }
-input[type=submit]:active, input[type=button]:active { background-image:url(../img/nav-bg.gif); background-position:bottom; }
-input[type=submit].default, .submit-row input.default { border:2px solid #888; background: url(../img/hbg.gif) center repeat-x; font-weight:bold; color:#888; }
-input[type=submit].default:active { background-image:url(../img/default-bg-reverse.gif); background-position:top; }
-
-a.button { background:white url(../img/nav-bg.gif) bottom repeat-x; padding:2px; color:black; }
-
-.submit-row { padding:5px 7px; text-align:right; background:url(../img/topbg.gif) top left repeat-x; border:1px solid #ABB0BE; margin:5px 0; }
-.submit-row input { margin:0 0 0 5px; }
-.submit-row .float-left { padding-top:.1em; }
-
-/*  FORM ROWS  */
-.ipfform-row { clear:both; padding:8px 12px; font-size:11px; }
-html>body .ipfform-row { border-bottom:1px solid #eee; }
-.ipfform-row:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
-.ipfform-row img, .ipfform-row input { vertical-align:middle; }
-form .form-row p { padding-left:0; font-size:11px; }
-
-/*  FORM LABELS  */
-form h4        { margin:0 !important; padding:0 !important; border:none !important; }
-label { font-weight:normal !important; color:#666; font-size:12px; }
-label.inline { margin-left:20px; }
-.required label, label.required        { font-weight:bold !important; color:#333 !important; }
+input[type=submit], input[type=button], .submit-row input { background:white url(../img/nav-bg.gif) bottom repeat-x; padding:3px; color:black; border:1px solid #bbb; border-color:#ddd #aaa #aaa #ddd; }
+input[type=submit]:active, input[type=button]:active { background-image:url(../img/nav-bg-reverse.gif); background-position:top; }
+input[type=submit].default, .submit-row input.default { border:2px solid #888; background:#DADFE3 url(../img/nav-bg.gif) bottom repeat-x; font-weight:bold; color:black; }
+input[type=submit].default:active { background-image:url(../img/nav-bg-reverse.gif); background-position:top; }
 
-/*  RADIO BUTTONS */
-form ul.radiolist li { list-style-type:none; }
-form ul.radiolist label { float:none; display:inline; }
-form ul.inline { margin-left:0; padding:0; }
-form ul.inline li { float:left; padding-right:7px; }
-
-/*  ALIGNED FIELDSETS  */
-.aligned label { display:block; padding:0 1em 3px 0; float:left; text-align:left; width:8em; }
-.aligned label.inline { display:inline; float:none; }
-.colMS .aligned .vLargeTextField, .colMS .aligned .vXMLLargeTextField { width:350px; }
-form .aligned p, form .aligned ul { margin-left:7em; padding-left:30px; }
-form .aligned table p { margin-left:0; padding-left:0; }
-form .aligned p.help { padding-left:38px; }
-.aligned .vCheckboxLabel { float:none !important; display:inline; }
-.colM .aligned .vLargeTextField, colM .aligned .vXMLLargeTextField { width:610px; }
-.checkbox-row p.help { margin-left:0; padding-left:0 !important; }
-
-/*  WIDE FIELDSETS  */
-.wide label { width:15em !important; }
-form .wide p { margin-left:15em; }
-form .wide p.help { padding-left:38px; }
-.colM fieldset.wide .vLargeTextField, .colM fieldset.wide .vXMLLargeTextField { width:450px; }
-
-/*  COLLAPSED FIELDSETS  */
-fieldset.collapsed * { display:none; }
-fieldset.collapsed h2, fieldset.collapsed { display:block !important; }
-fieldset.collapsed .collapse-toggle { display: inline !important; }
-fieldset.collapse h2 a.collapse-toggle { color:#ffc; }
-fieldset.collapse h2 a.collapse-toggle:hover { text-decoration:underline; }
-.hidden { display:none; }
-
-/* MONOSPACE TEXTAREAS */
-fieldset.monospace textarea { font-family:"Bitstream Vera Sans Mono",Monaco,"Courier New",Courier,monospace; }
+/* MODULES */
+.module { border:1px solid #ccc; margin-bottom:5px; background:white; }
+.module p, .module ul, .module h3, .module h4, .module dl, .module pre { padding-left:10px; padding-right:10px; }
+.module blockquote { margin-left:12px; }
+.module ul, .module ol { margin-left:1.5em; }
+.module h3 { margin-top:.6em; }
+.module h2, .module caption { margin:0; padding:2px 5px 3px 5px; font-size:11px; text-align:left; font-weight:bold; background:#DADFE3 url(../img/default-bg.gif) top left repeat-x; color:#444; }
+.module table { border-collapse: collapse; }
 
-/* MESSAGES & ERRORS  */
+/* MESSAGES & ERRORS */
 ul.messagelist { padding:0 0 5px 0; margin:0; }
 ul.messagelist li { font-size:12px; display:block; padding:4px 5px 4px 25px; margin:0 0 3px 0; border-bottom:1px solid #ddd; color:#666; background:#ffc url(../img/icon_success.gif) 5px .3em no-repeat; }
 .errornote { font-size:12px !important; display:block; padding:4px 5px 4px 25px; margin:0 0 3px 0; border:1px solid red; color:red;background:#ffc url(../img/icon_error.gif) 5px .3em no-repeat; }
 ul.errorlist { margin:0 !important; padding:0 !important; }
-.errorlist li { font-size:12px !important; display:block; padding:4px 5px 4px 25px; margin:0 0 3px 0; border:1px solid maroon; color:maroon; background:#FEE url(../img/icon_alert.gif) 3px 2px no-repeat; }
+.errorlist li { font-size:12px !important; display:block; padding:4px 5px 4px 25px; margin:0 0 3px 0; border:1px solid #844; color:maroon; background:#fee url(../img/icon_alert.gif) 5px .3em no-repeat; }
 td ul.errorlist { margin:0 !important; padding:0 !important; }
 td ul.errorlist li { margin:0 !important; }
 .error { background:#ffc; }
 .error input, .error select { border:1px solid red; }
 div.system-message { background: #ffc; margin: 10px; padding: 6px 8px; font-size: .8em; }
 div.system-message p.system-message-title { padding:4px 5px 4px 25px; margin:0; color:red; background:#ffc url(../img/icon_error.gif) 5px .3em no-repeat; }
+.description { font-size:12px; padding:5px 0 0 12px; }
+
+/* BREADCRUMBS */
+div.breadcrumbs { background:#AFAFAF url(../img/breadcrubms-bg.gif) left repeat-x; padding:2px 8px 3px 16px; font-size:11px;  color:#444;  border-top:1px solid #DCDCDC; border-bottom:1px solid #8C8C8C; text-align:left; }
 
-/*  ACTION ICONS  */
+/* ACTION ICONS */
 .addlink { padding-left:12px; background:url(../img/icon_addlink.gif) 0 .2em no-repeat; }
 .changelink { padding-left:12px; background:url(../img/icon_changelink.gif) 0 .2em no-repeat; }
-.deletelink { padding-left:12px; background:url(../img/icon_deletelink.gif) 0 .2em no-repeat; }
+.deletelink { padding-left:12px; background:url(../img/icon_deletelink.gif) 0 .25em no-repeat; }
 a.deletelink:link, a.deletelink:visited { color:#CC3434; }
 a.deletelink:hover { color:#993333; }
 
-/*  OBJECT TOOLS  */
-.object-tools { font-size:10px; font-weight:bold; font-family:Arial,Helvetica,sans-serif; padding-left:0; margin-bottom:5px; float:right; position:relative; margin-top:-2.4em; margin-bottom:-2em; }
-.form-row .object-tools { margin-top:0; margin-bottom:0; }
+/* OBJECT TOOLS */
+.object-tools { font-size:10px; font-weight:bold; font-family:Arial,Helvetica,sans-serif; padding-left:0; float:right; position:relative; margin-top:-2.4em; margin-bottom:-2em; }
+.form-row .object-tools { margin-top:5px; margin-bottom:5px; float:none; height:2em; padding-left:3.5em; }
 .object-tools li { display:block; float:left; background:url(../img/tool-left.gif) 0 0 no-repeat; padding:0 0 0 8px; margin-left:2px; height:16px; }
 .object-tools li:hover { background:url(../img/tool-left_over.gif) 0 0 no-repeat; }
 .object-tools a:link, .object-tools a:visited { display:block; float:left; color:white; padding:.1em 14px .1em 8px; height:14px; background:#999 url(../img/tool-right.gif) 100% 0 no-repeat; }
@@ -206,124 +136,6 @@ a.deletelink:hover { color:#993333; }
 .object-tools a.addlink { background:#999 url(../img/tooltag-add.gif) top right no-repeat; padding-right:28px; }
 .object-tools a.addlink:hover { background:#5b80b2 url(../img/tooltag-add_over.gif) top right no-repeat; }
 
-/*  INLINE CONTROLS  */
-#ipfinline-controls { font-weight:bold; font-size:12px; }
-#ipfinline-specific-controls { margin-left:6px; padding:0 8px; border-left:6px solid #ABB0BE;  }
-
-/*  BREADCRUMBS  */
-div.breadcrumbs { padding:2px 8px 3px 10px; font-size:11px; color:#444; text-align:left; }
-div.breadcrumbs a{ text-decoration:none;}
-div.breadcrumbs a:hover;{ text-decoration:underline; color:#444; }
-
-/*  SELECTOR (FILTER INTERFACE)  */
-.selector { width:580px; float:left; }
-.selector select { width:270px; height:170px; }
-.selector-available, .selector-chosen { float:left; width:270px; text-align:center; margin-bottom:5px; }
-.selector-available h2, .selector-chosen h2 { border:1px solid #ABB0BE; }
-.selector .selector-available h2 { background:white url(../img/nav-bg.gif) bottom left repeat-x; color:#666; }
-.selector .selector-filter { background:white; border:1px solid #ABB0BE; border-width:0 1px; padding:3px; color:#999; font-size:10px; margin:0; text-align:left; }
-.selector .selector-chosen .selector-filter { padding:4px 5px; }
-.selector .selector-available input { width:230px; }
-.selector ul.selector-chooser { float:left; width:22px; height:50px; background:url(../img/chooser-bg.gif) top center no-repeat; margin:13% 3px 0 3px; padding:0; }
-.selector-chooser li { margin:0; padding:3px; list-style-type:none; }
-.selector select { margin-bottom:5px; margin-top:0; }
-.selector-add, .selector-remove { width:16px; height:16px; display:block; text-indent:-3000px; }
-.selector-add { background:url(../img/selector-add.gif) top center no-repeat; margin-bottom:2px; }
-.selector-remove { background:url(../img/selector-remove.gif) top center no-repeat; }
-a.selector-chooseall, a.selector-clearall { display:block; width:6em; text-align:left; margin-left:auto; margin-right:auto; font-weight:bold; color:#666;  padding:3px 0 3px 18px; }
-a.selector-chooseall:hover, a.selector-clearall:hover { color:#036; }
-a.selector-chooseall { width:7em; background:url(../img/selector-addall.gif) left center no-repeat; }
-a.selector-clearall { background:url(../img/selector-removeall.gif) left center no-repeat; }
-
-/*  Stacked selectors for long items  */
-.stacked { float:left; width:500px; }
-.stacked select { width:480px; height:100px; }
-.stacked .selector-available, .stacked .selector-chosen { width:480px; }
-.stacked .selector-available { margin-bottom:0; }
-.stacked .selector-available input { width:442px; }
-.stacked ul.selector-chooser { height:22px; width:50px; margin:0 0 3px 40%; background:url(../img/chooser_stacked-bg.gif) top center no-repeat; }
-.stacked .selector-chooser li { float:left; padding:3px 3px 3px 5px; }
-.stacked .selector-chooseall, .stacked .selector-clearall { display:none; }
-.stacked .selector-add { background-image:url(../img/selector_stacked-add.gif); }
-.stacked .selector-remove { background-image:url(../img/selector_stacked-remove.gif); }
-
-/*  DATE AND TIME  */
-p.datetime { line-height:20px; margin:0; padding:0; color:#666; font-size:11px; font-weight:bold; }
-.datetime span { font-size:11px; font-weight:normal; color:#ABB0BE; white-space:nowrap; }
-.vDateField { margin-left:4px; }
-table p.datetime { font-size:10px; margin-left:0; padding-left:0; }
-
-/*  FILE UPLOADS  */
-p.file-upload { line-height:20px; margin:0; padding:0; color:#666; font-size:11px; font-weight:bold; }
-.file-upload a { font-weight:normal; }
-.file-upload .deletelink { margin-left:5px; }
-
-/*  CALENDARS & CLOCKS  */
-.calendarbox, .clockbox { margin:5px auto; font-size:11px; width: 16em; text-align: center; background:white; position:relative; }
-.clockbox { width:9em; }
-.calendar { margin:0; padding: 0; }
-.calendar table { margin: 0; padding: 0; border-collapse:collapse; background:white; width:99%; }
-.calendar caption, .calendarbox h2 { margin: 0; font-size:11px; text-align:center; border-top:none; }
-.calendar th { font-size:10px; color:#666; padding:2px 3px; text-align:center; background:#e1e1e1 url(../img/nav-bg.gif) 0 50% repeat-x; border-bottom:1px solid #ddd; }
-.calendar td { font-size:11px; text-align: center; padding: 0; border-top:1px solid #eee; border-bottom:none; }
-.calendar td.selected a { background: #C9DBED; }
-.calendar td.nonday { background:#efefef; }
-.calendar td.today a { background:#ffc; }
-.calendar td a, .timelist a { display: block; font-weight:bold; padding:4px; text-decoration: none; color:#444; }
-.calendar td a:hover, .timelist a:hover { background: #5b80b2; color:white; }
-.calendar td a:active, .timelist a:active { background: #036; color:white; }
-.calendarnav { font-size:10px; text-align: center; color:#ABB0BE; margin:0; padding:1px 3px; }
-.calendarnav a:link, #calendarnav a:visited, #calendarnav a:hover { color: #999; }
-.calendar-shortcuts { background:white; font-size:10px; line-height:11px; border-top:1px solid #eee; padding:3px 0 4px; color:#ABB0BE; }
-.calendarbox .calendarnav-previous, .calendarbox .calendarnav-next { display:block; position:absolute; font-weight:bold; font-size:12px; background:#C9DBED url(../img/default-bg.gif) bottom left repeat-x; padding:1px 4px 2px 4px; color:white; }
-.calendarnav-previous:hover, .calendarnav-next:hover { background:#036; }
-.calendarnav-previous { top:0; left:0; }
-.calendarnav-next { top:0; right:0; }
-.calendar-cancel { margin:0 !important; padding:0; font-size:10px; background:#e1e1e1 url(../img/nav-bg.gif) 0 50% repeat-x;  border-top:1px solid #ddd; }
-.calendar-cancel a { padding:2px; color:#999; }
-ul.timelist, .timelist li { list-style-type:none; margin:0; padding:0; }
-.timelist a { padding:2px; }
-
-/*  ORDERING WIDGET  */
-ul#orderthese { position:absolute; top:8em; right:0; width:240px; padding:0; margin:0; list-style-type:none; }
-ul#orderthese li { list-style-type:none; display:block; padding:0; margin:6px 0; width:214px; background:#f6f6f6; white-space:nowrap; overflow:hidden; }
-ul#orderthese li span { display:block; border:1px solid #e7e7e7; background:transparent url(../img/nav-bg-grabber.gif) top left repeat-y; font-size:10px !important; padding:4px 6px 4px 12px; }
-ul#orderthese span:hover { background-color:#efefef; }
-
-/*  PAGINATOR  */
-.paginator { font-size:11px; padding-top:10px; padding-bottom:10px; line-height:22px; margin:0; border-top:1px solid #ddd; }
-.paginator a:link, .paginator a:visited        { padding:2px 6px; border:solid 1px #ABB0BE; background:white; text-decoration:none; }
-.paginator a.showall { padding:0 !important; border:none !important; }
-.paginator a.showall:hover { color:#036 !important; background:transparent !important; }
-.paginator .end        { border-width:2px !important; margin-right:6px; }
-.paginator .this-page { padding:2px 6px; font-weight:bold; font-size:13px; vertical-align:top; }
-.paginator a:hover { color:white; background:#5b80b2; border-color:#036; }
-
-/*  TEXT STYLES & MODIFIERS  */
-.small { font-size:11px; }
-.tiny { font-size:10px; }
-p.tiny { margin-top:-2px; }
-.mini { font-size:9px; }
-p.mini { margin-top:-3px; }
-.help, p.help { font-size:10px !important; color:#999; }
-p img, h1 img, h2 img, h3 img, h4 img, td img { vertical-align:middle; }
-.quiet, a.quiet:link, a.quiet:visited { color:#999 !important;font-weight:normal !important; }
-.quiet strong { font-weight:bold !important; }
-.float-right { float:right; }
-.float-left { float:left; }
-.clear { clear:both; }
-.align-left { text-align:left; }
-.align-right { text-align:right; }
-.example { margin:10px 0; padding:5px 10px; background:#efefef; }
-.nowrap { white-space:nowrap; }
-
-/*  CUSTOM FORM FIELDS  */
-.vSelectMultipleField { vertical-align:top !important; }
-.vCheckboxField { border:none; }
-.vDateField, .vTimeField { margin-right:2px; }
-.vFileUploadField { border:none; }
-.vURLField { width:380px; }
-.vLargeTextField, .vXMLLargeTextField { width:480px; }
-.colM .vLargeTextField, .colM .vXMLLargeTextField { width:720px; }
-body.core-flatfile #id_content { height: 400px; }
-.module table .vPositiveSmallIntegerField { width: 22px; }
\ No newline at end of file
+/* OBJECT HISTORY */
+table#change-history { width:100%; }
+table#change-history tbody th { width:16em; }
diff --git a/ipf/admin/media/css/layout.css b/ipf/admin/media/css/layout.css
new file mode 100644 (file)
index 0000000..9f5eb97
--- /dev/null
@@ -0,0 +1,30 @@
+/* PAGE STRUCTURE */
+#container { position:relative; width:100%; min-width:760px; padding:0; }
+#content { margin:10px 15px; }
+#header { width:100%; }
+#content-main { float:left; width:100%; }
+#content-related { float:right; width:18em; position:relative; margin-right:-19em; }
+#footer { clear:both; padding:10px; }
+
+/*  COLUMN TYPES  */
+.colMS { margin-right:20em !important; }
+.colSM { margin-left:20em !important; }
+.colSM #content-related { float:left; margin-right:0; margin-left:-19em; }
+.colSM #content-main { float:right; }
+.popup .colM { width:95%; }
+.subcol { float:left; width:46%; margin-right:15px; }
+.dashboard #content { width:500px; }
+
+/*  HEADER  */
+#header { background:#BDBDBD url(../img/topbg.gif) left repeat-x; color:#565656; overflow:hidden; border-bottom:1px solid #8B8B8B;}
+#header a:link, #header a:visited { color:#006A95; }
+#header a:hover { text-decoration:underline; }
+#branding h1 { padding:0 16px; font-size:18px; margin:8px 0; font-weight:normal; }
+#branding h2 { padding:0 10px; font-size:14px; margin:-8px 0 8px 0; font-weight:normal; color:#ffc; }
+#user-tools { position:absolute; top:0; right:0; padding:8px 10px; font-size:11px; text-align:right; }
+#user-tools span{ font-size:9px; color:#ADA9AD;}
+
+/* SIDEBAR */
+#content-related h3 { font-size:12px; color:#666; margin-bottom:3px; }
+#content-related h4 { font-size:11px; }
+#content-related .module h2 { background:#eee url(../img/nav-bg.gif) bottom left repeat-x; color:#666; }
\ No newline at end of file
diff --git a/ipf/admin/media/css/login.css b/ipf/admin/media/css/login.css
new file mode 100644 (file)
index 0000000..f904957
--- /dev/null
@@ -0,0 +1,13 @@
+@import url('base.css');
+@import url('layout.css');
+
+/* LOGIN FORM */
+body.login { background:#eee; }
+.login #container { background:white; border:1px solid #ccc; width:28em; min-width:300px; margin-left:auto; margin-right:auto; margin-top:100px; }
+.login #content-main { width:100%; }
+.login form { margin-top:1em; }
+.login .form-row { padding:4px 0; float:left; width:100%; }
+.login .form-row label { float:left; width:9em; padding-right:0.5em; line-height:2em; text-align:right; font-size:1em; color:#333; }
+.login .form-row #id_username, .login .form-row #id_password { width:14em; }
+.login span.help { font-size:10px; display:block; }
+.login .submit-row { clear:both; padding:1em 0 0 9.4em; }
\ No newline at end of file
diff --git a/ipf/admin/media/css/null.css b/ipf/admin/media/css/null.css
new file mode 100644 (file)
index 0000000..1a93f22
--- /dev/null
@@ -0,0 +1 @@
+/* Nothing to see here. Dummy file to feed to the high pass filter which hides CSS from IE5/win. Details: http://tantek.com/CSS/Examples/highpass.html */
\ No newline at end of file
index 46531325df03557646d06f1d4d480d15c89c62d1..2de1305e449fa931b43befd8fd801a8ef854bbca 100644 (file)
@@ -1,7 +1,8 @@
 * html #container { position:static; } /* keep header from flowing off the page */
 * html .colMS #content-related { margin-right:0; margin-left:10px; position:static; } /* put the right sidebars back on the page */
 * html .colSM #content-related { margin-right:10px; margin-left:-115px; position:static; } /* put the left sidebars back on the page */
+* html .form-row { height:1%; }
 * html .dashboard #content { width:768px; } /* proper fixed width for dashboard in IE6 */
 * html .dashboard #content-main { width:535px; } /* proper fixed width for dashboard in IE6 */
-* html #content { width /**/: 768px; } /* fixed width for IE5 */
-* html #content-main { width /**/: 535px; } /* fixed width for IE5 */
\ No newline at end of file
+* html #changelist-filter ul { margin-right:-10px; } /* fix right margin for changelist filters in IE6 */
+* html .change-list .filtered { height:400px; } /* IE ignores min-height, but treats height as if it were min-height */
\ No newline at end of file
diff --git a/ipf/admin/media/css/rtl.css b/ipf/admin/media/css/rtl.css
new file mode 100644 (file)
index 0000000..9b5bc03
--- /dev/null
@@ -0,0 +1,46 @@
+body { direction: rtl; }
+
+/* login styles */
+
+.login .form-row { float:right; }
+.login .form-row label { float:right; padding-left:0.5em; padding-right:0; text-align:left;}
+.login .submit-row { clear:both; padding:1em 9.4em 0 0; }
+
+
+/* global styles */
+th { text-align: right; }
+.module h2, .module caption { text-align: right; }
+.addlink, .changelink { padding-left:0px; padding-right:12px; background-position:100% 0.2em; }
+.deletelink { padding-left:0px; padding-right:12px; background-position:100% 0.25em; }
+.object-tools { float:left; }
+
+
+/* layout styles */
+#user-tools { right:auto; left:0; text-align:left; }
+div.breadcrumbs { text-align:right; }
+#content-main { float:right;}
+#content-related { float:left; margin-left:-19em; margin-right:auto;}
+.colMS { margin-left:20em !important; margin-right:10px !important;}
+
+/* dashboard styles */
+.dashboard .module table td a { padding-left:.6em; padding-right:12px; }
+
+/* changelists styles */
+.change-list .filtered { background:white url(../img/changelist-bg_rtl.gif) top left repeat-y !important; }
+.change-list .filtered table { border-left:1px solid #ddd; border-right:0px none; }
+#changelist-filter { right:auto; left:0; border-left:0px none; border-right:1px solid #ddd;}
+.change-list .filtered table, .change-list .filtered .paginator, .filtered #toolbar, .filtered div.xfull { margin-right:0px !important; margin-left:160px !important; }
+#changelist-filter li.selected { border-left:0px none; padding-left:0px; margin-left:0; border-right:5px solid #ccc; padding-right:5px;margin-right:-10px; }
+
+/* fomrs styles */
+.aligned label { padding:0 0 3px 1em;  float:right; }
+.submit-row { text-align: left }
+.vDateField, .vTimeField { margin-left:2px; }
+
+/* widget styles */
+.calendarnav-previous { top:0; left:auto; right:0; }
+.calendarnav-next { top:0; right:auto; left:0;}
+.calendar caption, .calendarbox h2 { text-align:center; }
+
+.selector { float: right;}
+.selector .selector-filter { text-align: right;}
diff --git a/ipf/admin/media/css/style.css b/ipf/admin/media/css/style.css
deleted file mode 100644 (file)
index 7c4437f..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-@import url(global.css);
-@import url(changelists.css);
-/*\*/ @import "patch-iewin.css"; /**/
\ No newline at end of file
diff --git a/ipf/admin/media/css/widgets.css b/ipf/admin/media/css/widgets.css
new file mode 100644 (file)
index 0000000..5163224
--- /dev/null
@@ -0,0 +1,101 @@
+/* SELECTOR (FILTER INTERFACE) */
+.selector { width:580px; float:left; }
+.selector select { width:270px; height:17.2em; }
+.selector-available, .selector-chosen { float:left; width:270px; text-align:center; margin-bottom:5px; }
+.selector-available h2, .selector-chosen h2 { border:1px solid #ccc; }
+.selector .selector-available h2 { background:white url(../img/nav-bg.gif) bottom left repeat-x; color:#666; }
+.selector .selector-filter { background:white; border:1px solid #ccc; border-width:0 1px; padding:3px; color:#999; font-size:10px; margin:0; text-align:left; }
+.selector .selector-chosen .selector-filter { padding:4px 5px; }
+.selector .selector-available input { width:230px; }
+.selector ul.selector-chooser { float:left; width:22px; height:50px; background:url(../img/chooser-bg.gif) top center no-repeat; margin:8em 3px 0 3px; padding:0; }
+.selector-chooser li { margin:0; padding:3px; list-style-type:none; }
+.selector select { margin-bottom:5px; margin-top:0; }
+.selector-add, .selector-remove { width:16px; height:16px; display:block; text-indent:-3000px; }
+.selector-add { background:url(../img/selector-add.gif) top center no-repeat; margin-bottom:2px; }
+.selector-remove { background:url(../img/selector-remove.gif) top center no-repeat; }
+a.selector-chooseall, a.selector-clearall { display:block; width:6em; text-align:left; margin-left:auto; margin-right:auto; font-weight:bold; color:#666;  padding:3px 0 3px 18px; }
+a.selector-chooseall:hover, a.selector-clearall:hover { color:#036; }
+a.selector-chooseall { width:7em; background:url(../img/selector-addall.gif) left center no-repeat; }
+a.selector-clearall { background:url(../img/selector-removeall.gif) left center no-repeat; }
+
+/* STACKED SELECTORS */
+.stacked { float:left; width:500px; }
+.stacked select { width:480px; height:10.1em; }
+.stacked .selector-available, .stacked .selector-chosen { width:480px; }
+.stacked .selector-available { margin-bottom:0; }
+.stacked .selector-available input { width:442px; }
+.stacked ul.selector-chooser { height:22px; width:50px; margin:0 0 3px 40%; background:url(../img/chooser_stacked-bg.gif) top center no-repeat; }
+.stacked .selector-chooser li { float:left; padding:3px 3px 3px 5px; }
+.stacked .selector-chooseall, .stacked .selector-clearall { display:none; }
+.stacked .selector-add { background-image:url(../img/selector_stacked-add.gif); }
+.stacked .selector-remove { background-image:url(../img/selector_stacked-remove.gif); }
+
+/* DATE AND TIME */
+p.datetime { line-height:20px; margin:0; padding:0; color:#666; font-size:11px; font-weight:bold; }
+.datetime span { font-size:11px; color:#ccc; font-weight:normal; white-space:nowrap; }
+.vDateField { margin-left:4px; }
+table p.datetime { font-size:10px; margin-left:0; padding-left:0; }
+
+/* FILE UPLOADS */
+p.file-upload { line-height:20px; margin:0; padding:0; color:#666; font-size:11px; font-weight:bold; }
+.file-upload a { font-weight:normal; }
+.file-upload .deletelink { margin-left:5px; }
+
+/* CALENDARS & CLOCKS */
+.calendarbox, .clockbox { margin:5px auto; font-size:11px; width:16em; text-align:center; background:white; position:relative; }
+.clockbox { width:auto; }
+.calendar { margin:0; padding: 0; }
+.calendar table { margin:0; padding:0; border-collapse:collapse; background:white; width:99%; }
+.calendar caption, .calendarbox h2 { margin: 0; font-size:11px; text-align:center; border-top:none; }
+.calendar th { font-size:10px; color:#666; padding:2px 3px; text-align:center; background:#e1e1e1 url(../img/nav-bg.gif) 0 50% repeat-x; border-bottom:1px solid #ddd; }
+.calendar td { font-size:11px; text-align: center; padding: 0; border-top:1px solid #eee; border-bottom:none; }
+.calendar td.selected a { background: #C9DBED; }
+.calendar td.nonday { background:#efefef; }
+.calendar td.today a { background:#ffc; }
+.calendar td a, .timelist a { display: block; font-weight:bold; padding:4px; text-decoration: none; color:#444; }
+.calendar td a:hover, .timelist a:hover { background: #5b80b2; color:white; }
+.calendar td a:active, .timelist a:active { background: #036; color:white; }
+.calendarnav { font-size:10px; text-align: center; color:#ccc; margin:0; padding:1px 3px; }
+.calendarnav a:link, #calendarnav a:visited, #calendarnav a:hover { color: #999; }
+.calendar-shortcuts { background:white; font-size:10px; line-height:11px; border-top:1px solid #eee; padding:3px 0 4px; color:#ccc; }
+.calendarbox .calendarnav-previous, .calendarbox .calendarnav-next { display:block; position:absolute; font-weight:bold; font-size:12px; background:#C9DBED url(../img/default-bg.gif) bottom left repeat-x; padding:1px 4px 2px 4px; color:white; }
+.calendarnav-previous:hover, .calendarnav-next:hover { background:#036; }
+.calendarnav-previous { top:0; left:0; }
+.calendarnav-next { top:0; right:0; }
+.calendar-cancel { margin:0 !important; padding:0; font-size:10px; background:#e1e1e1 url(../img/nav-bg.gif) 0 50% repeat-x;  border-top:1px solid #ddd; }
+.calendar-cancel a { padding:2px; color:#999; }
+ul.timelist, .timelist li { list-style-type:none; margin:0; padding:0; }
+.timelist a { padding:2px; }
+
+/* INLINE ORDERER */
+ul.orderer {  position:relative; padding:0 !important; margin:0 !important; list-style-type:none; }
+ul.orderer li { list-style-type:none; display:block; padding:0; margin:0; border:1px solid #bbb; border-width:0 1px 1px 0; white-space:nowrap; overflow:hidden; background:#e2e2e2 url(../img/nav-bg-grabber.gif) repeat-y; }
+ul.orderer li:hover { cursor:move; background-color:#ddd; }
+ul.orderer li a.selector { margin-left:12px; overflow:hidden; width:83%; font-size:10px !important; padding:0.6em 0; }
+ul.orderer li a:link, ul.orderer li a:visited { color:#333; }
+ul.orderer li .inline-deletelink { position:absolute; right:4px; margin-top:0.6em; }
+ul.orderer li.selected { background-color:#f8f8f8; border-right-color:#f8f8f8; }
+ul.orderer li.deleted { background:#bbb url(../img/deleted-overlay.gif); }
+ul.orderer li.deleted a:link, ul.orderer li.deleted a:visited { color:#888; }
+ul.orderer li.deleted .inline-deletelink { background-image:url(../img/inline-restore.png);  }
+ul.orderer li.deleted:hover, ul.orderer li.deleted a.selector:hover { cursor:default; }
+
+/* EDIT INLINE */
+.inline-deletelink { display:block; text-indent:-9999px; background:transparent url(../img/inline-delete.png) no-repeat; width:15px; height:15px; margin:0.4em 0; border: 0px none; }
+.inline-deletelink:hover { background-position:-15px 0; cursor:pointer; }
+.editinline button.addlink { border: 0px none; color: #5b80b2; font-size: 100%; cursor: pointer; }
+.editinline button.addlink:hover { color: #036; cursor: pointer; }
+.editinline table .help { text-align:right; float:right; padding-left:2em; }
+.editinline tfoot .addlink { white-space:nowrap; }
+.editinline table thead th:last-child { border-left:none; }
+.editinline tr.deleted { background:#ddd url(../img/deleted-overlay.gif); }
+.editinline tr.deleted .inline-deletelink { background-image:url(../img/inline-restore.png); }
+.editinline tr.deleted td:hover { cursor:default; }
+.editinline tr.deleted td:first-child { background-image:none !important; }
+
+/* EDIT INLINE - STACKED */
+.editinline-stacked { min-width:758px; }
+.editinline-stacked .inline-object { margin-left:210px; background:white; }
+.editinline-stacked .inline-source { float:left; width:200px; background:#f8f8f8;  }
+.editinline-stacked .inline-splitter { float:left; width:9px; background:#f8f8f8 url(../img/inline-splitter-bg.gif) 50% 50% no-repeat; border-right:1px solid #ccc; }
+.editinline-stacked .controls { clear:both; background:#e1e1e1 url(../img/nav-bg.gif) top left repeat-x; padding:3px 4px; font-size:11px; border-top:1px solid #ddd; }
\ No newline at end of file
diff --git a/ipf/admin/media/img/breadcrubms-bg.gif b/ipf/admin/media/img/breadcrubms-bg.gif
new file mode 100644 (file)
index 0000000..b010cdd
Binary files /dev/null and b/ipf/admin/media/img/breadcrubms-bg.gif differ
diff --git a/ipf/admin/media/img/changelist-bg_rtl.gif b/ipf/admin/media/img/changelist-bg_rtl.gif
new file mode 100644 (file)
index 0000000..2379712
Binary files /dev/null and b/ipf/admin/media/img/changelist-bg_rtl.gif differ
index 0873281e51bdcfd1e7eb5bbfbde3a09c4cbc943e..3f8bd18d53495bf292cb83abd7a436268bbe69c8 100644 (file)
Binary files a/ipf/admin/media/img/default-bg-reverse.gif and b/ipf/admin/media/img/default-bg-reverse.gif differ
index 003aeca59fc46a07be968f351d75aa6e22e75f93..f230c42df2d1011acbeab92df674fb3de2310c41 100644 (file)
Binary files a/ipf/admin/media/img/default-bg.gif and b/ipf/admin/media/img/default-bg.gif differ
diff --git a/ipf/admin/media/img/deleted-overlay.gif b/ipf/admin/media/img/deleted-overlay.gif
new file mode 100644 (file)
index 0000000..dc3828f
Binary files /dev/null and b/ipf/admin/media/img/deleted-overlay.gif differ
diff --git a/ipf/admin/media/img/icon-unknown.gif b/ipf/admin/media/img/icon-unknown.gif
new file mode 100644 (file)
index 0000000..cfd2b02
Binary files /dev/null and b/ipf/admin/media/img/icon-unknown.gif differ
diff --git a/ipf/admin/media/img/inline-delete-8bit.png b/ipf/admin/media/img/inline-delete-8bit.png
new file mode 100644 (file)
index 0000000..95caf59
Binary files /dev/null and b/ipf/admin/media/img/inline-delete-8bit.png differ
diff --git a/ipf/admin/media/img/inline-delete.png b/ipf/admin/media/img/inline-delete.png
new file mode 100644 (file)
index 0000000..d59bcd2
Binary files /dev/null and b/ipf/admin/media/img/inline-delete.png differ
diff --git a/ipf/admin/media/img/inline-restore-8bit.png b/ipf/admin/media/img/inline-restore-8bit.png
new file mode 100644 (file)
index 0000000..e087c8e
Binary files /dev/null and b/ipf/admin/media/img/inline-restore-8bit.png differ
diff --git a/ipf/admin/media/img/inline-restore.png b/ipf/admin/media/img/inline-restore.png
new file mode 100644 (file)
index 0000000..efdd92a
Binary files /dev/null and b/ipf/admin/media/img/inline-restore.png differ
diff --git a/ipf/admin/media/img/inline-splitter-bg.gif b/ipf/admin/media/img/inline-splitter-bg.gif
new file mode 100644 (file)
index 0000000..32ac5b3
Binary files /dev/null and b/ipf/admin/media/img/inline-splitter-bg.gif differ
index 025fcb976d945f577ca1d6702bc0332d9cef5310..1df512c9fdf9b87c0ea4b5f924d49d5c58429ed3 100644 (file)
Binary files a/ipf/admin/media/img/topbg.gif and b/ipf/admin/media/img/topbg.gif differ
index 06ea090e2e8fe2eba03653ecc87d4a3c23ef3f28..e535844ba07c3660157685b6892c03760b1b50e6 100644 (file)
@@ -1,5 +1,24 @@
 <?php
 
+class ListFilter{
+    function __construct($local, $foreign, $choices, $title){
+       $this->local = $local;
+       $this->foreign = $foreign;
+       $this->choices = $choices;
+       $this->title = $title;
+    }
+
+    function IsChoice($id){
+       if (!$id)
+               return $false;
+       foreach($this->choices as &$ch){
+           if ($ch['id']==$id)
+               return true;
+       }
+       return false;
+    }
+}
+
 class IPF_Admin_Model{
     static $models = array();
 
@@ -54,6 +73,10 @@ class IPF_Admin_Model{
         }
     }
 
+    protected function _listFilters(){
+       return array();
+    }
+
     protected function _setupEditForm($form){
         $this->_setupForm($form);
     }
@@ -158,7 +181,7 @@ class IPF_Admin_Model{
     }
 
     protected function _getAddTemplate(){
-        return 'admin/add.html';
+        return 'admin/change.html';
     }
 
     protected function _getChangeTemplate(){
@@ -177,7 +200,7 @@ class IPF_Admin_Model{
 
     protected function _beforeChange($o){
     }
-    
+
     protected function _afterEdit($o){
         $this->_afterChange($o);
     }
@@ -212,14 +235,16 @@ class IPF_Admin_Model{
             $data = array();
             $this->setInlines($this->model, &$data);
         }
+
         $context = array(
             'page_title'=>'Add '.$this->modelName,
             'classname'=>$this->modelName,
             'form'=>$form,
             'inlineInstances'=>$this->inlineInstances,
             'lapp'=>$lapp,
-            'perms'=>$this->getPerms($request),
+            'perms'=>array(),
             'lmodel'=>$lmodel,
+            'admin_title' => IPF::get('admin_title'),
         );
         return IPF_Shortcuts::RenderToResponse($this->_getAddTemplate(), $context, $request);
     }
@@ -267,6 +292,7 @@ class IPF_Admin_Model{
             'lapp'=>$lapp,
             'perms'=>$this->getPerms($request),
             'lmodel'=>$lmodel,
+               'admin_title' => IPF::get('admin_title'),
         );
         return IPF_Shortcuts::RenderToResponse($this->_getChangeTemplate(), $context, $request);
     }
@@ -285,20 +311,79 @@ class IPF_Admin_Model{
             'lapp'=>$lapp,
             'lmodel'=>$lmodel,
             'affected'=>array(),
+               'admin_title' => IPF::get('admin_title'),
         );
         return IPF_Shortcuts::RenderToResponse('admin/delete.html', $context, $request);
     }
 
+    protected function _ListFilterQuery($request){
+       foreach($this->filters as $f){
+               $param_name = 'filter_'.$f->local;
+               if (isset($request->GET[$param_name])){
+                   $id = $request->GET[$param_name];
+                   if ($f->IsChoice($id))
+                               $this->q->where($f->local.'='.$id);
+               }
+       }
+    }
+
+    protected function _GetFilters($request){
+       $this->filters = array();
+       $rels = $this->model->getTable()->getRelations();
+        foreach($this->_listFilters() as $f){
+               $local = $rels[$f]['local'];
+               $foreign = $rels[$f]['foreign'];
+               $sel_id = @$request->GET['filter_'.$local];
+               $choices = array();
+           $choices[] = array(
+               'id'=>null,
+               'param'=>'',
+               'name'=>'All',
+               'selected'=>($sel_id==''),
+           );
+               foreach (IPF_ORM::getTable($rels[$f]['class'])->findAll() as $val){
+                       $selected = false;
+               $id = $val[$foreign];
+                       if ($sel_id==$id)
+                               $selected = true;
+                   $choices[] = array(
+                       'id'=>$id,
+                       'param'=>'filter_'.$local.'='.$id,
+                       'name'=>(string)$val,
+                       'selected'=>$selected,
+                   );
+               }
+               $this->filters[$f] = new ListFilter($local, $foreign, $choices, 'By '.IPF_Utils::humanTitle($f));
+        }
+    }
+
     public function ListItems($request){
         $this->ListItemsQuery();
+        $this->_GetFilters($request);
+        $this->_ListFilterQuery($request);
         $this->ListItemsHeader();
 
         $currentPage = (int)@$request->GET['page'];
 
+        $url = '';
+        foreach ($request->GET as $k=>$v){
+               if ($k=='page')
+                       continue;
+            if ($url=='')
+               $url = '?';
+            else
+               $url .= '&';
+            $url .= $k.'='.$v;
+        }
+        if ($url=='')
+               $pager_url = '?page={%page_number}';
+        else
+               $pager_url = $url.'&page={%page_number}';
+
         $pager = new IPF_ORM_Pager_LayoutArrows(
             new IPF_ORM_Pager($this->q, $currentPage, $this->perPage),
-            new IPF_ORM_Pager_Range_Sliding(array('chunk' => 10)),
-            '?page={%page_number}'
+            new IPF_ORM_Pager_Range_Sliding(array('chunk' => 15)),
+            $pager_url
         );
         $pager->setTemplate('<a href="{%url}">{%page}</a> ');
         $pager->setSelectedTemplate('<span class="this-page">{%page}</span> ');
@@ -312,6 +397,8 @@ class IPF_Admin_Model{
             'pager'=>$pager,
             'classname'=>$this->modelName,
             'perms'=>$this->getPerms($request),
+            'filters'=>$this->filters,
+               'admin_title' => IPF::get('admin_title'),
         );
         return IPF_Shortcuts::RenderToResponse('admin/items.html', $context, $request);
     }
diff --git a/ipf/admin/templates/admin/add.html b/ipf/admin/templates/admin/add.html
deleted file mode 100644 (file)
index 30faec7..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-{extends "admin/base.html"}
-
-{block breadcrumbs} <a href="{url 'IPF_Admin_Views_Index'}">Home</a> &raquo; <a href="{url 'IPF_Admin_Views_ListItems', array($lapp, $lmodel)}">{$classname}</a> &raquo; {$page_title}{/block}
-
-{block content}
-
-<div id="ipfcontent">
-    <h1>{$page_title}</h1>
-
-    <form method="post" {if $form.hasFileField() }enctype="multipart/form-data"{/if}>
-    <fieldset>
-    <table>
-    {$form.render_table}
-    </table>
-    </fieldset>
-    {if $inlineInstances}
-    {foreach $inlineInstances as $inline}
-    <fieldset class="inlineTabular" style="border:none; width:auto; float:left; padding:0; margin:10px 10px 10px 0;">
-    <legend>{$inline->getLegend()}</legend>
-    <table>
-    {foreach $inline.formset as $formset}
-    {if $formset.isFirst}
-    <tr>
-    {foreach $formset.fields as $fieldname=>$field}
-    <th{if $formset.field($fieldname).label=='Del'} style="width:20px;"{/if}>{$formset.field($fieldname).label}</th>
-    {/foreach}
-    </tr>
-    {/if}
-    <tr>
-    {foreach $formset.fields as $fieldname=>$field}
-    <td>{$formset.field($fieldname).fieldErrors()}{$formset.field($fieldname)|safe}</td>
-    {/foreach}
-    </tr>
-    {/foreach}
-    </table>
-    </fieldset>
-    {/foreach}
-    {/if}
-    <div style="clear:both;"></div>
-
-    <div class="submit-row">
-        <input type="submit" value="Save" class="default" />
-    </div>
-    </form>
-
-</div>
-
-{/block}
-
diff --git a/ipf/admin/templates/admin/base-simple.html b/ipf/admin/templates/admin/base-simple.html
deleted file mode 100644 (file)
index 73b82b3..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
-  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-  <link rel="stylesheet" href="{$ADMIN_MEDIA_URL}css/style.css" />
-  {block style}{/block}
-  {block head}{/block}
-  <title>{$page_title}</title>
-</head>
-
-<body class="simple">
-
-{block body}{/block}
-
-</body>
-</html>
index 047adf5cbc71825fb41f16b04206331c79b19d37..3661f9850bd0052563642c9f379d385342ff2728 100644 (file)
@@ -2,36 +2,23 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-  <link rel="stylesheet" href="{$ADMIN_MEDIA_URL}css/style.css" />
+  {block css}<link rel="stylesheet" href="{$ADMIN_MEDIA_URL}css/base.css" />{/block}
   <title>{$page_title} - IPF Administration</title>
 </head>
 
-<body>
+<body class="{block bodyclass}{/block}">
 
-<script type="text/javascript" src="{$ADMIN_MEDIA_URL}js/jquery.js"></script>
-
-<!-- Container -->
-<div id="ipfcontainer">
-    <!-- Header -->
-    <div id="ipfheader">
-        <div id="ipfbranding">
-            <h1 id="ipfsite-name">{trans 'IPF Administration'}</h1>
+<div id="container">
+    <div id="header">
+        <div id="branding">
+            <h1 id="site-name"><a href="/">{$admin_title}</a></h1>
         </div>
-        <div id="ipfuser-tools">Welcome, <strong>{$user}</strong>. <a href="{url 'IPF_Admin_Views_Logout'}">Log out</a><br /><span id="ipfver">Version: {$IPF_VER}</span></div>
-        <br class="clear" />
-    </div>
-    <!-- END Header -->
-
-    <div class="breadcrumbs">
-    {block breadcrumbs} <a href="{url 'IPF_Admin_Views_Index'}">Home</a>{/block}
+        {block usertools}<div id="user-tools">Welcome, <strong>{$user}</strong>. <a href="{url 'IPF_Admin_Views_Logout'}">Log out</a><br /><span id="ipfver">Version: {$IPF_VER}</span></div>{/block}
     </div>
-
+       {block breadcrumbs}{/block}
     {block content}{/block}
-
-    <div id="ipffooter"></div>
+    <div id="footer"></div>
 </div>
-<!-- END Container -->
 {block scripts}{/block}
-
 </body>
 </html>
index 31c7fac731a5ffaf5dcbd51017b97b844520bd69..cc5e2989bd4279d11a89642af43d076ef476076f 100644 (file)
@@ -1,50 +1,62 @@
 {extends "admin/base.html"}
 
-{block breadcrumbs} <a href="{url 'IPF_Admin_Views_Index'}">Home</a> &raquo; <a href="{url 'IPF_Admin_Views_ListItems', array($lapp, $lmodel)}">{$classname}</a> &raquo; {$page_title}{/block}
-
+{block css}<link rel="stylesheet" href="{$ADMIN_MEDIA_URL}css/forms.css" />{/block}
+{block bodyclass}change-form{/block}
+{block breadcrumbs}<div class="breadcrumbs"><a href="{url 'IPF_Admin_Views_Index'}">Home</a> &raquo; <a href="{url 'IPF_Admin_Views_ListItems', array($lapp, $lmodel)}">{$classname}</a> &raquo; {$page_title}</div>{/block}
 
 {block content}
 
-<div id="ipfcontent">
+<div id="content" class="colM">
     <h1>{$page_title}</h1>
-
-    <form method="post" {if $form.hasFileField()}enctype="multipart/form-data"{/if}>
-    <fieldset>
-    <table>
-    {$form.render_table}
-    </table>
-    </fieldset>
-    {if $inlineInstances}
-    {foreach $inlineInstances as $inline}
-    <fieldset class="inlineTabular" style="border:none; width:auto; float:left; padding:0; margin:10px 10px 10px 0;">
-    <legend>{$inline->getLegend()}</legend>
-    <table>
-    {foreach $inline.formset as $formset}
-    {if $formset.isFirst}
-    <tr>
-    {foreach $formset.fields as $fieldname=>$field}
-    <th{if $formset.field($fieldname).label=='Del'} style="width:20px;"{/if}>{$formset.field($fieldname).label}</th>
-    {/foreach}
-    </tr>
-    {/if}
-    <tr>
-    {foreach $formset.fields as $fieldname=>$field}
-    <td>{$formset.field($fieldname).fieldErrors()}{$formset.field($fieldname)|safe}</td>
-    {/foreach}
-    </tr>
-    {/foreach}
-    </table>
-    </fieldset>
-    {/foreach}
-               {/if}
-    <div style="clear:both;"></div>
-
-    <div class="submit-row">
-        {if array_search('delete',$perms)!==false}<p class="float-left"><a href="{url 'IPF_Admin_Views_DeleteItem', array($lapp, $lmodel, $object.id)}" class="deletelink">Delete</a></p>{/if}
-        <input type="submit" value="Save" class="default" />
+    <div id="content-main">
+           <form method="post" {if $form.hasFileField()}enctype="multipart/form-data"{/if}>
+           <div>
+            {if $form.errors}
+            <p class="errornote">Please correct the error below.</p>
+            {/if}
+                   <fieldset class="module aligned">
+                   {$form.render_admin()}
+                   </fieldset>
+                   {if $inlineInstances}
+           {foreach $inlineInstances as $inline}
+            <div class="inline-group">
+                <div class="tabular inline-related">
+                                   <fieldset class="module">
+                                   <h2>{$inline->getLegend()}</h2>
+                                   <table>
+                                   {foreach $inline.formset as $formset}
+                                       {if $formset.isFirst}
+                        <thead>
+                                       <tr>
+                                           {foreach $formset.fields as $fieldname=>$field}
+                                           <th{if $formset.field($fieldname).label=='Del'} style="width:20px;"{/if}>{$formset.field($fieldname).label}</th>
+                                           {/foreach}
+                                       </tr>
+                                           </thead>
+                                               <tbody>
+                                       {/if}
+                                   <tr>
+                            {foreach $formset.fields as $fieldname=>$field}
+                                           <td>{$formset.field($fieldname).fieldErrors()}{$formset.field($fieldname)|safe}</td>
+                                           {/foreach}
+                                       </tr>
+                                       {/foreach}
+                                               </tbody>
+                                   </table>
+                                   </fieldset>
+                               </div>
+                       </div>
+            {/foreach}
+               {/if}
+                   <div class="submit-row">
+                       {if array_search('delete',$perms)!==false}<p class="float-left"><a href="{url 'IPF_Admin_Views_DeleteItem', array($lapp, $lmodel, $object.id)}" class="deletelink">Delete</a></p>{/if}
+                       <input type="submit" value="Save" class="default" />
+                <input type="button" value="Cancel" onclick="javascript:history.back();" />
+                   </div>
+               </div>
+           </form>
     </div>
-    </form>
-
+       <br class="clear" />
 </div>
 
 {/block}
index d62e3af146d72d8dbe972848f951a109f0261864..77198387fa9146970f19741e9adee2be349c7e9c 100644 (file)
@@ -1,25 +1,29 @@
 {extends "admin/base.html"}
 
-{block breadcrumbs} <a href="{url 'IPF_Admin_Views_Index'}">Home</a> &raquo; <a href="{url 'IPF_Admin_Views_ListItems', array($lapp, $lmodel)}">{$classname}</a> &raquo; <a href="{url 'IPF_Admin_Views_EditItem', array($lapp, $lmodel, $object.id)}">{$object}</a> &raquo; Change Password{/block}
-
+{block css}<link rel="stylesheet" href="{$ADMIN_MEDIA_URL}css/forms.css" />{/block}
+{block bodyclass}change-form{/block}
+{block breadcrumbs}<div class="breadcrumbs"><a href="{url 'IPF_Admin_Views_Index'}">Home</a> &raquo; <a href="{url 'IPF_Admin_Views_ListItems', array($lapp, $lmodel)}">{$classname}</a> &raquo; <a href="{url 'IPF_Admin_Views_EditItem', array($lapp, $lmodel, $object.id)}">{$object}</a> &raquo; Change Password</div>{/block}
 
 {block content}
 
-<div id="ipfcontent">
+<div id="content" class="colM">
     <h1>{$page_title}</h1>
-    
-    <form method="post" action="">
-    <fieldset>
-    <table>
-    {$form.render_table}
-    </table>
-    </fieldset>
-
-    <div class="submit-row">
-        <input type="submit" value="Save" class="default" />
-    </div>
-    </form>    
-    
+       <div id="content-main">
+           <form method="post" action="">
+           <div>
+               {if $form.errors}
+            <p class="errornote">Please correct the error below.</p>
+            {/if}
+               <fieldset class="module aligned">
+               {$form.render_admin()}
+                       </fieldset>
+               <div class="submit-row">
+                   <input type="submit" value="Change password" class="default" />
+                <input type="button" value="Cancel" onclick="javascript:history.back();" />
+               </div>
+           </div>
+           </form>
+       </div>    
 </div>
 
 {/block}
index cf3b1ce9aaa71e6c3d4ce08261bc89578246e8ab..410b68550b31fceec463186569dc8434cf6f8cd2 100644 (file)
@@ -1,12 +1,10 @@
 {extends "admin/base.html"}
 
-{block breadcrumbs} <a href="{url 'IPF_Admin_Views_Index'}">Home</a> &raquo; <a href="{url 'IPF_Admin_Views_ListItems', array($lapp, $lmodel)}">{$classname}</a> &raquo; <a href="{url 'IPF_Admin_Views_EditItem', array($lapp, $lmodel, $object.id)}">{$object}</a> &raquo; {$page_title}{/block}
+{block breadcrumbs}<div class="breadcrumbs"><a href="{url 'IPF_Admin_Views_Index'}">Home</a> &raquo; <a href="{url 'IPF_Admin_Views_ListItems', array($lapp, $lmodel)}">{$classname}</a> &raquo; <a href="{url 'IPF_Admin_Views_EditItem', array($lapp, $lmodel, $object.id)}">{$object}</a> &raquo; {$page_title}</div>{/block}
 
 {block content}
-
-<div id="ipfcontent">
+<div id="content" class="colM">
     <h1>{$page_title}</h1>
-    
     <form method="post">
     <p>Are you sure you want to delete <em>{$object}</em>?
     </p>
@@ -17,8 +15,8 @@
     </ul>
     {/if}
     <input type="submit" value="Yes, delete it!" class="default" />
+    <input type="button" value="Cancel" onclick="javascript:history.back();" />
     </form>    
-    
 </div>
 
 {/block}
index 380394e6d9b83bc83085bc1522e8d4d552e55159..cb9820b10aec1499c703bc8af2f97acf81f9335f 100644 (file)
@@ -1,35 +1,40 @@
 {extends "admin/base.html"}
 
-{block content}
+{block css}<link rel="stylesheet" href="{$ADMIN_MEDIA_URL}css/dashboard.css" />{/block}
+{block bodyclass}dashboard{/block}
 
-<div id="ipfcontent" class="index">
+{block content}
+<div id="content" class="colMS">
     <h1>{$page_title}</h1>
-    <div id="ipfcontent-main">
-        <div class="module">
-            {foreach $app_list as $app}
-            <h2>{$app.name|escxml}</h2>
-            <table>
-            {foreach $app.models as $model}
-            <tr>
-                <th><a href="{url 'IPF_Admin_Views_ListItems', array($app.path, $model.path)}">{$model.name}</a></th>
-                <td>{if array_search('add',$model['perms'])!==false}<a class="addlink" href="{url 'IPF_Admin_Views_AddItem', array($app.path, $model.path)}">{trans 'Add'}</a>{/if}</td>
-                <td>{if array_search('change',$model['perms'])!==false}<a class="changelink" href="{url 'IPF_Admin_Views_ListItems', array($app.path, $model.path)}">{trans 'Change'}</a>{/if}</td>
-            </tr>
-            {/foreach}
-            </table>
-            {/foreach}
-        </div>
+    <div id="content-main">
+        {foreach $app_list as $app}
+               <div class="module">
+        <table summary="">
+        <caption>{$app.name|escxml}</caption>
+               <tbody>
+        {foreach $app.models as $model}
+        <tr>
+            <th scope="row"><a href="{url 'IPF_Admin_Views_ListItems', array($app.path, $model.path)}">{$model.name}</a></th>
+            <td>{if array_search('add',$model['perms'])!==false}<a class="addlink" href="{url 'IPF_Admin_Views_AddItem', array($app.path, $model.path)}">{trans 'Add'}</a>{/if}</td>
+            <td>{if array_search('change',$model['perms'])!==false}<a class="changelink" href="{url 'IPF_Admin_Views_ListItems', array($app.path, $model.path)}">{trans 'Change'}</a>{/if}</td>
+        </tr>
+        {/foreach}
+        </tbody>
+        </table>
+               </div>
+        {/foreach}
     </div>
-    <div id="ipfcontent-related">
-        <div class="module" id="ipfrecent-actions-module">
+    <div id="content-related">
+        <div class="module" id="recent-actions-module">
             <h2>Recent Actions</h2>
+            <h3>My Actions</h3>
             <ul class="actionlist">
             {foreach $admin_log as $log}
             <li class="{if $log.is_addition()}addlink{/if}{if $log.is_change()}changelink{/if}{if $log.is_deletion()}deletelink{/if}">{if !$log.is_deletion()}<a href="{$log.getAdminUrl()}">{/if}{$log.object_repr}{if !$log.is_deletion()}</a>{/if}<br /><span class="mini quiet">{$log.object_class} at {$log.created_at|date} by {$log.username}</span></li>
             {/foreach}
             </ul>
         </div>
-    </div>
+    </div-->
     <br class="clear" />
 </div>
 {/block}
index c9e6cf26ec387828405c4fe67f96ede3364b6b9c..9c4316c71c61b15c265272b49d99c9e4458a97cd 100644 (file)
@@ -1,56 +1,57 @@
 {extends "admin/base.html"}
 
-{block breadcrumbs} <a href="{url 'IPF_Admin_Views_Index'}">Home</a> &raquo; {$classname}{/block}
+{block css}<link rel="stylesheet" href="{$ADMIN_MEDIA_URL}css/changelists.css" />{/block}
+{block bodyclass}change-list{/block}
 
+{block breadcrumbs}<div class="breadcrumbs"><a href="{url 'IPF_Admin_Views_Index'}">Home</a> &raquo; {$classname}</div>{/block}
 
 {block content}
 
-<div id="ipfcontent">
+<div id="content" class="flex">
     <h1>{$page_title}</h1>
-    <ul class="object-tools">{if array_search('add',$perms)!==false}<li><a href="add/" class="addlink">Add {$classname}</a></li>{/if}</ul>
-    <div id="changelist">
-
-        <!--div id="changelist-filter">
-        <h2>Filter</h2>
-        <h3> By Credit Class </h3>
-        <ul>
-            <li class="selected">
-            <a href="?">All</a></li>
-            <li>
-            <a href="?credit_class__exact=1">Class A: Good Credit &amp; Good Income</a></li>
-            <li>
-            <a href="?credit_class__exact=2">Class B: Bad Credit &amp; Good Income</a></li>
-            <li>
-            <a href="?credit_class__exact=3">Class C: Bad Credit &amp; Bad Income</a></li>
-        </ul>
-        </div-->
-
-        <div>
-        <table>
-            <thead>
-                <tr>
-                {foreach $header as $h}
-                    <th>{$h.title}</th>
-                {/foreach}
-                </tr>
-            </thead>
-            <tbody>
-                {foreach $objects as $o}
-                <tr>
-                    {foreach $o.ModelAdmin().ListRow($o) as $v}
-                    <td>{$v|safe}</td>
-                    {/foreach}
-                </tr>
-                {/foreach}
-            </tbody>
-        </table>
-        <p class="paginator">
-            {$pager->display()|safe} {$pager->getPager()->getNumResults()} {$classname}
-        </p>
+       <div id="content-main">
+        <ul class="object-tools">{if array_search('add',$perms)!==false}<li><a href="add/" class="addlink">Add {$classname}</a></li>{/if}</ul>
+        <div id="changelist" class="module {if $filters} filtered{/if}">
+
+               {if $filters}
+               <div id="changelist-filter">
+               <h2>Filter</h2>
+               {foreach $filters as $f}
+               <h3>{$f->title}</h3>
+               <ul>
+               {foreach $f->choices as $ch}
+                   <li{if $ch['selected']} class="selected"{/if}><a href="?{$ch['param']}">{$ch['name']}</a></li>
+               {/foreach}
+               </ul>
+               {/foreach}
+               </div>
+               {/if}
+
+
+               <table>
+                   <thead>
+                       <tr>
+                       {foreach $header as $h}
+                           <th>{$h.title}</th>
+                       {/foreach}
+                       </tr>
+                   </thead>
+                   <tbody>
+                       {foreach $objects as $o}
+                       <tr>
+                           {foreach $o.ModelAdmin().ListRow($o) as $v}
+                           <td>{$v|safe}</td>
+                           {/foreach}
+                       </tr>
+                       {/foreach}
+                   </tbody>
+               </table>
+               <p class="paginator">
+                   {$pager->display()|safe}{$pager->getPager()->getNumResults()} {$classname}
+               </p>
         </div>
-
-    </div>
-
+       </div>
+       <br class="clear" />
 </div>
 
 
index dbcdcae101ddf654ae352af3655944b811f095a1..55e98fa9b953ab47d03cd919e1aa2c347184e9e3 100644 (file)
@@ -1,25 +1,22 @@
-{extends 'admin/base-simple.html'}
+{extends 'admin/base.html'}
 
-{block body}
-<div style="text-align:center; margin-top:100px;">
-<div style="margin-left:auto;margin-right:auto; width:300px; text-align:left;">
-    <h1>{$page_title}</h1>
-    
-    <form method="post">
-    <fieldset>
-    {if $form.message}<ul class="errorlist"><li>{$form.message}</li></ul>{/if}
-    <table>
-    {$form.render_table}
-    </table>
-    </fieldset>
+{block css}<link rel="stylesheet" href="{$ADMIN_MEDIA_URL}css/login.css" />{/block}
+{block bodyclass}login{/block}
+{block usertools}{/block}
 
-    <div class="submit-row">
-        <input type="submit" value="Sign In" class="default" />
+{block content}
+    <div id="content" class="colM">
+        <div id="content-main">    
+                   <form method="post">
+                   {if $form.message}<ul class="errorlist"><li>{$form.message}</li></ul>{/if}
+                   {$form.render_admin()}
+                   <div class="submit-row">
+                       <input type="submit" value="Sign In" class="default" />
+                   </div>
+                   </form>    
+        </div>
     </div>
-    </form>    
-    
-</div>
-</div>
-
-
+    <script type="text/javascript">
+        document.getElementById('id_username').focus();
+    </script>
 {/block}
index 7d5a9f63ce013f1bec8144c29987704523a2aaef..d332f79cf2c4727b704b4dce2284d4a037e29ca1 100644 (file)
@@ -1,16 +1,12 @@
-{extends 'admin/base-simple.html'}
+{extends 'admin/base.html'}
 
-{block body}
+{block breadcrumbs}<div class="breadcrumbs"><a href="{url 'IPF_Admin_Views_Index'}">Home</a></div>{/block}
 
-<div style="text-align:center; margin-top:100px;">
-<div style="margin-left:auto;margin-right:auto; width:300px; text-align:left;">
-    <h1>Logged Out</h1>
-    
-    <p>Thanks for spending some quality time with the Web site today.</p>
-    <p><a href="{url 'IPF_Admin_Views_Index'}">Log in</a> again.</p>
-
-</div>
+{block content}
+<div id="content" class="colM">
+<h1>Logged out</h1>
+<p>Thanks for spending some quality time with the Web site today.</p>
+<p><a href="{url 'IPF_Admin_Views_Index'}">Log in</a> again.</p>
+<br class="clear"/>
 </div>
-
-
 {/block}
index c096d21a03f18c27ea76c22951b74c2244afa013..a81f49f01e567d48fbc0ce6018ee97e886764bee 100644 (file)
@@ -56,9 +56,10 @@ function IPF_Admin_Views_Index($request, $match){
         ->execute();
 
     $context = array(
-        'page_title' => __('Administration'),
+        'page_title' => __('Site Administration'),
         'app_list' => $app_list,
         'admin_log' => $admin_log,
+        'admin_title' => IPF::get('admin_title'),
     );
     return IPF_Shortcuts::RenderToResponse('admin/index.html', $context, $request);
 }
@@ -175,6 +176,8 @@ function IPF_Admin_Views_ChangePassword($request, $match){
                     'form'=>$form,
                     'lapp'=>$lapp,
                     'lmodel'=>$lmodel,
+                    'admin_title' => IPF::get('admin_title'),
+
                 );
                 return IPF_Shortcuts::RenderToResponse('admin/changepassword.html', $context, $request);
             }
@@ -205,8 +208,9 @@ function IPF_Admin_Views_Login($request, $match){
     else
         $form = new IPF_Auth_Forms_Login(array('next'=>$success_url));
     $context = array(
-       'page_title' => __('IPF Administration'),
+       'page_title' => IPF::get('admin_title'),
        'form' => $form,
+       'admin_title' => IPF::get('admin_title'),
     );
     return IPF_Shortcuts::RenderToResponse('admin/login.html', $context, $request);
 }
@@ -214,7 +218,8 @@ function IPF_Admin_Views_Login($request, $match){
 function IPF_Admin_Views_Logout($request, $match){
     IPF_Auth_App::logout($request);
     $context = array(
-       'page_title' => __('IPF Administration'),
+       'page_title' => IPF::get('admin_title'),
+       'admin_title' => IPF::get('admin_title'),
     );
     return IPF_Shortcuts::RenderToResponse('admin/logout.html', $context, $request);
 }
index 2950bf71592ba9b487cca4a20e8a73ef4f9ddd00..16ceb5f95da745ff559728005b8a396adfe090d1 100644 (file)
@@ -1,13 +1,13 @@
-<?php 
+<?php
 
 class IPF_Auth_Forms_ChangePassword extends IPF_Form{
-    
+
     function initFields($extra=array())
     {
         $this->fields['password1'] = new IPF_Form_Field_Varchar(array('required'=>true,'widget'=>'IPF_Form_Widget_PasswordInput'));
         $this->fields['password2'] = new IPF_Form_Field_Varchar(array('required'=>true,'widget'=>'IPF_Form_Widget_PasswordInput','help_text'=>'Enter the same password as above, for verification.'));
     }
-    
+
     function isValid(){
         $ok = parent::isValid();
         if ($ok===true){
index 336450d5be47f211f4a502458aa0c9a031022bf8..b75253602a90d25a471e89f90cd7984d4fa71f7d 100644 (file)
@@ -1,15 +1,15 @@
-<?php 
+<?php
 
 class IPF_Auth_Forms_Profile extends IPF_Form_Model{
     function __construct($data=null, $extra=array(), $label_suffix=null){
         $extra['model'] = new User();
         parent::__construct($data, $extra, $label_suffix);
     }
-    
-    function fields(){ 
-        return array('username','email','first_name','last_name'); 
+
+    function fields(){
+        return array('username','email','first_name','last_name');
     }
-    
+
     function addDBField($name,$col){
         parent::addDBField($name, $col);
         if ($name=='username')
index b638f18e1aebbb9be747a205082a01319215969e..cd5d99e09e4bbb40cf8416ea7c20ccba1b15e684 100644 (file)
@@ -3,7 +3,7 @@
 class AdminUser extends IPF_Admin_Model{
     public function list_display(){return array('username', 'email', 'is_active', 'is_staff', 'is_superuser', 'created_at');}
     public function fields(){return array('username','password','email', 'first_name', 'last_name', 'is_active', 'is_staff', 'is_superuser');}
-    
+
     protected function _setupForm($form){
         $form->fields['username']->help_text = 'Required. 32 characters or less. Alphanumeric characters only (letters, digits and underscores).';
         $form->fields['password']->help_text = "Use '[algo]$[salt]$[hexdigest]' or use the <a href=\"password/\">change password form</a>.";
@@ -31,22 +31,23 @@ class AdminUser extends IPF_Admin_Model{
         else
             $form = new IPF_Auth_Forms_UserCreation();
         $context = array(
-            'page_title'=>'Add '.$this->modelName, 
+            'page_title'=>'Add '.$this->modelName,
             'classname'=>$this->modelName,
             'form'=>$form,
             'lapp'=>$lapp,
             'lmodel'=>$lmodel,
+            'perms'=>array(),
         );
-        return IPF_Shortcuts::RenderToResponse('admin/add.html', $context, $request);
+        return IPF_Shortcuts::RenderToResponse('admin/change.html', $context, $request);
     }
 }
+
 
 class User extends BaseUser
 {
     const UNUSABLE_PASSWORD = '!';
     public $session_key = 'IPF_User_auth';
-    
+
     public function __toString() {
         $s = $this->username;
         if ($s===null)
@@ -63,16 +64,16 @@ class User extends BaseUser
             return $username;
         return $name;
     }
-    
+
     static function createUser($username, $password=null, $email=null, $first_name=null, $last_name=null, $is_active=false, $is_staff=false, $is_superuser=false){
         $user = new User();
         $user->username = $username;
-        
+
         if (trim($email)=='')
             $user->email = null;
         else
             $user->email = $email;
-        
+
         $user->first_name = $first_name;
         $user->last_name = $last_name;
         $user->is_active = $is_active;
@@ -92,7 +93,7 @@ class User extends BaseUser
             // used here is just more simple when you know the records you're dealing with.
             $userErrors = $user->getErrorStack();
             //$emailErrors = $user->email->getErrorStack();
-            // Inspect user errors 
+            // Inspect user errors
             foreach($userErrors as $fieldName => $errorCodes) {
                 echo "Error:".$fieldName;
                 //print_r($errorCodes);
@@ -104,7 +105,7 @@ class User extends BaseUser
     function setUnusablePassword(){
         $this->password = UNUSABLE_PASSWORD;
     }
-    
+
     function setPassword($raw_password){
         $salt = IPF_Utils::randomString(5);
         $this->password = 'sha1:'.$salt.':'.sha1($salt.$raw_password);
index 6a6e5d6fe2a12358e0248d26e08af80cfca86f52..da8c15bd6a8281406ada8aec5aa0ad9bc32ffc43 100644 (file)
@@ -14,7 +14,7 @@ class IPF_Form implements Iterator
     public $label_suffix = ':';
 
     protected $is_valid = null;
-    
+
 
     function __construct($data=null, $extra=array(), $label_suffix=null)
     {
@@ -40,7 +40,7 @@ class IPF_Form implements Iterator
         }
         return $field_name;
     }
-    
+
     function hasFileField(){
         foreach($this->fields as $field){
             if (is_a($field,'IPF_Form_Field_File')){
@@ -59,7 +59,7 @@ class IPF_Form implements Iterator
         $form_methods = get_class_methods($this);
         foreach ($this->fields as $name=>$field) {
             $value = $field->widget->valueFromFormData($this->addPrefix($name),
-                                                       $this->data); 
+                                                       $this->data);
             try {
                 $value = $field->clean($value);
                 $this->cleaned_data[$name] = $value;
@@ -67,7 +67,7 @@ class IPF_Form implements Iterator
                     $m = 'clean_'.$name;
                     $value = $this->$m();
                     $this->cleaned_data[$name] = $value;
-                }                        
+                }
             } catch (IPF_Exception_Form $e) {
                 if (!isset($this->errors[$name])) $this->errors[$name] = array();
                 $this->errors[$name][] = $e->getMessage();
@@ -85,7 +85,7 @@ class IPF_Form implements Iterator
         if (empty($this->errors)) {
             $this->is_valid = true;
             return true;
-        } 
+        }
         // as some errors, we do not have cleaned data available.
         $this->cleaned_data = array();
         $this->is_valid = false;
@@ -117,7 +117,7 @@ class IPF_Form implements Iterator
         return (isset($this->errors['__all__'])) ? $this->errors['__all__'] : array();
     }
 
-    protected function htmlOutput($normal_row, $error_row, $row_ender, 
+    protected function htmlOutput($normal_row, $error_row, $row_ender,
                                   $help_text_html, $errors_on_separate_row)
     {
         $top_errors = (isset($this->errors['__all__'])) ? $this->errors['__all__'] : array();
@@ -141,7 +141,7 @@ class IPF_Form implements Iterator
                 if (strlen($bf->label) > 0) {
                     $label = htmlspecialchars($bf->label, ENT_COMPAT, 'UTF-8');
                     if ($this->label_suffix) {
-                        if (!in_array(mb_substr($label, -1, 1), 
+                        if (!in_array(mb_substr($label, -1, 1),
                                       array(':','?','.','!'))) {
                             $label .= $this->label_suffix;
                         }
@@ -165,12 +165,12 @@ class IPF_Form implements Iterator
                 if (!$errors_on_separate_row and count($bf_errors)) {
                     $errors = IPF_Form_renderErrorsAsHTML($bf_errors);
                 }
-                $output[] = sprintf($normal_row, $errors, $label, 
+                $output[] = sprintf($normal_row, $errors, $label,
                                     $bf->render_w(), $help_text);
             }
         }
         if (count($top_errors)) {
-            $errors = sprintf($error_row, 
+            $errors = sprintf($error_row,
                               IPF_Form_renderErrorsAsHTML($top_errors));
             array_unshift($output, $errors);
         }
@@ -204,10 +204,17 @@ class IPF_Form implements Iterator
     public function render_table()
     {
         return $this->htmlOutput('<tr><th>%2$s</th><td>%1$s%3$s%4$s</td></tr>',
-                                 '<tr><td colspan="2">%s</td></tr>', 
+                                 '<tr><td colspan="2">%s</td></tr>',
                                  '</td></tr>', '<br /><span class="helptext">%s</span>', false);
     }
 
+    public function render_admin()
+    {
+        return $this->htmlOutput('<div class="form-row"><div>%2$s %1$s%3$s%4$s</div></div>',
+                                 '<div>%s</div>',
+                                 '</div>', '<p class="help">%s</p>', true);
+    }
+
     function __get($prop)
     {
         if (!in_array($prop, array('render_p', 'render_ul', 'render_table', 'render_top_errors', 'get_top_errors'))) {
index 3a15faaa014f5f611aa3ce9e3a3de429455b516c..a3e27023ccfc0e1ebb18c5141b01b1f4d972e6ab 100644 (file)
@@ -67,7 +67,7 @@ class IPF_Form_Widget_HTMLInput extends IPF_Form_Widget
                     gecko_spellcheck : true,
                     verify_html : true,
                     dialog_type : "modal",
-                    width : "100%",
+                    width : "80%",
                     height : "350",
                     relative_urls : false,
                     remove_script_host : true,
index 92d9bf239953534d6c105c1dca849e0919fc67e2..6e234c235ef8e944f26f45f90af046dcda9e10f6 100644 (file)
@@ -6,8 +6,10 @@ class IPF_Form_Widget_SelectMultipleInput extends IPF_Form_Widget
 
     public function __construct($attrs=array())
     {
-        $this->choices = $attrs['choices'];
-        unset($attrs['choices']);
+       if (isset($attrs['choices'])){
+               $this->choices = $attrs['choices'];
+               unset($attrs['choices']);
+       }
         parent::__construct($attrs);
     }
 
index 0acfbc02de669584c092140151b3a0a269480f4e..f8fe16b537faced0455be62a5a7bba6168c566c6 100644 (file)
@@ -7,33 +7,44 @@ class IPF_ORM_Pager_LayoutArrows extends IPF_ORM_Pager_Layout
         $pager = $this->getPager();
         $str = '';
 
-        // First page
-        $this->addMaskReplacement('page', '&laquo;', true);
-        $options['page_number'] = $pager->getFirstPage();
-        $str .= $this->processPage($options);
-
-        // Previous page
-        $this->addMaskReplacement('page', '&lsaquo;', true);
-        $options['page_number'] = $pager->getPreviousPage();
-        $str .= $this->processPage($options);
-
-        // Pages listing
-        $this->removeMaskReplacement('page');
-        $str .= parent::display($options, true);
-
-        // Next page
-        $this->addMaskReplacement('page', '&rsaquo;', true);
-        $options['page_number'] = $pager->getNextPage();
-        $str .= $this->processPage($options);
-
-        // Last page
-        $this->addMaskReplacement('page', '&raquo;', true);
-        $options['page_number'] = $pager->getLastPage();
-        $str .= $this->processPage($options);
+               if ($pager->getFirstPage()!=$pager->getLastPage()){
+               // First page
+               if ($pager->getFirstPage()!=$pager->getPage()){
+                       $this->addMaskReplacement('page', '&laquo;', true);
+                       $options['page_number'] = $pager->getFirstPage();
+                       $str .= $this->processPage($options);
+               }
+
+               // Previous page
+                       /*
+               $this->addMaskReplacement('page', '&lsaquo;', true);
+               $options['page_number'] = $pager->getPreviousPage();
+               $str .= $this->processPage($options);
+               */
+
+               // Pages listing
+               $this->removeMaskReplacement('page');
+               $str .= parent::display($options, true);
+
+
+               // Next page
+                       /*
+               $this->addMaskReplacement('page', '&rsaquo;', true);
+               $options['page_number'] = $pager->getNextPage();
+               $str .= $this->processPage($options);
+               */
+
+               // Last page
+               if ($pager->getLastPage()!=$pager->getPage()){
+                       $this->addMaskReplacement('page', '&raquo;', true);
+                       $options['page_number'] = $pager->getLastPage();
+                       $str .= $this->processPage($options);
+               }
+               }
 
         if ($return)
             return $str;
 
-        echo $str;    
+        echo $str;
     }
 }
index 5e48473bf08e5a77bfcc9c0270163c7b800fd9e1..3b33d7c7362eb0bd0edcbe2517417493592ac517 100644 (file)
@@ -290,7 +290,10 @@ class IPF_Template_Compiler
             trigger_error(__('Start tag of a block missing: literal'), E_USER_ERROR);
             break;
         case 'block':
-            $res = '?>'.$this->_extendBlocks[$args].'<?php ';
+               if (isset($this->_extendBlocks[$args]))
+               $res = '?>'.$this->_extendBlocks[$args].'<?php ';
+            else
+               $res = '';
             break;
         case 'superblock':
             $res = '?>~~{~~superblock~~}~~<?php ';