Skip to content

Commit

Permalink
minor fixes and string translation
Browse files Browse the repository at this point in the history
rref #5367
rref #5366

ref #66
ref #65
  • Loading branch information
evrenesat committed Jul 26, 2016
1 parent 8141250 commit 3db6f66
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
15 changes: 8 additions & 7 deletions zengine/messaging/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,15 @@ class Subscriber(Model):
class Meta:
verbose_name = "Abonelik"
verbose_name_plural = "Abonelikler"
# list_fields = ["name", "gorev_tipi", "kurum_disi_gorev_baslama_tarihi"]
list_filters = ["name",]
# list_fields = ["name", ]
# list_filters = ["name",]
search_fields = ["name", ]

mq_channel = None
mq_connection = None

channel = Channel()
typ = field.Integer("Tip", choices=CHANNEL_TYPES)
name = field.String("Abonelik adı")
user = UserModel(reverse_name='subscriptions')
is_muted = field.Boolean("Kanalı sustur", default=False)
Expand All @@ -203,15 +204,15 @@ def _connect_mq(cls):

def get_actions(self):
actions = [
('Pin', '_zops_pin_channel'),
('Yukarı Sabitle', '_zops_pin_channel'),
# ('Mute', '_zops_mute_channel'),
]
if self.channel.owner == self.user or self.can_manage:
actions.extend([
('Delete', '_zops_delete_channel'),
('Edit', '_zops_edit_channel'),
('Add Users', '_zops_add_members'),
('Add Unit', '_zops_add_unit_to_channel')
('Sil', '_zops_delete_channel'),
('Düzenle', '_zops_edit_channel'),
('Kullanıcı Ekle', '_zops_add_members'),
('Birim Ekle', '_zops_add_unit_to_channel')
])
return actions

Expand Down
2 changes: 1 addition & 1 deletion zengine/messaging/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ def add_to_favorites(current):
}
"""
msg = Message.objects.get(current.input['message_key'])
msg = Message.objects.get(current.input['key'])
current.output = {'status': 'Created', 'code': 201}
fav, new = Favorite.objects.get_or_create(user_id=current.user_id, message=msg)
current.output['favorite_key'] = fav.key
Expand Down

0 comments on commit 3db6f66

Please sign in to comment.