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

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



Revision: 5000
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5000&view=rev
Author:   einhverfr
Date:     2012-07-16 05:14:50 +0000 (Mon, 16 Jul 2012)
Log Message:
-----------
Roles now have friendlier names, as in 1.3, and aligned checkboxes for easier selection

Modified Paths:
--------------
    trunk/LedgerSMB/DBObject/Entity/User.pm
    trunk/UI/Contact/contact.css
    trunk/UI/Contact/divs/user.html

Modified: trunk/LedgerSMB/DBObject/Entity/User.pm
===================================================================
--- trunk/LedgerSMB/DBObject/Entity/User.pm	2012-07-16 02:03:50 UTC (rev 4999)
+++ trunk/LedgerSMB/DBObject/Entity/User.pm	2012-07-16 05:14:50 UTC (rev 5000)
@@ -6,6 +6,7 @@
 
 package LedgerSMB::DBObject::Entity::User;
 use Moose;
+use LedgerSMB::App_State;
 extends 'LedgerSMB::DBObject_Moose';
 
 =head1 SYNOPSYS
@@ -142,7 +143,13 @@
 
 sub list_roles{
     my ($self) = @_;
-    return __PACKAGE__->call_procedure(procname => 'admin__get_roles');
+    my @roles =  __PACKAGE__->call_procedure(procname => 'admin__get_roles');
+    for my $role (@roles){
+        $role->{description} = $role->{rolname};
+        $role->{description} =~ s/.*__//;
+        $role->{description} =~ s/_/ /g;
+    }
+    return @roles;
 }
 
 =back

Modified: trunk/UI/Contact/contact.css
===================================================================
--- trunk/UI/Contact/contact.css	2012-07-16 02:03:50 UTC (rev 4999)
+++ trunk/UI/Contact/contact.css	2012-07-16 05:14:50 UTC (rev 5000)
@@ -117,4 +117,19 @@
         width: 10em;
 }
 
+#user_div table {
+       width: 40em;
+}
 
+#user_div input[type=~'checkbox'] {
+       float: left;
+}
+
+#user_div label {
+      width: 8em;
+      text-align: right;
+}
+
+#user_div table label {
+      width: 15em;
+}

Modified: trunk/UI/Contact/divs/user.html
===================================================================
--- trunk/UI/Contact/divs/user.html	2012-07-16 02:03:50 UTC (rev 4999)
+++ trunk/UI/Contact/divs/user.html	2012-07-16 05:14:50 UTC (rev 5000)
@@ -117,7 +117,7 @@
                            END ?>
                         <?lsmb PROCESS input element_data = {
                                type = "checkbox"
-                               label = role.rolname
+                               label = role.description
                                value = 1
                                name = role.rolname
                                checked = rolcheck

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