diff --git a/app/views/messages/_form.html.erb b/app/views/messages/_form.html.erb index 04940dbd..931b472c 100644 --- a/app/views/messages/_form.html.erb +++ b/app/views/messages/_form.html.erb @@ -19,7 +19,12 @@ <% if !replying && !@message.new_record? && @message.safe_attribute?('board_id') %>


- <%= f.select :board_id, boards_options_for_select(@message.project.boards) %>

+ <%# modify by nwb%> + <% if @message.project %> + <%= f.select :board_id, boards_options_for_select(@message.project.boards) %>

+ <% elsif @message.course %> + <%= f.select :board_id, boards_options_for_select(@message.course.boards) %>

+ <% end %> <% end %>

diff --git a/app/views/messages/edit.html.erb b/app/views/messages/edit.html.erb index b7f59129..2577a463 100644 --- a/app/views/messages/edit.html.erb +++ b/app/views/messages/edit.html.erb @@ -1,4 +1,8 @@ -<%= board_breadcrumb(@message) %> +<% if @message.project %> + <%= board_breadcrumb(@message) %> +<% elsif @message.course %> + <%= course_board_breadcrumb(@message) %> +<% end %>

<%= avatar(@topic.author, :size => "24") %><%=h @topic.subject %>