Patch #1022 ยป new_issue_anywhere.diff
public/stylesheets/application.css (working copy) | ||
---|---|---|
506 | 506 |
.task_todo { background:#aaa url(../images/task_todo.png); border: 1px solid #aaa; } |
507 | 507 |
.milestone { background-image:url(../images/milestone.png); background-repeat: no-repeat; border: 0; } |
508 | 508 | |
509 |
#new-issue-menu { position: absolute; } |
|
510 |
#new-issue-menu ul { |
|
511 |
list-style: none; |
|
512 |
background-color: white; |
|
513 |
border-top:1px solid #ddd; |
|
514 |
border-left:1px solid #ddd; |
|
515 |
border-bottom:1px solid #777; |
|
516 |
border-right:1px solid #777; |
|
517 |
} |
|
518 |
#new-issue-menu ul, #new-issue-menu li { |
|
519 |
margin: 0; |
|
520 |
padding: 0; |
|
521 |
border: 0; |
|
522 |
} |
|
523 |
#new-issue-menu li { padding: 1px; } |
|
524 |
#new-issue-menu a { |
|
525 |
border:1px solid white; |
|
526 |
text-decoration:none; |
|
527 |
background-repeat: no-repeat; |
|
528 |
background-position: 1px 50%; |
|
529 |
padding: 2px 0px 2px 20px; |
|
530 |
width:100%; /* IE */ |
|
531 |
} |
|
532 | ||
509 | 533 |
/***** Icons *****/ |
510 | 534 |
.icon { |
511 | 535 |
background-position: 0% 40%; |
public/javascripts/application.js (working copy) | ||
---|---|---|
120 | 120 |
} |
121 | 121 |
} |
122 | 122 |
}); |
123 | ||
124 |
function toggleNewIssueMenu(e) { |
|
125 |
if($('new-issue-menu').style.display == 'none') { |
|
126 |
Element.show('new-issue-menu'); |
|
127 |
$('new-issue-menu').style.left = Event.pointerX(e)+'px'; |
|
128 |
$('new-issue-menu').style.top = Event.pointerY(e)+'px'; |
|
129 |
} else { |
|
130 |
Element.hide('new-issue-menu'); |
|
131 |
} |
|
132 |
} |
app/views/layouts/base.rhtml (working copy) | ||
---|---|---|
56 | 56 |
</div> |
57 | 57 | |
58 | 58 |
<div id="ajax-indicator" style="display:none;"><span><%= l(:label_loading) %></span></div> |
59 |
<div id="new-issue-menu" style="display:none;"><%= render :partial => "layouts/new_issue_menu" if User.current.memberships.any? %></div> |
|
59 | 60 |
|
60 | 61 |
<div id="footer"> |
61 | 62 |
Powered by <%= link_to Redmine::Info.app_name, Redmine::Info.url %> © 2006-2008 Jean-Philippe Lang |
app/views/layouts/_new_issue_menu.rhtml (revision 0) | ||
---|---|---|
1 |
<% user_projects_by_root = User.current.projects.find(:all, :include => :parent).group_by(&:root) %> |
|
2 |
<div> |
|
3 |
<ul> |
|
4 |
<% user_projects_by_root.keys.sort.each do |root| %> |
|
5 |
<li><%= link_to h(root.name),:controller => :issues, :action => :new, :project_id => root %></li> |
|
6 |
<% user_projects_by_root[root].sort.each do |project| %> |
|
7 |
<% next if project == root %> |
|
8 |
<li><%= link_to '» '+h(project.name), :controller => :issues, :action => :new, :project_id => project %></li> |
|
9 |
<% end %> |
|
10 |
<% end %> |
|
11 |
</ul> |
|
12 |
</div> |
lib/redmine.rb (working copy) | ||
---|---|---|
96 | 96 |
menu.push :home, :home_url, :html => { :class => 'home' } |
97 | 97 |
menu.push :my_page, { :controller => 'my', :action => 'page' }, :html => { :class => 'mypage' }, :if => Proc.new { User.current.logged? } |
98 | 98 |
menu.push :projects, { :controller => 'projects', :action => 'index' }, :caption => :label_project_plural, :html => { :class => 'projects' } |
99 |
menu.push :new_issue, '#', :caption => :label_issue_new, :html => {:onclick => "toggleNewIssueMenu(event);"}, :if => Proc.new { User.current.logged? } |
|
99 | 100 |
menu.push :administration, { :controller => 'admin', :action => 'index' }, :html => { :class => 'admin' }, :if => Proc.new { User.current.admin? } |
100 | 101 |
menu.push :help, Redmine::Info.help_url, :html => { :class => 'help' } |
101 | 102 |
end |