aboutsummaryrefslogtreecommitdiff
path: root/web/views/test-index.erb
blob: 391efde43022f0eaf06f25a7b7c8f6a83c72a395 (plain)
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<% @nosearch = true
   @css = <<'CSS'
div#menu {
    position: relative;
    margin: 0 auto;
    width: 100%;
    height: 30px;
    border-bottom: 1px solid #a0a0a0;
}

div#menuitems {
    position: absolute;
    width: 100%;
}

div#menu .mitem {
    position: relative;
}

div#menu h2 {
    text-transform: uppercase;
    font-weight: normal;
    margin: 2px 40px 2px 0px;
    height: 26px;
    float: left;
}

div#menu h2:hover {
    border-bottom: 3px solid #a0a0a0;
}

div#menu h2 a {
    text-decoration: none;
}

div#menu div.mitem .mpop {
    position: absolute;
    visibility: hidden;
    padding-top: 6px;
    width: 100%;
    height: 210px;
    top: 31px;
    background: -moz-linear-gradient(top, #ffffff, #f0f0f0);
    border-radius: 4px;
}

div#menu div.mitem .mpop p {
    padding: 8px 16px;
    max-width: 40em;
}

div#menu div.mitem .mpop div {
    padding: 8px 16px;
}

div#menu div.mitem:hover .mpop {
    visibility: visible;
}

div#search_box {
    text-align: center;
}

div#search_box p {
    max-width: 100%;
    font-size: 80%;
}

div#main input#search {
    font-size: 140%;
    padding: 2px 6px;
}
CSS
%>
<div class="resize">
    <div id="menu"><div id="menuitems">
        <div class="mitem"><h2><a href="/keys"><%= h(t.osm.keys) %></a></h2>
            <div class="mpop">
                <p>All tag keys that exist in the database or in any of the other sources.</p>
                <div id="key_list"></div>
                <p class="emphasis"><a href="/keys"><%= h(t.pages.index.keys.listkeys) %></a></p>
            </div>
        </div>
        <div class="mitem"><h2><a href="/tags"><%= h(t.osm.tags) %></a></h2>
            <div class="mpop">
                <p>The most common tags in the database.</p>
                <div id="tag_list"></div>
                <p class="emphasis"><a href="/tags"><%= h(t.pages.index.tags.listtags) %></a></p>
            </div>
        </div>
        <div class="mitem"><h2><a href="/relations"><%= h(t.osm.relation_types) %></a></h2>
            <div class="mpop">
                <p>The different types of relations (indicated by the type tag).</p>
                <div id="relation_list"></div>
                <p class="emphasis"><a href="/relations"><%= h(t.pages.index.relations.listrelations) %></a></p>
            </div>
        </div>
        <div class="mitem"><h2><a href="/projects"><%= h(t.taginfo.projects) %></a></h2>
            <div class="mpop">
                <p>Projects that use OSM data in some way.</p>
                <div>
<% @db.select('SELECT id, name, icon_url FROM projects.projects').execute().each do |project| %>
                    <a href="/projects/<%= project['id'] %>"><img width="20" height="20" src="<%= project['icon_url'] %>" alt="" title="<%= project['name'] %>"/></a>
<% end %>
                </div>
                <p class="emphasis"><a href="/projects">Show all projects...</a></p>
            </div>
        </div>
        <div class="mitem"><h2><a href="/reports"><%= h(t.taginfo.reports) %></a></h2>
            <div class="mpop">
                <p>Reports show the tag data from different angles. They often
                bring together data from several sources in interesting ways.
                Some of the reports can help with finding specific errors.</p>
                <div>
                    <a href="/reports/characters_in_keys">Characters in keys</a> &bull;
                    <a href="/reports/database_statistics">Database statistics</a> &bull;
                    <a href="/reports/historic_development">Historic development</a> &bull;
                    <a href="/reports/key_lengths">Key lengths</a> &bull;
                    <a href="/reports/similar_keys">Similar keys</a>
                </div>
                <p class="emphasis"><a href="/reports"><%= h(t.pages.index.reports.listreports) %></a></p>
            </div>
        </div>
        <div class="mitem"><h2><a href="/about"><%= h(t.taginfo.about) %></a></h2>
            <div class="mpop">
                <p>OpenStreetMap uses tags to add meaning to geographic
                objects. There is no fixed list of those tags. New tags can be
                invented and used as needed. Taginfo tries to bring together
                all information about tags to help you understand how they are
                used and what they mean.</p>
                <p class="emphasis"><a href="/about">More...</a></p>
            </div>
        </div>
    </div></div>
    <div style="clear: both; height: 240px;"></div>
    <div id="search_box">
        <form id="search_form" action="/search"><input type="text" id="search" name="q" value="<%= h(params[:q]) %>"/></form>
        <p>Search the taginfo database.<br/>
        Formats: KEY, KEY=VALUE, =VALUE, ...</p>
    </div>
</div>