Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
AE
Sith
Commits
525b047b
Commit
525b047b
authored
Dec 05, 2018
by
Sli
Committed by
Skia
Dec 13, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
forum: display search bar on every forum pages
parent
404b825d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
8 deletions
+14
-8
forum/templates/forum/forum.jinja
forum/templates/forum/forum.jinja
+2
-1
forum/templates/forum/macros.jinja
forum/templates/forum/macros.jinja
+6
-0
forum/templates/forum/main.jinja
forum/templates/forum/main.jinja
+2
-5
forum/templates/forum/reply.jinja
forum/templates/forum/reply.jinja
+2
-1
forum/templates/forum/topic.jinja
forum/templates/forum/topic.jinja
+2
-1
No files found.
forum/templates/forum/forum.jinja
View file @
525b047b
{%
extends
"core/base.jinja"
%}
{%
from
'forum/macros.jinja'
import
display_forum
,
display_topic
%}
{%
from
'forum/macros.jinja'
import
display_forum
,
display_topic
,
display_search_bar
%}
{%
block
title
%}
{{
forum
}}
...
...
@@ -12,6 +12,7 @@
>
<a
href=
"
{{
f.get_absolute_url
()
}}
"
>
{{
f
}}
</a>
{%
endfor
%}
>
<a
href=
"
{{
forum.get_absolute_url
()
}}
"
>
{{
forum
}}
</a>
{{
display_search_bar
()
}}
</div>
<div
id=
"forum"
>
<h3>
{{
forum.name
}}
</h3>
...
...
forum/templates/forum/macros.jinja
View file @
525b047b
...
...
@@ -155,3 +155,9 @@
{{
m.mark_as_read
(
user
)
or
""
}}
{%
endmacro
%}
{%
macro
display_search_bar
()
%}
<form
action=
"
{{
url
(
'forum:search'
)
}}
"
method=
"GET"
style=
"text-align: right;"
>
<input
type=
"text"
placeholder=
"
{%
trans
%}
Search
{%
endtrans
%}
"
name=
"query"
/>
<input
type=
"submit"
value=
"
{%
trans
%}
Search
{%
endtrans
%}
"
/>
</form>
{%
endmacro
%}
forum/templates/forum/main.jinja
View file @
525b047b
{%
extends
"core/base.jinja"
%}
{%
from
'core/macros.jinja'
import
user_profile_link
%}
{%
from
'forum/macros.jinja'
import
display_forum
%}
{%
from
'forum/macros.jinja'
import
display_forum
,
display_search_bar
%}
{%
block
title
%}
{%
trans
%}
Forum
{%
endtrans
%}
...
...
@@ -12,6 +12,7 @@
</p>
<div
id=
"forum"
>
<h3>
{%
trans
%}
Forum
{%
endtrans
%}
</h3>
{{
display_search_bar
()
}}
<p>
<a
class=
"ib button"
href=
"
{{
url
(
'forum:last_unread'
)
}}
"
>
{%
trans
%}
View last unread messages
{%
endtrans
%}
</a>
<a
class=
"ib button"
href=
"
{{
url
(
'forum:favorite_topics'
)
}}
"
>
{%
trans
%}
Favorite topics
{%
endtrans
%}
</a>
...
...
@@ -21,10 +22,6 @@
<a
href=
"
{{
url
(
'forum:new_forum'
)
}}
"
>
{%
trans
%}
New forum
{%
endtrans
%}
</a>
</p>
{%
endif
%}
<form
action=
"
{{
url
(
'forum:search'
)
}}
"
method=
"GET"
id=
"header_search"
>
<input
type=
"text"
placeholder=
"
{%
trans
%}
Search
{%
endtrans
%}
"
name=
"query"
id=
"search"
/>
<input
type=
"submit"
value=
"
{%
trans
%}
Search
{%
endtrans
%}
"
style=
"display: none;"
/>
</form>
<div>
<div
class=
"ib w_big"
>
{%
trans
%}
Title
{%
endtrans
%}
...
...
forum/templates/forum/reply.jinja
View file @
525b047b
{%
extends
"core/base.jinja"
%}
{%
from
'forum/macros.jinja'
import
display_message
%}
{%
from
'forum/macros.jinja'
import
display_message
,
display_search_bar
%}
{%
block
title
%}
{%
if
topic
%}
...
...
@@ -11,6 +11,7 @@
{%
block
content
%}
{%
if
topic
%}
{{
display_search_bar
()
}}
<p>
<a
href=
"
{{
url
(
'forum:main'
)
}}
"
>
{%
trans
%}
Forum
{%
endtrans
%}
</a>
{%
for
f
in
topic.forum.get_parent_list
()
%}
...
...
forum/templates/forum/topic.jinja
View file @
525b047b
{%
extends
"core/base.jinja"
%}
{%
from
'core/macros.jinja'
import
user_profile_link
%}
{%
from
'forum/macros.jinja'
import
display_message
%}
{%
from
'forum/macros.jinja'
import
display_message
,
display_search_bar
%}
{%
block
title
%}
{{
topic
}}
...
...
@@ -27,6 +27,7 @@
{%
block
content
%}
<p>
{{
display_search_bar
()
}}
<a
href=
"
{{
url
(
'forum:main'
)
}}
"
>
{%
trans
%}
Forum
{%
endtrans
%}
</a>
{%
for
f
in
topic.forum.get_parent_list
()
|
reverse
%}
>
<a
href=
"
{{
f.get_absolute_url
()
}}
"
>
{{
f
}}
</a>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment