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 / Register
Toggle navigation
Open sidebar
grouprise
grouprise
Commits
ee57e9ee
Commit
ee57e9ee
authored
Feb 08, 2021
by
Robert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add links to chat rooms to group page
parent
d8f40ae8
Pipeline
#3000
failed with stages
in 1 minute and 55 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
2 deletions
+44
-2
grouprise/features/groups/templates/groups/detail/_about.html
...prise/features/groups/templates/groups/detail/_about.html
+20
-1
grouprise/features/groups/views.py
grouprise/features/groups/views.py
+2
-0
grouprise/features/matrix_chat/migrations/0002_auto_20210208_1131.py
...eatures/matrix_chat/migrations/0002_auto_20210208_1131.py
+19
-0
grouprise/features/matrix_chat/models.py
grouprise/features/matrix_chat/models.py
+1
-1
res/css/components/icons.less
res/css/components/icons.less
+2
-0
No files found.
grouprise/features/groups/templates/groups/detail/_about.html
View file @
ee57e9ee
...
...
@@ -127,7 +127,6 @@
<a
href=
"{% url 'recommend-group' group.slug %}"
>
Weiterempfehlen
</a>
{% endif %}
</dd>
{% load rules %}
{% has_perm 'groups.change' user group as can_view_details %}
{% if GROUPRISE_MAILINGLIST_ENABLED and can_view_details %}
...
...
@@ -141,6 +140,26 @@
</a>
</dd>
{% endif %}
{% if public_chat_room %}
<dt>
<i
class=
"sg sg-public-chat"
></i>
</dt>
<dd>
<a
href=
"{{ public_chat_room.get_client_url }}"
><strong>
Öffentlicher Chatraum der Gruppe
</strong></a>
</dd>
{% endif %}
{% load rules %}
{% has_perm 'groups.change' user group as can_view_details %}
{% if private_chat_room and can_view_details %}
<dt>
<i
class=
"sg sg-private-chat"
></i>
</dt>
<dd>
<a
href=
"{{ private_chat_room.get_client_url }}"
><strong>
Interner Chatraum der Gruppe
</strong></a>
</dd>
{% endif %}
</dl>
</div>
...
...
grouprise/features/groups/views.py
View file @
ee57e9ee
...
...
@@ -55,6 +55,8 @@ class Detail(PermissionMixin, TemplateFilterMixin, MultipleObjectMixin, DetailVi
mailinglist_conf
=
settings
.
GROUPRISE
.
get
(
'MAILINGLIST_ENABLED'
,
False
)
kwargs
[
'feed_url'
]
=
self
.
request
.
build_absolute_uri
(
reverse
(
'group-feed'
,
args
=
(
self
.
object
.
pk
,)))
kwargs
[
'public_chat_room'
]
=
self
.
object
.
matrix_rooms
.
filter
(
is_private
=
False
).
first
()
kwargs
[
'private_chat_room'
]
=
self
.
object
.
matrix_rooms
.
filter
(
is_private
=
True
).
first
()
return
super
().
get_context_data
(
GROUPRISE_MAILINGLIST_ENABLED
=
mailinglist_conf
,
associations
=
associations
,
...
...
grouprise/features/matrix_chat/migrations/0002_auto_20210208_1131.py
0 → 100644
View file @
ee57e9ee
# Generated by Django 2.2.17 on 2021-02-08 10:31
from
django.db
import
migrations
,
models
import
django.db.models.deletion
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'matrix_chat'
,
'0001_initial'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'matrixchatgrouproom'
,
name
=
'group'
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
related_name
=
'matrix_rooms'
,
to
=
'groups.Group'
),
),
]
grouprise/features/matrix_chat/models.py
View file @
ee57e9ee
...
...
@@ -7,7 +7,7 @@ from grouprise.features.matrix_chat.settings import MATRIX_DOMAIN
class
MatrixChatGroupRoom
(
models
.
Model
):
group
=
models
.
ForeignKey
(
"groups.Group"
,
related_name
=
"matrix_room"
,
on_delete
=
models
.
CASCADE
"groups.Group"
,
related_name
=
"matrix_room
s
"
,
on_delete
=
models
.
CASCADE
)
room_id
=
models
.
CharField
(
max_length
=
256
)
is_private
=
models
.
BooleanField
()
...
...
res/css/components/icons.less
View file @
ee57e9ee
...
...
@@ -105,6 +105,8 @@
.sg-icon(more, @fa-var-ellipsis-h);
.sg-icon(imprint, @fa-var-gavel);
.sg-icon(mailinglist, @fa-var-envelope);
.sg-icon(public-chat, @fa-var-comments);
.sg-icon(private-chat, @fa-var-user-secret);
// utility icons
.sg-icon(increase, @fa-var-plus);
...
...
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