Skip to content

Commit

Permalink
Merge pull request #9 from exo-do/features/reorganize-settings-panel
Browse files Browse the repository at this point in the history
Features/reorganize settings panel
  • Loading branch information
TheBronx authored Sep 9, 2021
2 parents 1d247d4 + fc2cf9b commit e9f50e3
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 34 deletions.
58 changes: 24 additions & 34 deletions public/templates/admin/plugins/reputation-rules.tpl
Original file line number Diff line number Diff line change
@@ -1,30 +1,26 @@
<form id="reputation-rules">
<div class="settings">

<div class="row">
<div class="col-sm-12 col-xs-12">
<p class="alert alert-info">Remember that upvotes give +1 point and downvotes -1 to the author. That is by default and w .</p>
</div>
</div>

<div class="row">
<div class="col-sm-2 col-xs-12 content-header">
Contents
</div>
<div class="col-sm-10 col-xs-12">
<nav class="section-content">
<ul>
<li><a href="#upvoting">Upvoting</a></li>
<li><a href="#upvoting-permissions">Upvoting Permissions</a></li>
<li><a href="#upvotes">Upvotes</a></li>
<li><a href="#upvotes">Upvote weight</a></li>
<li><a href="#downvoting">Downvoting</a></li>
<li><a href="#downvoting-permissions">Downvoting Permissions</a></li>
<li><a href="#downvotes">Downvotes</a></li>
<li><a href="#downvotes">Downvote weight</a></li>
<li><a href="#global-configuration">Global Configuration</a></li>
<li><a href="#save-reload">Save and Reload</a></li>
</ul>
</nav>
</div>
</div>

<h1><a name="upvoting"></a>Upvoting</h1>

<div class="row">
<div class="col-sm-2 col-xs-12 settings-header"><a name="upvoting-permissions"></a>Upvoting Permissions</div>
<div class="col-sm-10 col-xs-12">
Expand All @@ -45,7 +41,7 @@
</div>

<div class="row">
<div class="col-sm-2 col-xs-12 settings-header"><a name="upvotes"></a>Upvotes</div>
<div class="col-sm-2 col-xs-12 settings-header"><a name="upvotes"></a>Upvote weight</div>
<div class="col-sm-10 col-xs-12">
<div class="form-group">
<!-- (UPVOTE_EXTRA_PERCENTAGE) -->
Expand All @@ -65,6 +61,8 @@
</div>
</div>

<h1><a name="downvoting"></a>Downvoting</h1>

<div class="row">
<div class="col-sm-2 col-xs-12 settings-header"><a name="downvoting-permissions"></a>Downvoting Permissions</div>
<div class="col-sm-10 col-xs-12">
Expand Down Expand Up @@ -99,7 +97,7 @@
</div>

<div class="row">
<div class="col-sm-2 col-xs-12 settings-header"><a name="downvotes"></a>Downvotes</div>
<div class="col-sm-2 col-xs-12 settings-header"><a name="downvotes"></a>Downvote weight</div>
<div class="col-sm-10 col-xs-12">
<div class="form-group">
<!-- (DOWNVOTE_EXTRA_PERCENTAGE) -->
Expand All @@ -109,26 +107,28 @@
<br>
</div>

<div class="form-group">
<!-- (DOWNVOTE_PENALIZATION) -->
<label>Downvote penalization (amount of points to remove from user who downvotes):</label>
<input class="form-control" type="number" data-key="downvotePenalization" title="Downvote penalization">
<p class="help-block">Think of this as the cost of downvoting, so users don't downvote just for fun.</p>
<br>
</div>

<div class="form-group">
<!-- (MAX_POINTS_FOR_DOWNVOTE) -->
<label>Max downvote weight (points):</label>
<input class="form-control" type="number" data-key="maxDownvoteWeight" title="Max downvote points">
<p class="help-block">If this max is 10, a downvote will subtract up to 11 points (1 by default plus 10 extra).</p>
<br>
</div>

<div class="form-group">
<!-- (DOWNVOTE_PENALIZATION) -->
<label>Downvote penalization (amount of points to remove from user who downvotes):</label>
<input class="form-control" type="number" data-key="downvotePenalization" title="Downvote penalization">
<p class="help-block">Think of this as the cost of downvoting, so users don't downvote just for fun.</p>
<br>
</div>
</div>
</div>

<h1><a name="global-configuration"></a>Global configuration</h1>

<div class="row">
<div class="col-sm-2 col-xs-12 settings-header"><a name="global-configuration"></a>Global Configuration</div>
<div class="col-sm-2 col-xs-12 settings-header">Global Configuration</div>
<div class="col-sm-10 col-xs-12">
<div class="form-group">
<!-- RULE 4 -->
Expand Down Expand Up @@ -171,18 +171,9 @@
</div>
</div>

<div class="row">
<div class="col-sm-2 col-xs-12 settings-header"><a name="save-reload"></a>Apply settings</div>
<div class="col-sm-10 col-xs-12">
<div class="form-group">
<div class="col-xs-12 col-md-6 form-group">
<button type="button" class="btn btn-success form-control" id="save">
<i class="fa fa-fw fa-save"></i> Save and Apply
</button>
</div>
</div>
</div>
</div>
<button id="save" class="floating-button mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect mdl-button--colored" data-upgraded=",MaterialButton,MaterialRipple">
<i class="material-icons">save</i>
<span class="mdl-button__ripple-container"><span class="mdl-ripple"></span></span></button>

</div>

Expand All @@ -202,7 +193,6 @@ require(['settings'], function(settings) {
$('#reputation-rules').find('input').val('');
});
var wrapper = $("#reputation-rules");
settings.sync('reputation-rules', wrapper);
$('#save').click(function(event){
Expand Down
Binary file modified reputation-rules-acp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e9f50e3

Please sign in to comment.