Author
|
zPlus <zplus@peers.community>
2022-08-09 18:02:31
|
Committer
|
zPlus <zplus@peers.community>
2022-08-09 18:02:31
|
Commit
|
aa65aa5
(patch)
|
Tree
|
4988439
|
Parent(s)
|
|
Split commits (subject, body) lines in log page.
Split the commit message into "subject" and "body", and show them in a
<details> tag.
commits diff:
ea6af13..aa65aa5
1 file changed,
4 insertions,
3 deletions
—
download
Diffstat
Diff options
+4/-3
M templates/repository/log.html
59
|
59
|
|
<a href="{{ url('commit', repository=repository[:-4], commit_id=commit.id) }}">{{ commit.short_id }}</a>
|
60
|
60
|
|
</td>
|
61
|
61
|
|
<td class="message">
|
62
|
|
- |
{% if commit.message|length <= 100 %}
|
|
62
|
+ |
{% set subject, body = commit.message.split('\n', 1) %}
|
|
63
|
+ |
{% if body|length == 0 %}
|
63
|
64
|
|
{{ commit.message }}
|
64
|
65
|
|
{% else %}
|
65
|
66
|
|
<details>
|
66
|
|
- |
<summary>{{ commit.message[:100] }} ...</summary>
|
67
|
|
- |
<div class="fulltext">{{ commit.message }}</div>
|
|
67
|
+ |
<summary>{{ subject }}</summary>
|
|
68
|
+ |
<div class="fulltext">{{ body.strip() }}</div>
|
68
|
69
|
|
</details>
|
69
|
70
|
|
{% endif %}
|
70
|
71
|
|
</td>
|