some howto text for request_for_comment usage, changed background color of read-only editor.

This commit is contained in:
Ralf Teusner
2017-03-15 16:15:29 +01:00
parent fce6bb3410
commit 8f927d5ac9
4 changed files with 19 additions and 2 deletions

View File

@ -1,4 +1,5 @@
#commentitor {
margin-top: 2rem;
height: 600px;
background-color:#f9f9f9
}

View File

@ -41,14 +41,18 @@
</ul>
</h5>
<% end %>
<h5>
<u><%= t('request_for_comments.howto_title') %></u><br> <%= render_markdown(t('request_for_comments.howto')) %>
</h5>
</div>
<hr>
<!--
do not put a carriage return in the line below. it will be present in the presentation of the source code, otherwise.
also, all settings from the rails model needed for the editor configuration in the JavaScript are attached to the editor as data attributes here.
-->
<% submission.files.each do |file| %>
<%= (file.path or "") + "/" + file.name + file.file_type.file_extension %>
<%= (file.path or "") + "/" + file.name + file.file_type.file_extension %><br>
&nbsp;&nbsp;<i class="fa fa-arrow-down" aria-hidden="true"></i> <%= t('request_for_comments.click_here') %>
<div id='commentitor' class='editor' data-read-only='true' data-file-id='<%=file.id%>' data-mode='<%=file.file_type.editor_mode%>'><%= file.content %>
</div>
<% end %>

View File

@ -360,7 +360,13 @@ de:
body: 'Bitte besuchen Sie %{link}, sofern Sie Ihr Passwort zurücksetzen wollen.'
subject: Anweisungen zum Zurücksetzen Ihres Passworts
request_for_comments:
click_here: Zum Kommentieren auf die Seitenleiste klicken!
comments: Kommentare
howto: |
Um Kommentare zu einer Programmzeile hinzuzufügen, kann einfach auf die jeweilige Zeilennummer auf der linken Seite geklickt werden. <br>
Es öffnet sich ein Textfeld, in dem der Kommentar eingetragen werden kann. <br>
Mit "Kommentieren" wird der Kommentar dann gesichert und taucht als Sprechblase neben der Zeile auf.
howto_title: 'Anleitung:'
index:
get_my_comment_requests: Meine Kommentaranfragen
all: "Alle Kommentaranfragen"

View File

@ -381,7 +381,13 @@ en:
body: 'Please visit %{link} if you want to reset your password.'
subject: Password reset instructions
request_for_comments:
click_here: Click on this sidebar to comment!
comments: Comments
howto: |
To leave comments to a specific code line, click on the respective line number. <br>
Enter your comment in the popup and save it by clicking "Comment this". <br>
Your comment will show up next to the line number as a speech bubble symbol.
howto_title: 'How to comment:'
index:
all: All Requests for Comments
get_my_comment_requests: My Requests for Comments