diff options
author | Christian Klinger | 2016-06-24 13:02:38 +0200 |
---|---|---|
committer | Christian Klinger | 2016-06-24 13:02:38 +0200 |
commit | 5394876236afc3eb724ceebeac08abbbd9f2382b (patch) | |
tree | 6175a968d612dc24e5e41b6de70ad7b15e876f99 /modules-available/news/templates | |
parent | [exams] Apply formatting (diff) | |
download | slx-admin-5394876236afc3eb724ceebeac08abbbd9f2382b.tar.gz slx-admin-5394876236afc3eb724ceebeac08abbbd9f2382b.tar.xz slx-admin-5394876236afc3eb724ceebeac08abbbd9f2382b.zip |
also allow users to edit the help.
The code is still a little ugly.
Diffstat (limited to 'modules-available/news/templates')
-rw-r--r-- | modules-available/news/templates/page-news.html | 129 |
1 files changed, 88 insertions, 41 deletions
diff --git a/modules-available/news/templates/page-news.html b/modules-available/news/templates/page-news.html index 8e400498..e29d85fb 100644 --- a/modules-available/news/templates/page-news.html +++ b/modules-available/news/templates/page-news.html @@ -1,10 +1,13 @@ -<div class="panel panel-default"> - <div class="panel-heading"> - {{lang_editNews}} - </div> - <div class="panel-body"> - <p>{{lang_newsIntro}}</p> + +<ul class="nav nav-tabs" role="tablist"> + <li role="presentation" class="{{^editHelp}}active{{/editHelp}}"><a href="#news" role="tab" data-toggle="tab">{{lang_editNews}}</a></li> + <li role="presentation" class="{{#editHelp}}active{{/editHelp}}" ><a href="#help" role="tab" data-toggle="tab">Edit Help</a></li> +</ul> + +<div class="tab-content"> + <div role="tabpanel" class="tab-pane {{^editHelp}}active{{/editHelp}}" id="news" style="padding:5px"> <form action="?do=News&action=save" method="post"> + <p>{{lang_newsIntro}}</p> <div class="form-group"> <label for="news-title-id">{{lang_title}}</label> <input type="text" name="news-title" id ="news-title-id" class="form-control" placeholder="{{welcome}}" value="{{latestTitle}}"> @@ -14,44 +17,88 @@ <textarea name="news-content" id ="news-content-id" class="form-control" rows="5" cols="30" placeholder="">{{latestContent}}</textarea> </div> <p>{{lang_latestUpdate}}: {{latestDate}}</p> - <button class="btn btn-primary btn-sm" type="submit">{{lang_save}}</button> + <button class="btn btn-primary btn-sm" name="news-type" value="news" type="submit">{{lang_save}}</button> <input type="hidden" name="token" value="{{token}}"> </form> + <br/> + <div class="panel panel-default"> + <div class="panel-heading"> + {{lang_newsOld}} + </div> + <div class="panel-body"> + <div class="table-responsive"> + <form method="post" action="?do=News&action=delete"> + <table class="table table-stripped table-condensed"> + <thead> + <tr> + <th>{{lang_date}}</th> + <th>{{lang_title}}</th> + <th>{{lang_content}}</th> + <th></th> + </tr> + </thead> + <tbody> + {{#list}} + <tr {{#active}}class="active"{{/active}}> + <td class="text-left nowrap">{{date}}</td> + <td class="slx-ellipsis">{{title}}</td> + <td class="slx-ellipsis">{{content}}</td> + <td> + <a class="btn btn-primary btn-xs" href="?do=news&newsid={{newsid}}&action=show"><span class="glyphicon glyphicon-share-alt"></span> {{lang_show}}</a> + <button class="btn btn-danger btn-xs" type="submit" name="newsid" value="{{newsid}}"><span class="glyphicon glyphicon-remove"></span> {{lang_delete}}</button> + </td> + </tr> + {{/list}} + </tbody> + </table> + <input type="hidden" name="token" value="{{token}}"> + </form> + </div> + </div> + </div> </div> -</div> - -<div class="panel panel-default"> - <div class="panel-heading"> - {{lang_newsOld}} - </div> - <div class="panel-body"> - <div class="table-responsive"> - <form method="post" action="?do=News&action=delete"> - <input type="hidden" name="token" value="{{token}}"> - <table class="table table-stripped table-condensed"> - <thead> - <tr> - <th>{{lang_date}}</th> - <th>{{lang_title}}</th> - <th>{{lang_content}}</th> - <th></th> - </tr> - </thead> - <tbody> - {{#list}} - <tr {{#active}}class="active"{{/active}}> - <td class="text-left nowrap">{{date}}</td> - <td class="slx-ellipsis">{{title}}</td> - <td class="slx-ellipsis">{{content}}</td> - <td> - <a class="btn btn-primary btn-xs" href="?do=news&newsid={{newsid}}&action=show"><span class="glyphicon glyphicon-share-alt"></span> {{lang_show}}</a> - <button class="btn btn-danger btn-xs" type="submit" name="newsid" value="{{newsid}}"><span class="glyphicon glyphicon-remove"></span> {{lang_delete}}</button> - </td> - </tr> - {{/list}} - </tbody> - </table> - </form> + <div role="tabpanel" class="tab-pane {{#editHelp}}active{{/editHelp}}" id="help"> + <form action="?do=News&action=save" method="post"> + <div class="form-group"> + <label for="news-content-id">{{lang_content}}</label> + <textarea name="help-content" id ="help-content-id" class="form-control" rows="5" cols="30" placeholder="">{{latestHelp}}</textarea> + </div> + <button class="btn btn-primary btn-sm" name="news-type" value="help" type="submit">{{lang_save}}</button> + <input type="hidden" name="token" value="{{token}}"> + </form> + <div class="panel panel-default"> + <div class="panel-heading"> + {{lang_oldHelp}} + </div> + <div class="panel-body"> + <div class="table-responsive"> + <form method="post" action="?do=News&action=delete&editHelp=true"> + <table class="table table-stripped table-condensed"> + <thead> + <tr> + <th>{{lang_date}}</th> + <th>{{lang_content}}</th> + <th></th> + </tr> + </thead> + <tbody> + {{#listHelp}} + <tr {{#active}}class="active"{{/active}}> + <td class="text-left nowrap">{{date}}</td> + <td class="slx-ellipsis">{{content}}</td> + <td> + <a class="btn btn-primary btn-xs" href="?do=news&newsid={{newsid}}&action=show"><span class="glyphicon glyphicon-share-alt"></span> {{lang_show}}</a> + <button class="btn btn-danger btn-xs" type="submit" name="newsid" value="{{newsid}}"><span class="glyphicon glyphicon-remove"></span> {{lang_delete}}</button> + </td> + </tr> + {{/listHelp}} + </tbody> + </table> + <input type="hidden" name="token" value="{{token}}"> + </form> + </div> + </div> </div> </div> </div> + |