Author: richter
Date: Fri Jan 15 21:53:01 2016
New Revision: 1724884

URL: http://svn.apache.org/viewvc?rev=1724884&view=rev
Log:
Add show link for attachements

Modified:
    perl/embperl/trunk/Embperl/Form/Control/attachment.pm

Modified: perl/embperl/trunk/Embperl/Form/Control/attachment.pm
URL: 
http://svn.apache.org/viewvc/perl/embperl/trunk/Embperl/Form/Control/attachment.pm?rev=1724884&r1=1724883&r2=1724884&view=diff
==============================================================================
--- perl/embperl/trunk/Embperl/Form/Control/attachment.pm (original)
+++ perl/embperl/trunk/Embperl/Form/Control/attachment.pm Fri Jan 15 21:53:01 
2016
@@ -28,7 +28,20 @@ use Embperl::Inline ;
 
 use vars qw{%fdat} ;
 
+# ---------------------------------------------------------------------------
+#
+#   init - init the new control
+#
+
+sub init
 
+    {
+    my ($self) = @_ ;
+
+    $self -> SUPER::init () ;
+    $self -> {no_show} = 1 if (!exists $self -> {no_show}) ;
+    }
+    
 # 
------------------------------------------------------------------------------------------
 #
 #   init_data - daten aufteilen
@@ -106,6 +119,7 @@ my $name     = $self -> {name};
 
 $]
 <div [+ do { local $escmode = 0 ; $self -> get_std_control_attr($req) } +] 
_ef_attach="ef_attachment" _ef_dynid="<_id>"  _ef_attr="[+ $name +]" 
_ef_always_download="[+ $self -> {always_download} +]">
+    [$if !$self -> {no_show} $]<a class="ef-attachment-show" 
href="#">Anzeigen</a>&nbsp;[$endif$]
     [$if !$self -> {no_download} $]<a class="ef-attachment-download" 
href="#">Download</a>&nbsp;[$endif$]
     [$if !$self -> {no_upload} $]<a class="ef-attachment-upload" 
href="#">Upload</a>&nbsp;[$endif$]
     [$if !$self -> {no_delete} $]<a class="ef-attachment-delete" 
href="#">L&ouml;schen</a>&nbsp;[$endif$]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to