Skip to content

Commit

Permalink
Move the child totalizer to the all link.
Browse files Browse the repository at this point in the history
  • Loading branch information
arik-so committed Oct 24, 2024
1 parent 6ccdf70 commit 10095b9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/subcommand/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5210,7 +5210,7 @@ next
server.assert_response_regex(
format!("/inscription/{parent_inscription_id}"),
StatusCode::OK,
format!(".*<title>Inscription 0</title>.*<dt>children \\(1\\)</dt>.*<a href=/inscription/{inscription_id}>.*</a>.*"),
format!(".*<title>Inscription 0</title>.*<dt>children</dt>.*<a href=/inscription/{inscription_id}>.*</a>.*"),
);

assert_eq!(
Expand Down Expand Up @@ -5377,7 +5377,7 @@ next
.*<a href=/inscription/.*><iframe .* src=/preview/.*></iframe></a>.*
.*<a href=/inscription/.*><iframe .* src=/preview/.*></iframe></a>.*
<div class=center>
<a href=/children/{parent_inscription_id}>all</a>
<a href=/children/{parent_inscription_id}>all \\(5\\)</a>
</div>.*"
),
);
Expand Down
8 changes: 4 additions & 4 deletions src/templates/inscription.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,14 +286,14 @@ mod tests {
<div>❯</div>
</div>
<dl>
<dt>children \\(2\\)</dt>
<dt>children</dt>
<dd>
<div class=thumbnails>
<a href=/inscription/2{64}i2><iframe .* src=/preview/2{64}i2></iframe></a>
<a href=/inscription/3{64}i3><iframe .* src=/preview/3{64}i3></iframe></a>
</div>
<div class=center>
<a href=/children/1{64}i1>all</a>
<a href=/children/1{64}i1>all \\(2\\)</a>
</div>
</dd>
<dt>id</dt>
Expand Down Expand Up @@ -349,13 +349,13 @@ mod tests {
<div>❯</div>
</div>
<dl>
<dt>children \\(1\\)</dt>
<dt>children</dt>
<dd>
<div class=thumbnails>
<a href=/inscription/2{64}i2><iframe .* src=/preview/2{64}i2></iframe></a>
</div>
<div class=center>
<a href=/children/1{64}i1>all</a>
<a href=/children/1{64}i1>all \\(1\\)</a>
</div>
</dd>
<dt>id</dt>
Expand Down
4 changes: 2 additions & 2 deletions templates/inscription.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ <h1>Inscription {{ self.number }}</h1>
</dd>
%% }
%% if !self.children.is_empty() {
<dt>children ({{ self.child_count }})</dt>
<dt>children</dt>
<dd>
<div class=thumbnails>
%% for id in &self.children {
{{Iframe::thumbnail(*id)}}
%% }
</div>
<div class=center>
<a href=/children/{{self.id}}>all</a>
<a href=/children/{{self.id}}>all ({{ self.child_count }})</a>
</div>
</dd>
%% }
Expand Down
2 changes: 1 addition & 1 deletion tests/wallet/inscribe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ fn inscribe_with_parent_inscription_and_fee_rate() {
ord.assert_response_regex(
format!("/inscription/{}", child_output.parents.first().unwrap()),
format!(
".*<dt>children \\(1\\)</dt>.*<a href=/inscription/{}>.*",
".*<dt>children</dt>.*<a href=/inscription/{}>.*",
child_output.inscriptions[0].id
),
);
Expand Down

0 comments on commit 10095b9

Please sign in to comment.