From 3db6f6609a1c284d6d8ee85a9240c90a10ad9cd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Evren=20Esat=20=C3=96zkan?= Date: Tue, 26 Jul 2016 18:02:19 +0300 Subject: [PATCH] minor fixes and string translation rref #5367 rref #5366 ref zetaops/zengine#66 ref zetaops/zengine#65 --- zengine/messaging/model.py | 15 ++++++++------- zengine/messaging/views.py | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/zengine/messaging/model.py b/zengine/messaging/model.py index e7f605f0..3efef9ca 100644 --- a/zengine/messaging/model.py +++ b/zengine/messaging/model.py @@ -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) @@ -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 diff --git a/zengine/messaging/views.py b/zengine/messaging/views.py index aeeffbc5..8c7e3407 100644 --- a/zengine/messaging/views.py +++ b/zengine/messaging/views.py @@ -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