Skip to content

Commit

Permalink
Cosmetic stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
teusbenschop committed Jan 4, 2025
1 parent 1991974 commit fbb91d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions styles/sheetm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,15 @@ std::string styles_sheetm (Webserver_Request& webserver_request)
}

std::string del = webserver_request.query["delete"];
if (del != "") {
if (!del.empty()) {
if (write) database_styles.deleteMarker (name, del);
}

std::stringstream markerblock;
std::map <std::string, std::string> markers_names = database_styles.getMarkersAndNames (name);
for (auto & item : markers_names) {
std::string marker = item.first;
std::string marker_name = item.second;
marker_name = translate (marker_name);
const std::string marker = item.first;
const std::string marker_name = translate(item.second);
markerblock << "<tr>";
markerblock << R"(<td><a href=")" << "view?sheet=" << name << "&style=" << marker << R"(">)" << marker << "</a></td>";
markerblock << "<td>" << marker_name << "</td>";
Expand Down
4 changes: 2 additions & 2 deletions styles/sheetm.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ <h1>translate("Stylesheet") ##name##</h1>
<table>
<thead>
<tr>
<td>translate("Style")</td>
<td>translate("Name")</td>
<td><b>translate("Style")</b></td>
<td><b>translate("Name")</b></td>
<td></td>
</tr>
</thead>
Expand Down

0 comments on commit fbb91d4

Please sign in to comment.