Revision 1360:45dbcd39b9e9
| 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/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/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/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 |
|
|
| plugins/redmine_bibliography/app/views/projects/_bibliography_box.html.erb | ||
|---|---|---|
| 18 | 18 |
<%= link_to(l("more_details_link"), {:controller => :publications, :action => :show, :id => publication.id, :project_id => @project.id}) -%>
|
| 19 | 19 |
|
| 20 | 20 |
<%= link_to l(:bibtex_link).html_safe, "javascript:void(0)", :class => "bibtex-link"-%> |
| 21 |
|
|
| 22 |
<%- unless publication.external_url.blank? -%> |
|
| 23 |
<%= link_to l(:external_url_link), publication.external_url, {:target => "_blank"} -%>
|
|
| 24 |
<%- end -%> |
|
| 25 |
|
|
| 26 |
|
|
| 21 | 27 |
</dd> |
| 22 | 28 |
<dd class="bibtex-textarea collapsed" style="display: none;"> |
| 23 | 29 |
<textarea readonly> <%= print_bibtex_format(publication) -%> </textarea> |
| plugins/redmine_bibliography/config/locales/en.yml | ||
|---|---|---|
| 150 | 150 |
|
| 151 | 151 |
bibtex_link: "[B<small>IB</small>T<sub>E</sub>X]" |
| 152 | 152 |
more_details_link: "[More Details]" |
| 153 |
external_url_link: "[URL (ext.)]" |
|
| 153 | 154 |
|
| plugins/redmine_tags/lib/redmine_tags/hooks/views_issues_hook.rb | ||
|---|---|---|
| 19 | 19 |
module RedmineTags |
| 20 | 20 |
module Hooks |
| 21 | 21 |
class ViewsIssuesHook < Redmine::Hook::ViewListener |
| 22 |
render_on :view_issues_show_details_bottom, :partial => 'issues/tags' |
|
| 23 |
render_on :view_issues_form_details_bottom, :partial => 'issues/tags_form' |
|
| 24 |
render_on :view_issues_sidebar_planning_bottom, :partial => 'issues/tags_sidebar' |
|
| 25 |
render_on :view_issues_bulk_edit_details_bottom, :partial => 'issues/tags_form' |
|
| 22 |
|
|
| 23 |
# TODO: temporary hack to disable tags on issues |
|
| 24 |
## BEGIN ~lf 20130712 |
|
| 25 |
|
|
| 26 |
# render_on :view_issues_show_details_bottom, :partial => '# issues/tags' |
|
| 27 |
# render_on :view_issues_form_details_bottom, :partial => '# issues/tags_form' |
|
| 28 |
# render_on :view_issues_sidebar_planning_bottom, :partial => '# issues/tags_sidebar' |
|
| 29 |
# render_on :view_issues_bulk_edit_details_bottom, :partial => 'issues/tags_form' |
|
| 30 |
|
|
| 31 |
## END ~lf 20130712 |
|
| 32 |
|
|
| 33 |
|
|
| 26 | 34 |
end |
| 27 | 35 |
end |
| 28 | 36 |
end |
| public/javascripts/repository.js | ||
|---|---|---|
| 1 |
function toggle_ext_url(){
|
|
| 2 |
if($('repository_is_external').checked)
|
|
| 3 |
$('repository_external_url').enable();
|
|
| 4 |
else |
|
| 5 |
$('repository_external_url').disable();
|
|
| 1 |
function toggle_ext_url() {
|
|
| 2 |
if (document.getElementById('repository_is_external').checked) {
|
|
| 3 |
document.getElementById('repository_external_url').disabled = false;
|
|
| 4 |
} else {
|
|
| 5 |
document.getElementById('repository_external_url').disabled = true;
|
|
| 6 |
} |
|
| 6 | 7 |
} |
| 7 | 8 |
|
Also available in: Unified diff