| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
#pragma once |
| 22 |
|
| 23 |
#include <map> |
| 24 |
#include <string> |
| 25 |
|
| 26 |
#include "Server/Web/HtmlTagButton.h" |
| 27 |
|
| 28 |
namespace Server { namespace Web |
| 29 |
{ |
| 30 |
class HtmlTagButtonSwapRelation : public HtmlTagButton |
| 31 |
{ |
| 32 |
public: |
| 33 |
HtmlTagButtonSwapRelation() = delete; |
| 34 |
HtmlTagButtonSwapRelation(HtmlTagButtonSwapRelation&) = delete; |
| 35 |
HtmlTagButtonSwapRelation& operator=(HtmlTagButtonSwapRelation&) = delete; |
| 36 |
|
| 37 |
inline HtmlTagButtonSwapRelation(const std::string& atlock, const std::string& priority, const bool up) |
| 38 |
: HtmlTagButton(HtmlTag("span").AddContent(up ? "↑" : "↓"), "swap_relation_" + priority + "_" + std::string(up ? "up" : "down")) |
| 39 |
{ |
| 40 |
AddAttribute("onclick", "swapRelations('" + atlock + "', " + priority + ", '" + std::string(up ? "up" : "down") + "'); return false;"); |
| 41 |
AddClass("small_button"); |
| 42 |
} |
| 43 |
}; |
| 44 |
}} |