text-cms init and return feedb change

This commit is contained in:
ragu 2023-01-17 20:43:36 +01:00
parent c1fe6c235c
commit a61920988c
23 changed files with 267 additions and 408 deletions

View file

@ -32,8 +32,7 @@ sub new {
sub tpl(){
my $node_meta = shift;
my $users_dms = shift;
my $u_group = shift;
my $return = shift;
my $feedb = shift || {};
my $q = new CGI;
my $cf = new Config;
@ -48,17 +47,20 @@ sub tpl(){
my %varenv = $cf->envonline();
my $lang = "de";
my $dbh = "";
#print $dbt->{operator}->{$varenv{dbname}}->{oprefix};
my $rel_id = $1 if($R::rel_id && $R::rel_id =~ /(\d+)/);
my $c_id = $1 if($R::c_id && $R::c_id =~ /(\d+)/);
my $c_id = "";
$c_id = $1 if($R::c_id && $R::c_id =~ /(\d+)/);
$c_id = $feedb->{c_id} if($feedb->{c_id});
my $u_id = $1 if($R::u_id && $R::u_id =~ /(\d+)/);
$u_id = $1 if($R::c_idadr && $R::c_idadr =~ /(\d+)/ && $R::base_edit eq "new_dmsusers");
my ($edit,$copy_key,$save_key,$relate_key,$move_key,$delete_key);
my $tpl = {};
my @tpl_order = ();
my $edit_template = "";
my $bg_color = "grey";
my $bg_color = $node_meta->{bg_color} || "grey";
my $ctrel = {};
my $cttpos = {};
my $gesamt = 0;
@ -78,7 +80,6 @@ sub tpl(){
print $q->hidden(-name=>'c_id',-override=>'1', -value=>"$ctrel->{c_id}");
print $q->hidden(-name=>'rel_id',-override=>'1', -value=>"$ctrel->{rel_id}");
$bg_color = $varenv{background_color2};
$edit = "rel_edit";
#$relate_key = "relate_dialog4menu";
$move_key = "move_dialog4menu" if($node_meta->{tpl_id} == 205);#only Waren
@ -97,7 +98,6 @@ sub tpl(){
print $q->hidden(-name=>'c_id',-override=>'1', -value=>"$ctrel->{c_id}");
print $q->hidden(-name=>'rel_id',-override=>'1', -value=>"$ctrel->{rel_id}");
$bg_color = $varenv{background_color2};
$edit = "base_edit";
$save_key = "save_adr";
$edit_template = "$ctrel->{template_id}" . "000";
@ -122,7 +122,6 @@ sub tpl(){
$ctrel = $dbt->fetch_tablerecord($dbh,$ref);
print $q->hidden(-name=>'u_id',-override=>'1', -value=>"$ctrel->{u_id}");
$bg_color = $varenv{background_color2};
$edit = "base_edit";
$save_key = "save_dmsusers";
#print Dumper($node_meta->{tpl_id}) . "\n u_id:" . $u_id;
@ -138,11 +137,25 @@ sub tpl(){
print $q->hidden(-name=>'c_id',-override=>'1', -value=>"$ctrel->{c_id}");
print $q->hidden(-name=>'rel_id',-override=>'1', -value=>"$ctrel->{rel_id}");
$bg_color = $varenv{background_color2};
$edit = "rel_edit";
$save_key = "save_ctuser";
$tpl = $dbt->get_tpl($dbh,$node_meta->{tpl_id});
}elsif($node_meta->{ct_table} eq "contentuser" && $node_meta->{tpl_id} == 194 && $c_id){
my $ref = {
table => "$node_meta->{ct_table}",
fetch => "one",
template_id => "$node_meta->{tpl_id}",
c_id => "$c_id",
};
$ctrel = $dbt->fetch_record($dbh,$ref);
print $q->hidden(-name=>'c_id',-override=>'1', -value=>"$ctrel->{c_id}");
print $q->hidden(-name=>'rel_id',-override=>'1', -value=>"$ctrel->{rel_id}");
$edit = "base_edit";
$save_key = "save_contentcms";
$tpl = $dbt->get_tpl($dbh,$node_meta->{tpl_id});
}elsif($node_meta->{ct_table} eq "contenttranspos" && $node_meta->{tpl_id} == 221){
my $now_dt = strftime "%Y-%m-%d %H:%M:%S", localtime;
my $pref = {
@ -169,7 +182,6 @@ sub tpl(){
$gesamt = sprintf('%.2f', $gesamt);
}
$bg_color = $varenv{background_color2};
$edit = "base_edit";
$save_key = "save_pos";
my $tpl_id = $node_meta->{tpl_id};
@ -775,10 +787,7 @@ EOF
my $w = "width:25em;";
$w= "width:" . $2 . "em;" if($size =~ /area(\d+)-(\d+)/);
print $q->Tr();
print $q->td({-style=>'padding:4px 0 0 0px;',-colspan=>1},""),"\n";
print $q->td({-style=>'padding:4px 0 0 0px;',-colspan=>3},"$des"),"\n";
print $q->Tr();
print $q->td({-style=>'padding:4px 0 0 0px;',-colspan=>1},""),"\n";
print $q->td({-class=>'left_italic_cms',-colspan=>1},"$des"),"\n";
if($key eq "txt28" && $ctrel->{$key} =~ /SEPA-Lastschriftmandat/){
use URI::Encode qw(uri_encode uri_decode);
$ctrel->{txt28} = uri_decode($ctrel->{txt28});
@ -788,9 +797,6 @@ EOF
}
print $q->td({-class=>'content1_cms', -colspan=>'3'},$q->textarea(-id=>"$key", -class=>"etxt", -style=>"border: 1px solid silver;$h $w", -name=>"$key", -override=>'1',-default=>"$ctrel->{$key}")),"\n";
}
elsif($key =~ /txt02/ && $varenv{syshost} =~ /sharee/){
#nothing txt02=Datei aktiv=10=sharee-APP aktivierte Dokument
}
elsif($key =~ /txt15/ && $varenv{syshost} =~ /sharee/ && $node_meta->{tpl_id} == 202){
my $record_bonus = {c_id => 0};
my $pref_cc = {

View file

@ -25,7 +25,7 @@ sub tpl(){
my $mode = shift || "";
my $varenv = shift;
my $users_sharee = shift || { c_id => 0 };
my $return = shift || "";
my $feedb = shift || "";
my $q = new CGI;
my $but = new Buttons;

View file

@ -33,7 +33,6 @@ sub new {
sub tpl(){
my $node_meta = shift;
my $users_dms = shift;
my $u_group = shift;
my $return = shift || "";
my $q = new CGI;
@ -120,7 +119,7 @@ sub tpl(){
my $table = "content";
$searchref->{table_pos} = "contentpos";
if($node_meta->{tpl_id} == 199){
if($node_meta->{tpl_id} == 194 || $node_meta->{tpl_id} == 199){
$table = "contentuser";
$searchref->{table_pos} = "";
$searchref->{template_id_pos} = "";
@ -245,13 +244,17 @@ EOF
#new_edit and search (disabled for Statistik, Service-Config and DMS-Account view)
if($node_meta->{tpl_id} !~ /195|198|199/){
my $edit="rel_edit";
my $new_key="service_done";
my $search = "search";
print $q->Tr(),"\n";
print $q->td({-style=>"background-color:silver;$hstyle"},$but->singlesubmit1("detail_search","$search","","")),"\n";
print $q->td({-style=>"$hstyle"}," "),"\n";
print $q->td({-style=>"background-color:silver;$hstyle"},$but->singlesubmit1("detail_search","search","","")),"\n";
my $a_color = $node_meta->{bg_color} || "yellow";
if($node_meta->{tpl_id} =~ /194/){
my $edit="base_edit";
my $new_key="new_contentcms";#Text-CMS
print $q->td({-style=>"width:25px;background-color:$a_color;$hstyle"}, $but->singlesubmit2glyph("$edit","$new_key","$ib{$new_key}","background-color:$a_color;"));
}else{
print $q->td({-style=>"$hstyle"}," "),"\n";
}
#1. Search-fields
my $s_val = "";
@ -413,7 +416,7 @@ EOF
#$u_name = $ct_users->{$ct4rel->{$id}->{$key}}->{txt01} || $ct4rel->{$id}->{$key};
print $q->td({-class=>"$tdclass",-style=>"$tdstyle $set_style"},"$u_name"),"\n";
}elsif($key eq "ct_name" && $node_meta->{ct_table} eq "contentuser" && $node_meta->{tpl_id} == 199){
}elsif($key eq "ct_name" && $node_meta->{ct_table} eq "contentuser" && $node_meta->{tpl_id} =~ /194|199/){
my $spec_style = "";
$spec_style = "min-width:140px;";
print $q->td({-class=>"$tdclass",-style=>"$tdstyle $spec_style"},$q->a({-class=>"linknav3",-href=>"?node2edit=editpart\&c_id=$ct4rel->{$id}->{c_id}",-title=>"edit"},"$ct4rel->{$id}->{$key}")),"\n";

View file

@ -581,7 +581,7 @@ EOF
print $q->div({-style=>"clear:both;height:0.1px;"},""),"\n";
if($ctt->{txt30}){
print $q->div({-style=>"padding:0.5em;font-size:0.81em;width:98%;text-align:right;"}, "$ctt->{txt30}"),"\n";
}elsif( -f "$varenv{pdf}/$praefix-$ctt->{ct_name}.pdf" ){
}elsif( -f "$varenv{pdfinvoice}/$praefix-$ctt->{ct_name}.pdf" ){
print $q->start_form(),"\n";
print $q->hidden(-name=>'offset', -override=>'1', -value=>"$R::offset"),"\n" if($R::offset);
print $q->hidden(-name=>'limit', -override=>'1', -value=>"$R::limit"),"\n" if($R::limit);