Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision c7f9da81

Von Moritz Bunkus vor mehr als 17 Jahren hinzugefügt

  • ID c7f9da819e437745d637e714993959e57244655a
  • Vorgänger 9c548b6f
  • Nachfolger 52ee8da6

Umstellung der Kontenübersicht auf die Verwendung von "Template".

Unterschiede anzeigen:

SL/Form.pm
386 386

  
387 387
  if ($ENV{HTTP_USER_AGENT}) {
388 388

  
389
    if ($self->{stylesheet} && (-f "css/$self->{stylesheet}")) {
390
      $stylesheet =
391
        qq|<LINK REL="stylesheet" HREF="css/$self->{stylesheet}" TYPE="text/css" TITLE="Lx-Office stylesheet">
392
 |;
389
    my $stylesheets = "$self->{stylesheet} $self->{stylesheets}";
390

  
391
    $stylesheets =~ s|^\s*||;
392
    $stylesheets =~ s|\s*$||;
393
    foreach my $file (split m/\s+/, $stylesheets) {
394
      $file =~ s|.*/||;
395
      next if (! -f "css/$file");
396

  
397
      $stylesheet .= qq|<link rel="stylesheet" href="css/$file" TYPE="text/css" TITLE="Lx-Office stylesheet">\n|;
393 398
    }
394 399

  
395 400
    $self->{favicon}    = "favicon.ico" unless $self->{favicon};
bin/mozilla/am.pl
413 413

  
414 414
  foreach $ca (@{ $form->{CA} }) {
415 415

  
416
    $ca->{debit}  = "&nbsp;";
417
    $ca->{credit} = "&nbsp;";
416
    $ca->{debit}  = "";
417
    $ca->{credit} = "";
418 418

  
419 419
    if ($ca->{amount} > 0) {
420
      $ca->{credit} =
421
        $form->format_amount(\%myconfig, $ca->{amount}, 2, "&nbsp;");
420
      $ca->{credit} = $form->format_amount(\%myconfig, $ca->{amount}, 2);
422 421
    }
423 422
    if ($ca->{amount} < 0) {
424
      $ca->{debit} =
425
        $form->format_amount(\%myconfig, -1 * $ca->{amount}, 2, "&nbsp;");
423
      $ca->{debit} = $form->format_amount(\%myconfig, -1 * $ca->{amount}, 2);
426 424
    }
427 425
    $ca->{heading}   = ( $ca->{charttype} eq 'H' ) ? 1:''; 
428 426
    $ca->{link_edit_account} = 
......
437 435
             ."&password=$form->{password}&action=list_account_details&";
438 436
  
439 437
  
440
  my $pjx = new CGI::Ajax( 
441
             'list_account_details' => $list_account_details_url 
442
  );
438
  my $pjx = new CGI::Ajax('list_account_details' => $list_account_details_url);
443 439

  
444 440
  # Eneable AJAX debuging
445 441
  #$pjx->DEBUG(1);
446 442
  #$pjx->JSDEBUG(1);
447 443
    
448 444
  push(@ { $form->{AJAX} }, $pjx);
449
  
445

  
446
  $form->{stylesheets} = "list_accounts.css";
447

  
450 448
  $form->header;
451 449
  
452 450
  
......
455 453
  };
456 454
  
457 455
  # Ausgabe des Templates
458
  print($form->parse_html_template('am/list_accounts', $parameters_ref));
456
  print($form->parse_html_template2('am/list_accounts', $parameters_ref));
459 457
  
460 458
  $lxdebug->leave_sub();
461 459

  
templates/webpages/am/list_accounts_de.html
1
[% USE HTML %]<body>
1 2

  
2
  <style type="text/css">
3
  
4
  /* Kontenliste Styles */
5

  
6
  .coa_listtop { 
7
	background-color:rgb(236,233,216); 
8
	text-align:left;
9
	padding:5px;
10
	font-size:12pt; 
11
	color:black; 
12
	font-weight: bolder;
13
	border-style:dashed;
14
	border-width:thin;
15
  }
16

  
17
  .coa_listheading { 
18
	background-color:rgb(236,233,216); 
19
	color: black; 
20
	background-image:url("../image/fade.png");
21
  }
22
  
23
  .coa_listheading_element { 
24
	font-size:10pt; 
25
	padding:3px;
26
	font-weight:bolder;
27
	text-align:left;
28
	border-style:dotted;
29
	border-width:thin;
30
  }
31
  
32
  .coa_listrow1 { 
33
	background-color: rgb(208,207,201); 
34
	color: black; 
35
	vertical-align: top; 
36
  }
37

  
38
  .coa_listrow0 { 
39
        background-color: rgb(236,233,216); 
40
        color: black; 
41
        vertical-align: top; 
42
  }
43

  
44
  .coa_amount {
45
        text-align:right;
46
        font-familiy:monospace;
47
  }
48

  
49
  .coa_account_header {
50
        font-size:10pt; 
51
	padding:3px;
52
	font-weight:bolder;
53
	text-align:left;
54
	border-style:none;
55
	border-width:thin;
56
  
57
  }
58

  
59
  .coa_account_header_sc {
60
        font-size:10pt; 
61
	padding:3px;
62
	font-weight:bolder;
63
	text-align:left;
64
	border-style:none;
65
	border-width:thin;
66
        cursor:s-resize;
67
  }
68
  
69
  .coa_detail {
70
	padding:0px;
71
	border-style:none;
72
  }
73
  
74
  .coa_detail_emph {
75
        font-size:10pt;
76
        font-weight:bold;
77
        color:darkred;
78
  }
79
                    
80
  .coa_details_header {
81
        font-size:8pt; 
82
	padding:3px;
83
	font-weight:bolder;
84
	text-align:center;
85
	border-style:none;
86
	border-width:thin;
87
  }
88

  
89
  .coa_details_header2 {
90
        font-size:8pt; 
91
	padding:3px;
92
	font-weight:normal;
93
	text-align:left;
94
	border-style:none;
95
	border-width:thin;
96
  }
97
  
98
  </style>
99

  
100
</head>
101

  
102
<body>
103

  
104
<br/><div id='pjxdebugrequest'></div><br/>
105

  
106

  
107
<table width=100%>
108
  <tr class="coa_listtop">
109
      <th class="coa_listtop"><TMPL_VAR title ESCAPE=HTML></th>
110
  </tr>
111
</table>
3
 <br/><div id='pjxdebugrequest'></div><br/>
4

  
5
 <div class="coa_listtop">[% title %]</div>
112 6

  
113
<br />
7
 <br />
114 8

  
115
<table width="100%">
9
 <table width="100%">
116 10

  
117 11
  <colgroup>
118
      <col width="10%">
119
      <col width="10%">
120
      <col width="10%">
121
      <col width="50%">
122
      <col width="10%">
123
      <col width="10%">
12
   <col width="10%">
13
   <col width="10%">
14
   <col width="10%">
15
   <col width="50%">
16
   <col width="10%">
17
   <col width="10%">
124 18
  </colgroup>
125
  
19

  
126 20
  <tr class="coa_listheading">
127
    
128
    <td class="coa_listheading_element">
129
        Konto
130
    </td>
131
    <td colspan="3" class="coa_listheading_element">
132
        Beschreibung (Klick
133
  ?ffnet einzelne Kontendetails)
134
    </td>
135
    <td class="coa_listheading_element">
136
        Soll
137
    </td>
138
    <td class="coa_listheading_element">
139
        Haben
140
    </td>
21
   <td class="coa_listheading_element">Konto</td>
22
   <td colspan="3" class="coa_listheading_element">Beschreibung (Klick
23
  ?ffnet einzelne Kontendetails)</td>
24
   <td class="coa_listheading_element">Soll</td>
25
   <td class="coa_listheading_element">Haben</td>
141 26
  </tr>
142 27

  
143
<TMPL_LOOP CA>
144

  
145
  <TMPL_IF heading>
146
        <tr>
147
          <td class="accountlistheading">
148
            <a href="<TMPL_VAR link_edit_account>" >
149
            <TMPL_VAR accno>
150
            </a>
151
          </td>
152
          <td colspan="5" class="accountlistheading">
153
            <TMPL_VAR description>
154
          </td>
155
        </tr>
156
  <TMPL_ELSE>
157

  
158
    <TMPL_IF __odd__>
159
        <tr class="coa_listrow1">
160
    <TMPL_ELSE>
161
        <tr class="coa_listrow0">
162
    </TMPL_IF>
163
    
164

  
165
    <td class="coa_account_header">
166
        <b><a href="<TMPL_VAR link_edit_account>" ><TMPL_VAR accno></a></b>
28
  [% SET row_odd = '1' %][% FOREACH row = CA %]
167 29

  
168
    </td>
169
    <input type="hidden" name="chart_id" value="<TMPL_VAR id ESCAPE=HTML>"
170
    id="chart_id_<TMPL_VAR id ESCAPE=HTML>" >
171
    <td colspan="3" id="accountcontent<TMPL_VAR id
172
      ESCAPE=HTML>-title" class="coa_account_header_sc"
173
      onclick="list_account_details( ['chart_id_<TMPL_VAR id ESCAPE=HTML>'],
174
      ['ajaxcontent<TMPL_VAR id ESCAPE=HTML>'] )">
175
    <TMPL_VAR description ESCAPE=HTML>&nbsp;
176
    </td>
177
    <td class="coa_account_header">
178
            <div class="coa_amount"><TMPL_VAR debit></div>
179
    </td>
180
    <td class="coa_account_header">
181
            <div class="coa_amount"><TMPL_VAR credit>&nbsp;</div>
30
  [% IF row.heading %]
31
  <tr>
32
   <td class="accountlistheading"><a href="[% row.link_edit_account %]">[% HTML.escape(row.accno) %]</a></td>
33
   <td colspan="5" class="accountlistheading">[% HTML.escape(row.description) %]</td>
34
  </tr>
35

  
36
  [% ELSE %]
37

  
38
  <tr class="coa_listrow[% IF row_odd %]1[% SET row_odd = '0' %][% ELSE %]0[% SET row_odd = '1' %][% END %]">
39

  
40
   <td class="coa_account_header">
41
    <b><a href="[% row.link_edit_account %]" >[% HTML.escape(row.accno) %]</a></b>
42
   </td>
43

  
44
   <input type="hidden" name="chart_id" value="[% HTML.escape(row.id) %]" id="chart_id_[% HTML.escape(row.id) %]" >
45
   <td colspan="3" id="accountcontent[% HTML.escape(row.id) %]-title" class="coa_account_header_sc"
46
       onclick="list_account_details( ['chart_id_[% HTML.escape(row.id) %]'], ['ajaxcontent[% HTML.escape(row.id) %]'] )">
47
    [% HTML.escape(row.description) %]
48
   </td>
49

  
50
    <td class="coa_account_header"><div class="coa_amount">[% HTML.escape(row.debit) %]</div></td>
51
    <td class="coa_account_header"><div class="coa_amount">[% HTML.escape(row.credit) %]</div>
182 52
    </td>
183 53
  </tr>
54

  
184 55
  <tr class="coa_detail">
185
    <td colspan="6" width="100%"> 
186
        <div id="ajaxcontent<TMPL_VAR id ESCAPE=HTML>">
187
      </div>
188
    </td>
56
   <td colspan="6" width="100%"><div id="ajaxcontent[% HTML.escape(row.id) %]"></div></td>
189 57
  </tr>
190
  
191
  </TMPL_IF>
192
  
193
</TMPL_LOOP>
194 58

  
195
</table>
59
  [% END %]
196 60

  
197
</body>
198
</html>
61
  [% END %]
199 62

  
63
 </table>
200 64

  
65
</body>
66
</html>
templates/webpages/am/list_accounts_master.html
1
[% USE HTML %]<body>
1 2

  
2
  <style type="text/css">
3
  
4
  /* Kontenliste Styles */
5

  
6
  .coa_listtop { 
7
	background-color:rgb(236,233,216); 
8
	text-align:left;
9
	padding:5px;
10
	font-size:12pt; 
11
	color:black; 
12
	font-weight: bolder;
13
	border-style:dashed;
14
	border-width:thin;
15
  }
16

  
17
  .coa_listheading { 
18
	background-color:rgb(236,233,216); 
19
	color: black; 
20
	background-image:url("../image/fade.png");
21
  }
22
  
23
  .coa_listheading_element { 
24
	font-size:10pt; 
25
	padding:3px;
26
	font-weight:bolder;
27
	text-align:left;
28
	border-style:dotted;
29
	border-width:thin;
30
  }
31
  
32
  .coa_listrow1 { 
33
	background-color: rgb(208,207,201); 
34
	color: black; 
35
	vertical-align: top; 
36
  }
37

  
38
  .coa_listrow0 { 
39
        background-color: rgb(236,233,216); 
40
        color: black; 
41
        vertical-align: top; 
42
  }
43

  
44
  .coa_amount {
45
        text-align:right;
46
        font-familiy:monospace;
47
  }
48

  
49
  .coa_account_header {
50
        font-size:10pt; 
51
	padding:3px;
52
	font-weight:bolder;
53
	text-align:left;
54
	border-style:none;
55
	border-width:thin;
56
  
57
  }
58

  
59
  .coa_account_header_sc {
60
        font-size:10pt; 
61
	padding:3px;
62
	font-weight:bolder;
63
	text-align:left;
64
	border-style:none;
65
	border-width:thin;
66
        cursor:s-resize;
67
  }
68
  
69
  .coa_detail {
70
	padding:0px;
71
	border-style:none;
72
  }
73
  
74
  .coa_detail_emph {
75
        font-size:10pt;
76
        font-weight:bold;
77
        color:darkred;
78
  }
79
                    
80
  .coa_details_header {
81
        font-size:8pt; 
82
	padding:3px;
83
	font-weight:bolder;
84
	text-align:center;
85
	border-style:none;
86
	border-width:thin;
87
  }
88

  
89
  .coa_details_header2 {
90
        font-size:8pt; 
91
	padding:3px;
92
	font-weight:normal;
93
	text-align:left;
94
	border-style:none;
95
	border-width:thin;
96
  }
97
  
98
  </style>
99

  
100
</head>
101

  
102
<body>
103

  
104
<br/><div id='pjxdebugrequest'></div><br/>
105

  
106

  
107
<table width=100%>
108
  <tr class="coa_listtop">
109
      <th class="coa_listtop"><TMPL_VAR title ESCAPE=HTML></th>
110
  </tr>
111
</table>
3
 <br/><div id='pjxdebugrequest'></div><br/>
4

  
5
 <div class="coa_listtop">[% title %]</div>
112 6

  
113
<br />
7
 <br />
114 8

  
115
<table width="100%">
9
 <table width="100%">
116 10

  
117 11
  <colgroup>
118
      <col width="10%">
119
      <col width="10%">
120
      <col width="10%">
121
      <col width="50%">
122
      <col width="10%">
123
      <col width="10%">
12
   <col width="10%">
13
   <col width="10%">
14
   <col width="10%">
15
   <col width="50%">
16
   <col width="10%">
17
   <col width="10%">
124 18
  </colgroup>
125
  
19

  
126 20
  <tr class="coa_listheading">
127
    
128
    <td class="coa_listheading_element">
129
        <translate>Account</translate>
130
    </td>
131
    <td colspan="3" class="coa_listheading_element">
132
        <translate>Description (Click on Description for details)</translate>
133
    </td>
134
    <td class="coa_listheading_element">
135
        <translate>Debit</translate>
136
    </td>
137
    <td class="coa_listheading_element">
138
        <translate>Credit</translate>
139
    </td>
21
   <td class="coa_listheading_element"><translate>Account</translate></td>
22
   <td colspan="3" class="coa_listheading_element"><translate>Description (Click on Description for details)</translate></td>
23
   <td class="coa_listheading_element"><translate>Debit</translate></td>
24
   <td class="coa_listheading_element"><translate>Credit</translate></td>
140 25
  </tr>
141 26

  
142
<TMPL_LOOP CA>
143

  
144
  <TMPL_IF heading>
145
        <tr>
146
          <td class="accountlistheading">
147
            <a href="<TMPL_VAR link_edit_account>" >
148
            <TMPL_VAR accno>
149
            </a>
150
          </td>
151
          <td colspan="5" class="accountlistheading">
152
            <TMPL_VAR description>
153
          </td>
154
        </tr>
155
  <TMPL_ELSE>
156

  
157
    <TMPL_IF __odd__>
158
        <tr class="coa_listrow1">
159
    <TMPL_ELSE>
160
        <tr class="coa_listrow0">
161
    </TMPL_IF>
162
    
163

  
164
    <td class="coa_account_header">
165
        <b><a href="<TMPL_VAR link_edit_account>" ><TMPL_VAR accno></a></b>
27
  [% SET row_odd = '1' %][% FOREACH row = CA %]
166 28

  
167
    </td>
168
    <input type="hidden" name="chart_id" value="<TMPL_VAR id ESCAPE=HTML>"
169
    id="chart_id_<TMPL_VAR id ESCAPE=HTML>" >
170
    <td colspan="3" id="accountcontent<TMPL_VAR id
171
      ESCAPE=HTML>-title" class="coa_account_header_sc"
172
      onclick="list_account_details( ['chart_id_<TMPL_VAR id ESCAPE=HTML>'],
173
      ['ajaxcontent<TMPL_VAR id ESCAPE=HTML>'] )">
174
    <TMPL_VAR description ESCAPE=HTML>&nbsp;
175
    </td>
176
    <td class="coa_account_header">
177
            <div class="coa_amount"><TMPL_VAR debit></div>
178
    </td>
179
    <td class="coa_account_header">
180
            <div class="coa_amount"><TMPL_VAR credit>&nbsp;</div>
29
  [% IF row.heading %]
30
  <tr>
31
   <td class="accountlistheading"><a href="[% row.link_edit_account %]">[% HTML.escape(row.accno) %]</a></td>
32
   <td colspan="5" class="accountlistheading">[% HTML.escape(row.description) %]</td>
33
  </tr>
34

  
35
  [% ELSE %]
36

  
37
  <tr class="coa_listrow[% IF row_odd %]1[% SET row_odd = '0' %][% ELSE %]0[% SET row_odd = '1' %][% END %]">
38

  
39
   <td class="coa_account_header">
40
    <b><a href="[% row.link_edit_account %]" >[% HTML.escape(row.accno) %]</a></b>
41
   </td>
42

  
43
   <input type="hidden" name="chart_id" value="[% HTML.escape(row.id) %]" id="chart_id_[% HTML.escape(row.id) %]" >
44
   <td colspan="3" id="accountcontent[% HTML.escape(row.id) %]-title" class="coa_account_header_sc"
45
       onclick="list_account_details( ['chart_id_[% HTML.escape(row.id) %]'], ['ajaxcontent[% HTML.escape(row.id) %]'] )">
46
    [% HTML.escape(row.description) %]
47
   </td>
48

  
49
    <td class="coa_account_header"><div class="coa_amount">[% HTML.escape(row.debit) %]</div></td>
50
    <td class="coa_account_header"><div class="coa_amount">[% HTML.escape(row.credit) %]</div>
181 51
    </td>
182 52
  </tr>
53

  
183 54
  <tr class="coa_detail">
184
    <td colspan="6" width="100%"> 
185
        <div id="ajaxcontent<TMPL_VAR id ESCAPE=HTML>">
186
      </div>
187
    </td>
55
   <td colspan="6" width="100%"><div id="ajaxcontent[% HTML.escape(row.id) %]"></div></td>
188 56
  </tr>
189
  
190
  </TMPL_IF>
191
  
192
</TMPL_LOOP>
193 57

  
194
</table>
58
  [% END %]
195 59

  
196
</body>
197
</html>
60
  [% END %]
198 61

  
62
 </table>
199 63

  
64
</body>
65
</html>

Auch abrufbar als: Unified diff