File: bookmark.ams

package info (click to toggle)
amrita 1.0.2-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,880 kB
  • ctags: 1,363
  • sloc: ruby: 9,159; xml: 978; makefile: 116
file content (40 lines) | stat: -rw-r--r-- 906 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<html>
<body>

<amritascript> <!--
  require "bmmodel"
  include Amrita

  bm = BookmarkList.new
  bm.load_from_file("bookmark.dat")
  groups = bm.groups.keys.sort

  data = {
    :groups => groups.collect do |k|
      {
        :group_name=>k,
        :items=>bm.groups[k].collect do |item|
        {
          :name=>item.name,
          :link=>a(:href=>item.url) { item.url }
        }
      end
      }
    end
  }
//--></amritascript>

  <div id="groups">                      
    <h1 id="group_name"></h1>
    <table border="1">                     
      <tr><th>name</th><th>url</th></tr>  
      <tr id="items">                        
        <td id="name">name</td>                
        <td><a id="link">url with link</a></td>                
      </tr>                                
    </table>                               
  </div>                                 


</body>
</html>