rfc can now be solved.
show.html still needs to be finished
This commit is contained in:
@@ -21,6 +21,11 @@
|
||||
<%= t('request_for_comments.no_question') %>
|
||||
<% end %>
|
||||
</h5>
|
||||
<% if (policy(@request_for_comment).mark_as_solved? and not @request_for_comment.solved?) %>
|
||||
<button class="btn btn-default" id="mark-as-solved-button">Bla</button>
|
||||
<% else %>
|
||||
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
@@ -37,6 +42,22 @@ also, all settings from the rails model needed for the editor configuration in t
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var solvedButton = $('#mark-as-solved-button');
|
||||
|
||||
solvedButton.on('click', function(event){
|
||||
var jqrequest = $.ajax({
|
||||
dataType: 'json',
|
||||
method: 'GET',
|
||||
url: location + '/mark_as_solved'
|
||||
});
|
||||
|
||||
jqrequest.done(function(response){
|
||||
if(response.solved){
|
||||
solvedButton.hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// set file paths for ace
|
||||
var ACE_FILES_PATH = '/assets/ace/';
|
||||
_.each(['modePath', 'themePath', 'workerPath'], function(attribute) {
|
||||
|
@@ -1 +1 @@
|
||||
json.extract! @request_for_comment, :id, :user_id, :exercise_id, :file_id, :requested_at, :created_at, :updated_at, :user_type
|
||||
json.extract! @request_for_comment, :id, :user_id, :exercise_id, :file_id, :requested_at, :created_at, :updated_at, :user_type, :solved
|
||||
|
Reference in New Issue
Block a user