feat: allow to edit tags in settings (#6760)

Co-authored-by: Krzysztof Nizioł <kniziol@gmail.com>
Co-authored-by: Alexis Saettler <alexis@saettler.org>
This commit is contained in:
khalil Abu jayab
2023-11-06 20:14:21 +02:00
committed by GitHub
parent 91cf9154e0
commit bdffa9bd72
32 changed files with 103 additions and 16 deletions
@@ -4,6 +4,7 @@ namespace App\Http\Controllers;
use App\Models\User\User;
use App\Helpers\DateHelper;
use App\Models\Contact\Tag;
use Illuminate\Support\Str;
use Illuminate\Http\Request;
use App\Helpers\LocaleHelper;
@@ -16,8 +17,10 @@ use App\Models\Account\Invitation;
use App\Services\User\EmailChange;
use App\Exceptions\StripeException;
use App\Http\Requests\ImportsRequest;
use Illuminate\Http\RedirectResponse;
use App\Notifications\InvitationMail;
use App\Http\Requests\SettingsRequest;
use App\Services\Contact\Tag\UpdateTag;
use LaravelWebauthn\Models\WebauthnKey;
use App\Http\Requests\InvitationRequest;
use App\Services\Contact\Tag\DestroyTag;
@@ -365,6 +368,26 @@ class SettingsController extends Controller
return redirect()->route('settings.tags.index')
->with('success', trans('settings.tags_list_delete_success'));
}
/**
* Edit a tag name.
*
* @param Tag $tag
* @param Request $request
*
* @return \Illuminate\Http\RedirectResponse
*/
public function editTag(Tag $tag, Request $request): RedirectResponse
{
app(UpdateTag::class)->execute([
'tag_id' => $tag->id,
'account_id' => auth()->user()->account_id,
'name' => $request->input('name'),
]);
return back()
->with('success', trans('settings.tags_list_edit_success'));
}
public function api()
{
+1
View File
@@ -331,6 +331,7 @@ return [
'tags_list_description' => 'You can organize your contacts by setting up tags. Tags work like folders, but you can add more than one tag to a contact. To add a new tag, add it on the contact itself.',
'tags_list_contact_number' => '1 جهة اتصال|:count جهات اتصال',
'tags_list_delete_success' => 'The tag has been successfully deleted',
'tags_list_edit_success' => 'The tag has been successfully updated',
'tags_list_delete_confirmation' => 'Are you sure you want to delete the tag? No contacts will be deleted, only the tag.',
'tags_blank_title' => 'Tags are a great way of categorizing your contacts.',
'tags_blank_description' => 'Tags work like folders, but you can add more than one tag to a contact. Go to a contact and tag a friend, right below the name. Once a contact is tagged, come back here to manage all the tags in your account.',
+1
View File
@@ -331,6 +331,7 @@ return [
'tags_list_description' => 'Své kontakty můžete organizovat pomocí tagů. Tagy fungují jako adresáře, kontaktům můžete ale přidat vícero tagů. Nový tag přidáte úpravou vlastního kontaktu.',
'tags_list_contact_number' => '1 contact|:count contacts',
'tags_list_delete_success' => 'Tag byl úspěšně smazán',
'tags_list_edit_success' => 'The tag has been successfully updated',
'tags_list_delete_confirmation' => 'Opravdu chcete smazat tento tag? Bude smazán pouze vybraný tag, žádné kontakty.',
'tags_blank_title' => 'Tagy jsou šikovné řešení kategorizace kontaktů.',
'tags_blank_description' => 'Tags work like folders, but you can add more than one tag to a contact. Go to a contact and tag a friend, right below the name. Once a contact is tagged, come back here to manage all the tags in your account.',
+1
View File
@@ -331,6 +331,7 @@ return [
'tags_list_description' => 'You can organize your contacts by setting up tags. Tags work like folders, but you can add more than one tag to a contact. To add a new tag, add it on the contact itself.',
'tags_list_contact_number' => '1 contact|:count contacts',
'tags_list_delete_success' => 'The tag has been successfully deleted',
'tags_list_edit_success' => 'The tag has been successfully updated',
'tags_list_delete_confirmation' => 'Are you sure you want to delete the tag? No contacts will be deleted, only the tag.',
'tags_blank_title' => 'Tags are a great way of categorizing your contacts.',
'tags_blank_description' => 'Tags work like folders, but you can add more than one tag to a contact. Go to a contact and tag a friend, right below the name. Once a contact is tagged, come back here to manage all the tags in your account.',
+1
View File
@@ -331,6 +331,7 @@ return [
'tags_list_description' => 'Du kannst deine Kontakte mithilfe von Tags organisieren. Tags funktionieren wie Ordner, wobei ein Kontakt auch mehrere Tags erhalten kann. Um einen neuen Tag anzulegen, musst du ihn nur beim Kontakt hinzufügen.',
'tags_list_contact_number' => '1 Kontakt|:count Kontakte',
'tags_list_delete_success' => 'Der Tag wurde erfolgreich gelöscht',
'tags_list_edit_success' => 'The tag has been successfully updated',
'tags_list_delete_confirmation' => 'Möchtest du den Tag wirklich löschen? Kontakte werden nicht gelöscht, sondern nur der Tag.',
'tags_blank_title' => 'Tags bieten eine tolle Möglichkeit Kontakte zu organisieren.',
'tags_blank_description' => 'Tags funktionieren wie Ordner, wobei ein Kontakt auch mehrere Tags erhalten kann. Öffne einen Kontakt und tagge einen Freund direkt unter dem Namen. Sobald ein Kontakt getaggt ist, kannst du hier deine Tags verwalten.',
+1
View File
@@ -331,6 +331,7 @@ return [
'tags_list_description' => 'Μπορείτε να οργανώσετε τις επαφές σας χρησιμοποιώντας ετικέτες. Οι ετικέτες λειτουργούν σαν φάκελοι οργάνωσης, αλλά μπορείτε να προσθέσετε περισσότερες από μία ετικέτες σε κάθε επαφή. Για να δημιουργήσετε μια νέα ετικέτα, απλά προσθέστε την στην ίδια την επαφή.',
'tags_list_contact_number' => '1 επαφή|:count επαφές',
'tags_list_delete_success' => 'Η ετικέτα έχει διαγραφεί με επιτυχία',
'tags_list_edit_success' => 'The tag has been successfully updated',
'tags_list_delete_confirmation' => 'Είστε βέβαιοι ότι θέλετε να διαγράψετε την ετικέτα? Καμία επαφή δεν θα διαγραφεί, μόνο αυτή η ετικέτα από τις επαφές που είχε χρησιμοποιηθεί.',
'tags_blank_title' => 'Οι ετικέτες είναι ένας πολύ καλός τρόπος για να κατηγοριοποιήσετε τις επαφές σας.',
'tags_blank_description' => 'Οι ετικέτες λειτουργούν σαν φάκελοι οργάνωσης, ενώ μπορείτε να προσθέσετε περισσότερες από μία ετικέτες σε μια επαφή. Μεταβείτε σε μια επαφή και προσθέστε μια ετικέτα, ακριβώς κάτω από το όνομα. Μόλις προστεθεί η ετικέτα, μπορείτε να επιστρέψτε εδώ για να διαχειριστείτε όλες τις ετικέτες στον λογαριασμό σας.',
+1
View File
@@ -331,6 +331,7 @@ return [
'tags_list_description' => 'You can organize your contacts by setting up tags. Tags work like folders, but you can add more than one tag to a contact. To add a new tag, add it on the contact itself.',
'tags_list_contact_number' => '1 contact|:count contacts',
'tags_list_delete_success' => 'The tag has been successfully deleted',
'tags_list_edit_success' => 'The tag has been successfully updated',
'tags_list_delete_confirmation' => 'Are you sure you want to delete the tag? No contacts will be deleted, only the tag.',
'tags_blank_title' => 'Tags are a great way of categorizing your contacts.',
'tags_blank_description' => 'Tags work like folders, but you can add more than one tag to a contact. Go to a contact and tag a friend, right below the name. Once a contact is tagged, come back here to manage all the tags in your account.',
+1
View File
@@ -332,6 +332,7 @@ return [
'tags_list_description' => 'You can organize your contacts by setting up tags. Tags work like folders, but you can add more than one tag to a contact. To add a new tag, add it on the contact itself.',
'tags_list_contact_number' => '1 contact|:count contacts',
'tags_list_delete_success' => 'The tag has been successfully deleted',
'tags_list_edit_success' => 'The tag has been successfully updated',
'tags_list_delete_confirmation' => 'Are you sure you want to delete the tag? No contacts will be deleted, only the tag.',
'tags_blank_title' => 'Tags are a great way of categorizing your contacts.',
'tags_blank_description' => 'Tags work like folders, but you can add more than one tag to a contact. Go to a contact and tag a friend, right below the name. Once a contact is tagged, come back here to manage all the tags in your account.',
+1
View File
@@ -331,6 +331,7 @@ return [
'tags_list_description' => 'Puede organizar sus contactos configurando etiquetas. Las etiquetas funcionan como carpetas, pero puede añadir más de una etiqueta a un contacto. Para añadir una nueva etiqueta, añádela en el contacto mismo.',
'tags_list_contact_number' => '1 contacto|:count contactos',
'tags_list_delete_success' => 'La etiqueta se ha eliminado correctamente',
'tags_list_edit_success' => 'The tag has been successfully updated',
'tags_list_delete_confirmation' => '¿Está seguro que desea eliminar la etiqueta? Ningún contacto será eliminado, sólo la etiqueta.',
'tags_blank_title' => 'Las etiquetas son una excelente forma de clasificar tus contactos.',
'tags_blank_description' => 'Las etiquetas funcionan como carpetas, pero puede añadir más de una etiqueta a un contacto. Ir a un contacto y etiquetar a un amigo, justo debajo del nombre. Una vez que un contacto está etiquetado, vuelve aquí para gestionar todas las etiquetas de tu cuenta.',
+1
View File
@@ -332,6 +332,7 @@ return [
'tags_list_description' => 'You can organize your contacts by setting up tags. Tags work like folders, but you can add more than one tag to a contact. To add a new tag, add it on the contact itself.',
'tags_list_contact_number' => '1 contact|:count contacts',
'tags_list_delete_success' => 'The tag has been successfully deleted',
'tags_list_edit_success' => 'The tag has been successfully updated',
'tags_list_delete_confirmation' => 'Are you sure you want to delete the tag? No contacts will be deleted, only the tag.',
'tags_blank_title' => 'Tags are a great way of categorizing your contacts.',
'tags_blank_description' => 'Tags work like folders, but you can add more than one tag to a contact. Go to a contact and tag a friend, right below the name. Once a contact is tagged, come back here to manage all the tags in your account.',
+1
View File
@@ -331,6 +331,7 @@ return [
'tags_list_description' => 'You can organize your contacts by setting up tags. Tags work like folders, but you can add more than one tag to a contact. To add a new tag, add it on the contact itself.',
'tags_list_contact_number' => '1 contact|:count contacts',
'tags_list_delete_success' => 'The tag has been successfully deleted',
'tags_list_edit_success' => 'The tag has been successfully updated',
'tags_list_delete_confirmation' => 'Are you sure you want to delete the tag? No contacts will be deleted, only the tag.',
'tags_blank_title' => 'Tags are a great way of categorizing your contacts.',
'tags_blank_description' => 'Tags work like folders, but you can add more than one tag to a contact. Go to a contact and tag a friend, right below the name. Once a contact is tagged, come back here to manage all the tags in your account.',
+1
View File
@@ -331,6 +331,7 @@ return [
'tags_list_description' => 'Vous pouvez organiser vos contact avec des étiquettes. Les étiquettes sont comme des dossiers, mais vous pouvez avoir autant d’étiquettes que vous le souhaitez par contact.',
'tags_list_contact_number' => ':count contact|:count contacts',
'tags_list_delete_success' => 'L’étiquette a été supprimée avec succès',
'tags_list_edit_success' => 'The tag has been successfully updated',
'tags_list_delete_confirmation' => 'Êtes-vous sûr de vouloir supprimer cette étiquette ? Aucun contact ne sera supprimé, seulement l’étiquette.',
'tags_blank_title' => 'Les étiquettes sont une excellente manière de catégoriser vos contacts.',
'tags_blank_description' => 'Les étiquettent fonctionnent comme des dossiers, mais vous pouvez ajouter plus d\'une étiquette à un contact. Allez à un contact et taguez un ami, juste en dessous du nom. Une fois qu\'un contact est étiqueté, revenez ici pour gérer toutes les étiquettes de votre compte.',
+1
View File
@@ -331,6 +331,7 @@ return [
'tags_list_description' => 'ניתן לארגן את אנשי הקשר שלך על ידי הגדרת תגיות. תגיות עובדות כמו תיקיות אך יש לך אפשרות להוסיף יותר מתגית אחת לאיש קשר. כדי להוסיף תגית חדשה, ניתן להוסיף אותה על איש הקשר עצמו.',
'tags_list_contact_number' => 'איש קשר אחד|:count אנשי קשר',
'tags_list_delete_success' => 'התגית נמחקה בהצלחה',
'tags_list_edit_success' => 'The tag has been successfully updated',
'tags_list_delete_confirmation' => 'למחוק את התגית? לא יימחקו אנשי קשר, רק התגית.',
'tags_blank_title' => 'תגיות הן דרך נהדרת לארגון אנשי הקשר שלך.',
'tags_blank_description' => 'תגיות עובדות כמו תיקיות, אך ניתן להוסיף יותר מתגית אחת לאיש קשר. יש לגשת לאיש קשר ולתייג כחבר, מיד מתחת לשם. לאחר תיוג איש קשר, ניתן לחזור לכאן כדי לנהל את כל התגיות בחשבון שלך.',
+1
View File
@@ -331,6 +331,7 @@ return [
'tags_list_description' => 'You can organize your contacts by setting up tags. Tags work like folders, but you can add more than one tag to a contact. To add a new tag, add it on the contact itself.',
'tags_list_contact_number' => '1 contact|:count contacts',
'tags_list_delete_success' => 'The tag has been successfully deleted',
'tags_list_edit_success' => 'The tag has been successfully updated',
'tags_list_delete_confirmation' => 'Are you sure you want to delete the tag? No contacts will be deleted, only the tag.',
'tags_blank_title' => 'Tags are a great way of categorizing your contacts.',
'tags_blank_description' => 'Tags work like folders, but you can add more than one tag to a contact. Go to a contact and tag a friend, right below the name. Once a contact is tagged, come back here to manage all the tags in your account.',
+1
View File
@@ -331,6 +331,7 @@ return [
'tags_list_description' => 'Anda dapat mengkategorikan kontak Anda dengan mengatur tag. Tag berfungsi seperti folder, tetapi Anda dapat menambahkan lebih dari satu tag ke kontak. Untuk menambahkan sebuah tag baru, tambahkan tag pada kontak tersebut.',
'tags_list_contact_number' => ':count kontak',
'tags_list_delete_success' => 'Tag telah berhasil dihapus',
'tags_list_edit_success' => 'The tag has been successfully updated',
'tags_list_delete_confirmation' => 'Apakah Anda yakin ingin menghapus tag? Tidak ada kontak yang akan dihapus, hanya tag saja.',
'tags_blank_title' => 'Tag adalah sebuah cara yang bagus untuk mengkategorikan kontak Anda.',
'tags_blank_description' => 'Tag bekerja seperti folder, tetapi Anda dapat menambahkan lebih dari satu tag ke kontak. Cari sebuah kontak dan tag seorang teman, tepat di bawah namanya. Setelah sebuah kontak ditambhkan tag, kembali ke sini untuk mengelola semua tag di akun Anda.',
+1
View File
@@ -331,6 +331,7 @@ return [
'tags_list_description' => 'Puoi organizzare i tuoi contatti attraverso le etichette. Le etichette funzionano come delle cartelle, ma puoi aggiungere più di un\'etichetta a ogni contatto. Per aggiungere una nuova etichetta, aggiungila al contatto stesso.',
'tags_list_contact_number' => '1 contatto|:count contatti',
'tags_list_delete_success' => 'Etichetta rimossa',
'tags_list_edit_success' => 'The tag has been successfully updated',
'tags_list_delete_confirmation' => 'Rimuovere etichetta? Nessun contatto verrà rimosso, solo l\'etichetta.',
'tags_blank_title' => 'Le etichette sono un buon modo di organizzare i tuoi contatti.',
'tags_blank_description' => 'I tag funzionano come cartelle, ma puoi aggiungerne più di uno a un contatto. Vai a un contatto e tagga un amico, proprio sotto al nome. Una volta taggato un contatto, torna qui per gestire tutti i tag nel tuo profilo.',
+1
View File
@@ -331,6 +331,7 @@ return [
'tags_list_description' => 'You can organize your contacts by setting up tags. Tags work like folders, but you can add more than one tag to a contact. To add a new tag, add it on the contact itself.',
'tags_list_contact_number' => '1 contact|:count contacts',
'tags_list_delete_success' => 'The tag has been successfully deleted',
'tags_list_edit_success' => 'The tag has been successfully updated',
'tags_list_delete_confirmation' => 'Are you sure you want to delete the tag? No contacts will be deleted, only the tag.',
'tags_blank_title' => 'Tags are a great way of categorizing your contacts.',
'tags_blank_description' => 'Tags work like folders, but you can add more than one tag to a contact. Go to a contact and tag a friend, right below the name. Once a contact is tagged, come back here to manage all the tags in your account.',
+1
View File
@@ -331,6 +331,7 @@ return [
'tags_list_description' => 'Je kan je contacten organiseren door labels toe te voegen. Labels werken als mappen maar je kan meer dan één label toevoegen aan een contact. Om een nieuw label toe te voegen moet je dat bij een contactpersoon zelf doen.',
'tags_list_contact_number' => '1 contact|:count contacten',
'tags_list_delete_success' => 'Het label is succesvol verwijderd',
'tags_list_edit_success' => 'The tag has been successfully updated',
'tags_list_delete_confirmation' => 'Weet je zeker dat je het label wil verwijderen? Alleen het label zal worden verwijderd, contactpersonen blijven behouden.',
'tags_blank_title' => 'Labels zijn een geweldige methode om je contacten te organiseren.',
'tags_blank_description' => 'Tags work like folders, but you can add more than one tag to a contact. Go to a contact and tag a friend, right below the name. Once a contact is tagged, come back here to manage all the tags in your account.',
+1
View File
@@ -331,6 +331,7 @@ return [
'tags_list_description' => 'Du kan organisere kontaktene dine ved å sette opp tagger. Tagger fungerer som mapper, men du kan legge til flere enn ett tag til en kontakt. For å legge til en ny tag, legg den til selve kontakten.',
'tags_list_contact_number' => '1 kontakt|:count kontakter',
'tags_list_delete_success' => 'Taggen har blitt slettet',
'tags_list_edit_success' => 'The tag has been successfully updated',
'tags_list_delete_confirmation' => 'Er du sikker på at du vil slette taggen? Ingen kontakter vil bli slettet, bare taggen.',
'tags_blank_title' => 'Tagger er en flott måte å kategorisere kontaktene på.',
'tags_blank_description' => 'Merker fungerer som mapper, men du kan legge til flere enn en tag til en kontakt. Gå til kontakt og tagg en venn rett under navnet. Når en kontakt er tagget, kom tilbake hit for å administrere alle taggene på kontoen din.',
+1
View File
@@ -331,6 +331,7 @@ return [
'tags_list_description' => 'Você pode organizar seus contatos configurando etiquetas (tags). As tags funcionam como pastas, mas você pode adicionar mais de uma tag a um contato. Para adicionar uma nova tag, adicione-a no próprio contato.',
'tags_list_contact_number' => '1 contato|:count contatos',
'tags_list_delete_success' => 'A tag foi excluída com sucesso',
'tags_list_edit_success' => 'The tag has been successfully updated',
'tags_list_delete_confirmation' => 'Tem certeza que deseja excluir a etiqueta? Nenhum contato será excluído, apenas a etiqueta.',
'tags_blank_title' => 'As tags são uma ótima maneira de categorizar seus contatos.',
'tags_blank_description' => 'As tags funcionam como pastas, mas você pode adicionar mais de uma tag a um contato. Vá para um contato e marque um amigo, logo abaixo do nome. Depois de adicionar uma tag ao contato, volte aqui para gerenciar todas as tags da sua conta.',
+1
View File
@@ -331,6 +331,7 @@ return [
'tags_list_description' => 'You can organize your contacts by setting up tags. Tags work like folders, but you can add more than one tag to a contact.',
'tags_list_contact_number' => '1 contacto|:count contactos',
'tags_list_delete_success' => 'The tag has been successfully with success',
'tags_list_edit_success' => 'The tag has been successfully updated',
'tags_list_delete_confirmation' => 'Are you sure you want to delete the tag? No contacts will be deleted, only the tag.',
'tags_blank_title' => 'Tags are a great way of categorizing your contacts.',
'tags_blank_description' => 'Tags work like folders, but you can add more than one tag to a contact. Go to a contact and tag a friend, right below the name. Once a contact is tagged, come back here to manage all the tags in your account.',
+1
View File
@@ -331,6 +331,7 @@ return [
'tags_list_description' => 'You can organize your contacts by setting up tags. Tags work like folders, but you can add more than one tag to a contact.',
'tags_list_contact_number' => '1 contact|:count contacts',
'tags_list_delete_success' => 'The tag has been successfully with success',
'tags_list_edit_success' => 'The tag has been successfully updated',
'tags_list_delete_confirmation' => 'Are you sure you want to delete the tag? No contacts will be deleted, only the tag.',
'tags_blank_title' => 'Tags are a great way of categorizing your contacts.',
'tags_blank_description' => 'Tags work like folders, but you can add more than one tag to a contact. Go to a contact and tag a friend, right below the name. Once a contact is tagged, come back here to manage all the tags in your account.',
+1
View File
@@ -331,6 +331,7 @@ return [
'tags_list_description' => 'Du kan organisera dina kontakter genom att konfigurera taggar. Taggar fungerar som mappar, men du kan lägga till fler än en tagg till en kontakt. För att lägga till en ny tagg, lägg till den på själva kontakten.',
'tags_list_contact_number' => '1 kontakt|:count kontakter',
'tags_list_delete_success' => 'Taggen har tagits bort',
'tags_list_edit_success' => 'The tag has been successfully updated',
'tags_list_delete_confirmation' => 'Är du säker på att du vill ta bort taggen? Inga kontakter kommer att tas bort, bara taggen.',
'tags_blank_title' => 'Taggar är ett bra sätt att kategorisera dina kontakter.',
'tags_blank_description' => 'Tags work like folders, but you can add more than one tag to a contact. Go to a contact and tag a friend, right below the name. Once a contact is tagged, come back here to manage all the tags in your account.',
+1
View File
@@ -331,6 +331,7 @@ return [
'tags_list_description' => 'Etiketler ayarlayarak kişilerinizi düzenleyebilirsiniz. Etiketler klasörler gibi çalışır, ancak bir kişiye birden fazla etiket ekleyebilirsiniz. Yeni bir etiket eklemek için, kişinin üzerine ekleyin.',
'tags_list_contact_number' => ':count bağlantı',
'tags_list_delete_success' => 'Etiket başarıyla silindi',
'tags_list_edit_success' => 'The tag has been successfully updated',
'tags_list_delete_confirmation' => 'Etiketi silmek istediğinizden emin misiniz? Bağlantılar silinmeyecek, sadece etiket silinecektir.',
'tags_blank_title' => 'Etiketler, kişilerinizi sınıflandırmanın harika bir yoludur.',
'tags_blank_description' => 'Tags work like folders, but you can add more than one tag to a contact. Go to a contact and tag a friend, right below the name. Once a contact is tagged, come back here to manage all the tags in your account.',
+1
View File
@@ -331,6 +331,7 @@ return [
'tags_list_description' => 'You can organize your contacts by setting up tags. Tags work like folders, but you can add more than one tag to a contact. To add a new tag, add it on the contact itself.',
'tags_list_contact_number' => '1 contact|:count contacts',
'tags_list_delete_success' => 'The tag has been successfully deleted',
'tags_list_edit_success' => 'The tag has been successfully updated',
'tags_list_delete_confirmation' => 'Are you sure you want to delete the tag? No contacts will be deleted, only the tag.',
'tags_blank_title' => 'Tags are a great way of categorizing your contacts.',
'tags_blank_description' => 'Tags work like folders, but you can add more than one tag to a contact. Go to a contact and tag a friend, right below the name. Once a contact is tagged, come back here to manage all the tags in your account.',
+1
View File
@@ -331,6 +331,7 @@ return [
'tags_list_description' => 'Bạn có thể sắp xếp liên hệ bằng cách thiết lập nhãn. Nhãn hoạt động giống thư mục, nhưng bạn có thể thêm nhiều nhãn vào một liên hệ. Để thêm nhãn mới, thêm nó ở trang liên hệ.',
'tags_list_contact_number' => ':count liên hệ',
'tags_list_delete_success' => 'The tag has been successfully deleted',
'tags_list_edit_success' => 'The tag has been successfully updated',
'tags_list_delete_confirmation' => 'Are you sure you want to delete the tag? No contacts will be deleted, only the tag.',
'tags_blank_title' => 'Tag là một cách tốt để phân loại liên hệ của bạn.',
'tags_blank_description' => 'Tag hoạt động như một thư mục, nhưng bạn có thể thêm nhiều tag vào một liên hệ. Truy cập trang liên hệ và thêm tag bạn bè, ngay dưới phần tên. Khi liên hệ được gắn tag, quay trở lại đây và quản lý tất cả tag trong tài khoản của bạn.',
+1
View File
@@ -331,6 +331,7 @@ return [
'tags_list_description' => '您可以通過設定來標記聯絡人。標記的工作方式類似於資料夾, 但可以向聯絡人新增多個標記。若要新增新標記, 請在聯絡人中新增即可。',
'tags_list_contact_number' => ':count 個聯絡人',
'tags_list_delete_success' => '標籤已成功刪除',
'tags_list_edit_success' => 'The tag has been successfully updated',
'tags_list_delete_confirmation' => '確實要刪除該標籤嗎?不會刪除任何聯絡人, 只有標籤。',
'tags_blank_title' => '標籤是對您的聯絡人進行分類的一種很好的方式。',
'tags_blank_description' => 'Tags work like folders, but you can add more than one tag to a contact. Go to a contact and tag a friend, right below the name. Once a contact is tagged, come back here to manage all the tags in your account.',
+1
View File
@@ -331,6 +331,7 @@ return [
'tags_list_description' => '您可以通过设置来标记联系人。标记的工作方式类似于文件夹, 但可以向联系人添加多个标记。若要添加新标记, 请在联系人中添加即可。',
'tags_list_contact_number' => ':count 个联系人',
'tags_list_delete_success' => '标签已成功删除',
'tags_list_edit_success' => 'The tag has been successfully updated',
'tags_list_delete_confirmation' => '确实要删除该标签吗?不会删除任何联系人, 只有标签。',
'tags_blank_title' => '标签是对您的联系人进行分类的一种很好的方式。',
'tags_blank_description' => '标签的工作方式类似于文件夹,但可以向联系人添加多个标签。你可以转到联系人页面,并在名字的下方添加标签,之后可以返回此处管理帐户中的所有标签。',
+14
View File
@@ -99,6 +99,20 @@
}
}
.tags-list {
h3.with-actions {
padding-bottom: 13px;
}
.table-cell.actions {
@if $htmldir == ltr {
text-align: right;
} @else {
text-align: left;
}
}
}
.blank-screen {
text-align: center;
+4 -4
View File
@@ -87,16 +87,16 @@
</li>
@foreach ($exports as $export)
<li class="table-row">
<div class="table-cell table-cell">
<div class="table-cell">
{{ trans("settings.export_type_{$export['type']}") }}
</div>
<div class="table-cell table-cell date">
<div class="table-cell date">
{{ \App\Helpers\DateHelper::getShortDateWithTime($export['created_at']) }}
</div>
<div class="table-cell table-cell">
<div class="table-cell">
{{ trans("settings.export_status_{$export['status']}") }}
</div>
<div class="table-cell actions table-cell">
<div class="table-cell actions">
@if ($export['status'] === \App\Models\Account\ExportJob::EXPORT_DONE)
<form method="POST" action="{{ route('settings.export.download', ['uuid' => $export['uuid']]) }}">
@csrf
+34 -11
View File
@@ -30,7 +30,7 @@
@include('settings._sidebar')
<div class="col-12 col-sm-9">
<div class="col-12 col-sm-9 tags-list">
<div class="br3 ba b--gray-monica bg-white mb4">
<div class="pa3 bb b--gray-monica">
@if (auth()->user()->account->tags->count() == 0)
@@ -62,21 +62,34 @@
<ul class="table">
@foreach (auth()->user()->account->tags as $tag)
<li class="table-row" data-tag-id="{{ $tag->id }}">
<div class="table-cell">
{{ $tag->name }}
<span class="tags-list-contact-number">({{ trans_choice('settings.tags_list_contact_number', $tag->contacts()->count(), ['count' => $tag->contacts()->count()]) }})</span>
<ul>
@foreach($tag->contacts as $contact)
<li class="di mr1"><a href="people/{{ $contact->hashID() }}">{{ $contact->name }}</a></li>
@endforeach
</ul>
<div class="table-cell fl">
<form method="POST" action="{{ route('settings.tags.update', $tag) }}" class="fl edit-tag-form hidden">
@method('PUT')
@csrf
<input name="name" value="{{ $tag->name }}" class="di br2 f5 ba b--black-40 pa2 outline-0 edit-tag-input" />
<a class="pointer" html="" onclick="this.parentNode.submit(); return false;">{{ trans('app.save') }}</a>
<a class="pointer" html="" onclick="toggleEditInput(this); return false;">{{ trans('app.close') }}</a>
</form>
<div class="tag-content">
<span class="tag-name">{{ $tag->name }}</span>
<span class="tags-list-contact-number">({{ trans_choice('settings.tags_list_contact_number', $tag->contacts()->count(), ['count' => $tag->contacts()->count()]) }})</span>
<ul>
@foreach($tag->contacts as $contact)
<li class="di mr1"><a href="people/{{ $contact->hashID() }}">{{ $contact->name }}</a></li>
@endforeach
</ul>
</div>
</div>
<div class="table-cell actions">
<form method="POST" action="{{ route('settings.tags.delete', $tag) }}">
<span class="fl edit-icon-btn" onclick="toggleEditInput(this)">
<i class="fa fa-pencil pointer" aria-hidden="true"></i>
</span>
<form method="POST" action="{{ route('settings.tags.delete', $tag) }}" class="fl">
@method('DELETE')
@csrf
<confirm message="{{ trans('settings.tags_list_delete_confirmation') }}">
<i class="fa fa-trash-o" aria-hidden="true"></i>
<i class="fa fa-trash-o pointer" aria-hidden="true"></i>
</confirm>
</form>
</div>
@@ -94,3 +107,13 @@
</div>
@endsection
<script>
function toggleEditInput(editIcon) {
let tableRow = editIcon.closest('.table-row');
let tagContent = tableRow.querySelector('.tag-content');
let editInput = tableRow.querySelector('.edit-tag-form');
tagContent.classList.toggle('hidden');
editInput.classList.toggle('hidden');
}
</script>
+1 -1
View File
@@ -293,7 +293,7 @@ Route::middleware(['auth', 'verified', 'mfa'])->group(function () {
Route::name('tags.')->group(function () {
Route::get('/settings/tags', 'SettingsController@tags')->name('index');
Route::get('/settings/tags/add', 'SettingsController@addUser')->name('add');
Route::put('/settings/tags/{tag}', 'SettingsController@editTag')->name('update');
Route::delete('/settings/tags/{tag}', 'SettingsController@deleteTag')->name('delete');
});