%
#--
# Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see .
#++
%>
<% @page_title = t("views.site.page_title") -%>
<%= t("views.site.description") %>
<% unless logged_in? -%>
<% if false -%>
<%= t("views.site.for_projects") %> |
<%= t("views.site.for_contributors") %> |
<%= image_tag("overview_projects.png") -%> |
<%= image_tag("overview_contributors.png") -%> |
<% end -%>
<% if GitoriousConfig['public_mode'] || logged_in? -%>
<%= t("views.site.creating_account").call(self, new_user_path) %>
<% end -%>
<% end -%>
<% if GitoriousConfig['public_mode'] -%>
<% pull_box(nil, :class => "expose") do -%>
Gitorious provides open source infrastructure
for open source projects which use Git.
Read more…
<% end -%>
<% cache([:site_index, :recent_activities], :expires_in => 10.minutes) do -%>
<% pull_box("Recent activities") do -%>
<% @latest_events.each do |event| -%>
<%= render :partial => event, :locals => { :relative_time => true } -%>
<% end -%>
<% end -%>
<% end -%>
<% cache([:site_index, :active_projects_two_weeks], :expires_in => 30.minutes) do -%>
<% pull_box("Active projects
(last two weeks)") do -%>
<% end -%>
<% end -%>
<% cache([:site_index, :active_projects_overall], :expires_in => 1.hour) do -%>
<% pull_box("Active projects
(overall)") do -%>
<% end -%>
<% end -%>
<% cache([:site_index, :active_clones], :expires_in => 25.minutes) do -%>
<% pull_box("Most active repository clones") do -%>
<% @top_repository_clones.each do |repo| -%>
-
<%= link_to h(repo.title), repo_owner_path(repo, :project_repository_path, repo.project, repo) -%>
(<%= link_to h(repo.project.title), repo.project -%>)
<%= truncate(h(strip_tags(repo.description)), :length => 65) -%>
<% end -%>
<% end -%>
<% end -%>
<% cache([:site_index, :active_teams], :expires_in => 15.minutes) do -%>
<% pull_box("Active teams") do -%>
<% end -%>
<% end -%>
<% cache([:site_index, :active_users], :expires_in => 20.minutes) do -%>
<% pull_box("Active users") do -%>
<% end -%>
<% end -%>
<% cache([:site_index, :newest_projects], :expires_in => 5.minutes) do -%>
<% pull_box(t("views.site.newest_projects")) do -%>
<% @projects.each do |project| -%>
-
<%= link_to h(project.title), project -%>
<%= truncate(h(project.stripped_description), :length => 65) -%>
<% end -%>
- <%= link_to t("views.site.view_more"), projects_path -%>
<% end -%>
<% end -%>
<% end -%>