Skip to content

Commit

Permalink
Fix part of oppia#3950: Replace Jinja template in frontend with Angul…
Browse files Browse the repository at this point in the history
…ar (oppia#4050)

fix part of: oppia#3950
  • Loading branch information
ishucr7 authored and seanlip committed Nov 2, 2017
1 parent bb4143a commit e35f971
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 6 deletions.
23 changes: 23 additions & 0 deletions core/templates/dev/head/pages/forum/Forum.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Copyright 2014 The Oppia Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS-IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/**
* @fileoverview Data and controllers for the Oppia 'forum' page.
*/

oppia.controller('Forum', [
'$scope', function($scope) {
$scope.DEV_MODE = GLOBALS.DEV_MODE;
}
]);
15 changes: 9 additions & 6 deletions core/templates/dev/head/pages/forum/forum.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@
</style>

<div class="container">
<div class="oppia-forum">
{% if on_localhost %}
<div class="oppia-warning">
<strong>Warning:</strong> This page may not display correctly on localhost. To view it, change 'localhost' to '127.0.0.1' in the URL bar.
</div>
{% endif %}
<div class="oppia-forum" ng-controller="Forum">
<div ng-if="DEV_MODE" class="oppia-warning">
<strong>Warning:</strong> This page may not display correctly on localhost. To view it, change 'localhost' to '127.0.0.1' in the URL bar.
</div>

<iframe src="{{full_google_group_url}}" frameborder="0" height="1300" style="width: 100%;">
</iframe>
Expand All @@ -37,3 +35,8 @@
{% block footer%}
{% include 'pages/footer.html' %}
{% endblock %}

{% block footer_js %}
{{ super() }}
<script src="{{TEMPLATE_DIR_PREFIX}}/pages/forum/Forum.js"></script>
{% endblock footer_js %}

0 comments on commit e35f971

Please sign in to comment.