Revision 1061:01076ed49ffc
| app/controllers/projects_controller.rb | ||
|---|---|---|
| 111 | 111 |
end |
| 112 | 112 |
# end of code to be removed |
| 113 | 113 |
|
| 114 |
|
|
| 115 |
if validate_parent_id && @project.save |
|
| 114 |
if validate_is_public_key && validate_parent_id && @project.save |
|
| 116 | 115 |
@project.set_allowed_parent!(params[:project]['parent_id']) if params[:project].has_key?('parent_id')
|
| 117 | 116 |
# Add current user as a project member if he is not admin |
| 118 | 117 |
unless User.current.admin? |
| ... | ... | |
| 300 | 299 |
render_404 |
| 301 | 300 |
end |
| 302 | 301 |
|
| 302 |
def validate_is_public_key |
|
| 303 |
# Although is_public isn't mandatory in the project model (it gets |
|
| 304 |
# defaulted), it must be present in params -- it can be true or |
|
| 305 |
# false, but it must be there. This permits us to make forms in |
|
| 306 |
# which the user _has_ to select public or private (rather than |
|
| 307 |
# defaulting it) if we want to |
|
| 308 |
if params.nil? || params[:project].nil? || !params[:project].has_key?(:is_public) |
|
| 309 |
@project.errors.add :is_public, :public_or_private |
|
| 310 |
return false |
|
| 311 |
end |
|
| 312 |
true |
|
| 313 |
end |
|
| 314 |
|
|
| 303 | 315 |
# Validates parent_id param according to user's permissions |
| 304 | 316 |
# TODO: move it to Project model in a validation that depends on User.current |
| 305 | 317 |
def validate_parent_id |
| app/views/activities/_busy.html.erb | ||
|---|---|---|
| 1 | 1 |
<% events = @events_by_day %> |
| 2 | 2 |
<% if (events.nil?) |
| 3 |
activity = Redmine::Activity::Fetcher.new(User.current)
|
|
| 3 |
activity = Redmine::Activity::Fetcher.new(User.anonymous)
|
|
| 4 | 4 |
events = activity.events(Date.today - 14, Date.today + 1) |
| 5 | 5 |
end |
| 6 | 6 |
%> |
| app/views/activities/_busy_institution.html.erb | ||
|---|---|---|
| 1 | 1 |
<% events = @events_by_day %> |
| 2 | 2 |
<% if (events.nil?) |
| 3 |
activity = Redmine::Activity::Fetcher.new(User.current) |
|
| 4 |
events = activity.events(Date.today - 14, Date.today + 1) |
|
| 3 |
activity = Redmine::Activity::Fetcher.new(User.anonymous) |
|
| 4 |
days = Setting.activity_days_default.to_i |
|
| 5 |
events = activity.events(Date.today - days, Date.today + 1) |
|
| 5 | 6 |
end |
| 6 | 7 |
%> |
| 7 | 8 |
|
| ... | ... | |
| 24 | 25 |
<% end %> |
| 25 | 26 |
</ul> |
| 26 | 27 |
<% end %> |
| 28 |
|
|
| app/views/projects/_form.html.erb | ||
|---|---|---|
| 21 | 21 |
<br /> |
| 22 | 22 |
<em> <%= l(:text_project_homepage_info) %></em> |
| 23 | 23 |
</p> |
| 24 |
<p><%= f.check_box :is_public %> |
|
| 24 |
<p> |
|
| 25 |
<%= label(:project, :is_public_1, l(:field_public_or_private) + content_tag("span", " *", :class => "required")) %>
|
|
| 26 |
<% |
|
| 27 |
# if the project hasn't been created fully yet, then we don't |
|
| 28 |
# want to set either public or private (make the user decide) |
|
| 29 |
initialised = !@project.id.nil? |
|
| 30 |
%> |
|
| 31 |
<%= f.radio_button :is_public, 1, :checked => (initialised && @project.is_public?) %> |
|
| 32 |
<%= l(:text_project_public_info) %> |
|
| 25 | 33 |
<br /> |
| 26 |
<em> <%= l(:text_project_visibility_info) %></em> |
|
| 34 |
<%= f.radio_button :is_public, 0, :checked => (initialised && !@project.is_public?) %> |
|
| 35 |
<%= l(:text_project_private_info) %> |
|
| 36 |
<br> |
|
| 37 |
<em><%= l(:text_project_visibility_info) %></em> |
|
| 27 | 38 |
</p> |
| 28 | 39 |
<%= wikitoolbar_for 'project_description' %> |
| 29 | 40 |
|
| app/views/projects/_members_box.html.erb | ||
|---|---|---|
| 1 | 1 |
<% if @users_by_role.any? %> |
| 2 |
<div class="members box">
|
|
| 2 |
<div id="memberbox"><div class="box">
|
|
| 3 | 3 |
<h3><%=l(:label_member_plural)%></h3> |
| 4 | 4 |
<p><% @users_by_role.keys.sort.each do |role| %> |
| 5 | 5 |
<%=h role %>: <%= @users_by_role[role].sort.collect{|u| link_to_user u}.join(", ") %><br />
|
| 6 | 6 |
<% end %></p> |
| 7 |
</div> |
|
| 7 |
</div></div>
|
|
| 8 | 8 |
<% end %> |
| app/views/projects/explore.html.erb | ||
|---|---|---|
| 1 |
<% content_for :header_tags do %> |
|
| 2 |
<%= stylesheet_link_tag 'redmine_tags', :plugin => 'redmine_tags' %> |
|
| 3 |
<% end %> |
|
| 1 | 4 |
|
| 5 |
<% cache(:action => 'explore', :action_suffix => 'tags', :expires_in => 1.hour) do %> |
|
| 2 | 6 |
<h2><%= l(:label_explore_projects) %></h2> |
| 3 |
|
|
| 4 | 7 |
<div class="tags box"> |
| 5 | 8 |
<h3><%=l(:label_project_tags_all)%></h3> |
| 6 | 9 |
<%= render :partial => 'projects/tagcloud' %> |
| 7 | 10 |
</div> |
| 11 |
<% end %> |
|
| 12 |
|
|
| 8 | 13 |
<div class="splitcontentleft"> |
| 14 |
<% cache(:action => 'explore', :action_suffix => 'busy_institutions', :expires_in => 1.hour) do %> |
|
| 9 | 15 |
<div class="institutions box"> |
| 10 | 16 |
<h3><%=l(:label_institutions_busy)%></h3> |
| 11 | 17 |
<%= render :partial => 'activities/busy_institution' %> |
| 12 | 18 |
</div> |
| 19 |
<% end %> |
|
| 13 | 20 |
<div class="projects box"> |
| 14 | 21 |
<h3><%=l(:label_project_latest)%></h3> |
| 15 | 22 |
<%= render :partial => 'projects/latest' %> |
| 16 | 23 |
</div> |
| 17 | 24 |
</div> |
| 18 | 25 |
<div class="splitcontentright"> |
| 26 |
<% cache(:action => 'explore', :action_suffix => 'busy_projects', :expires_in => 1.hour) do %> |
|
| 19 | 27 |
<div class="projects box"> |
| 20 | 28 |
<h3><%=l(:label_projects_busy)%></h3> |
| 21 | 29 |
<%= render :partial => 'activities/busy' %> |
| 22 | 30 |
</div> |
| 31 |
<% end %> |
|
| 23 | 32 |
</div> |
| app/views/projects/new.html.erb | ||
|---|---|---|
| 3 | 3 |
<% labelled_tabular_form_for @project do |f| %> |
| 4 | 4 |
<%= render :partial => 'form', :locals => { :f => f } %>
|
| 5 | 5 |
<%= submit_tag l(:button_create) %> |
| 6 |
<%= submit_tag l(:button_create_and_continue), :name => 'continue' %> |
|
| 7 | 6 |
<%= javascript_tag "Form.Element.focus('project_name');" %>
|
| 8 | 7 |
<% end %> |
| config/locales/en.yml | ||
|---|---|---|
| 130 | 130 |
circular_dependency: "This relation would create a circular dependency" |
| 131 | 131 |
cant_link_an_issue_with_a_descendant: "An issue cannot be linked to one of its subtasks" |
| 132 | 132 |
must_accept_terms_and_conditions: "You must accept the Terms and Conditions" |
| 133 |
public_or_private: "You must select either public or private" |
|
| 133 | 134 |
|
| 134 | 135 |
actionview_instancetag_blank_option: Please select |
| 135 | 136 |
|
| ... | ... | |
| 328 | 329 |
field_root_directory: Root directory |
| 329 | 330 |
field_cvsroot: CVSROOT |
| 330 | 331 |
field_cvs_module: Module |
| 332 |
field_public_or_private: "Public or Private?" |
|
| 331 | 333 |
|
| 332 | 334 |
setting_external_repository: "Select this if the project's main repository is hosted somewhere else" |
| 333 | 335 |
setting_external_repository_url: "The URL of the existing external repository. Must be publicly accessible without a password" |
| ... | ... | |
| 546 | 548 |
label_home: Home |
| 547 | 549 |
label_home_heading: Welcome! |
| 548 | 550 |
label_my_page: My page |
| 549 |
label_my_account: My account
|
|
| 551 |
label_my_account: Account
|
|
| 550 | 552 |
label_my_projects: My projects |
| 551 | 553 |
label_my_page_block: My page block |
| 552 | 554 |
label_administration: Administration |
| ... | ... | |
| 891 | 893 |
button_expand_all: Expand all |
| 892 | 894 |
button_delete: Delete |
| 893 | 895 |
button_create: Create |
| 894 |
button_create_and_continue: Create and continue
|
|
| 896 |
button_create_and_continue: Create and Add Another
|
|
| 895 | 897 |
button_test: Test |
| 896 | 898 |
button_edit: Edit |
| 897 | 899 |
button_edit_associated_wikipage: "Edit associated Wiki page: %{page_title}"
|
| ... | ... | |
| 966 | 968 |
text_caracters_minimum: "Must be at least %{count} characters long."
|
| 967 | 969 |
text_length_between: "Length between %{min} and %{max} characters."
|
| 968 | 970 |
text_project_name_info: "This will be the name of your project as it appears throughout this site.<br /> You can change it at any time, in the project's settings." |
| 969 |
text_project_visibility_info: "If your project is not public, it will be visible only to you and to users that you have added as project members.<br/>You can change this later if you wish." |
|
| 971 |
text_project_public_info: "Public: visible to anybody browsing the site." |
|
| 972 |
text_project_private_info: "Private: visible only to you, and to users you have added as project members." |
|
| 973 |
text_project_visibility_info: "You can change whether your project is public or private later if you wish." |
|
| 970 | 974 |
text_user_ssamr_description_info: 'Please describe your current research or development interests.<br/>This information will be used at registration to determine that you are a real person – so please be descriptive, or your application may be delayed or rejected.<br/>After registration, the description is publicly visible in your profile and you can edit it at any time.' |
| 971 | 975 |
text_issue_parent_issue_info: 'If this is a subtask, please insert its parent task number or write the main task name.' |
| 972 | 976 |
|
| public/stylesheets/application.css | ||
|---|---|---|
| 256 | 256 |
.highlight.token-3 { background-color: #aaf;}
|
| 257 | 257 |
|
| 258 | 258 |
.box{
|
| 259 |
padding:6px; |
|
| 260 |
margin-bottom: 10px; |
|
| 261 |
background-color:#f6f6f6; |
|
| 262 |
color:#505050; |
|
| 263 |
line-height:1.5em; |
|
| 264 |
border: 1px solid #e4e4e4; |
|
| 259 |
padding:6px;
|
|
| 260 |
margin-bottom: 10px;
|
|
| 261 |
background-color:#f6f6f6;
|
|
| 262 |
color:#505050;
|
|
| 263 |
line-height:1.5em;
|
|
| 264 |
border: 1px solid #e4e4e4;
|
|
| 265 | 265 |
} |
| 266 | 266 |
|
| 267 | 267 |
.box h4 {
|
| 268 |
margin-top: 0; |
|
| 269 |
padding-top: 0; |
|
| 268 |
margin-top: 0;
|
|
| 269 |
padding-top: 0;
|
|
| 270 | 270 |
} |
| 271 | 271 |
|
| 272 | 272 |
div.square {
|
| ... | ... | |
| 344 | 344 |
div#members dt .email { color: #777; font-size: 80%; }
|
| 345 | 345 |
div#members dd .roles { font-style: italic; }
|
| 346 | 346 |
|
| 347 |
div#memberbox h3 {
|
|
| 348 |
background: url(../images/group.png) no-repeat 0% 50%; |
|
| 349 |
padding-left: 20px; |
|
| 350 |
} |
|
| 351 |
div#memberbox p {
|
|
| 352 |
padding-left: 20px; |
|
| 353 |
margin-left: 0; |
|
| 354 |
} |
|
| 355 |
|
|
| 356 |
div.issues ul {
|
|
| 357 |
padding-left: 20px; |
|
| 358 |
margin-left: 0; |
|
| 359 |
list-style-type: none; |
|
| 360 |
} |
|
| 361 |
div.issues p {
|
|
| 362 |
padding-left: 20px; |
|
| 363 |
margin-left: 0; |
|
| 364 |
} |
|
| 365 |
|
|
| 347 | 366 |
.projects .latest .title { margin-right: 0.5em; }
|
| 348 | 367 |
.tipoftheday .tip { margin-left: 2em; margin-top: 0.5em; }
|
| 349 | 368 |
|
| public/themes/soundsoftware/stylesheets/application.css | ||
|---|---|---|
| 147 | 147 |
*/ |
| 148 | 148 |
/* h4 { border-bottom: dotted 1px #c0c0c0; } */
|
| 149 | 149 |
|
| 150 |
.wiki p { margin-left: 3em; margin-right: 3em; }
|
|
| 150 |
.wiki p, .wiki li { margin-left: 30px; margin-right: 3em; }
|
|
| 151 |
|
|
| 152 |
.repository-info .wiki p { margin-left: 0 }
|
|
| 151 | 153 |
|
| 152 | 154 |
div.issue { background: #fdfaf0; border: 1px solid #a9b680; border-left: 4px solid #a9b680; }
|
| 153 | 155 |
|
| public/themes/soundsoftware/stylesheets/fonts-generic.css | ||
|---|---|---|
| 1 |
@import url(fonts.css); |
|
| 1 |
@import url(fonts.css?2);
|
|
| 2 | 2 |
|
| 3 | 3 |
h1, #project-ancestors-title, #top-menu a {
|
| 4 | 4 |
font-family: Insider, 'Gill Sans', Tahoma, sans-serif; |
| public/themes/soundsoftware/stylesheets/fonts-mac.css | ||
|---|---|---|
| 1 |
@import url(fonts.css); |
|
| 1 |
@import url(fonts.css?2);
|
|
| 2 | 2 |
|
| 3 | 3 |
h1, #project-ancestors-title, #top-menu a {
|
| 4 | 4 |
font-family: Insider, "Lucida Grande", sans-serif; |
| public/themes/soundsoftware/stylesheets/fonts-ms.css | ||
|---|---|---|
| 1 |
@import url(fonts.css); |
|
| 1 |
@import url(fonts.css?2);
|
|
| 2 | 2 |
|
| 3 | 3 |
/* IE likes us to separate out normal & bold into different fonts |
| 4 | 4 |
rather than use the selectors on the same font */ |
| vendor/plugins/redmine_bibliography/app/views/projects/_bibliography_box.html.erb | ||
|---|---|---|
| 17 | 17 |
<dd> |
| 18 | 18 |
<%= link_to("[More Details]", {:controller => :publications, :action => :show, :id => publication.id, :project_id => @project.id}) -%>
|
| 19 | 19 |
|
| 20 |
<%= link_to_function "[Bibtex]", onclick="toggleBibtex(this)" -%>
|
|
| 20 |
<%= link_to_function "[B<small>IB</small>T<sub>E</sub>X]", onclick="toggleBibtex(this)" -%>
|
|
| 21 | 21 |
</dd> |
| 22 | 22 |
<dd class="bibtex-textarea collapsed" style="display: none;"> |
| 23 | 23 |
<textarea readonly><%= publication.print_entry(:bibtex) -%></textarea> |
| vendor/plugins/redmine_bibliography/app/views/publications/show.html.erb | ||
|---|---|---|
| 2 | 2 |
|
| 3 | 3 |
<div class="box"> |
| 4 | 4 |
<h3>Publication Info</h3> |
| 5 |
<%= show_cite_proc_entry(@publication)%>
|
|
| 5 |
<p><%= show_cite_proc_entry(@publication)%></p>
|
|
| 6 | 6 |
|
| 7 |
<h3>Bibtex Format</h3>
|
|
| 8 |
<%=h print_bibtex_entry(@publication) %>
|
|
| 7 |
<h3>B<small>IB</small>T<sub>E</sub>X Format</h3>
|
|
| 8 |
<pre><%=h print_bibtex_entry(@publication) %></pre>
|
|
| 9 | 9 |
</div> |
| 10 | 10 |
|
| 11 | 11 |
<div class="box"> |
| vendor/plugins/redmine_bibliography/assets/stylesheets/bibliography.css | ||
|---|---|---|
| 33 | 33 |
} |
| 34 | 34 |
|
| 35 | 35 |
|
| 36 |
div#bibliography dd { margin-bottom: 1em; padding-left: 18px; font-size: 0.9em; }
|
|
| 36 |
div#bibliography dd { margin-bottom: 1em; font-size: 0.9em; }
|
|
| 37 | 37 |
|
| 38 | 38 |
div#bibliography dd .authors { font-style: italic; }
|
| 39 | 39 |
div#bibliography dd span.authors { color: #808080; }
|
| 40 | 40 |
div#bibliography dd span.year { padding-left: 0.6em; }
|
| 41 | 41 |
|
| 42 | 42 |
div#bibliography .box dt {
|
| 43 |
background: url(../../../images/document.png) no-repeat 0% 50%; padding-left: 20px; |
|
| 44 |
margin-left: 2em; |
|
| 43 |
background: url(../../../images/document.png) no-repeat 0% 4px; |
|
| 44 |
padding-left: 20px; |
|
| 45 |
margin-left: 0; |
|
| 45 | 46 |
} |
| 46 | 47 |
div#bibliography .box dd {
|
| 47 |
margin-left: 25px; |
|
| 48 |
padding-left: 20px; |
|
| 49 |
margin-left: 0; |
|
| 48 | 50 |
} |
| 49 | 51 |
|
| 50 | 52 |
div#bibliography h3 {
|
| ... | ... | |
| 58 | 60 |
font: normal 8px; |
| 59 | 61 |
padding: 2px 10px; |
| 60 | 62 |
border: solid 1px #ddd; |
| 61 |
} |
|
| 63 |
} |
|
| vendor/plugins/redmine_tags/app/controllers/tags_controller.rb | ||
|---|---|---|
| 1 |
class TagsController < ApplicationController |
|
| 2 |
|
|
| 3 |
def index |
|
| 4 |
respond_to do |format| |
|
| 5 |
format.html {
|
|
| 6 |
render :template => 'tags/index.html.erb', :layout => !request.xhr? |
|
| 7 |
} |
|
| 8 |
format.api {
|
|
| 9 |
} |
|
| 10 |
format.atom {
|
|
| 11 |
} |
|
| 12 |
end |
|
| 13 |
end |
|
| 14 |
|
|
| 15 |
end |
|
| vendor/plugins/redmine_tags/app/views/projects/_tagcloud.html.erb | ||
|---|---|---|
| 1 |
<% content_for :header_tags do %> |
|
| 2 |
<%= stylesheet_link_tag 'redmine_tags', :plugin => 'redmine_tags' %> |
|
| 3 |
<% end %> |
|
| 4 | 1 |
|
| 5 | 2 |
<div id="tags"> |
| 6 | 3 |
<%= render_tags_list(Project.available_tags, :style => :cloud) %> |
| vendor/plugins/redmine_tags/app/views/tags/index.html.erb | ||
|---|---|---|
| 1 |
<% content_for :header_tags do %> |
|
| 2 |
<%= auto_discovery_link_tag(:atom, {:action => 'index', :format => 'atom', :key => User.current.rss_key}) %>
|
|
| 3 |
<%= stylesheet_link_tag 'redmine_tags', :plugin => 'redmine_tags' %> |
|
| 4 |
<% end %> |
|
| 5 |
|
|
| 6 |
|
|
| 7 |
<div style="clear:both;"></div> |
|
| 8 |
<h2> |
|
| 9 |
<%= l("label_project_tags_all") %>
|
|
| 10 |
</h2> |
|
| 11 |
|
|
| 12 |
<%= render_tags_list(Project.available_tags, :style => :cloud) %> |
|
| 13 |
|
|
Also available in: Unified diff