Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon5.gif   How to format a column in list display?, posted by Andreas Luedeke on Fri Apr 23 20:08:10 2021 pik1.PNGpik-list.PNG
    icon3.gif   Bug Report with CSS includes (was Re: How to format a column in list display?), posted by Andreas Luedeke on Mon Jun 14 17:25:02 2021 
       icon2.gif   Bug Report with CSS includes (was Re: How to format a column in list display?), posted by Sebastian Schenk on Mon Jun 14 18:51:59 2021 
Message ID: 69370     Entry time: Mon Jun 14 17:25:02 2021     In reply to: 69353     Reply to this: 69372
Icon: Idea  Author: Andreas Luedeke  Author Email: andreas.luedeke@psi.ch 
Category: Bug report  OS: All  ELOG Version: V3.1.4 
Subject: Bug Report with CSS includes (was Re: How to format a column in list display?) 

Okay, found some solution for my problem:

List Change Pikett = <div class="pikett">$Pikett</div>
CSS=pikett.css

And file themes/default/pikett.css contains:

.pikett {
  background-color:white;
  font-size:16px;
  font-family:monospace;
  text-align:left;
}

That works like a charm - until I log in to the logbook. Then the include of the CSS in the header is garbled with some "prefix" of random chars:

<link rel="stylesheet" type="text/css" href="elog.css">
<link rel="stylesheet" type="text/css" href="`=T ýpikett.css">

And a quick check in the source code shows some bad code:

L7615: function "show_html_header"

         rsprintf("<link rel=\"stylesheet\" type=\"text/css\" href=\"%s%s\">\n", css_base, css);

Here css_base is a not initialized local variable of the function. In fact the above line is the only reference of that variable char css_base[1000].

The bug is still present in elog-3.1.4-611489b

 

Andreas Luedeke wrote:
There is the nice conditional formatting feature for List display:
Cell Style <attribute> <value> = <style>
I would like to use it without conditions: some attributes should always be formatted in a specific way.
 
Specifically I want a generated attribute (combined from other attributes) to be display in monospace font.
The "Format Pikett = 0, attribname, messagelist" works nicely for the single entry display (pik1), but not for List view (pik-list).

Would it be possible to create a new command "List format <attribute> = <css_class_name>,<css_class_value>,<width>,<size>", or is there another way to achieve this?

 

ELOG V3.1.5-fe60aaf