summaryrefslogtreecommitdiff
path: root/web/views/project.erb
blob: b82f925c16d4a9d552e0df7b2267eb9012d179e8 (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
<div class="pre">
    <h1><%= h(@project['name']) %></h1>
    <p><%= h(@project['description']) %></p>
</div>
<div id="tabs">
    <ul class="no-print">
        <li><a href="#overview"><%= h(t.taginfo.overview) %></a></li>
        <li><a href="#tags"><%= h(t.osm.tags) %></a></li>
    </ul>
    <div id="overview">
        <table class="desc">
            <tr><th><%= h(t.pages.project.overview.project_name) %>:</th><td><span id="icon_url"></span> <%= h(@project['name']) %></td></tr>
            <tr><th><%= h(t.pages.project.overview.project_url) %>:</th><td id="project_url"></td></tr>
            <tr><th><%= h(t.pages.project.overview.description) %>:</th><td><%= h(@project['description']) %></td></tr>
<% if @project['doc_url'] %>
            <tr><th><%= h(t.pages.project.overview.documentation_url) %>:</th><td id="doc_url"></td></tr>
<% end %>
            <tr><th><%= h(t.pages.project.overview.last_update) %>:</th><td><%= h(@project['data_updated']) %></td></tr>
            <tr><th><%= h(t.pages.project.overview.json_url) %>:</th><td id="json_url"></td></tr>
        </table>
        <p><i><%= t.pages.project.overview.info %></i></p>
    </div>
    <div id="tags">
        <h2><%= h(t.pages.project.tags.title) %></h2>
        <p class="boxpre"><i><%= h(t.pages.project.tags.intro) %></i></p>
        <table id="grid-tags">
        </table>
    </div>
</div>
<% javascript do
    JS.raw(<<"JAVASCRIPT")
function page_init2() {
    var project = #{ @project_id.to_json },
        project_url = #{ @project['project_url'].to_json },
        json_url = #{ @project['json_url'].to_json },
        icon_url = #{ @project['icon_url'].to_json },
        doc_url = #{ @project['doc_url'].to_json };

    if (project_url) {
        jQuery('#project_url').html(link_to_url_nofollow(project_url));
    }
    if (icon_url) {
        jQuery('#icon_url').html(img({ src: icon_url, width: 16, height: 16, alt: ''}));
    }
    if (json_url) {
        jQuery('#json_url').html(link_to_url_nofollow(json_url));
    }
    if (doc_url) {
        jQuery('#doc_url').html(link_to_url_nofollow(doc_url));
    }

    init_tabs([project]);
}
JAVASCRIPT
end
%>