[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[2282] trunk



Revision: 2282
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2282&view=rev
Author:   einhverfr
Date:     2008-08-19 22:49:39 +0000 (Tue, 19 Aug 2008)

Log Message:
-----------
Enhancements to notes and entity management:
* Default workflow only allows addresses connected to entity_credit_accounts
* Default workflow only allows contact info conntected to entity_credit_accounts
* Notes now display the Pgsql user that created them
* Notes are now displayed with linebreaks properly showing up.

Modified Paths:
--------------
    trunk/UI/Contact/contact.css
    trunk/UI/Contact/contact.html
    trunk/sql/Pg-database.sql

Modified: trunk/UI/Contact/contact.css
===================================================================
--- trunk/UI/Contact/contact.css	2008-08-19 18:14:18 UTC (rev 2281)
+++ trunk/UI/Contact/contact.css	2008-08-19 22:49:39 UTC (rev 2282)
@@ -19,6 +19,10 @@
 	margin-bottom: 0em;
 }
 
+div.note_contents {
+	white-space:pre
+}
+
 div label {
 	margin-left: 1em;
 }

Modified: trunk/UI/Contact/contact.html
===================================================================
--- trunk/UI/Contact/contact.html	2008-08-19 18:14:18 UTC (rev 2281)
+++ trunk/UI/Contact/contact.html	2008-08-19 22:49:39 UTC (rev 2282)
@@ -211,12 +211,12 @@
 		} ?>
     </form>
 <?lsmb FOREACH n = notes ?>
-<div class="entity_note"><?lsmb n.note ?></div>
+<div class="note_contents"><?lsmb n.note ?></div>
 <?lsmb END ?>
 </div>
 <?lsmb IF entity_id ?>
 <div id="credit_div">
-<div class="listtop"><strong>Accounts</strong</div>
+<div class="listtop"><strong>Accounts</strong></div>
     <table width="100%">
     <tr class="listheading">
         <th class="account_class"><?lsmb text('Type') ?></th>
@@ -226,7 +226,7 @@
         <th class="end_date"><?lsmb text('End Date') ?></th>
     </tr>
     <?lsmb FOREACH cl_item = credit_list ?>
-    <tr>
+    <tr <?lsmb IF meta_number == cl_item.meta_number  ?> class="active"<?lsmb END ?>>
         <td><?lsmb IF cl_item.entity_class == 1 ?><?lsmb text('Vendor') ?>
             <?lsmb ELSIF cl_item.entity_class == 2 ?><?lsmb text('Customer') ?>
             <?lsmb END ?>
@@ -375,15 +375,17 @@
                } ?>
 	</tr>
         </table>
-		<?lsmb INCLUDE button element_data = {
-			text = text('Save'),
+		<?lsmb IF credit_id;
+		INCLUDE button element_data = {
+			text = text('Save Changes'),
 			class="submit" 
 			type="submit" 
 			name="action" 
 			value="save_credit" 
 			accesskey="C" 
 			title="Save Credit Account[Alt-C]"
-		} ?>
+		};
+		END ?>
 		<?lsmb INCLUDE button element_data = {
 			text = text('Save New'),
 			class="submit" 
@@ -442,7 +444,7 @@
 </div>
 <?lsmb END ?>
 <?lsmb END ?>
-<?lsmb IF entity_id ?>
+<?lsmb IF entity_id && credit_id ?>
 <div id="location_div" class="container">
     <div class="listtop"><?lsmb text('Locations') ?></div>
 	<!-- This entire form should probably be optionaly automated with AJAX
@@ -474,7 +476,7 @@
 	<th class="actions"><?lsmb text('Actions') ?></th>
     </tr>
 	<?lsmb FOREACH loc = locations ?>
-    <tr>
+    <tr <?lsmb IF location_id == loc.id ?> class="active" <?lsmb END ?>>
 	<td class="type"><?lsmb loc.class ?></td>
 	<td class="line_one"><?lsmb loc.line_one ?></td>
 	<td class="city"><?lsmb loc.city ?></td>
@@ -723,7 +725,8 @@
 <?lsmb FOREACH n = notes ?>
 <div class="note">
 <div class="timestamp"><?lsmb text('Entered at: [_1]', n.created) ?></div>
-<div class="contents"><?lsmb n.note ?></div>
+<div class="author"><?lsmb text("Author: [_1]", n.created_by) ?></div>
+<div class="note_contents"><?lsmb n.note ?></div>
 </div>
 <?lsmb END ?>
 <form action="<?lsmb script ?>" method="post">

Modified: trunk/sql/Pg-database.sql
===================================================================
--- trunk/sql/Pg-database.sql	2008-08-19 18:14:18 UTC (rev 2281)
+++ trunk/sql/Pg-database.sql	2008-08-19 22:49:39 UTC (rev 2282)
@@ -364,6 +364,7 @@
 CREATE TABLE note (id serial primary key, note_class integer not null references note_class(id), 
                    note text not null, vector tsvector not null, 
                    created timestamp not null default now(),
+                   created_by text DEFAULT SESSION_USER;
                    ref_key integer not null);
 
 CREATE TABLE entity_note(entity_id int references entity(id)) INHERITS (note);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.