diff options
author | 2011-05-03 21:09:59 +0200 | |
---|---|---|
committer | 2011-05-03 21:09:59 +0200 | |
commit | a1631f3a69094ddece84e7af69a7d2f56736ee2f (patch) | |
tree | f391d76b645328402ea897a896b7f98a93ec2501 /app | |
parent | glsa_controller/glsa model: Allow for re-releases (updated revisions) of sent... (diff) | |
download | glsamaker-a1631f3a69094ddece84e7af69a7d2f56736ee2f.tar.gz glsamaker-a1631f3a69094ddece84e7af69a7d2f56736ee2f.tar.bz2 glsamaker-a1631f3a69094ddece84e7af69a7d2f56736ee2f.zip |
Extract comment box into an own partial. Add dock ability.
Diffstat (limited to 'app')
-rw-r--r-- | app/views/glsa/_comments.html.erb | 16 | ||||
-rw-r--r-- | app/views/glsa/addcomment.html.erb | 4 | ||||
-rw-r--r-- | app/views/glsa/edit.html.erb | 18 | ||||
-rw-r--r-- | app/views/glsa/show.html.erb | 4 |
4 files changed, 25 insertions, 17 deletions
diff --git a/app/views/glsa/_comments.html.erb b/app/views/glsa/_comments.html.erb new file mode 100644 index 0000000..e36c015 --- /dev/null +++ b/app/views/glsa/_comments.html.erb @@ -0,0 +1,16 @@ + <div class="box" id="comments"> + <h2> + <span class="toolbar"> + <a href="javascript://" onclick="addCommentDialog(<%= @glsa.id %>);" title="Add comment"> + <img src="/images/icons/plus.png" alt="Add comment" /> + </a> + <a href="javascript://" onclick="GLSAMaker.misc.ui.dock($('comments'));" title="Dock right"> + <img src="/images/icons/dock-right.png" alt="Dock right" /> + </a> + </span> + <img src="/images/icons/comment.png" alt="comment" /> Comments + </h2> + <ul id="commentslist"> + <%= render :partial => "comment", :collection => @glsa.comments %> + </ul> + </div>
\ No newline at end of file diff --git a/app/views/glsa/addcomment.html.erb b/app/views/glsa/addcomment.html.erb index 203ae73..eb925ae 100644 --- a/app/views/glsa/addcomment.html.erb +++ b/app/views/glsa/addcomment.html.erb @@ -13,7 +13,9 @@ Please enter your comment:</label></p> <% fields_for :newcomment do |f| %> - <%= f.text_area :text, :class => "hugetext nice", :rows => 2 %> + <p> + <%= f.text_area :text, :class => "nice", :rows => 2 %> + </p> <div align="right"> Rating: diff --git a/app/views/glsa/edit.html.erb b/app/views/glsa/edit.html.erb index 17fd9f7..567ebc5 100644 --- a/app/views/glsa/edit.html.erb +++ b/app/views/glsa/edit.html.erb @@ -60,20 +60,8 @@ <%= render :partial => "edit_bug_row", :collection => @rev.bugs, :as => :bug %> </table> </div> - - <div class="box"> - <h2> - <span class="toolbar"> - <a href="javascript://" onclick="addCommentDialog(<%= @glsa.id %>);" title="Add comment"> - <img src="/images/icons/plus.png" alt="Add comment" /> - </a> - </span> - <img src="/images/icons/comment.png" alt="comment" /> Comments - </h2> - <ul id="commentslist"> - <%= render :partial => "comment", :collection => @glsa.comments %> - </ul> - </div> + + <%= render :partial => "comments" %> <div style="text-align: right;"> <input type="submit" class="button" style="font-size: 150%;" value="Save →" /> @@ -160,7 +148,7 @@ </a> </span> <img src="/images/icons/impact.png" alt="Impact" /> - <label for="Impact">Impact</label> + <label for="impact">Impact</label> </h2> <p><textarea name="glsa[impact]" id="impact" class="nice" rows="5"><%= h lastrev_content(@glsa, 'impact') %></textarea></p> </div> diff --git a/app/views/glsa/show.html.erb b/app/views/glsa/show.html.erb index ab481ba..9193fcf 100644 --- a/app/views/glsa/show.html.erb +++ b/app/views/glsa/show.html.erb @@ -60,7 +60,9 @@ <table id="bugtable"> <%= render :partial => "show_bug_row", :collection => @glsa.last_revision.bugs, :as => :bug %> </table> - </div> + </div> + + <%= render :partial => "comments" %> </div> <p> |