public ExportViewModel(Translator translator, Session session) : base(translator, translator.Get("Export.List.Title", "Title of the exports list page", "Exports"), session) { }
public ExportListItemViewModel(Translator translator, Export export) { Id = export.Id.Value.ToString(); Name = export.Name.Value.EscapeHtml(); PhraseDeleteConfirmationQuestion = translator.Get("Export.List.Delete.Confirm.Question", "Delete export confirmation question", "Do you really wish to delete export {0}?", export.GetText(translator)).EscapeHtml(); }
public NamedIntViewModel(Translator translator, TagUsage usage, bool selected) : this((int)usage, usage.Translate(translator), selected) { }
public NamedIntViewModel(Translator translator, TagMode mode, bool selected) : this((int)mode, mode.Translate(translator), selected) { }
public override string GetText(Translator translator) { return(_translate(Value, translator)); }
public NamedIntViewModel(Translator translator, PublicKeyType type, bool selected) : this((int)type, type.Translate(translator), selected) { }
public NamedIntViewModel(Translator translator, PartAccess part, bool selected) : this((int)part, part.Translate(translator), selected) { }
public UniversalDocument(Translator translator, Contact contact, string texTemplate) { _translator = translator; _contact = contact; _texTemplate = texTemplate; }
public NamedIntViewModel(Translator translator, AddressCategory category, bool selected) : this((int)category, category.Translate(translator), selected) { }
public NamedIntViewModel(Translator translator, MailingElementType type, bool selected) : this((int)type, type.Translate(translator), selected) { }
public NamedIntViewModel(Translator translator, Language language, bool selected) : this((int)language, language.Translate(translator), selected) { }
public NamedIntViewModel(Translator translator, ContactColumns columns, bool selected) : this((int)columns, columns.TranslateFlag(translator), selected) { }
public PhraseViewModel(Translator translator, Session session) : base(translator, translator.Get("Phrase.List.Title", "Title of the phrase list page", "Countries"), session) { }
public override string GetText(Translator translator) { throw new NotImplementedException(); }
public NamedIntViewModel(Translator translator, SubjectAccess subject, bool selected) : this((int)subject, subject.Translate(translator), selected) { }
public override string GetText(Translator translator) { return(Name.Value); }
public NamedIntViewModel(Translator translator, AccessRight right, bool selected) : this((int)right, right.Translate(translator), selected) { }
public ContactListItemViewModel(IDatabase database, Translator translator, Contact contact, Session session, SearchSettings settings) { ShowOrganization = settings.Columns.Value.HasFlag(ContactColumns.Organization); ShowName = settings.Columns.Value.HasFlag(ContactColumns.Name); ShowStreet = settings.Columns.Value.HasFlag(ContactColumns.Street); ShowPlace = settings.Columns.Value.HasFlag(ContactColumns.Place); ShowState = settings.Columns.Value.HasFlag(ContactColumns.State); ShowMail = settings.Columns.Value.HasFlag(ContactColumns.Mail); ShowPhone = settings.Columns.Value.HasFlag(ContactColumns.Phone); ShowSubscriptions = settings.Columns.Value.HasFlag(ContactColumns.Subscriptions); ShowTags = settings.Columns.Value.HasFlag(ContactColumns.Tags); var contactAccess = session.HasAccess(contact, PartAccess.Contact, AccessRight.Read); var subscriptionsAccess = session.HasAccess(contact, PartAccess.Subscription, AccessRight.Read); var tagsAccess = session.HasAccess(contact, PartAccess.TagAssignments, AccessRight.Read); Id = contact.Id.ToString(); Organization = contact.Organization.Value.EscapeHtml(); LastName = contactAccess ? contact.LastName.Value.EscapeHtml() : string.Empty; FirstNames = contactAccess ? contact.ShortTitleAndNames.EscapeHtml() : string.Empty; MailAddress = contactAccess ? contact.PrimaryMailAddress.EscapeHtml() : string.Empty; PhoneNumber = contactAccess ? contact.PrimaryPhoneNumber.EscapeHtml() : string.Empty; Place = contactAccess ? contact.PostalAddresses .OrderBy(p => p.Precedence.Value) .Select(p => p.PlaceWithPostalCode.EscapeHtml()) .FirstOrDefault() ?? string.Empty : string.Empty; Street = contactAccess ? contact.PostalAddresses .OrderBy(p => p.Precedence.Value) .Select(p => p.StreetOrPostOfficeBox.EscapeHtml()) .FirstOrDefault() ?? string.Empty : string.Empty; State = contactAccess ? contact.PostalAddresses .OrderBy(p => p.Precedence.Value) .Select(p => p.StateOrCountry(translator).EscapeHtml()) .FirstOrDefault() ?? string.Empty : string.Empty; Subscriptions = subscriptionsAccess ? string.Join(", ", contact.Subscriptions .Select(m => m.Feed.Value.GetText(translator)) .OrderBy(m => m)) : string.Empty; Tags = tagsAccess ? string.Join(", ", contact.TagAssignments .Select(t => t.Tag.Value.GetText(translator)) .OrderBy(t => t)) : string.Empty; }
public abstract string GetText(Translator translator);