[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[4511] trunk/UI/Contact
- Subject: SF.net SVN: ledger-smb:[4511] trunk/UI/Contact
- From: ..hidden..
- Date: Tue, 20 Mar 2012 08:34:25 +0000
Revision: 4511
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4511&view=rev
Author: einhverfr
Date: 2012-03-20 08:34:25 +0000 (Tue, 20 Mar 2012)
Log Message:
-----------
More refactoring to contact.html. Next will move div list creation to controller
Modified Paths:
--------------
trunk/UI/Contact/contact.html
Added Paths:
-----------
trunk/UI/Contact/divs/bank_act.html
trunk/UI/Contact/divs/contact_info.html
trunk/UI/Contact/divs/notes.html
Modified: trunk/UI/Contact/contact.html
===================================================================
--- trunk/UI/Contact/contact.html 2012-03-19 09:43:12 UTC (rev 4510)
+++ trunk/UI/Contact/contact.html 2012-03-20 08:34:25 UTC (rev 4511)
@@ -82,9 +82,15 @@
{id = 'location_div',
label = text('Addresses'),
template = 'address'},
- {id = 'contact_div', label = text('Contact Info')}, #'
- {id = 'bank_div', label = text('Bank Accounts')}, #'
- {id = 'notes_div', label = text('Notes')}
+ {id = 'contact_div',
+ label = text('Contact Info')
+ template = 'contact_info'}, #'
+ {id = 'bank_div',
+ label = text('Bank Accounts')
+ template = 'bank_act'}, #'
+ {id = 'notes_div',
+ label = text('Notes'),
+ template = 'notes'}
);
IF account_class == 1 or account_class == 2;
#DIVS.push({id = 'tasks_div', label = text('Tasks')});
@@ -106,267 +112,5 @@
END
END
?>
-<div class="container" id="contact_div">
- <div class="listtop"><?lsmb text('Contact Information') ?></div>
- <table width="100%">
- <tr class="listheading">
- <th class="contact_class"><?lsmb text('Type') ?></th>
- <th class="description"><?lsmb text('Description') ?></th>
- <th class="contact"><?lsmb text('Contact Info') ?></th>
- <th class="contact_actions"><?lsmb text('Actions') ?></th>
- </tr>
- <?lsmb FOREACH ct = contacts ?>
- <tr>
- <td class="contact_class"><?lsmb ct.class ?></td>
- <td class="description"><?lsmb ct.description ?></td>
- <td class="contact"><?lsmb ct.contact ?></td>
- <td class="contact_actions">
- <a href="<?lsmb tt_url(script)
- ?>?entity_id=<?lsmb tt_url(entity_id)
- ?>&contact=<?lsmb tt_url(ct.contact)
- ?>&contact_class=<?lsmb tt_url(ct.class_id)
- ?>&description=<?lsmb tt_url(ct.description)
- ?>&action=edit&credit_id=<?lsmb
- tt_url(credit_id)
- ?>&person_id=<?lsmb tt_url(person_id)
- ?>&target_div=contact_div"
- >[<?lsmb text('Edit'); ?>]</a>
- <a href="<?lsmb tt_url(script)
- ?>?entity_id=<?lsmb tt_url(entity_id)
- ?>&contact_class_id=<?lsmb
- tt_url(ct.class_id)
- ?>&action=delete_contact&credit_id=<?lsmb
- tt_url(credit_id) ?>&form_id=<?lsmb form_id
- ?>&contact=<?lsmb tt_url(ct.contact)
- ?>&person_id=<?lsmb tt_url(person_id)
- ?>&target_div=contact_div"
- >[<?lsmb text('Delete'); ?>]</a>
- </td>
- </tr>
- <?lsmb END ?>
- </table>
- <form action="<?lsmb script ?>">
-<?lsmb PROCESS input element_data = {
- type = "hidden"
- name = "form_id"
- value = form_id
- } ?>
-<?lsmb PROCESS input element_data = {
- type = "hidden"
- name = "target_div"
- value = 'contact_div'
- } ?>
- <?lsmb PROCESS input element_data = {
- type="hidden"
- name="entity_id"
- value=entity_id
- } ?>
- <?lsmb PROCESS input element_data = {
- type="hidden"
- name="credit_id"
- value=credit_id
- } ?>
- <?lsmb PROCESS input element_data = {
- type="hidden"
- name="old_contact_class"
- value=contact_class
- } ?>
- <?lsmb PROCESS input element_data = {
- type="hidden"
- name="old_contact"
- value=contact
- } ?>
- <?lsmb PROCESS input element_data = {
- type="hidden"
- name="contact_id"
- value=contact_id
- } ?>
- <div>
- <?lsmb PROCESS select element_data = {
- name = "contact_class"
- label = "Type"
- text_attr = "class"
- value_attr = "id"
- default_values = [contact_class]
- options = contact_class_list
- } ?>
- </div>
- <div>
- <?lsmb PROCESS input element_data = {
- label = text('Description'),
- name = "description"
- value = description
- type = "text"
- size = "20"
- } #' ?>
- </div>
- <div>
- <?lsmb PROCESS input element_data = {
- label = text('Contact Info'),
- name = "contact"
- value = contact
- type = "text"
- size = "20"
- } #' ?>
- </div>
- <div><?lsmb PROCESS button element_data = {
- name = "action",
- value = "save_contact",
- text = text('Save Contact'),
- class = "submit"
- } #' ?>
- <?lsmb IF contact.defined ?>
- <?lsmb PROCESS button element_data = {
- name = "action",
- value = "save_contact_new",
- text = text('Save As New'),
- class = "submit"
- } #' ?>
- <?lsmb END # IF old_contact.defined ?>
- </div>
-</form>
-
-</div>
-<div class="container" id="bank_div">
-<div class="listtop"><?lsmb text('Bank Accounts') ?></div>
-<table width="100%">
-<tr class="listheading">
- <th class="bic"><?lsmb text('BIC/SWIFT Code') ?></th>
- <th class="iban"><?lsmb text('Account Number') ?></th>
- <th class="actions"><?lsmb text('Actions') ?></th>
-</tr>
-<?lsmb FOREACH ba = bank_account ?>
-<tr>
- <td class="bic"><?lsmb ba.bic ?></td>
- <td class="iban"><?lsmb ba.iban ?></td>
- <td class="actions">
- <a href="<?lsmb script ?>?action=delete_bank_acct&entity_id=<?lsmb
- entity_id ?>&bank_account_id=<?lsmb ba.id
- ?>&target_div=bank_div&form_id=<?lsmb form_id
- ?>&credit_id=<?lsmb tt_url(credit_id) ?>"
- >[<?lsmb text('Delete') ?>]</a>
- </td>
-</tr>
-<?lsmb END ?>
-</table>
-<form name="bank_acct" action="<?lsmb script ?>">
-<?lsmb PROCESS input element_data = {
- type = "hidden"
- name = "form_id"
- value = form_id
- } ?>
-<?lsmb PROCESS input element_data = {
- type = "hidden"
- name = "target_div"
- value = 'bank_div'
- } ?>
- <?lsmb PROCESS input element_data = {
- type="hidden"
- name="entity_id"
- value=entity_id
- } ?>
- <?lsmb PROCESS input element_data = {
- type="hidden"
- name="credit_id"
- value=credit_id
- } ?>
- <?lsmb PROCESS input element_data = {
- type="hidden"
- name="bank_account_id"
- value=bank_account_id
- } ?>
- <div>
- <?lsmb INCLUDE input element_data = {
- type="text"
- label = text('BIC/SWIFT Code')
- name="bic"
- value=bic
- size=20
- } #' ?>
- </div>
- <div>
- <?lsmb PROCESS input element_data = {
- type="text"
- label = text('Bank Account')
- name="iban"
- value=iban
- size=20
- } #' ?>
- </div>
- <div><?lsmb PROCESS button element_data = {
- name="action"
- value="save_bank_account"
- class="submit"
- text = text('Save')
- } ?>
- </div>
-</form>
-</div>
-<div id="notes_div" class="container">
-<div class="listtop"><?lsmb text('Notes') ?></div>
-<form action="<?lsmb script ?>" method="post">
-<?lsmb PROCESS input element_data = {
- type = "hidden"
- name = "target_div"
- value = 'notes_div'
- } ?>
-<?lsmb PROCESS input element_data = {
- type = "hidden"
- name = "form_id"
- value = form_id
- } ?>
- <?lsmb PROCESS input element_data = {
- type="hidden"
- name="entity_id"
- value=entity_id
- } ?>
- <?lsmb PROCESS input element_data = {
- type="hidden"
- name="credit_id"
- value=credit_id
- } ?>
-<?lsmb IF credit_id -?>
-<div class="input">
- <?lsmb PROCESS input element_data = {
- label = text('Subject'),
- name = "subject"
- value = subject
- type = "text"
- size = "20"
- } ?>
-</div>
-<div class="input"><?lsmb PROCESS select element_data = {
- name = "note_class"
- default_values = [note_class]
- options = note_class_options
- label = text("Note Class") #"
- text_attr = "label"
- value_attr = "value"
- } ?>
-</div>
-<?lsmb END # IF credit_id -?>
-<div class="input"><?lsmb PROCESS textarea element_data = {
- label = text('Notes')
- name = 'note'
-} ?></div>
-<div class="input">
-<?lsmb PROCESS button element_data = {
- text = text('Save')
- class = 'submit'
- name = 'action'
- value = 'save_notes'
-} ?>
-
-</form>
-<?lsmb FOREACH n = notes ?>
-<div class="note">
- <div class="note_subject"><?lsmb text('Subject: [_1]', n.subject)?></div>
- <div class="timestamp"><?lsmb text('Entered at: [_1]', n.created) ?></div>
- <div class="author"><?lsmb text("Author: [_1]", n.created_by) ?></div>
- <div class="note_contents"><?lsmb n.note ?></div>
-</div>
-<?lsmb END ?>
-</div>
-<?lsmb END ?>
</body>
</html>
Added: trunk/UI/Contact/divs/bank_act.html
===================================================================
--- trunk/UI/Contact/divs/bank_act.html (rev 0)
+++ trunk/UI/Contact/divs/bank_act.html 2012-03-20 08:34:25 UTC (rev 4511)
@@ -0,0 +1,75 @@
+<div class="container" id="bank_div">
+<div class="listtop"><?lsmb text('Bank Accounts') ?></div>
+<table width="100%">
+<tr class="listheading">
+ <th class="bic"><?lsmb text('BIC/SWIFT Code') ?></th>
+ <th class="iban"><?lsmb text('Account Number') ?></th>
+ <th class="actions"><?lsmb text('Actions') ?></th>
+</tr>
+<?lsmb FOREACH ba = bank_account ?>
+<tr>
+ <td class="bic"><?lsmb ba.bic ?></td>
+ <td class="iban"><?lsmb ba.iban ?></td>
+ <td class="actions">
+ <a href="<?lsmb script ?>?action=delete_bank_acct&entity_id=<?lsmb
+ entity_id ?>&bank_account_id=<?lsmb ba.id
+ ?>&target_div=bank_div&form_id=<?lsmb form_id
+ ?>&credit_id=<?lsmb tt_url(credit_id) ?>"
+ >[<?lsmb text('Delete') ?>]</a>
+ </td>
+</tr>
+<?lsmb END ?>
+</table>
+<form name="bank_acct" action="<?lsmb script ?>">
+<?lsmb PROCESS input element_data = {
+ type = "hidden"
+ name = "form_id"
+ value = form_id
+ } ?>
+<?lsmb PROCESS input element_data = {
+ type = "hidden"
+ name = "target_div"
+ value = 'bank_div'
+ } ?>
+ <?lsmb PROCESS input element_data = {
+ type="hidden"
+ name="entity_id"
+ value=entity_id
+ } ?>
+ <?lsmb PROCESS input element_data = {
+ type="hidden"
+ name="credit_id"
+ value=credit_id
+ } ?>
+ <?lsmb PROCESS input element_data = {
+ type="hidden"
+ name="bank_account_id"
+ value=bank_account_id
+ } ?>
+ <div>
+ <?lsmb INCLUDE input element_data = {
+ type="text"
+ label = text('BIC/SWIFT Code')
+ name="bic"
+ value=bic
+ size=20
+ } #' ?>
+ </div>
+ <div>
+ <?lsmb PROCESS input element_data = {
+ type="text"
+ label = text('Bank Account')
+ name="iban"
+ value=iban
+ size=20
+ } #' ?>
+ </div>
+ <div><?lsmb PROCESS button element_data = {
+ name="action"
+ value="save_bank_account"
+ class="submit"
+ text = text('Save')
+ } ?>
+ </div>
+</form>
+</div>
Added: trunk/UI/Contact/divs/contact_info.html
===================================================================
--- trunk/UI/Contact/divs/contact_info.html (rev 0)
+++ trunk/UI/Contact/divs/contact_info.html 2012-03-20 08:34:25 UTC (rev 4511)
@@ -0,0 +1,121 @@
+<div class="container" id="contact_div">
+ <div class="listtop"><?lsmb text('Contact Information') ?></div>
+ <table width="100%">
+ <tr class="listheading">
+ <th class="contact_class"><?lsmb text('Type') ?></th>
+ <th class="description"><?lsmb text('Description') ?></th>
+ <th class="contact"><?lsmb text('Contact Info') ?></th>
+ <th class="contact_actions"><?lsmb text('Actions') ?></th>
+ </tr>
+ <?lsmb FOREACH ct = contacts ?>
+ <tr>
+ <td class="contact_class"><?lsmb ct.class ?></td>
+ <td class="description"><?lsmb ct.description ?></td>
+ <td class="contact"><?lsmb ct.contact ?></td>
+ <td class="contact_actions">
+ <a href="<?lsmb tt_url(script)
+ ?>?entity_id=<?lsmb tt_url(entity_id)
+ ?>&contact=<?lsmb tt_url(ct.contact)
+ ?>&contact_class=<?lsmb tt_url(ct.class_id)
+ ?>&description=<?lsmb tt_url(ct.description)
+ ?>&action=edit&credit_id=<?lsmb
+ tt_url(credit_id)
+ ?>&person_id=<?lsmb tt_url(person_id)
+ ?>&target_div=contact_div"
+ >[<?lsmb text('Edit'); ?>]</a>
+ <a href="<?lsmb tt_url(script)
+ ?>?entity_id=<?lsmb tt_url(entity_id)
+ ?>&contact_class_id=<?lsmb
+ tt_url(ct.class_id)
+ ?>&action=delete_contact&credit_id=<?lsmb
+ tt_url(credit_id) ?>&form_id=<?lsmb form_id
+ ?>&contact=<?lsmb tt_url(ct.contact)
+ ?>&person_id=<?lsmb tt_url(person_id)
+ ?>&target_div=contact_div"
+ >[<?lsmb text('Delete'); ?>]</a>
+ </td>
+ </tr>
+ <?lsmb END ?>
+ </table>
+ <form action="<?lsmb script ?>">
+<?lsmb PROCESS input element_data = {
+ type = "hidden"
+ name = "form_id"
+ value = form_id
+ } ?>
+<?lsmb PROCESS input element_data = {
+ type = "hidden"
+ name = "target_div"
+ value = 'contact_div'
+ } ?>
+ <?lsmb PROCESS input element_data = {
+ type="hidden"
+ name="entity_id"
+ value=entity_id
+ } ?>
+ <?lsmb PROCESS input element_data = {
+ type="hidden"
+ name="credit_id"
+ value=credit_id
+ } ?>
+ <?lsmb PROCESS input element_data = {
+ type="hidden"
+ name="old_contact_class"
+ value=contact_class
+ } ?>
+ <?lsmb PROCESS input element_data = {
+ type="hidden"
+ name="old_contact"
+ value=contact
+ } ?>
+ <?lsmb PROCESS input element_data = {
+ type="hidden"
+ name="contact_id"
+ value=contact_id
+ } ?>
+ <div>
+ <?lsmb PROCESS select element_data = {
+ name = "contact_class"
+ label = "Type"
+ text_attr = "class"
+ value_attr = "id"
+ default_values = [contact_class]
+ options = contact_class_list
+ } ?>
+ </div>
+ <div>
+ <?lsmb PROCESS input element_data = {
+ label = text('Description'),
+ name = "description"
+ value = description
+ type = "text"
+ size = "20"
+ } #' ?>
+ </div>
+ <div>
+ <?lsmb PROCESS input element_data = {
+ label = text('Contact Info'),
+ name = "contact"
+ value = contact
+ type = "text"
+ size = "20"
+ } #' ?>
+ </div>
+ <div><?lsmb PROCESS button element_data = {
+ name = "action",
+ value = "save_contact",
+ text = text('Save Contact'),
+ class = "submit"
+ } #' ?>
+ <?lsmb IF contact.defined ?>
+ <?lsmb PROCESS button element_data = {
+ name = "action",
+ value = "save_contact_new",
+ text = text('Save As New'),
+ class = "submit"
+ } #' ?>
+ <?lsmb END # IF old_contact.defined ?>
+ </div>
+</form>
+
+</div>
Added: trunk/UI/Contact/divs/notes.html
===================================================================
--- trunk/UI/Contact/divs/notes.html (rev 0)
+++ trunk/UI/Contact/divs/notes.html 2012-03-20 08:34:25 UTC (rev 4511)
@@ -0,0 +1,64 @@
+<div id="notes_div" class="container">
+<div class="listtop"><?lsmb text('Notes') ?></div>
+<form action="<?lsmb script ?>" method="post">
+<?lsmb PROCESS input element_data = {
+ type = "hidden"
+ name = "target_div"
+ value = 'notes_div'
+ } ?>
+<?lsmb PROCESS input element_data = {
+ type = "hidden"
+ name = "form_id"
+ value = form_id
+ } ?>
+ <?lsmb PROCESS input element_data = {
+ type="hidden"
+ name="entity_id"
+ value=entity_id
+ } ?>
+ <?lsmb PROCESS input element_data = {
+ type="hidden"
+ name="credit_id"
+ value=credit_id
+ } ?>
+<?lsmb IF credit_id -?>
+<div class="input">
+ <?lsmb PROCESS input element_data = {
+ label = text('Subject'),
+ name = "subject"
+ value = subject
+ type = "text"
+ size = "20"
+ } ?>
+</div>
+<div class="input"><?lsmb PROCESS select element_data = {
+ name = "note_class"
+ default_values = [note_class]
+ options = note_class_options
+ label = text("Note Class") #"
+ text_attr = "label"
+ value_attr = "value"
+ } ?>
+</div>
+<?lsmb END # IF credit_id -?>
+<div class="input"><?lsmb PROCESS textarea element_data = {
+ label = text('Notes')
+ name = 'note'
+} ?></div>
+<div class="input">
+<?lsmb PROCESS button element_data = {
+ text = text('Save')
+ class = 'submit'
+ name = 'action'
+ value = 'save_notes'
+} ?>
+
+</form>
+<?lsmb FOREACH n = notes ?>
+<div class="note">
+ <div class="note_subject"><?lsmb text('Subject: [_1]', n.subject)?></div>
+ <div class="timestamp"><?lsmb text('Entered at: [_1]', n.created) ?></div>
+ <div class="author"><?lsmb text("Author: [_1]", n.created_by) ?></div>
+ <div class="note_contents"><?lsmb n.note ?></div>
+</div>
+</div>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.