thiswebshoprules

git clone https://git.tarina.org/thiswebshoprules
Log | Files | Refs

products.html (977B)


      1 $def with (addproduct, listproducts, goodies, idvalue)
      2 <div id="container">
      3 <div id="default">
      4 <br>
      5 $for i in listproducts:
      6     <a href='/products/$i.id'>$i.name $i.price</a>
      7 $if idvalue == '':
      8     <h2>Add product</h2>
      9 $else:
     10     <h2>Edit product</h2>
     11 <div id="addevent">
     12 <form method="POST">
     13 $:addproduct.render()
     14 </form>
     15 <a href='/products/$idvalue?cmd=del&id=$idvalue'>remove product</a>
     16 <br>
     17 <hr>
     18 $if goodies != None:
     19     $for i in goodies:
     20         $if i.soundname[-5:] == '.jpeg' or i.soundname[-4:] == '.png':
     21             <img src="/static/img/thumb/$i.soundname">
     22         $else:
     23             <p>$i.soundname</p>
     24         <br>
     25         <a href='/products/$idvalue?cmd=remove&soundname=$i.soundname'>remove</a>
     26         <br>
     27         <hr>
     28 $if idvalue != '':
     29     <form method="POST" enctype="multipart/form-data" action="">
     30     <input type="file" name="imgfile"/> <br>
     31     <br/>
     32     <input name="upload", type="submit" value="upload" />
     33     </form>
     34 </div>
     35 
     36 </div>
     37 </div>
     38 </div>