[vhffs-dev] [svn] commit: r52 - trunk/vhffs-api/src/Vhffs trunk/vhffs-backend/src/pgsql trunk/vhffs-panel/admin/user trunk/vhffs-panel/templates/admin/user

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Author: soda
Date: Tue Jul 12 22:35:19 2005
New Revision: 52

Log:
Admin can now modify notes


Added:
    trunk/vhffs-backend/src/pgsql/create_notes.sql
    trunk/vhffs-panel/admin/user/edit_note.pl   (with props)
    trunk/vhffs-panel/templates/admin/user/edit-note.tmpl
Modified:
    trunk/vhffs-api/src/Vhffs/Note.pm
    trunk/vhffs-panel/admin/user/edit.pl
    trunk/vhffs-panel/templates/admin/user/edit.tmpl

Modified: trunk/vhffs-api/src/Vhffs/Note.pm
==============================================================================
--- trunk/vhffs-api/src/Vhffs/Note.pm (original)
+++ trunk/vhffs-api/src/Vhffs/Note.pm Tue Jul 12 22:35:19 2005
@@ -10,6 +10,18 @@
 use diagnostics;
 
 package Vhffs::Note;
+sub set_note
+{
+	my $vhffs		=	shift;
+	my $entity		=	shift;
+	my $value		=	shift;
+
+	my $oldvalue = get_note( $vhffs , $entity );
+	my $newvalue = $value - $oldvalue;
+	inc_note( $vhffs , $entity , $newvalue );
+}
+
+
 
 sub inc_note
 {

Modified: trunk/vhffs-panel/admin/user/edit.pl
==============================================================================
--- trunk/vhffs-panel/admin/user/edit.pl (original)
+++ trunk/vhffs-panel/admin/user/edit.pl Tue Jul 12 22:35:19 2005
@@ -200,6 +200,17 @@
 	}
 
 
+	if( $vhffs->get_config->use_notation == 1 )
+	{
+		use Vhffs::Note;
+		my $subtemplate = new HTML::Template( filename => $templatedir."/admin/user/edit-note.tmpl" );
+		$subtemplate->param( TEXT_NOTE => "Note" );
+		$subtemplate->param( VALUE_NOTE => Vhffs::Note::get_note( $vhffs , $object ) );
+		$subtemplate->param( VALUE_USERNAME => $object->get_username );
+		$subtemplate->param( SEND => gettext("Update note") );
+
+		$template->param( NOTE => $subtemplate->output );
+	}
 
 
 

Modified: trunk/vhffs-panel/templates/admin/user/edit.tmpl
==============================================================================
--- trunk/vhffs-panel/templates/admin/user/edit.tmpl (original)
+++ trunk/vhffs-panel/templates/admin/user/edit.tmpl Tue Jul 12 22:35:19 2005
@@ -132,6 +132,9 @@
 </form>
 
 
+<p>
+<TMPL_VAR NAME="NOTE">
+</p>	
 
 
         <p>




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/