thiswebshoprules

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

products.html (1236B)


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