Revision 1361:7c0909052511 app
| app/controllers/projects_controller.rb | ||
|---|---|---|
| 196 | 196 |
@issue_category ||= IssueCategory.new |
| 197 | 197 |
@member ||= @project.members.new |
| 198 | 198 |
@trackers = Tracker.sorted.all |
| 199 |
@repository ||= @project.repository |
|
| 199 | 200 |
@wiki ||= @project.wiki |
| 200 | 201 |
end |
| 201 | 202 |
|
| app/controllers/welcome_controller.rb | ||
|---|---|---|
| 24 | 24 |
def index |
| 25 | 25 |
@site_project = Project.find_by_identifier "soundsoftware-site" |
| 26 | 26 |
@site_news = [] |
| 27 |
@site_news = News.latest_for @site_project if @site_project
|
|
| 27 |
@site_news = News.latest_for(@site_project, 3) if @site_project
|
|
| 28 | 28 |
|
| 29 | 29 |
# tests if user is logged in to generate the tips of the day list |
| 30 | 30 |
if User.current.logged? |
| app/models/repository.rb | ||
|---|---|---|
| 51 | 51 |
'password', |
| 52 | 52 |
'path_encoding', |
| 53 | 53 |
'log_encoding', |
| 54 |
'is_external', |
|
| 55 |
'external_url', |
|
| 54 | 56 |
'is_default' |
| 55 | 57 |
|
| 56 | 58 |
safe_attributes 'url', |
| app/views/activities/_busy.html.erb | ||
|---|---|---|
| 13 | 13 |
<ul> |
| 14 | 14 |
|
| 15 | 15 |
<% |
| 16 |
for project in busy_projects(events, 5)
|
|
| 16 |
for project in busy_projects(events, 7)
|
|
| 17 | 17 |
%> |
| 18 | 18 |
|
| 19 | 19 |
<li class="busy"> |
| app/views/issues/_form.html.erb | ||
|---|---|---|
| 43 | 43 |
|
| 44 | 44 |
<%= call_hook(:view_issues_form_details_bottom, { :issue => @issue, :form => f }) %>
|
| 45 | 45 |
<% end %> |
| 46 |
|
|
| 47 |
<% if @issue.new_record? && User.current.allowed_to?(:add_issue_watchers, @project) -%> |
|
| 48 |
<p id="watchers_form"><label><%= l(:label_issue_watchers) %></label> |
|
| 49 |
<% @issue.project.users.sort.each do |user| -%> |
|
| 50 |
<label class="floating"><%= check_box_tag 'issue[watcher_user_ids][]', user.id, !!(@issue.watched_by?(user) or user == User.current) %> <%=h user %></label> |
|
| 51 |
<% end -%> |
|
| 52 |
</p> |
|
| 53 |
<% end %> |
|
| 54 |
|
|
| 55 |
<%= call_hook(:view_issues_form_details_bottom, { :issue => @issue, :form => f }) %>
|
|
| 56 |
|
|
| 57 |
<%= wikitoolbar_for 'issue_description' %> |
|
| app/views/projects/explore.html.erb | ||
|---|---|---|
| 11 | 11 |
<h2><%= l(:label_explore_projects) %></h2> |
| 12 | 12 |
|
| 13 | 13 |
<div class="threecolumnleft"> |
| 14 |
<% cache(:action => 'explore', :action_suffix => 'tags', :expires_in => 1.hour) do %>
|
|
| 14 |
<% cache(:action => 'explore', :action_suffix => 'tags') do %> |
|
| 15 | 15 |
<div class="tags box"> |
| 16 | 16 |
<h3><%=l(:label_project_tags_all)%></h3> |
| 17 | 17 |
<%= render :partial => 'projects/tagcloud' %> |
| ... | ... | |
| 28 | 28 |
</div> |
| 29 | 29 |
|
| 30 | 30 |
<div class="threecolumnleft"> |
| 31 |
<% cache(:action => 'explore', :action_suffix => 'busy_institutions', :expires_in => 1.hour) do %>
|
|
| 31 |
<% cache(:action => 'explore', :action_suffix => 'busy_institutions') do %> |
|
| 32 | 32 |
<div class="institutions box"> |
| 33 | 33 |
<h3><%=l(:label_institutions_busy)%></h3> |
| 34 | 34 |
<%= render :partial => 'activities/busy_institution' %> |
| ... | ... | |
| 38 | 38 |
</div> |
| 39 | 39 |
|
| 40 | 40 |
<div class="threecolumnmid"> |
| 41 |
<% cache(:action => 'explore', :action_suffix => 'busy_projects', :expires_in => 1.hour) do %>
|
|
| 41 |
<% cache(:action => 'explore', :action_suffix => 'busy_projects') do %> |
|
| 42 | 42 |
<div class="projects box"> |
| 43 | 43 |
<h3><%=l(:label_projects_busy)%></h3> |
| 44 | 44 |
<%= render :partial => 'activities/busy' %> |
| app/views/projects/settings/_repositories.html.erb | ||
|---|---|---|
| 1 |
<% if @project.repositories.any? %> |
|
| 2 |
<table class="list"> |
|
| 3 |
<thead> |
|
| 4 |
<tr> |
|
| 5 |
<th><%= l(:field_identifier) %></th> |
|
| 6 |
<th><%= l(:field_repository_is_default) %></th> |
|
| 7 |
<th><%= l(:label_scm) %></th> |
|
| 8 |
<th><%= l(:label_repository) %></th> |
|
| 9 |
<th></th> |
|
| 10 |
</tr> |
|
| 11 |
</thead> |
|
| 12 |
<tbody> |
|
| 13 |
<% @project.repositories.sort.each do |repository| %> |
|
| 14 |
<tr class="<%= cycle 'odd', 'even' %>"> |
|
| 15 |
<td> |
|
| 16 |
<%= link_to repository.identifier, |
|
| 17 |
{:controller => 'repositories', :action => 'show',:id => @project, :repository_id => repository.identifier_param} if repository.identifier.present? %>
|
|
| 18 |
</td> |
|
| 19 |
<td align="center"><%= checked_image repository.is_default? %></td> |
|
| 20 |
<td><%=h repository.scm_name %></td> |
|
| 21 |
<td><%=h repository.url %></td> |
|
| 22 |
<td class="buttons"> |
|
| 23 |
<% if User.current.allowed_to?(:manage_repository, @project) %> |
|
| 24 |
<%= link_to(l(:label_user_plural), committers_repository_path(repository), |
|
| 1 |
|
|
| 2 |
<%= javascript_include_tag 'repository' %> |
|
| 3 |
|
|
| 4 |
<% if @repository %> |
|
| 5 |
|
|
| 6 |
<%= form_for @repository, |
|
| 7 |
:as => :repository, |
|
| 8 |
:remote => true, |
|
| 9 |
:url => { :controller => 'repositories', :action => 'update', :id => @repository },
|
|
| 10 |
:method => 'put' do |f| %> |
|
| 11 |
|
|
| 12 |
<%= error_messages_for 'repository' %> |
|
| 13 |
|
|
| 14 |
<div class="box tabular"> |
|
| 15 |
|
|
| 16 |
<p> |
|
| 17 |
<%= l(:text_settings_repo_explanation).html_safe %></ br> |
|
| 18 |
<% if @repository.is_external %> |
|
| 19 |
<p><%= l(:text_settings_repo_is_external).html_safe %></ br> |
|
| 20 |
<% else %> |
|
| 21 |
<p><%= l(:text_settings_repo_is_internal).html_safe %></ br> |
|
| 22 |
<% end %> |
|
| 23 |
</p> |
|
| 24 |
|
|
| 25 |
|
|
| 26 |
<p> |
|
| 27 |
<%= label_tag('repository_is_external', l(:label_is_external_repository)) %>
|
|
| 28 |
<%= check_box :repository, :is_external, :onclick => "toggle_ext_url()" %> |
|
| 29 |
<br/><em><%= l(:setting_external_repository).html_safe %></em> |
|
| 30 |
</p> |
|
| 31 |
|
|
| 32 |
<p> |
|
| 33 |
<%= label_tag('repository_external_url', l(:label_repository_external_url)) %>
|
|
| 34 |
<%= text_field :repository, :external_url, :disabled => !(@repository and @repository.is_external) %> |
|
| 35 |
<br/><em><%= l(:setting_external_repository_url).html_safe %></em> |
|
| 36 |
</p> |
|
| 37 |
|
|
| 38 |
<p><%= l(:text_settings_repo_need_help).html_safe %></p> |
|
| 39 |
|
|
| 40 |
</div> |
|
| 41 |
|
|
| 42 |
<div class="contextual"> |
|
| 43 |
<% if @repository && !@repository.new_record? %> |
|
| 44 |
<%= link_to(l(:label_user_plural), |
|
| 45 |
{
|
|
| 46 |
:controller => 'repositories', |
|
| 47 |
:action => 'committers', |
|
| 48 |
:id => @repository |
|
| 49 |
}, |
|
| 25 | 50 |
:class => 'icon icon-user') %> |
| 26 |
<%= link_to(l(:button_edit), edit_repository_path(repository), |
|
| 27 |
:class => 'icon icon-edit') %> |
|
| 28 |
<%= delete_link repository_path(repository) %> |
|
| 29 |
<% end %> |
|
| 30 |
</td> |
|
| 31 |
</tr> |
|
| 32 |
<% end %> |
|
| 33 |
</tbody> |
|
| 34 |
</table> |
|
| 35 |
<% else %> |
|
| 36 |
<p class="nodata"><%= l(:label_no_data) %></p> |
|
| 51 |
<% end %> |
|
| 52 |
</div> |
|
| 53 |
|
|
| 54 |
<%= submit_tag(l(:button_save)) %> |
|
| 55 |
|
|
| 37 | 56 |
<% end %> |
| 38 | 57 |
|
| 39 |
<% if User.current.allowed_to?(:manage_repository, @project) %>
|
|
| 40 |
<p><%= link_to l(:label_repository_new), new_project_repository_path(@project), :class => 'icon icon-add' %></p>
|
|
| 58 |
<% else %>
|
|
| 59 |
<%= l(:text_settings_repo_creation).html_safe %></ br>
|
|
| 41 | 60 |
<% end %> |
| 61 |
|
|
| app/views/users/_form.html.erb | ||
|---|---|---|
| 1 |
<%= javascript_include_tag "ssamr_institutions" %> |
|
| 2 |
|
|
| 1 |
<% content_for :header_tags do %> |
|
| 2 |
<%= javascript_include_tag "ssamr_institutions" %> |
|
| 3 |
<% end %> |
|
| 3 | 4 |
|
| 4 | 5 |
<%= error_messages_for 'user' %> |
| 5 | 6 |
|
| ... | ... | |
| 27 | 28 |
|
| 28 | 29 |
<div class="box tabular"> |
| 29 | 30 |
<h3><%=l(:label_ssamr_details)%></h3> |
| 30 |
<%= labelled_fields_for :ssamr_user_details do |ssamr_user_detail| %>
|
|
| 31 |
<%= labelled_fields_for :ssamr_user_detail, @user.ssamr_user_detail do |ssamr_user_detail| %>
|
|
| 31 | 32 |
<p> |
| 32 |
<%= ssamr_user_detail.text_area :description, :rows => 3, :cols => 40, :required => true, :class => 'wiki-edit' %>
|
|
| 33 |
<%= ssamr_user_detail.text_area :description, :rows => 3, :cols => 40, :required => true, :class => 'wiki-edit' %> |
|
| 33 | 34 |
</p> |
| 34 | 35 |
|
| 35 | 36 |
<p><label for="institution"><%=l("field_ssamr_user_detail.institution")%> <span class="required">*</span></label>
|
| app/views/welcome/index.html.erb | ||
|---|---|---|
| 5 | 5 |
</div> |
| 6 | 6 |
<% end %> |
| 7 | 7 |
|
| 8 |
<div id="welcomepagenews"> |
|
| 9 |
<% if @site_news.any? %> |
|
| 10 |
<div class="news box"> |
|
| 11 |
<h3><%=l(:label_news_site_latest)%></h3> |
|
| 12 |
<%= render :partial => 'news/news', :locals => { :project => @site_project }, :collection => @site_news %>
|
|
| 13 |
<%= link_to l(:label_news_more), { :controller => 'news', :project_id => @site_project.identifier, :action => 'index' } %>
|
|
| 14 |
</div> |
|
| 15 |
<% end %> |
|
| 16 |
</div> |
|
| 17 |
|
|
| 8 | 18 |
<div id="welcomepage"> |
| 9 |
|
|
| 10 | 19 |
<%= textilizable Setting.welcome_text %> |
| 11 |
|
|
| 12 | 20 |
</div> |
| 13 | 21 |
|
| 14 | 22 |
<% content_for :header_tags do %> |
Also available in: Unified diff