[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[4493] trunk
- Subject: SF.net SVN: ledger-smb:[4493] trunk
- From: ..hidden..
- Date: Sat, 17 Mar 2012 00:54:14 +0000
Revision: 4493
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4493&view=rev
Author: einhverfr
Date: 2012-03-17 00:54:13 +0000 (Sat, 17 Mar 2012)
Log Message:
-----------
Beginnings of refactoring contact template
Modified Paths:
--------------
trunk/LedgerSMB/ScriptLib/Company.pm
trunk/UI/Contact/contact.html
Modified: trunk/LedgerSMB/ScriptLib/Company.pm
===================================================================
--- trunk/LedgerSMB/ScriptLib/Company.pm 2012-03-17 00:13:45 UTC (rev 4492)
+++ trunk/LedgerSMB/ScriptLib/Company.pm 2012-03-17 00:54:13 UTC (rev 4493)
@@ -320,9 +320,7 @@
sub add {
my ($request) = @_;
- my $company = new_company($request);
- set_entity_class($company);
- _render_main_screen($company);
+ _render_main_screen($request);
}
@@ -753,7 +751,7 @@
$request->close_form;
$request->open_form;
$request->{dbh}->commit;
- if ($request->{company}){
+ if (ref $request->{company}){
my @credit_list =
$credit->list_for_entity($request->{company}->entity_id);
$request->{credit_list} = ..hidden..;
Modified: trunk/UI/Contact/contact.html
===================================================================
--- trunk/UI/Contact/contact.html 2012-03-17 00:13:45 UTC (rev 4492)
+++ trunk/UI/Contact/contact.html 2012-03-17 00:54:13 UTC (rev 4493)
@@ -62,24 +62,37 @@
<?lsmb text("Add Employee") ?>
<?lsmb text("Edit Employee") ?>
-->
+<?lsmb # TODO: Move to controller scripts.
+ nav_list = [];
+ IF entity_class == 3;
+ nav_list.push({id = 'hr_div', label = text('HR')});
+ ELSE;
+ nav_list.push({id = 'company_div', label = text('Company')},
+ {id = 'credit_div', label = text('Credit Accts')}); #'
+ END;
+ IF entity_id;
+ nav_list.push(
+ {id = 'location_div', label = text('Addresses')},
+ {id = 'contact_div', label = text('Contact Info')}, #'
+ {id = 'bank_div', label = text('Bank Accounts')}, #'
+ {id = 'notes_div', label = text('Notes')}
+ );
+ IF account_class == 1 or account_class == 2;
+ #nav_list.push({id = 'prices_div', label = text('Pricelist')});
+ #nav_list.push({id = 'history_div', label = text('History')});
+ ELSIF account_class == 3;
+ #nav_list.push({id = 'user_div', label = text('User')});
+ END;
+ END; ?>
<ul class="navigation">
- <?lsmb IF entity_class == 3 ?>
- <li class="nav"><a href="#hr_div"><?lsmb text('HR') ?></a></li>
- <?lsmb ELSE ?>
- <li class="nav"><a href="#company_div"><?lsmb text('Company') ?></a></li>
- <li class="nav"><a href="#credit_div"><?lsmb text('Accounts') ?></a></li>
- <?lsmb END ?>
- <?lsmb IF entity_id ?>
- <li class="nav"><a href="#location_div"><?lsmb text('Addresses') ?></a></li>
- <li class="nav"><a href="#contact_div"><?lsmb text('Contact Info') ?></a></li>
- <li class="nav"><a href="#bank_div"><?lsmb text('Bank Accounts') ?></a></li>
- <li class="nav"><a href="#notes_div"><?lsmb text('Notes') ?></a></li>
- <!-- Commented out as not yet implemented -CT
- <li><a href="#history_div"><?lsmb text('History') ?></a></li>
- <li><a href="#user_div"><?lsmb text('User') ?></a></li>
- -->
- <?lsmb END ?>
+ <?lsmb FOREACH nav IN nav_list ?>
+ <li class="nav"><a href="#<?lsmb nav.id ?>"><?lsmb nav.label ?></a></li>
+ <?lsmb END ?>
</ul>
+<?lsmb FOREACH ITEM IN div_list;
+ PROCESS ITEM;
+ END
+?>
</div>
<?lsmb IF entity_class == 3 ?>
<div id="hr_div" class="container">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.