Patch #1022 ยป new_issue_anywhere.diff
| public/stylesheets/application.css (working copy) | ||
|---|---|---|
|
.task_todo { background:#aaa url(../images/task_todo.png); border: 1px solid #aaa; }
|
||
|
.milestone { background-image:url(../images/milestone.png); background-repeat: no-repeat; border: 0; }
|
||
|
#new-issue-menu { position: absolute; }
|
||
|
#new-issue-menu ul {
|
||
|
list-style: none;
|
||
|
background-color: white;
|
||
|
border-top:1px solid #ddd;
|
||
|
border-left:1px solid #ddd;
|
||
|
border-bottom:1px solid #777;
|
||
|
border-right:1px solid #777;
|
||
|
}
|
||
|
#new-issue-menu ul, #new-issue-menu li {
|
||
|
margin: 0;
|
||
|
padding: 0;
|
||
|
border: 0;
|
||
|
}
|
||
|
#new-issue-menu li { padding: 1px; }
|
||
|
#new-issue-menu a {
|
||
|
border:1px solid white;
|
||
|
text-decoration:none;
|
||
|
background-repeat: no-repeat;
|
||
|
background-position: 1px 50%;
|
||
|
padding: 2px 0px 2px 20px;
|
||
|
width:100%; /* IE */
|
||
|
}
|
||
|
/***** Icons *****/
|
||
|
.icon {
|
||
|
background-position: 0% 40%;
|
||
| public/javascripts/application.js (working copy) | ||
|---|---|---|
|
}
|
||
|
}
|
||
|
});
|
||
|
function toggleNewIssueMenu(e) {
|
||
|
if($('new-issue-menu').style.display == 'none') {
|
||
|
Element.show('new-issue-menu');
|
||
|
$('new-issue-menu').style.left = Event.pointerX(e)+'px';
|
||
|
$('new-issue-menu').style.top = Event.pointerY(e)+'px';
|
||
|
} else {
|
||
|
Element.hide('new-issue-menu');
|
||
|
}
|
||
|
}
|
||
| app/views/layouts/base.rhtml (working copy) | ||
|---|---|---|
|
</div>
|
||
|
<div id="ajax-indicator" style="display:none;"><span><%= l(:label_loading) %></span></div>
|
||
|
<div id="new-issue-menu" style="display:none;"><%= render :partial => "layouts/new_issue_menu" if User.current.memberships.any? %></div>
|
||
|
|
||
|
<div id="footer">
|
||
|
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) | ||
|---|---|---|
|
<% user_projects_by_root = User.current.projects.find(:all, :include => :parent).group_by(&:root) %>
|
||
|
<div>
|
||
|
<ul>
|
||
|
<% user_projects_by_root.keys.sort.each do |root| %>
|
||
|
<li><%= link_to h(root.name),:controller => :issues, :action => :new, :project_id => root %></li>
|
||
|
<% user_projects_by_root[root].sort.each do |project| %>
|
||
|
<% next if project == root %>
|
||
|
<li><%= link_to '» '+h(project.name), :controller => :issues, :action => :new, :project_id => project %></li>
|
||
|
<% end %>
|
||
|
<% end %>
|
||
|
</ul>
|
||
|
</div>
|
||
| lib/redmine.rb (working copy) | ||
|---|---|---|
|
menu.push :home, :home_url, :html => { :class => 'home' }
|
||
|
menu.push :my_page, { :controller => 'my', :action => 'page' }, :html => { :class => 'mypage' }, :if => Proc.new { User.current.logged? }
|
||
|
menu.push :projects, { :controller => 'projects', :action => 'index' }, :caption => :label_project_plural, :html => { :class => 'projects' }
|
||
|
menu.push :new_issue, '#', :caption => :label_issue_new, :html => {:onclick => "toggleNewIssueMenu(event);"}, :if => Proc.new { User.current.logged? }
|
||
|
menu.push :administration, { :controller => 'admin', :action => 'index' }, :html => { :class => 'admin' }, :if => Proc.new { User.current.admin? }
|
||
|
menu.push :help, Redmine::Info.help_url, :html => { :class => 'help' }
|
||
|
end
|
||