Import v7.1 files

This commit is contained in:
Daniel J. Summers 2019-02-17 19:25:07 -06:00
parent d6ed11687a
commit e18cd888f3
111 changed files with 12462 additions and 0 deletions

3
.gitignore vendored
View File

@ -328,3 +328,6 @@ ASALocalRun/
# MFractors (Xamarin productivity tool) working folder # MFractors (Xamarin productivity tool) working folder
.mfractor/ .mfractor/
### --- ###
src/PrayerTracker/appsettings.json

View File

@ -0,0 +1,86 @@
namespace PrayerTracker
open Microsoft.EntityFrameworkCore
open PrayerTracker.Entities
/// EF Core data context for PrayerTracker
[<AllowNullLiteral>]
type AppDbContext (options : DbContextOptions<AppDbContext>) =
inherit DbContext (options)
[<DefaultValue>]
val mutable private churches : DbSet<Church>
[<DefaultValue>]
val mutable private members : DbSet<Member>
[<DefaultValue>]
val mutable private prayerRequests : DbSet<PrayerRequest>
[<DefaultValue>]
val mutable private preferences : DbSet<ListPreferences>
[<DefaultValue>]
val mutable private smallGroups : DbSet<SmallGroup>
[<DefaultValue>]
val mutable private timeZones : DbSet<TimeZone>
[<DefaultValue>]
val mutable private users : DbSet<User>
[<DefaultValue>]
val mutable private userGroupXref : DbSet<UserSmallGroup>
/// Churches
member this.Churches
with get() = this.churches
and set v = this.churches <- v
/// Small group members
member this.Members
with get() = this.members
and set v = this.members <- v
/// Prayer requests
member this.PrayerRequests
with get() = this.prayerRequests
and set v = this.prayerRequests <- v
/// Request list preferences (by class)
member this.Preferences
with get() = this.preferences
and set v = this.preferences <- v
/// Small groups
member this.SmallGroups
with get() = this.smallGroups
and set v = this.smallGroups <- v
/// Time zones
member this.TimeZones
with get() = this.timeZones
and set v = this.timeZones <- v
/// Users
member this.Users
with get() = this.users
and set v = this.users <- v
/// User / small group cross-reference
member this.UserGroupXref
with get() = this.userGroupXref
and set v = this.userGroupXref <- v
/// F#-style async for saving changes
member this.AsyncSaveChanges () =
this.SaveChangesAsync () |> Async.AwaitTask
override __.OnModelCreating (modelBuilder : ModelBuilder) =
base.OnModelCreating modelBuilder
modelBuilder.HasDefaultSchema "pt" |> ignore
[ Church.configureEF
ListPreferences.configureEF
Member.configureEF
PrayerRequest.configureEF
SmallGroup.configureEF
TimeZone.configureEF
User.configureEF
UserSmallGroup.configureEF
]
|> List.iter (fun x -> x modelBuilder)

View File

@ -0,0 +1,300 @@
[<AutoOpen>]
module PrayerTracker.DataAccess
open FSharp.Control.Tasks.ContextInsensitive
open Microsoft.EntityFrameworkCore
open PrayerTracker.Entities
open System.Collections.Generic
open System.Linq
/// EF can return null for record types with the CLIMutable attribute; this converts a possibly-null record type to an
/// option
let optRec<'T> (r : 'T) =
match box r with null -> None | _ -> Some r
type AppDbContext with
(*-- DISCONNECTED DATA EXTENSIONS --*)
/// Add an entity entry to the tracked data context with the status of Added
member this.AddEntry<'TEntity when 'TEntity : not struct> (e : 'TEntity) =
this.Entry<'TEntity>(e).State <- EntityState.Added
/// Add an entity entry to the tracked data context with the status of Updated
member this.UpdateEntry<'TEntity when 'TEntity : not struct> (e : 'TEntity) =
this.Entry<'TEntity>(e).State <- EntityState.Modified
/// Add an entity entry to the tracked data context with the status of Deleted
member this.RemoveEntry<'TEntity when 'TEntity : not struct> (e : 'TEntity) =
this.Entry<'TEntity>(e).State <- EntityState.Deleted
(*-- CHURCH EXTENSIONS --*)
/// Find a church by its Id
member this.TryChurchById cId =
task {
let! church = this.Churches.AsNoTracking().FirstOrDefaultAsync (fun c -> c.churchId = cId)
return optRec church
}
/// Find all churches
member this.AllChurches () =
task {
let! churches = this.Churches.AsNoTracking().OrderBy(fun c -> c.name).ToListAsync ()
return List.ofSeq churches
}
(*-- MEMBER EXTENSIONS --*)
/// Get a small group member by its Id
member this.TryMemberById mId =
task {
let! mbr = this.Members.AsNoTracking().FirstOrDefaultAsync (fun m -> m.memberId = mId)
return optRec mbr
}
/// Find all members for a small group
member this.AllMembersForSmallGroup gId =
task {
let! mbrs =
this.Members.AsNoTracking()
.Where(fun m -> m.smallGroupId = gId)
.OrderBy(fun m -> m.memberName)
.ToListAsync ()
return List.ofSeq mbrs
}
/// Count members for a small group
member this.CountMembersForSmallGroup gId =
this.Members.CountAsync (fun m -> m.smallGroupId = gId)
(*-- PRAYER REQUEST EXTENSIONS *)
/// Get a prayer request by its Id
member this.TryRequestById reqId =
task {
let! req = this.PrayerRequests.AsNoTracking().FirstOrDefaultAsync (fun pr -> pr.prayerRequestId = reqId)
return optRec req
}
/// Get all (or active) requests for a small group as of now or the specified date
member this.AllRequestsForSmallGroup (grp : SmallGroup) clock listDate activeOnly : PrayerRequest seq =
let theDate = match listDate with Some dt -> dt | _ -> grp.localDateNow clock
upcast (
this.PrayerRequests.AsNoTracking().Where(fun pr -> pr.smallGroupId = grp.smallGroupId)
|> function
// Filter
| query when activeOnly ->
let asOf = theDate.AddDays(-(float grp.preferences.daysToExpire)).Date
query.Where(fun pr ->
(pr.updatedDate > asOf
|| pr.doNotExpire
|| RequestType.Recurring = pr.requestType
|| RequestType.Expecting = pr.requestType)
&& not pr.isManuallyExpired)
| query -> query
|> function
// Sort
| query when grp.preferences.requestSort = "D" ->
query.OrderByDescending(fun pr -> pr.updatedDate)
.ThenByDescending(fun pr -> pr.enteredDate)
.ThenBy(fun pr -> pr.requestor)
| query ->
query.OrderBy(fun pr -> pr.requestor)
.ThenByDescending(fun pr -> pr.updatedDate)
.ThenByDescending(fun pr -> pr.enteredDate))
/// Count prayer requests for the given small group Id
member this.CountRequestsBySmallGroup gId =
this.PrayerRequests.CountAsync (fun pr -> pr.smallGroupId = gId)
/// Count prayer requests for the given church Id
member this.CountRequestsByChurch cId =
this.PrayerRequests.CountAsync (fun pr -> pr.smallGroup.churchId = cId)
(*-- SMALL GROUP EXTENSIONS --*)
/// Find a small group by its Id
member this.TryGroupById gId =
task {
let! grp =
this.SmallGroups.AsNoTracking()
.Include(fun sg -> sg.preferences)
.FirstOrDefaultAsync (fun sg -> sg.smallGroupId = gId)
return optRec grp
}
/// Get small groups that are public or password protected
member this.PublicAndProtectedGroups () =
task {
let! grps =
this.SmallGroups.AsNoTracking()
.Include(fun sg -> sg.preferences)
.Include(fun sg -> sg.church)
.Where(fun sg ->
sg.preferences.isPublic || (sg.preferences.groupPassword <> null && sg.preferences.groupPassword <> ""))
.OrderBy(fun sg -> sg.church.name)
.ThenBy(fun sg -> sg.name)
.ToListAsync ()
return List.ofSeq grps
}
/// Get small groups that are password protected
member this.ProtectedGroups () =
task {
let! grps =
this.SmallGroups.AsNoTracking()
.Include(fun sg -> sg.church)
.Where(fun sg -> sg.preferences.groupPassword <> null && sg.preferences.groupPassword <> "")
.OrderBy(fun sg -> sg.church.name)
.ThenBy(fun sg -> sg.name)
.ToListAsync ()
return List.ofSeq grps
}
/// Get all small groups
member this.AllGroups () =
task {
let! grps =
this.SmallGroups.AsNoTracking()
.Include(fun sg -> sg.church)
.Include(fun sg -> sg.preferences)
.Include(fun sg -> sg.preferences.timeZone)
.OrderBy(fun sg -> sg.name)
.ToListAsync ()
return List.ofSeq grps
}
/// Get a small group list by their Id, with their church prepended to their name
member this.GroupList () =
task {
let! grps =
this.SmallGroups.AsNoTracking()
.Include(fun sg -> sg.church)
.OrderBy(fun sg -> sg.church.name)
.ThenBy(fun sg -> sg.name)
.ToListAsync ()
return grps
|> Seq.map (fun grp -> grp.smallGroupId.ToString "N", sprintf "%s | %s" grp.church.name grp.name)
|> Map.ofSeq
}
/// Log on a small group
member this.TryGroupLogOnByPassword gId pw =
task {
let! grp = this.TryGroupById gId
match grp with
| None -> return None
| Some g ->
match pw = g.preferences.groupPassword with
| true -> return grp
| _ -> return None
}
/// Check a cookie log on for a small group
member this.TryGroupLogOnByCookie gId pwHash (hasher : string -> string) =
task {
let! grp = this.TryGroupById gId
match grp with
| None -> return None
| Some g ->
match pwHash = hasher g.preferences.groupPassword with
| true -> return grp
| _ -> return None
}
/// Count small groups for the given church Id
member this.CountGroupsByChurch cId =
this.SmallGroups.CountAsync (fun sg -> sg.churchId = cId)
(*-- TIME ZONE EXTENSIONS --*)
/// Get a time zone by its Id
member this.TryTimeZoneById tzId =
task {
let! tz = this.TimeZones.FirstOrDefaultAsync (fun t -> t.timeZoneId = tzId)
return optRec tz
}
/// Get all time zones
member this.AllTimeZones () =
task {
let! tzs = this.TimeZones.OrderBy(fun t -> t.sortOrder).ToListAsync ()
return List.ofSeq tzs
}
(*-- USER EXTENSIONS --*)
/// Find a user by its Id
member this.TryUserById uId =
task {
let! user = this.Users.AsNoTracking().FirstOrDefaultAsync (fun u -> u.userId = uId)
return optRec user
}
/// Find a user by its e-mail address and authorized small group
member this.TryUserByEmailAndGroup email gId =
task {
let! user =
this.Users.AsNoTracking().FirstOrDefaultAsync (fun u ->
u.emailAddress = email
&& u.smallGroups.Any (fun xref -> xref.smallGroupId = gId))
return optRec user
}
/// Find a user by its Id (tracked entity), eagerly loading the user's groups
member this.TryUserByIdWithGroups uId =
task {
let! user = this.Users.Include(fun u -> u.smallGroups).FirstOrDefaultAsync (fun u -> u.userId = uId)
return optRec user
}
/// Get a list of all users
member this.AllUsers () =
task {
let! usrs = this.Users.AsNoTracking().OrderBy(fun u -> u.lastName).ThenBy(fun u -> u.firstName).ToListAsync ()
return List.ofSeq usrs
}
/// Get all PrayerTracker users as members (used to send e-mails)
member this.AllUsersAsMembers () =
task {
let! usrs =
this.Users.AsNoTracking().OrderBy(fun u -> u.lastName).ThenBy(fun u -> u.firstName).ToListAsync ()
return usrs
|> Seq.map (fun u -> { Member.empty with email = u.emailAddress; memberName = u.fullName })
|> List.ofSeq
}
/// Find a user based on their credentials
member this.TryUserLogOnByPassword email pwHash gId =
task {
let! user =
this.Users.FirstOrDefaultAsync (fun u ->
u.emailAddress = email
&& u.passwordHash = pwHash
&& u.smallGroups.Any (fun xref -> xref.smallGroupId = gId))
return optRec user
}
/// Find a user based on credentials stored in a cookie
member this.TryUserLogOnByCookie uId gId pwHash =
task {
let! user = this.TryUserByIdWithGroups uId
match user with
| None -> return None
| Some u ->
match pwHash = u.passwordHash && u.smallGroups |> Seq.exists (fun xref -> xref.smallGroupId = gId) with
| true ->
this.Entry<User>(u).State <- EntityState.Detached
return Some { u with passwordHash = ""; salt = None; smallGroups = List<UserSmallGroup>() }
| _ -> return None
}
/// Count the number of users for a small group
member this.CountUsersBySmallGroup gId =
this.Users.CountAsync (fun u -> u.smallGroups.Any (fun xref -> xref.smallGroupId = gId))
/// Count the number of users for a church
member this.CountUsersByChurch cId =
this.Users.CountAsync (fun u -> u.smallGroups.Any (fun xref -> xref.smallGroup.churchId = cId))

View File

@ -0,0 +1,565 @@
namespace PrayerTracker.Entities
open FSharp.EFCore.OptionConverter
open Microsoft.EntityFrameworkCore
open NodaTime
open System
open System.Collections.Generic
(*-- CONSTANTS --*)
/// Constants to use for the e-mail type parameter
[<RequireQualifiedAccess>]
module EmailType =
/// HTML e-mail
[<Literal>]
let Html = "Html"
/// Plain Text e-mail
[<Literal>]
let PlainText = "PlainText"
/// E-mail with the list as an attached PDF
[<Literal>]
let AttachedPdf = "AttachedPdf"
/// These values match those in the RequestType document store
[<RequireQualifiedAccess>]
module RequestType =
/// Current Requests (follow expiration rules)
let Current = "Current"
/// Long-Term / Recurring Requests (do not automatically expire)
let Recurring = "Recurring"
/// Praise Reports (follow expiration rules)
let Praise = "Praise"
/// Expectant Mothers (do not automatically expire)
let Expecting = "Expecting"
/// Announcements (follow expiration rules)
let Announcement = "Announcement"
(*-- SUPPORT TYPES --*)
/// Statistics for churches
[<NoComparison; NoEquality>]
type ChurchStats =
{ /// The number of small groups in the church
smallGroups : int
/// The number of prayer requests in the church
prayerRequests : int
/// The number of users who can access small groups in the church
users : int
}
/// PK type for the Church entity
type ChurchId = Guid
/// PK type for the Member entity
type MemberId = Guid
/// PK type for the PrayerRequest entity
type PrayerRequestId = Guid
/// PK type for the SmallGroup entity
type SmallGroupId = Guid
/// PK type for the TimeZone entity
type TimeZoneId = string
/// PK type for the User entity
type UserId = Guid
/// PK for User/SmallGroup cross-reference table
type UserSmallGroupKey =
{ userId : UserId
smallGroupId : SmallGroupId
}
(*-- ENTITIES --*)
/// This represents a church
type [<CLIMutable; NoComparison; NoEquality>] Church =
{ /// The Id of this church
churchId : ChurchId
/// The name of the church
name : string
/// The city where the church is
city : string
/// The state where the church is
st : string
/// Does this church have an active interface with Virtual Prayer Room?
hasInterface : bool
/// The address for the interface
interfaceAddress : string option
/// Small groups for this church
smallGroups : ICollection<SmallGroup>
}
with
/// An empty church
// aww... how sad :(
static member empty =
{ churchId = Guid.Empty
name = ""
city = ""
st = ""
hasInterface = false
interfaceAddress = None
smallGroups = List<SmallGroup> ()
}
/// Configure EF for this entity
static member internal configureEF (mb : ModelBuilder) =
mb.Entity<Church> (
fun m ->
m.ToTable "Church" |> ignore
m.Property(fun e -> e.churchId).HasColumnName "ChurchId" |> ignore
m.Property(fun e -> e.name).HasColumnName("Name").IsRequired () |> ignore
m.Property(fun e -> e.city).HasColumnName("City").IsRequired () |> ignore
m.Property(fun e -> e.st).HasColumnName("ST").IsRequired().HasMaxLength 2 |> ignore
m.Property(fun e -> e.hasInterface).HasColumnName "HasVirtualPrayerRoomInterface" |> ignore
m.Property(fun e -> e.interfaceAddress).HasColumnName "InterfaceAddress" |> ignore)
|> ignore
mb.Model.FindEntityType(typeof<Church>).FindProperty("interfaceAddress")
.SetValueConverter(OptionConverter<string> ())
/// Preferences for the form and format of the prayer request list
and [<CLIMutable; NoComparison; NoEquality>] ListPreferences =
{ /// The Id of the small group to which these preferences belong
smallGroupId : SmallGroupId
/// The days after which regular requests expire
daysToExpire : int
/// The number of days a new or updated request is considered new
daysToKeepNew : int
/// The number of weeks after which long-term requests are flagged for follow-up
longTermUpdateWeeks : int
/// The name from which e-mails are sent
emailFromName : string
/// The e-mail address from which e-mails are sent
emailFromAddress : string
/// The fonts to use in generating the list of prayer requests
listFonts : string
/// The color for the prayer request list headings
headingColor : string
/// The color for the lines offsetting the prayer request list headings
lineColor : string
/// The font size for the headings on the prayer request list
headingFontSize : int
/// The font size for the text on the prayer request list
textFontSize : int
/// The order in which the prayer requests are sorted
requestSort : string
/// The password used for "small group login" (view-only request list)
groupPassword : string
/// The default e-mail type for this class
defaultEmailType : string
/// Whether this class makes its request list public
isPublic : bool
/// The time zone which this class uses (use tzdata names)
timeZoneId : TimeZoneId
/// The time zone information
timeZone : TimeZone
}
with
/// A set of preferences with their default values
static member empty =
{ smallGroupId = Guid.Empty
daysToExpire = 14
daysToKeepNew = 7
longTermUpdateWeeks = 4
emailFromName = "PrayerTracker"
emailFromAddress = "prayer@djs-consulting.com"
listFonts = "Century Gothic,Tahoma,Luxi Sans,sans-serif"
headingColor = "maroon"
lineColor = "navy"
headingFontSize = 16
textFontSize = 12
requestSort = "D"
groupPassword = ""
defaultEmailType = EmailType.Html
isPublic = false
timeZoneId = "America/Denver"
timeZone = TimeZone.empty
}
/// Configure EF for this entity
static member internal configureEF (mb : ModelBuilder) =
mb.Entity<ListPreferences> (
fun m ->
m.ToTable "ListPreference" |> ignore
m.HasKey (fun e -> e.smallGroupId :> obj) |> ignore
m.Property(fun e -> e.smallGroupId).HasColumnName "SmallGroupId" |> ignore
m.Property(fun e -> e.daysToKeepNew)
.HasColumnName("DaysToKeepNew")
.IsRequired()
.HasDefaultValue(7)
|> ignore
m.Property(fun e -> e.daysToExpire)
.HasColumnName("DaysToExpire")
.IsRequired()
.HasDefaultValue(14)
|> ignore
m.Property(fun e -> e.longTermUpdateWeeks)
.HasColumnName("LongTermUpdateWeeks")
.IsRequired()
.HasDefaultValue(4)
|> ignore
m.Property(fun e -> e.emailFromName)
.HasColumnName("EmailFromName")
.IsRequired()
.HasDefaultValue("PrayerTracker")
|> ignore
m.Property(fun e -> e.emailFromAddress)
.HasColumnName("EmailFromAddress")
.IsRequired()
.HasDefaultValue("prayer@djs-consulting.com")
|> ignore
m.Property(fun e -> e.listFonts)
.HasColumnName("ListFonts")
.IsRequired()
.HasDefaultValue("Century Gothic,Tahoma,Luxi Sans,sans-serif")
|> ignore
m.Property(fun e -> e.headingColor)
.HasColumnName("HeadingColor")
.IsRequired()
.HasDefaultValue("maroon")
|> ignore
m.Property(fun e -> e.lineColor)
.HasColumnName("LineColor")
.IsRequired()
.HasDefaultValue("navy")
|> ignore
m.Property(fun e -> e.headingFontSize)
.HasColumnName("HeadingFontSize")
.IsRequired()
.HasDefaultValue(16)
|> ignore
m.Property(fun e -> e.textFontSize)
.HasColumnName("TextFontSize")
.IsRequired()
.HasDefaultValue(12)
|> ignore
m.Property(fun e -> e.requestSort)
.HasColumnName("RequestSort")
.IsRequired()
.HasMaxLength(1)
.HasDefaultValue("D")
|> ignore
m.Property(fun e -> e.groupPassword)
.HasColumnName("GroupPassword")
.IsRequired()
.HasDefaultValue("")
|> ignore
m.Property(fun e -> e.defaultEmailType)
.HasColumnName("DefaultEmailType")
.IsRequired()
.HasDefaultValue(EmailType.Html)
|> ignore
m.Property(fun e -> e.isPublic)
.HasColumnName("IsPublic")
.IsRequired()
.HasDefaultValue(false)
|> ignore
m.Property(fun e -> e.timeZoneId)
.HasColumnName("TimeZoneId")
.IsRequired()
.HasDefaultValue("America/Denver")
|> ignore)
|> ignore
/// A member of a small group
and [<CLIMutable; NoComparison; NoEquality>] Member =
{ /// The Id of the member
memberId : MemberId
/// The Id of the small group to which this member belongs
smallGroupId : SmallGroupId
/// The name of the member
memberName : string
/// The e-mail address for the member
email : string
/// The type of e-mail preferred by this member (see <see cref="EmailTypes"/> constants)
format : string option
/// The small group to which this member belongs
smallGroup : SmallGroup
}
with
/// An empty member
static member empty =
{ memberId = Guid.Empty
smallGroupId = Guid.Empty
memberName = ""
email = ""
format = None
smallGroup = SmallGroup.empty
}
/// Configure EF for this entity
static member internal configureEF (mb : ModelBuilder) =
mb.Entity<Member> (
fun m ->
m.ToTable "Member" |> ignore
m.Property(fun e -> e.memberId).HasColumnName "MemberId" |> ignore
m.Property(fun e -> e.smallGroupId).HasColumnName "SmallGroupId" |> ignore
m.Property(fun e -> e.memberName).HasColumnName("MemberName").IsRequired() |> ignore
m.Property(fun e -> e.email).HasColumnName("Email").IsRequired() |> ignore
m.Property(fun e -> e.format).HasColumnName "Format" |> ignore)
|> ignore
mb.Model.FindEntityType(typeof<Member>).FindProperty("format").SetValueConverter(OptionConverter<string> ())
/// This represents a single prayer request
and [<CLIMutable; NoComparison; NoEquality>] PrayerRequest =
{ /// The Id of this request
prayerRequestId : PrayerRequestId
/// The type of the request
requestType : string
/// The user who entered the request
userId : UserId
/// The small group to which this request belongs
smallGroupId : SmallGroupId
/// The date/time on which this request was entered
enteredDate : DateTime
/// The date/time this request was last updated
updatedDate : DateTime
/// The name of the requestor or subject, or title of announcement
requestor : string option
/// The text of the request
text : string
/// Whether this request is exempt from standard expiration rules
doNotExpire : bool
/// Whether the chaplain should be notified for this request
notifyChaplain : bool
/// Whether this request has been expired manually
isManuallyExpired : bool
/// The user who entered this request
user : User
/// The small group to which this request belongs
smallGroup : SmallGroup
}
with
/// An empty request
static member empty =
{ prayerRequestId = Guid.Empty
requestType = RequestType.Current
userId = Guid.Empty
smallGroupId = Guid.Empty
enteredDate = DateTime.MinValue
updatedDate = DateTime.MinValue
requestor = None
text = ""
doNotExpire = false
notifyChaplain = false
isManuallyExpired = false
user = User.empty
smallGroup = SmallGroup.empty
}
/// Is this request expired?
member this.isExpired (curr : DateTime) expDays =
match this.isManuallyExpired with
| true -> true // Manual expiration
| false ->
let nonExpiringTypes = [ RequestType.Recurring; RequestType.Expecting ]
match this.doNotExpire || List.contains this.requestType nonExpiringTypes with
| true -> false // No expiration
| false -> curr.AddDays(-(float expDays)) > this.updatedDate // Automatic expiration
/// Is an update required for this long-term request?
member this.updateRequired curr expDays updWeeks =
match this.isExpired curr expDays with
| true -> false
| _ -> curr.AddDays(-(float (updWeeks * 7))) > this.updatedDate
/// Configure EF for this entity
static member internal configureEF (mb : ModelBuilder) =
mb.Entity<PrayerRequest> (
fun m ->
m.ToTable "PrayerRequest" |> ignore
m.Property(fun e -> e.prayerRequestId).HasColumnName "PrayerRequestId" |> ignore
m.Property(fun e -> e.requestType).HasColumnName("RequestType").IsRequired() |> ignore
m.Property(fun e -> e.userId).HasColumnName "UserId" |> ignore
m.Property(fun e -> e.smallGroupId).HasColumnName "SmallGroupId" |> ignore
m.Property(fun e -> e.enteredDate).HasColumnName "EnteredDate" |> ignore
m.Property(fun e -> e.updatedDate).HasColumnName "UpdatedDate" |> ignore
m.Property(fun e -> e.requestor).HasColumnName "Requestor" |> ignore
m.Property(fun e -> e.text).HasColumnName("Text").IsRequired() |> ignore
m.Property(fun e -> e.doNotExpire).HasColumnName "DoNotExpire" |> ignore
m.Property(fun e -> e.notifyChaplain).HasColumnName "NotifyChaplain" |> ignore
m.Property(fun e -> e.isManuallyExpired).HasColumnName "IsManuallyExpired" |> ignore)
|> ignore
mb.Model.FindEntityType(typeof<PrayerRequest>).FindProperty("requestor")
.SetValueConverter(OptionConverter<string> ())
/// This represents a small group (Sunday School class, Bible study group, etc.)
and [<CLIMutable; NoComparison; NoEquality>] SmallGroup =
{ /// The Id of this small group
smallGroupId : SmallGroupId
/// The church to which this group belongs
churchId : ChurchId
/// The name of the group
name : string
/// The church to which this small group belongs
church : Church
/// The preferences for the request list
preferences : ListPreferences
/// The members of the group
members : ICollection<Member>
/// Prayer requests for this small group
prayerRequests : ICollection<PrayerRequest>
/// The users authorized to manage this group
users : ICollection<UserSmallGroup>
}
with
/// An empty small group
static member empty =
{ smallGroupId = Guid.Empty
churchId = Guid.Empty
name = ""
church = Church.empty
preferences = ListPreferences.empty
members = List<Member> ()
prayerRequests = List<PrayerRequest> ()
users = List<UserSmallGroup> ()
}
/// Get the local date for this group
member this.localTimeNow (clock : IClock) =
match clock with null -> nullArg "clock" | _ -> ()
let tz =
match DateTimeZoneProviders.Tzdb.Ids.Contains this.preferences.timeZoneId with
| true -> DateTimeZoneProviders.Tzdb.[this.preferences.timeZoneId]
| false -> DateTimeZone.Utc
clock.GetCurrentInstant().InZone(tz).ToDateTimeUnspecified()
/// Get the local date for this group
member this.localDateNow clock =
(this.localTimeNow clock).Date
/// Configure EF for this entity
static member internal configureEF (mb : ModelBuilder) =
mb.Entity<SmallGroup> (
fun m ->
m.ToTable "SmallGroup" |> ignore
m.Property(fun e -> e.smallGroupId).HasColumnName "SmallGroupId" |> ignore
m.Property(fun e -> e.churchId).HasColumnName "ChurchId" |> ignore
m.Property(fun e -> e.name).HasColumnName("Name").IsRequired() |> ignore
m.HasOne(fun e -> e.preferences) |> ignore)
|> ignore
/// This represents a time zone in which a class may reside
and [<CLIMutable; NoComparison; NoEquality>] TimeZone =
{ /// The Id for this time zone (uses tzdata names)
timeZoneId : TimeZoneId
/// The description of this time zone
description : string
/// The order in which this timezone should be displayed
sortOrder : int
/// Whether this timezone is active
isActive : bool
}
with
/// An empty time zone
static member empty =
{ timeZoneId = ""
description = ""
sortOrder = 0
isActive = false
}
/// Configure EF for this entity
static member internal configureEF (mb : ModelBuilder) =
mb.Entity<TimeZone> (
fun m ->
m.ToTable "TimeZone" |> ignore
m.Property(fun e -> e.timeZoneId).HasColumnName "TimeZoneId" |> ignore
m.Property(fun e -> e.description).HasColumnName("Description").IsRequired() |> ignore
m.Property(fun e -> e.sortOrder).HasColumnName "SortOrder" |> ignore
m.Property(fun e -> e.isActive).HasColumnName "IsActive" |> ignore)
|> ignore
/// This represents a user of PrayerTracker
and [<CLIMutable; NoComparison; NoEquality>] User =
{ /// The Id of this user
userId : UserId
/// The first name of this user
firstName : string
/// The last name of this user
lastName : string
/// The e-mail address of the user
emailAddress : string
/// Whether this user is a PrayerTracker system administrator
isAdmin : bool
/// The user's hashed password
passwordHash : string
/// The salt for the user's hashed password
salt : Guid option
/// The small groups which this user is authorized
smallGroups : ICollection<UserSmallGroup>
}
with
/// An empty user
static member empty =
{ userId = Guid.Empty
firstName = ""
lastName = ""
emailAddress = ""
isAdmin = false
passwordHash = ""
salt = None
smallGroups = List<UserSmallGroup> ()
}
/// The full name of the user
member this.fullName =
sprintf "%s %s" this.firstName this.lastName
/// Configure EF for this entity
static member internal configureEF (mb : ModelBuilder) =
mb.Entity<User> (
fun m ->
m.ToTable "User" |> ignore
m.Ignore(fun e -> e.fullName :> obj) |> ignore
m.Property(fun e -> e.userId).HasColumnName "UserId" |> ignore
m.Property(fun e -> e.firstName).HasColumnName("FirstName").IsRequired() |> ignore
m.Property(fun e -> e.lastName).HasColumnName("LastName").IsRequired() |> ignore
m.Property(fun e -> e.emailAddress).HasColumnName("EmailAddress").IsRequired() |> ignore
m.Property(fun e -> e.isAdmin).HasColumnName "IsSystemAdmin" |> ignore
m.Property(fun e -> e.passwordHash).HasColumnName("PasswordHash").IsRequired() |> ignore
m.Property(fun e -> e.salt).HasColumnName "Salt" |> ignore)
|> ignore
mb.Model.FindEntityType(typeof<User>).FindProperty("salt")
.SetValueConverter(OptionConverter<Guid> ())
/// Cross-reference between user and small group
and [<CLIMutable; NoComparison; NoEquality>] UserSmallGroup =
{ /// The Id of the user who has access to the small group
userId : UserId
/// The Id of the small group to which the user has access
smallGroupId : SmallGroupId
/// The user who has access to the small group
user : User
/// The small group to which the user has access
smallGroup : SmallGroup
}
with
/// An empty user/small group xref
static member empty =
{ userId = Guid.Empty
smallGroupId = Guid.Empty
user = User.empty
smallGroup = SmallGroup.empty
}
/// Configure EF for this entity
static member internal configureEF (mb : ModelBuilder) =
mb.Entity<UserSmallGroup> (
fun m ->
m.ToTable "User_SmallGroup" |> ignore
m.HasKey(fun e -> { userId = e.userId; smallGroupId = e.smallGroupId } :> obj) |> ignore
m.Property(fun e -> e.userId).HasColumnName "UserId" |> ignore
m.Property(fun e -> e.smallGroupId).HasColumnName "SmallGroupId" |> ignore
m.HasOne(fun e -> e.user)
.WithMany(fun e -> e.smallGroups :> IEnumerable<UserSmallGroup>)
.HasForeignKey(fun e -> e.userId :> obj)
|> ignore
m.HasOne(fun e -> e.smallGroup)
.WithMany(fun e -> e.users :> IEnumerable<UserSmallGroup>)
.HasForeignKey(fun e -> e.smallGroupId :> obj)
|> ignore)
|> ignore

View File

@ -0,0 +1,510 @@
namespace PrayerTracker.Migrations
open Microsoft.EntityFrameworkCore
open Microsoft.EntityFrameworkCore.Infrastructure
open Microsoft.EntityFrameworkCore.Migrations
open Microsoft.EntityFrameworkCore.Migrations.Operations
open Microsoft.EntityFrameworkCore.Migrations.Operations.Builders
open Npgsql.EntityFrameworkCore.PostgreSQL.Metadata
open PrayerTracker
open PrayerTracker.Entities
open System
type ChurchTable =
{ churchId : OperationBuilder<AddColumnOperation>
city : OperationBuilder<AddColumnOperation>
hasInterface : OperationBuilder<AddColumnOperation>
interfaceAddress : OperationBuilder<AddColumnOperation>
name : OperationBuilder<AddColumnOperation>
st : OperationBuilder<AddColumnOperation>
}
type ListPreferencesTable =
{ smallGroupId : OperationBuilder<AddColumnOperation>
daysToExpire : OperationBuilder<AddColumnOperation>
daysToKeepNew : OperationBuilder<AddColumnOperation>
defaultEmailType : OperationBuilder<AddColumnOperation>
emailFromAddress : OperationBuilder<AddColumnOperation>
emailFromName : OperationBuilder<AddColumnOperation>
groupPassword : OperationBuilder<AddColumnOperation>
headingColor : OperationBuilder<AddColumnOperation>
headingFontSize : OperationBuilder<AddColumnOperation>
isPublic : OperationBuilder<AddColumnOperation>
lineColor : OperationBuilder<AddColumnOperation>
listFonts : OperationBuilder<AddColumnOperation>
longTermUpdateWeeks : OperationBuilder<AddColumnOperation>
requestSort : OperationBuilder<AddColumnOperation>
textFontSize : OperationBuilder<AddColumnOperation>
timeZoneId : OperationBuilder<AddColumnOperation>
}
type MemberTable =
{ memberId : OperationBuilder<AddColumnOperation>
email : OperationBuilder<AddColumnOperation>
format : OperationBuilder<AddColumnOperation>
memberName : OperationBuilder<AddColumnOperation>
smallGroupId : OperationBuilder<AddColumnOperation>
}
type PrayerRequestTable =
{ prayerRequestId : OperationBuilder<AddColumnOperation>
doNotExpire : OperationBuilder<AddColumnOperation>
enteredDate : OperationBuilder<AddColumnOperation>
isManuallyExpired : OperationBuilder<AddColumnOperation>
notifyChaplain : OperationBuilder<AddColumnOperation>
requestType : OperationBuilder<AddColumnOperation>
requestor : OperationBuilder<AddColumnOperation>
smallGroupId : OperationBuilder<AddColumnOperation>
text : OperationBuilder<AddColumnOperation>
updatedDate : OperationBuilder<AddColumnOperation>
userId : OperationBuilder<AddColumnOperation>
}
type SmallGroupTable =
{ smallGroupId : OperationBuilder<AddColumnOperation>
churchId : OperationBuilder<AddColumnOperation>
name : OperationBuilder<AddColumnOperation>
}
type TimeZoneTable =
{ timeZoneId : OperationBuilder<AddColumnOperation>
description : OperationBuilder<AddColumnOperation>
isActive : OperationBuilder<AddColumnOperation>
sortOrder : OperationBuilder<AddColumnOperation>
}
type UserSmallGroupTable =
{ userId : OperationBuilder<AddColumnOperation>
smallGroupId : OperationBuilder<AddColumnOperation>
}
type UserTable =
{ userId : OperationBuilder<AddColumnOperation>
emailAddress : OperationBuilder<AddColumnOperation>
firstName : OperationBuilder<AddColumnOperation>
isAdmin : OperationBuilder<AddColumnOperation>
lastName : OperationBuilder<AddColumnOperation>
passwordHash : OperationBuilder<AddColumnOperation>
salt : OperationBuilder<AddColumnOperation>
}
[<DbContext (typeof<AppDbContext>)>]
[<Migration "20161217153124_InitialDatabase">]
type InitialDatabase () =
inherit Migration ()
override __.Up (migrationBuilder : MigrationBuilder) =
migrationBuilder.EnsureSchema (name = "pt")
|> ignore
migrationBuilder.CreateTable (
name = "Church",
schema = "pt",
columns =
(fun table ->
{ churchId = table.Column<Guid> (name = "ChurchId", nullable = false)
city = table.Column<string> (name = "City", nullable = false)
hasInterface = table.Column<bool> (name = "HasVirtualPrayerRoomInterface", nullable = false)
interfaceAddress = table.Column<string> (name = "InterfaceAddress", nullable = true)
name = table.Column<string> (name = "Name", nullable = false)
st = table.Column<string> (name = "ST", maxLength = Nullable<int> 2, nullable = false)
}),
constraints =
fun table ->
table.PrimaryKey ("PK_Church", fun x -> upcast x.churchId) |> ignore)
|> ignore
migrationBuilder.CreateTable (
name = "TimeZone",
schema = "pt",
columns =
(fun table ->
{ timeZoneId = table.Column<string> (name = "TimeZoneId", nullable = false)
description = table.Column<string> (name = "Description", nullable = false)
isActive = table.Column<bool> (name = "IsActive", nullable = false)
sortOrder = table.Column<int> (name = "SortOrder", nullable = false)
}),
constraints =
fun table ->
table.PrimaryKey ("PK_TimeZone", fun x -> upcast x.timeZoneId) |> ignore)
|> ignore
migrationBuilder.CreateTable (
name = "User",
schema = "pt",
columns =
(fun table ->
{ userId = table.Column<Guid> (name = "UserId", nullable = false)
emailAddress = table.Column<string> (name = "EmailAddress", nullable = false)
firstName = table.Column<string> (name = "FirstName", nullable = false)
isAdmin = table.Column<bool> (name = "IsSystemAdmin", nullable = false)
lastName = table.Column<string> (name = "LastName", nullable = false)
passwordHash = table.Column<string> (name = "PasswordHash", nullable = false)
salt = table.Column<Guid> (name = "Salt", nullable = true)
}),
constraints =
fun table ->
table.PrimaryKey("PK_User", fun x -> upcast x.userId) |> ignore)
|> ignore
migrationBuilder.CreateTable (
name = "SmallGroup",
schema = "pt",
columns =
(fun table ->
{ smallGroupId = table.Column<Guid> (name = "SmallGroupId", nullable = false)
churchId = table.Column<Guid> (name = "ChurchId", nullable = false)
name = table.Column<string> (name = "Name", nullable = false)
}),
constraints =
fun table ->
table.PrimaryKey ("PK_SmallGroup", fun x -> upcast x.smallGroupId) |> ignore
table.ForeignKey (
name = "FK_SmallGroup_Church_ChurchId",
column = (fun x -> upcast x.churchId),
principalSchema = "pt",
principalTable = "Church",
principalColumn = "ChurchId",
onDelete = ReferentialAction.Cascade)
|> ignore)
|> ignore
migrationBuilder.CreateTable (
name = "ListPreference",
schema = "pt",
columns =
(fun table ->
{ smallGroupId = table.Column<Guid> (name = "SmallGroupId", nullable = false)
daysToExpire = table.Column<int> (name = "DaysToExpire", nullable = false, defaultValue = 14)
daysToKeepNew = table.Column<int> (name = "DaysToKeepNew", nullable = false, defaultValue = 7)
defaultEmailType = table.Column<string> (name = "DefaultEmailType", nullable = false, defaultValue = "Html")
emailFromAddress = table.Column<string> (name = "EmailFromAddress", nullable = false, defaultValue = "prayer@djs-consulting.com")
emailFromName = table.Column<string> (name = "EmailFromName", nullable = false, defaultValue = "PrayerTracker")
groupPassword = table.Column<string> (name = "GroupPassword", nullable = false, defaultValue = "")
headingColor = table.Column<string> (name = "HeadingColor", nullable = false, defaultValue = "maroon")
headingFontSize = table.Column<int> (name = "HeadingFontSize", nullable = false, defaultValue = 16)
isPublic = table.Column<bool> (name = "IsPublic", nullable = false, defaultValue = false)
lineColor = table.Column<string> (name = "LineColor", nullable = false, defaultValue = "navy")
listFonts = table.Column<string> (name = "ListFonts", nullable = false, defaultValue = "Century Gothic,Tahoma,Luxi Sans,sans-serif")
longTermUpdateWeeks = table.Column<int> (name = "LongTermUpdateWeeks", nullable = false, defaultValue = 4)
requestSort = table.Column<string> (name = "RequestSort", maxLength = Nullable<int> 1, nullable = false, defaultValue = "D")
textFontSize = table.Column<int> (name = "TextFontSize", nullable = false, defaultValue = 12)
timeZoneId = table.Column<string> (name = "TimeZoneId", nullable = false, defaultValue = "America/Denver")
}),
constraints =
fun table ->
table.PrimaryKey ("PK_ListPreference", fun x -> upcast x.smallGroupId) |> ignore
table.ForeignKey (
name = "FK_ListPreference_SmallGroup_SmallGroupId",
column = (fun x -> upcast x.smallGroupId),
principalSchema = "pt",
principalTable = "SmallGroup",
principalColumn = "SmallGroupId",
onDelete = ReferentialAction.Cascade)
|> ignore
table.ForeignKey (
name = "FK_ListPreference_TimeZone_TimeZoneId",
column = (fun x -> upcast x.timeZoneId),
principalSchema = "pt",
principalTable = "TimeZone",
principalColumn = "TimeZoneId",
onDelete = ReferentialAction.Cascade)
|> ignore)
|> ignore
migrationBuilder.CreateTable (
name = "Member",
schema = "pt",
columns =
(fun table ->
{ memberId = table.Column<Guid> (name = "MemberId", nullable = false)
email = table.Column<string> (name = "Email", nullable = false)
format = table.Column<string> (name = "Format", nullable = true)
memberName = table.Column<string> (name = "MemberName", nullable = false)
smallGroupId = table.Column<Guid> (name = "SmallGroupId", nullable = false)
}),
constraints =
fun table ->
table.PrimaryKey ("PK_Member", fun x -> upcast x.memberId) |> ignore
table.ForeignKey (
name = "FK_Member_SmallGroup_SmallGroupId",
column = (fun x -> upcast x.smallGroupId),
principalSchema = "pt",
principalTable = "SmallGroup",
principalColumn = "SmallGroupId",
onDelete = ReferentialAction.Cascade)
|> ignore)
|> ignore
migrationBuilder.CreateTable (
name = "PrayerRequest",
schema = "pt",
columns =
(fun table ->
{ prayerRequestId = table.Column<Guid> (name = "PrayerRequestId", nullable = false)
doNotExpire = table.Column<bool> (name = "DoNotExpire", nullable = false)
enteredDate = table.Column<DateTime> (name = "EnteredDate", nullable = false)
isManuallyExpired = table.Column<bool> (name = "IsManuallyExpired", nullable = false)
notifyChaplain = table.Column<bool> (name = "NotifyChaplain", nullable = false)
requestType = table.Column<string> (name = "RequestType", nullable = false)
requestor = table.Column<string> (name = "Requestor", nullable = true)
smallGroupId = table.Column<Guid> (name = "SmallGroupId", nullable = false)
text = table.Column<string> (name = "Text", nullable = false)
updatedDate = table.Column<DateTime> (name = "UpdatedDate", nullable = false)
userId = table.Column<Guid> (name = "UserId", nullable = false)
}),
constraints =
fun table ->
table.PrimaryKey ("PK_PrayerRequest", fun x -> upcast x.prayerRequestId) |> ignore
table.ForeignKey (
name = "FK_PrayerRequest_SmallGroup_SmallGroupId",
column = (fun x -> upcast x.smallGroupId),
principalSchema = "pt",
principalTable = "SmallGroup",
principalColumn = "SmallGroupId",
onDelete = ReferentialAction.Cascade)
|> ignore
table.ForeignKey (
name = "FK_PrayerRequest_User_UserId",
column = (fun x -> upcast x.userId),
principalSchema = "pt",
principalTable = "User",
principalColumn = "UserId",
onDelete = ReferentialAction.Cascade)
|> ignore)
|> ignore
migrationBuilder.CreateTable(
name = "User_SmallGroup",
schema = "pt",
columns =
(fun table ->
{ userId = table.Column<Guid> (name = "UserId", nullable = false)
smallGroupId = table.Column<Guid> (name = "SmallGroupId", nullable = false)
}),
constraints =
fun table ->
table.PrimaryKey ("PK_User_SmallGroup", fun x -> upcast x) |> ignore
table.ForeignKey (
name = "FK_User_SmallGroup_SmallGroup_SmallGroupId",
column = (fun x -> upcast x.smallGroupId),
principalSchema = "pt",
principalTable = "SmallGroup",
principalColumn = "SmallGroupId",
onDelete = ReferentialAction.Cascade)
|> ignore
table.ForeignKey (
name = "FK_User_SmallGroup_User_UserId",
column = (fun x -> upcast x.userId),
principalSchema = "pt",
principalTable = "User",
principalColumn = "UserId",
onDelete = ReferentialAction.Cascade)
|> ignore)
|> ignore
migrationBuilder.CreateIndex (name = "IX_ListPreference_TimeZoneId", schema = "pt", table = "ListPreference", column = "TimeZoneId") |> ignore
migrationBuilder.CreateIndex (name = "IX_Member_SmallGroupId", schema = "pt", table = "Member", column = "SmallGroupId") |> ignore
migrationBuilder.CreateIndex (name = "IX_PrayerRequest_SmallGroupId", schema = "pt", table = "PrayerRequest", column = "SmallGroupId") |> ignore
migrationBuilder.CreateIndex (name = "IX_PrayerRequest_UserId", schema = "pt", table = "PrayerRequest", column = "UserId") |> ignore
migrationBuilder.CreateIndex (name = "IX_SmallGroup_ChurchId", schema = "pt", table = "SmallGroup", column = "ChurchId") |> ignore
migrationBuilder.CreateIndex (name = "IX_User_SmallGroup_SmallGroupId", schema = "pt", table = "User_SmallGroup", column = "SmallGroupId") |> ignore
override __.Down (migrationBuilder : MigrationBuilder) =
migrationBuilder.DropTable (name = "ListPreference", schema = "pt") |> ignore
migrationBuilder.DropTable (name = "Member", schema = "pt") |> ignore
migrationBuilder.DropTable (name = "PrayerRequest", schema = "pt") |> ignore
migrationBuilder.DropTable (name = "User_SmallGroup", schema = "pt") |> ignore
migrationBuilder.DropTable (name = "TimeZone", schema = "pt") |> ignore
migrationBuilder.DropTable (name = "SmallGroup", schema = "pt") |> ignore
migrationBuilder.DropTable (name = "User", schema = "pt") |> ignore
migrationBuilder.DropTable (name = "Church", schema = "pt") |> ignore
override __.BuildTargetModel (modelBuilder : ModelBuilder) =
modelBuilder
.HasDefaultSchema("pt")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
.HasAnnotation("ProductVersion", "1.1.0-rtm-22752")
|> ignore
modelBuilder.Entity (
typeof<Church>,
fun b ->
b.Property<Guid>("churchId").ValueGeneratedOnAdd() |> ignore
b.Property<string>("city").IsRequired() |> ignore
b.Property<bool>("hasInterface") |> ignore
b.Property<string>("interfaceAddress") |> ignore
b.Property<string>("name").IsRequired() |> ignore
b.Property<string>("st").IsRequired().HasMaxLength(2) |> ignore
b.HasKey("churchId") |> ignore
b.ToTable("Church") |> ignore)
|> ignore
modelBuilder.Entity (
typeof<ListPreferences>,
fun b ->
b.Property<Guid>("smallGroupId") |> ignore
b.Property<int>("daysToExpire").ValueGeneratedOnAdd().HasDefaultValue(14) |> ignore
b.Property<int>("daysToKeepNew").ValueGeneratedOnAdd().HasDefaultValue(7) |> ignore
b.Property<string>("defaultEmailType").IsRequired().ValueGeneratedOnAdd().HasDefaultValue("Html") |> ignore
b.Property<string>("emailFromAddress").IsRequired().ValueGeneratedOnAdd().HasDefaultValue("prayer@djs-consulting.com") |> ignore
b.Property<string>("emailFromName").IsRequired().ValueGeneratedOnAdd().HasDefaultValue("PrayerTracker") |> ignore
b.Property<string>("groupPassword").IsRequired().ValueGeneratedOnAdd().HasDefaultValue("") |> ignore
b.Property<string>("headingColor").IsRequired().ValueGeneratedOnAdd().HasDefaultValue("maroon") |> ignore
b.Property<int>("headingFontSize").ValueGeneratedOnAdd().HasDefaultValue(16) |> ignore
b.Property<bool>("isPublic").ValueGeneratedOnAdd().HasDefaultValue(false) |> ignore
b.Property<string>("lineColor").IsRequired().ValueGeneratedOnAdd().HasDefaultValue("navy") |> ignore
b.Property<string>("listFonts").IsRequired().ValueGeneratedOnAdd().HasDefaultValue("Century Gothic,Tahoma,Luxi Sans,sans-serif") |> ignore
b.Property<int>("longTermUpdateWeeks").ValueGeneratedOnAdd().HasDefaultValue(4) |> ignore
b.Property<string>("requestSort").IsRequired().ValueGeneratedOnAdd().HasDefaultValue("D").HasMaxLength(1) |> ignore
b.Property<int>("textFontSize").ValueGeneratedOnAdd().HasDefaultValue(12) |> ignore
b.Property<string>("timeZoneId").IsRequired().ValueGeneratedOnAdd().HasDefaultValue("America/Denver") |> ignore
b.HasKey("smallGroupId") |> ignore
b.HasIndex("timeZoneId") |> ignore
b.ToTable("ListPreference") |> ignore)
|> ignore
modelBuilder.Entity (
typeof<Member>,
fun b ->
b.Property<Guid>("memberId").ValueGeneratedOnAdd() |> ignore
b.Property<string>("email").IsRequired() |> ignore
b.Property<string>("format") |> ignore
b.Property<string>("memberName").IsRequired() |> ignore
b.Property<Guid>("smallGroupId") |> ignore
b.HasKey("memberId") |> ignore
b.HasIndex("smallGroupId") |> ignore
b.ToTable("Member") |> ignore)
|> ignore
modelBuilder.Entity (
typeof<PrayerRequest>,
fun b ->
b.Property<Guid>("prayerRequestId").ValueGeneratedOnAdd() |> ignore
b.Property<bool>("doNotExpire") |> ignore
b.Property<DateTime>("enteredDate") |> ignore
b.Property<bool>("isManuallyExpired") |> ignore
b.Property<bool>("notifyChaplain") |> ignore
b.Property<string>("requestType").IsRequired() |> ignore
b.Property<string>("requestor") |> ignore
b.Property<Guid>("smallGroupId") |> ignore
b.Property<string>("text").IsRequired() |> ignore
b.Property<DateTime>("updatedDate") |> ignore
b.Property<Guid>("userId") |> ignore
b.HasKey("prayerRequestId") |> ignore
b.HasIndex("smallGroupId") |> ignore
b.HasIndex("userId") |> ignore
b.ToTable("PrayerRequest") |> ignore)
|> ignore
modelBuilder.Entity (
typeof<SmallGroup>,
fun b ->
b.Property<Guid>("smallGroupId").ValueGeneratedOnAdd() |> ignore
b.Property<Guid>("churchId") |> ignore
b.Property<string>("name").IsRequired() |> ignore
b.HasKey("smallGroupId") |> ignore
b.HasIndex("churchId") |> ignore
b.ToTable("SmallGroup") |> ignore)
|> ignore
modelBuilder.Entity (
typeof<PrayerTracker.Entities.TimeZone>,
fun b ->
b.Property<string>("timeZoneId").ValueGeneratedOnAdd() |> ignore
b.Property<string>("description").IsRequired() |> ignore
b.Property<bool>("isActive") |> ignore
b.Property<int>("sortOrder") |> ignore
b.HasKey("timeZoneId") |> ignore
b.ToTable("TimeZone") |> ignore)
|> ignore
modelBuilder.Entity (
typeof<User>,
fun b ->
b.Property<Guid>("userId").ValueGeneratedOnAdd() |> ignore
b.Property<string>("emailAddress").IsRequired() |> ignore
b.Property<string>("firstName").IsRequired() |> ignore
b.Property<bool>("isAdmin") |> ignore
b.Property<string>("lastName").IsRequired() |> ignore
b.Property<string>("passwordHash").IsRequired() |> ignore
b.Property<Guid>("salt") |> ignore
b.HasKey("userId") |> ignore
b.ToTable("User") |> ignore)
|> ignore
modelBuilder.Entity (
typeof<UserSmallGroup>,
fun b ->
b.Property<Guid>("userId") |> ignore
b.Property<Guid>("smallGroupId") |> ignore
b.HasKey("userId", "smallGroupId") |> ignore
b.HasIndex("smallGroupId") |> ignore
b.ToTable("User_SmallGroup") |> ignore)
|> ignore
modelBuilder.Entity (
typeof<ListPreferences>,
fun b ->
b.HasOne("PrayerTracker.Entities.SmallGroup")
.WithOne("preferences")
.HasForeignKey("PrayerTracker.Entities.ListPreferences", "smallGroupId")
.OnDelete(DeleteBehavior.Cascade)
|> ignore
b.HasOne("PrayerTracker.Entities.TimeZone", "timeZone")
.WithMany()
.HasForeignKey("timeZoneId")
.OnDelete(DeleteBehavior.Cascade)
|> ignore)
|> ignore
modelBuilder.Entity (
typeof<Member>,
fun b ->
b.HasOne("PrayerTracker.Entities.SmallGroup", "smallGroup")
.WithMany("members")
.HasForeignKey("smallGroupId")
.OnDelete(DeleteBehavior.Cascade)
|> ignore)
|> ignore
modelBuilder.Entity (
typeof<PrayerRequest>,
fun b ->
b.HasOne("PrayerTracker.Entities.SmallGroup", "smallGroup")
.WithMany("prayerRequests")
.HasForeignKey("smallGroupId")
.OnDelete(DeleteBehavior.Cascade)
|> ignore
b.HasOne("PrayerTracker.Entities.User", "user")
.WithMany()
.HasForeignKey("userId")
.OnDelete(DeleteBehavior.Cascade)
|> ignore)
|> ignore
modelBuilder.Entity (
typeof<SmallGroup>,
fun b ->
b.HasOne("PrayerTracker.Entities.Church", "Church")
.WithMany("SmallGroups")
.HasForeignKey("ChurchId")
.OnDelete(DeleteBehavior.Cascade)
|> ignore)
|> ignore
modelBuilder.Entity (
typeof<UserSmallGroup>,
fun b ->
b.HasOne("PrayerTracker.Entities.SmallGroup", "smallGroup")
.WithMany("users")
.HasForeignKey("smallGroupId")
.OnDelete(DeleteBehavior.Cascade)
|> ignore
b.HasOne("PrayerTracker.Entities.User", "user")
.WithMany("smallGroups")
.HasForeignKey("userId")
.OnDelete(DeleteBehavior.Cascade)
|> ignore)
|> ignore

View File

@ -0,0 +1,199 @@
namespace PrayerTracker.Migrations
open Microsoft.EntityFrameworkCore
open Microsoft.EntityFrameworkCore.Infrastructure
open Npgsql.EntityFrameworkCore.PostgreSQL.Metadata
open PrayerTracker
open PrayerTracker.Entities
open System
[<DbContext (typeof<AppDbContext>)>]
type AppDbContextModelSnapshot () =
inherit ModelSnapshot ()
override __.BuildModel (modelBuilder : ModelBuilder) =
modelBuilder
.HasDefaultSchema("pt")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
.HasAnnotation("ProductVersion", "1.1.0-rtm-22752")
|> ignore
modelBuilder.Entity (
typeof<Church>,
fun b ->
b.Property<Guid>("churchId").ValueGeneratedOnAdd() |> ignore
b.Property<string>("city").IsRequired() |> ignore
b.Property<bool>("hasInterface") |> ignore
b.Property<string>("interfaceAddress") |> ignore
b.Property<string>("name").IsRequired() |> ignore
b.Property<string>("st").IsRequired().HasMaxLength(2) |> ignore
b.HasKey("churchId") |> ignore
b.ToTable("Church") |> ignore)
|> ignore
modelBuilder.Entity (
typeof<ListPreferences>,
fun b ->
b.Property<Guid>("smallGroupId") |> ignore
b.Property<int>("daysToExpire").ValueGeneratedOnAdd().HasDefaultValue(14) |> ignore
b.Property<int>("daysToKeepNew").ValueGeneratedOnAdd().HasDefaultValue(7) |> ignore
b.Property<string>("defaultEmailType").IsRequired().ValueGeneratedOnAdd().HasDefaultValue("Html") |> ignore
b.Property<string>("emailFromAddress").IsRequired().ValueGeneratedOnAdd().HasDefaultValue("prayer@djs-consulting.com") |> ignore
b.Property<string>("emailFromName").IsRequired().ValueGeneratedOnAdd().HasDefaultValue("PrayerTracker") |> ignore
b.Property<string>("groupPassword").IsRequired().ValueGeneratedOnAdd().HasDefaultValue("") |> ignore
b.Property<string>("headingColor").IsRequired().ValueGeneratedOnAdd().HasDefaultValue("maroon") |> ignore
b.Property<int>("headingFontSize").ValueGeneratedOnAdd().HasDefaultValue(16) |> ignore
b.Property<bool>("isPublic").ValueGeneratedOnAdd().HasDefaultValue(false) |> ignore
b.Property<string>("lineColor").IsRequired().ValueGeneratedOnAdd().HasDefaultValue("navy") |> ignore
b.Property<string>("listFonts").IsRequired().ValueGeneratedOnAdd().HasDefaultValue("Century Gothic,Tahoma,Luxi Sans,sans-serif") |> ignore
b.Property<int>("longTermUpdateWeeks").ValueGeneratedOnAdd().HasDefaultValue(4) |> ignore
b.Property<string>("requestSort").IsRequired().ValueGeneratedOnAdd().HasDefaultValue("D").HasMaxLength(1) |> ignore
b.Property<int>("textFontSize").ValueGeneratedOnAdd().HasDefaultValue(12) |> ignore
b.Property<string>("timeZoneId").IsRequired().ValueGeneratedOnAdd().HasDefaultValue("America/Denver") |> ignore
b.HasKey("smallGroupId") |> ignore
b.HasIndex("timeZoneId") |> ignore
b.ToTable("ListPreference") |> ignore)
|> ignore
modelBuilder.Entity (
typeof<Member>,
fun b ->
b.Property<Guid>("memberId").ValueGeneratedOnAdd() |> ignore
b.Property<string>("email").IsRequired() |> ignore
b.Property<string>("format") |> ignore
b.Property<string>("memberName").IsRequired() |> ignore
b.Property<Guid>("smallGroupId") |> ignore
b.HasKey("memberId") |> ignore
b.HasIndex("smallGroupId") |> ignore
b.ToTable("Member") |> ignore)
|> ignore
modelBuilder.Entity (
typeof<PrayerRequest>,
fun b ->
b.Property<Guid>("prayerRequestId").ValueGeneratedOnAdd() |> ignore
b.Property<bool>("doNotExpire") |> ignore
b.Property<DateTime>("enteredDate") |> ignore
b.Property<bool>("isManuallyExpired") |> ignore
b.Property<bool>("notifyChaplain") |> ignore
b.Property<string>("requestType").IsRequired() |> ignore
b.Property<string>("requestor") |> ignore
b.Property<Guid>("smallGroupId") |> ignore
b.Property<string>("text").IsRequired() |> ignore
b.Property<DateTime>("updatedDate") |> ignore
b.Property<Guid>("userId") |> ignore
b.HasKey("prayerRequestId") |> ignore
b.HasIndex("smallGroupId") |> ignore
b.HasIndex("userId") |> ignore
b.ToTable("PrayerRequest") |> ignore)
|> ignore
modelBuilder.Entity (
typeof<SmallGroup>,
fun b ->
b.Property<Guid>("smallGroupId").ValueGeneratedOnAdd() |> ignore
b.Property<Guid>("churchId") |> ignore
b.Property<string>("name").IsRequired() |> ignore
b.HasKey("smallGroupId") |> ignore
b.HasIndex("churchId") |> ignore
b.ToTable("SmallGroup") |> ignore)
|> ignore
modelBuilder.Entity (
typeof<PrayerTracker.Entities.TimeZone>,
fun b ->
b.Property<string>("timeZoneId").ValueGeneratedOnAdd() |> ignore
b.Property<string>("description").IsRequired() |> ignore
b.Property<bool>("isActive") |> ignore
b.Property<int>("sortOrder") |> ignore
b.HasKey("timeZoneId") |> ignore
b.ToTable("TimeZone") |> ignore)
|> ignore
modelBuilder.Entity (
typeof<User>,
fun b ->
b.Property<Guid>("userId").ValueGeneratedOnAdd() |> ignore
b.Property<string>("emailAddress").IsRequired() |> ignore
b.Property<string>("firstName").IsRequired() |> ignore
b.Property<bool>("isAdmin") |> ignore
b.Property<string>("lastName").IsRequired() |> ignore
b.Property<string>("passwordHash").IsRequired() |> ignore
b.Property<Guid>("salt") |> ignore
b.HasKey("userId") |> ignore
b.ToTable("User") |> ignore)
|> ignore
modelBuilder.Entity (
typeof<UserSmallGroup>,
fun b ->
b.Property<Guid>("userId") |> ignore
b.Property<Guid>("smallGroupId") |> ignore
b.HasKey("userId", "smallGroupId") |> ignore
b.HasIndex("smallGroupId") |> ignore
b.ToTable("User_SmallGroup") |> ignore)
|> ignore
modelBuilder.Entity (
typeof<ListPreferences>,
fun b ->
b.HasOne("PrayerTracker.Entities.SmallGroup")
.WithOne("preferences")
.HasForeignKey("PrayerTracker.Entities.ListPreferences", "smallGroupId")
.OnDelete(DeleteBehavior.Cascade)
|> ignore
b.HasOne("PrayerTracker.Entities.TimeZone", "timeZone")
.WithMany()
.HasForeignKey("timeZoneId")
.OnDelete(DeleteBehavior.Cascade)
|> ignore)
|> ignore
modelBuilder.Entity (
typeof<Member>,
fun b ->
b.HasOne("PrayerTracker.Entities.SmallGroup", "smallGroup")
.WithMany("members")
.HasForeignKey("smallGroupId")
.OnDelete(DeleteBehavior.Cascade)
|> ignore)
|> ignore
modelBuilder.Entity (
typeof<PrayerRequest>,
fun b ->
b.HasOne("PrayerTracker.Entities.SmallGroup", "smallGroup")
.WithMany("prayerRequests")
.HasForeignKey("smallGroupId")
.OnDelete(DeleteBehavior.Cascade)
|> ignore
b.HasOne("PrayerTracker.Entities.User", "user")
.WithMany()
.HasForeignKey("userId")
.OnDelete(DeleteBehavior.Cascade)
|> ignore)
|> ignore
modelBuilder.Entity (
typeof<SmallGroup>,
fun b ->
b.HasOne("PrayerTracker.Entities.Church", "Church")
.WithMany("SmallGroups")
.HasForeignKey("ChurchId")
.OnDelete(DeleteBehavior.Cascade)
|> ignore)
|> ignore
modelBuilder.Entity (
typeof<UserSmallGroup>,
fun b ->
b.HasOne("PrayerTracker.Entities.SmallGroup", "smallGroup")
.WithMany("users")
.HasForeignKey("smallGroupId")
.OnDelete(DeleteBehavior.Cascade)
|> ignore
b.HasOne("PrayerTracker.Entities.User", "user")
.WithMany("smallGroups")
.HasForeignKey("userId")
.OnDelete(DeleteBehavior.Cascade)
|> ignore)
|> ignore

View File

@ -0,0 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<FileVersion>7.0.0.0</FileVersion>
</PropertyGroup>
<ItemGroup>
<Compile Include="Entities.fs" />
<Compile Include="AppDbContext.fs" />
<Compile Include="DataAccess.fs" />
<Compile Include="Migrations\20161217153124_InitialDatabase.fs" />
<Compile Include="Migrations\AppDbContextModelSnapshot.fs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="FSharp.EFCore.OptionConverter" Version="1.0.0" />
<PackageReference Include="NodaTime" Version="2.4.0" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="2.1.2" />
<PackageReference Include="TaskBuilder.fs" Version="2.1.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="FSharp.Core" Version="4.5.2" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,219 @@
module PrayerTracker.Entities.EntitiesTests
open Expecto
open System
open System.Linq
open NodaTime.Testing
open NodaTime
[<Tests>]
let churchTests =
testList "Church" [
test "empty is as expected" {
let mt = Church.empty
Expect.equal mt.churchId Guid.Empty "The church ID should have been an empty GUID"
Expect.equal mt.name "" "The name should have been blank"
Expect.equal mt.city "" "The city should have been blank"
Expect.equal mt.st "" "The state should have been blank"
Expect.isFalse mt.hasInterface "The church should not show that it has an interface"
Expect.isNone mt.interfaceAddress "The interface address should not exist"
Expect.isNotNull mt.smallGroups "The small groups navigation property should not be null"
Expect.isEmpty mt.smallGroups "There should be no small groups for an empty church"
}
]
[<Tests>]
let listPreferencesTests =
testList "ListPreferences" [
test "empty is as expected" {
let mt = ListPreferences.empty
Expect.equal mt.smallGroupId Guid.Empty "The small group ID should have been an empty GUID"
Expect.equal mt.daysToExpire 14 "The default days to expire should have been 14"
Expect.equal mt.daysToKeepNew 7 "The default days to keep new should have been 7"
Expect.equal mt.longTermUpdateWeeks 4 "The default long term update weeks should have been 4"
Expect.equal mt.emailFromName "PrayerTracker" "The default e-mail from name should have been PrayerTracker"
Expect.equal mt.emailFromAddress "prayer@djs-consulting.com"
"The default e-mail from address should have been prayer@djs-consulting.com"
Expect.equal mt.listFonts "Century Gothic,Tahoma,Luxi Sans,sans-serif" "The default list fonts were incorrect"
Expect.equal mt.headingColor "maroon" "The default heading text color should have been maroon"
Expect.equal mt.lineColor "navy" "The default heding line color should have been navy"
Expect.equal mt.headingFontSize 16 "The default heading font size should have been 16"
Expect.equal mt.textFontSize 12 "The default text font size should have been 12"
Expect.equal mt.requestSort "D" "The default request sort should have been D (date)"
Expect.equal mt.groupPassword "" "The default group password should have been blank"
Expect.equal mt.defaultEmailType EmailType.Html "The default e-mail type should have been HTML"
Expect.isFalse mt.isPublic "The isPublic flag should not have been set"
Expect.equal mt.timeZoneId "America/Denver" "The default time zone should have been America/Denver"
Expect.equal mt.timeZone.timeZoneId "" "The default preferences should have included an empty time zone"
}
]
[<Tests>]
let memberTests =
testList "Member" [
test "empty is as expected" {
let mt = Member.empty
Expect.equal mt.memberId Guid.Empty "The member ID should have been an empty GUID"
Expect.equal mt.smallGroupId Guid.Empty "The small group ID should have been an empty GUID"
Expect.equal mt.memberName "" "The member name should have been blank"
Expect.equal mt.email "" "The member e-mail address should have been blank"
Expect.isNone mt.format "The preferred e-mail format should not exist"
Expect.equal mt.smallGroup.smallGroupId Guid.Empty "The small group should have been an empty one"
}
]
[<Tests>]
let prayerRequestTests =
testList "PrayerRequest" [
test "empty is as expected" {
let mt = PrayerRequest.empty
Expect.equal mt.prayerRequestId Guid.Empty "The request ID should have been an empty GUID"
Expect.equal mt.requestType RequestType.Current "The request type should have been Current"
Expect.equal mt.userId Guid.Empty "The user ID should have been an empty GUID"
Expect.equal mt.smallGroupId Guid.Empty "The small group ID should have been an empty GUID"
Expect.equal mt.enteredDate DateTime.MinValue "The entered date should have been the minimum"
Expect.equal mt.updatedDate DateTime.MinValue "The updated date should have been the minimum"
Expect.isNone mt.requestor "The requestor should not exist"
Expect.equal mt.text "" "The request text should have been blank"
Expect.isFalse mt.doNotExpire "The do not expire flag should not have been set"
Expect.isFalse mt.notifyChaplain "The notify chaplain flag should not have been set"
Expect.isFalse mt.isManuallyExpired "The is manually expired flag should not have been set"
Expect.equal mt.user.userId Guid.Empty "The user should have been an empty one"
Expect.equal mt.smallGroup.smallGroupId Guid.Empty "The small group should have been an empty one"
}
test "isExpired always returns false for expecting requests" {
let req = { PrayerRequest.empty with requestType = RequestType.Expecting }
Expect.isFalse (req.isExpired DateTime.Now 0) "An expecting request should never be considered expired"
}
test "isExpired always returns false for never-expired requests" {
let req = { PrayerRequest.empty with updatedDate = DateTime.Now.AddMonths -1; doNotExpire = true }
Expect.isFalse (req.isExpired DateTime.Now 4) "A never-expired request should never be considered expired"
}
test "isExpired always returns false for recurring requests" {
let req = { PrayerRequest.empty with requestType = RequestType.Recurring }
Expect.isFalse (req.isExpired DateTime.Now 0) "A recurring/long-term request should never be considered expired"
}
test "isExpired always returns true for manually expired requests" {
let req = { PrayerRequest.empty with updatedDate = DateTime.Now; isManuallyExpired = true }
Expect.isTrue (req.isExpired DateTime.Now 5) "A manually expired request should always be considered expired"
}
test "isExpired returns false for non-expired requests" {
let req = { PrayerRequest.empty with updatedDate = DateTime.Now.AddDays -5. }
Expect.isFalse (req.isExpired DateTime.Now 7) "A request updated 5 days ago should not be considered expired"
}
test "isExpired returns true for expired requests" {
let req = { PrayerRequest.empty with updatedDate = DateTime.Now.AddDays -8. }
Expect.isTrue (req.isExpired DateTime.Now 7) "A request updated 8 days ago should be considered expired"
}
test "updateRequired returns false for expired requests" {
let req = { PrayerRequest.empty with isManuallyExpired = true }
Expect.isFalse (req.updateRequired DateTime.Now 7 4) "An expired request should not require an update"
}
test "updateRequired returns false when an update is not required for an active request" {
let req =
{ PrayerRequest.empty with
requestType = RequestType.Recurring
updatedDate = DateTime.Now.AddDays -14.
}
Expect.isFalse (req.updateRequired DateTime.Now 7 4)
"An active request updated 14 days ago should not require an update until 28 days"
}
test "updateRequired returns true when an update is required for an active request" {
let req =
{ PrayerRequest.empty with
requestType = RequestType.Recurring
updatedDate = DateTime.Now.AddDays -34.
}
Expect.isTrue (req.updateRequired DateTime.Now 7 4)
"An active request updated 34 days ago should require an update (past 28 days)"
}
]
[<Tests>]
let smallGroupTests =
testList "SmallGroup" [
let now = DateTime (2017, 5, 12, 12, 15, 0, DateTimeKind.Utc)
let withFakeClock f () =
FakeClock (Instant.FromDateTimeUtc now) |> f
yield test "empty is as expected" {
let mt = SmallGroup.empty
Expect.equal mt.smallGroupId Guid.Empty "The small group ID should have been an empty GUID"
Expect.equal mt.churchId Guid.Empty "The church ID should have been an empty GUID"
Expect.equal mt.name "" "The name should have been blank"
Expect.equal mt.church.churchId Guid.Empty "The church should have been an empty one"
Expect.isNotNull mt.members "The members navigation property should not be null"
Expect.isEmpty mt.members "There should be no members for an empty small group"
Expect.isNotNull mt.prayerRequests "The prayer requests navigation property should not be null"
Expect.isEmpty mt.prayerRequests "There should be no prayer requests for an empty small group"
Expect.isNotNull mt.users "The users navigation property should not be null"
Expect.isEmpty mt.users "There should be no users for an empty small group"
}
yield! testFixture withFakeClock [
"localTimeNow adjusts the time ahead of UTC",
fun clock ->
let grp = { SmallGroup.empty with preferences = { ListPreferences.empty with timeZoneId = "Europe/Berlin" } }
Expect.isGreaterThan (grp.localTimeNow clock) now "UTC to Europe/Berlin should have added hours"
"localTimeNow adjusts the time behind UTC",
fun clock ->
Expect.isLessThan (SmallGroup.empty.localTimeNow clock) now
"UTC to America/Denver should have subtracted hours"
"localTimeNow returns UTC when the time zone is invalid",
fun clock ->
let grp = { SmallGroup.empty with preferences = { ListPreferences.empty with timeZoneId = "garbage" } }
Expect.equal (grp.localTimeNow clock) now "UTC should have been returned for an invalid time zone"
]
yield test "localTimeNow fails when clock is not passed" {
Expect.throws (fun () -> (SmallGroup.empty.localTimeNow >> ignore) null)
"Should have raised an exception for null clock"
}
yield test "localDateNow returns the date portion" {
let now' = DateTime (2017, 5, 12, 1, 15, 0, DateTimeKind.Utc)
let clock = FakeClock (Instant.FromDateTimeUtc now')
Expect.isLessThan (SmallGroup.empty.localDateNow clock) now.Date "The date should have been a day earlier"
}
]
[<Tests>]
let timeZoneTests =
testList "TimeZone" [
test "empty is as expected" {
let mt = TimeZone.empty
Expect.equal mt.timeZoneId "" "The time zone ID should have been blank"
Expect.equal mt.description "" "The description should have been blank"
Expect.equal mt.sortOrder 0 "The sort order should have been zero"
Expect.isFalse mt.isActive "The is-active flag should not have been set"
}
]
[<Tests>]
let userTests =
testList "User" [
test "empty is as expected" {
let mt = User.empty
Expect.equal mt.userId Guid.Empty "The user ID should have been an empty GUID"
Expect.equal mt.firstName "" "The first name should have been blank"
Expect.equal mt.lastName "" "The last name should have been blank"
Expect.equal mt.emailAddress "" "The e-mail address should have been blank"
Expect.isFalse mt.isAdmin "The is admin flag should not have been set"
Expect.equal mt.passwordHash "" "The password hash should have been blank"
Expect.isNone mt.salt "The password salt should not exist"
Expect.isNotNull mt.smallGroups "The small groups navigation property should not have been null"
Expect.isEmpty mt.smallGroups "There should be no small groups for an empty user"
}
test "fullName concatenates first and last names" {
let user = { User.empty with firstName = "Unit"; lastName = "Test" }
Expect.equal user.fullName "Unit Test" "The full name should be the first and last, separated by a space"
}
]
[<Tests>]
let userSmallGroupTests =
testList "UserSmallGroup" [
test "empty is as expected" {
let mt = UserSmallGroup.empty
Expect.equal mt.userId Guid.Empty "The user ID should have been an empty GUID"
Expect.equal mt.smallGroupId Guid.Empty "The small group ID should have been an empty GUID"
Expect.equal mt.user.userId Guid.Empty "The user should have been an empty one"
Expect.equal mt.smallGroup.smallGroupId Guid.Empty "The small group should have been an empty one"
}
]

View File

@ -0,0 +1,33 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="TestLocalization.fs" />
<Compile Include="Data\EntitiesTests.fs" />
<Compile Include="UI\UtilsTests.fs" />
<Compile Include="UI\ViewModelsTests.fs" />
<Compile Include="UI\CommonFunctionsTests.fs" />
<Compile Include="Program.fs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Expecto" Version="8.4.2" />
<PackageReference Include="Expecto.VisualStudio.TestAdapter" Version="10.0.0" />
<PackageReference Include="NodaTime.Testing" Version="2.4.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PrayerTracker.Data\PrayerTracker.Data.fsproj" />
<ProjectReference Include="..\PrayerTracker.UI\PrayerTracker.UI.fsproj" />
<ProjectReference Include="..\PrayerTracker\PrayerTracker.fsproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="FSharp.Core" Version="4.5.2" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,5 @@
open Expecto
[<EntryPoint>]
let main argv =
runTestsInAssembly defaultConfig argv

View File

@ -0,0 +1,14 @@
module PrayerTracker.Tests.TestLocalization
open Microsoft.Extensions.Localization
open Microsoft.Extensions.Logging.Abstractions
open Microsoft.Extensions.Options
open PrayerTracker
let _s =
let asm = typeof<Common>.Assembly.GetName().Name
let opts =
{ new IOptions<LocalizationOptions> with
member __.Value with get () = LocalizationOptions (ResourcesPath = "Resources")
}
ResourceManagerStringLocalizerFactory(opts, new NullLoggerFactory ()).Create("Common", asm)

View File

@ -0,0 +1,208 @@
module PrayerTracker.UI.CommonFunctionsTests
open Expecto
open Giraffe.GiraffeViewEngine
open Microsoft.AspNetCore.Mvc.Localization
open Microsoft.Extensions.Localization
open PrayerTracker.Tests.TestLocalization
open PrayerTracker.Views
open System.IO
[<Tests>]
let encLocTextTests =
testList "encLocText" [
test "succeeds" {
let enc = encLocText (LocalizedString ("test", "test&")) |> renderHtmlNode
Expect.equal enc "test&amp;" "string not encoded correctly"
}
]
[<Tests>]
let iconSizedTests =
testList "iconSized" [
test "succeeds" {
let ico = iconSized 18 "tom-&-jerry" |> renderHtmlNode
Expect.equal ico "<i class=\"material-icons md-18\">tom-&-jerry</i>" "icon HTML not correct"
}
]
[<Tests>]
let iconTests =
testList "icon" [
test "succeeds" {
let ico = icon "bob-&-tom" |> renderHtmlNode
Expect.equal ico "<i class=\"material-icons\">bob-&-tom</i>" "icon HTML not correct"
}
]
[<Tests>]
let namedColorListTests =
testList "namedColorList" [
test "succeeds with default values" {
let expected =
[ "<select name=\"the-name\">"
"<option value=\"aqua\" style=\"background-color:aqua;color:black;\">aqua</option>"
"<option value=\"black\" style=\"background-color:black;color:white;\">black</option>"
"<option value=\"blue\" style=\"background-color:blue;color:white;\">blue</option>"
"<option value=\"fuchsia\" style=\"background-color:fuchsia;color:black;\">fuchsia</option>"
"<option value=\"gray\" style=\"background-color:gray;color:white;\">gray</option>"
"<option value=\"green\" style=\"background-color:green;color:white;\">green</option>"
"<option value=\"lime\" style=\"background-color:lime;color:black;\">lime</option>"
"<option value=\"maroon\" style=\"background-color:maroon;color:white;\">maroon</option>"
"<option value=\"navy\" style=\"background-color:navy;color:white;\">navy</option>"
"<option value=\"olive\" style=\"background-color:olive;color:white;\">olive</option>"
"<option value=\"purple\" style=\"background-color:purple;color:white;\">purple</option>"
"<option value=\"red\" style=\"background-color:red;color:black;\">red</option>"
"<option value=\"silver\" style=\"background-color:silver;color:black;\">silver</option>"
"<option value=\"teal\" style=\"background-color:teal;color:white;\">teal</option>"
"<option value=\"white\" style=\"background-color:white;color:black;\">white</option>"
"<option value=\"yellow\" style=\"background-color:yellow;color:black;\">yellow</option>"
"</select>"
]
|> String.concat ""
let selectList = namedColorList "the-name" "" [] _s |> renderHtmlNode
Expect.equal expected selectList "The default select list was not generated correctly"
}
test "succeeds with a selected value" {
let selectList = namedColorList "the-name" "white" [] _s |> renderHtmlNode
Expect.stringContains selectList " selected>white</option>" "Selected option not generated correctly"
}
test "succeeds with extra attributes" {
let selectList = namedColorList "the-name" "" [ _id "myId" ] _s |> renderHtmlNode
Expect.stringStarts selectList "<select name=\"the-name\" id=\"myId\">" "Attributes not included correctly"
}
]
[<Tests>]
let radioTests =
testList "radio" [
test "succeeds when not selected" {
let rad = radio "a-name" "anId" "test" "unit" |> renderHtmlNode
Expect.equal rad "<input type=\"radio\" name=\"a-name\" id=\"anId\" value=\"test\">"
"Unselected radio button not generated correctly"
}
test "succeeds when selected" {
let rad = radio "a-name" "anId" "unit" "unit" |> renderHtmlNode
Expect.equal rad "<input type=\"radio\" name=\"a-name\" id=\"anId\" value=\"unit\" checked>"
"Selected radio button not generated correctly"
}
]
[<Tests>]
let rawLocTextTests =
testList "rawLocText" [
test "succeeds" {
use sw = new StringWriter ()
let raw = rawLocText sw (LocalizedHtmlString ("test", "test&")) |> renderHtmlNode
Expect.equal raw "test&" "string not written correctly"
}
]
[<Tests>]
let selectDefaultTests =
testList "selectDefault" [
test "succeeds" {
Expect.equal (selectDefault "a&b") "— a&b —" "Default selection not generated correctly"
}
]
[<Tests>]
let selectListTests =
testList "selectList" [
test "succeeds with minimum options" {
let theList = selectList "a-list" "" [] [] |> renderHtmlNode
Expect.equal theList "<select name=\"a-list\" id=\"a-list\"></select>" "Empty select list not generated correctly"
}
test "succeeds with all options" {
let theList =
[ "tom", "Tom&"
"bob", "Bob"
"jan", "Jan"
]
|> selectList "the-list" "bob" [ _style "ugly" ]
|> renderHtmlNode
let expected =
[ "<select name=\"the-list\" id=\"the-list\" style=\"ugly\">"
"<option value=\"tom\">Tom&amp;</option>"
"<option value=\"bob\" selected>Bob</option>"
"<option value=\"jan\">Jan</option>"
"</select>"
]
|> String.concat ""
Expect.equal theList expected "Filled select list not generated correctly"
}
]
[<Tests>]
let spaceTests =
testList "space" [
test "succeeds" {
Expect.equal (renderHtmlNode space) " " "space literal not correct"
}
]
[<Tests>]
let submitTests =
testList "submit" [
test "succeeds" {
let btn = submit [ _class "slick" ] "file-ico" _s.["a&b"] |> renderHtmlNode
Expect.equal
btn
"<button type=\"submit\" class=\"slick\"><i class=\"material-icons\">file-ico</i> &nbsp;a&amp;b</button>"
"Submit button not generated correctly"
}
]
[<Tests>]
let tableSummaryTests =
testList "tableSummary" [
test "succeeds for no entries" {
let sum = tableSummary 0 _s |> renderHtmlNode
Expect.equal sum "<div class=\"pt-center-text\"><small>No Entries to Display</small></div>"
"Summary for no items is incorrect"
}
test "succeeds for one entry" {
let sum = tableSummary 1 _s |> renderHtmlNode
Expect.equal sum "<div class=\"pt-center-text\"><small>Displaying 1 Entry</small></div>"
"Summary for one item is incorrect"
}
test "succeeds for many entries" {
let sum = tableSummary 5 _s |> renderHtmlNode
Expect.equal sum "<div class=\"pt-center-text\"><small>Displaying 5 Entries</small></div>"
"Summary for many items is incorrect"
}
]
module TimeZones =
open PrayerTracker.Views.CommonFunctions.TimeZones
[<Tests>]
let nameTests =
testList "TimeZones.name" [
test "succeeds for US Eastern time" {
Expect.equal (name "America/New_York" _s |> string) "Eastern" "US Eastern time zone not returned correctly"
}
test "succeeds for US Central time" {
Expect.equal (name "America/Chicago" _s |> string) "Central" "US Central time zone not returned correctly"
}
test "succeeds for US Mountain time" {
Expect.equal (name "America/Denver" _s |> string) "Mountain" "US Mountain time zone not returned correctly"
}
test "succeeds for US Mountain (AZ) time" {
Expect.equal (name "America/Phoenix" _s |> string) "Mountain (Arizona)"
"US Mountain (AZ) time zone not returned correctly"
}
test "succeeds for US Pacific time" {
Expect.equal (name "America/Los_Angeles" _s |> string) "Pacific" "US Pacific time zone not returned correctly"
}
test "succeeds for Central European time" {
Expect.equal (name "Europe/Berlin" _s |> string) "Central European"
"Central European time zone not returned correctly"
}
test "fails for unexpected time zone" {
Expect.equal (name "Wakanda" _s |> string) "Wakanda" "Unexpected time zone should have returned the original ID"
}
]

View File

@ -0,0 +1,129 @@
module PrayerTracker.UI.UtilsTests
open Expecto
open PrayerTracker
[<Tests>]
let ckEditorToTextTests =
testList "ckEditorToText" [
test "replaces newline/tab sequence with nothing" {
Expect.equal (ckEditorToText "Here is some \n\ttext") "Here is some text"
"Newline/tab sequence should have been removed"
}
test "replaces &nbsp; with a space" {
Expect.equal (ckEditorToText "Test&nbsp;text") "Test text" "&nbsp; should have been replaced with a space"
}
test "replaces double space with one non-breaking space and one regular space" {
Expect.equal (ckEditorToText "Test text") "Test&#xa0; text"
"double space should have been replaced with one non-breaking space and one regular space"
}
test "replaces paragraph break with two line breaks" {
Expect.equal (ckEditorToText "some</p><p>text") "some<br><br>text"
"paragraph break should have been replaced with two line breaks"
}
test "removes start and end paragraph tags" {
Expect.equal (ckEditorToText "<p>something something</p>") "something something"
"start/end paragraph tags should have been removed"
}
test "trims the result" {
Expect.equal (ckEditorToText " abc ") "abc" "Should have trimmed the resulting text"
}
test "does all the replacements and removals at one time" {
Expect.equal (ckEditorToText " <p>Paragraph&nbsp;1\n\t line two</p><p>Paragraph 2 x</p>")
"Paragraph 1 line two<br><br>Paragraph 2&#xa0; x"
"all replacements and removals were not made correctly"
}
]
[<Tests>]
let htmlToPlainTextTests =
testList "htmlToPlainText" [
test "decodes HTML-encoded entities" {
Expect.equal (htmlToPlainText "1 &gt; 0") "1 > 0" "HTML-encoded entities should have been decoded"
}
test "trims the input HTML" {
Expect.equal (htmlToPlainText " howdy ") "howdy" "HTML input string should have been trimmed"
}
test "replaces line breaks with new lines" {
Expect.equal (htmlToPlainText "Lots<br>of<br />new<br>lines") "Lots\nof\nnew\nlines"
"Break tags should have been converted to newline characters"
}
test "replaces non-breaking spaces with spaces" {
Expect.equal (htmlToPlainText "Here&nbsp;is&#xa0;some&nbsp;more&#xa0;text") "Here is some more text"
"Non-breaking spaces should have been replaced with spaces"
}
test "does all replacements at one time" {
Expect.equal (htmlToPlainText " &lt;&nbsp;&lt;<br>test") "< <\ntest" "All replacements were not made correctly"
}
test "does not fail when passed null" {
Expect.equal (htmlToPlainText null) "" "Should return an empty string for null input"
}
test "does not fail when passed an empty string" {
Expect.equal (htmlToPlainText "") "" "Should return an empty string when given an empty string"
}
]
[<Tests>]
let replaceFirstTests =
testList "replaceFirst" [
test "replaces the first occurrence when it is found at the beginning of the string" {
let testString = "unit unit unit"
Expect.equal (replaceFirst "unit" "test" testString) "test unit unit"
"First occurrence of a substring was not replaced properly at the beginning of the string"
}
test "replaces the first occurrence when it is found in the center of the string" {
let testString = "test unit test"
Expect.equal (replaceFirst "unit" "test" testString) "test test test"
"First occurrence of a substring was not replaced properly when it is in the center of the string"
}
test "returns the original string if the replacement isn't found" {
let testString = "unit tests"
Expect.equal (replaceFirst "tested" "testing" testString) "unit tests"
"String which did not have the target substring was not returned properly"
}
]
[<Tests>]
let sndAsStringTests =
testList "sndAsString" [
test "converts the second item to a string" {
Expect.equal (sndAsString ("a", 5)) "5" "The second part of the tuple should have been converted to a string"
}
]
[<Tests>]
let stripTagsTests =
let testString = "<p class=\"testing\">Here is some text<br> <br />and some more</p>"
testList "stripTags" [
test "does nothing if all tags are allowed" {
Expect.equal (stripTags [ "p"; "br" ] testString) testString
"There should have been no replacements in the target string"
}
test "strips the start/end tag for non allowed tag" {
Expect.equal (stripTags [ "br" ] testString) "Here is some text<br> <br />and some more"
"There should have been no \"p\" tag, but all \"br\" tags, in the returned string"
}
test "strips void/self-closing tags" {
Expect.equal (stripTags [] testString) "Here is some text and some more"
"There should have been no tags; all void and self-closing tags should have been stripped"
}
]
[<Tests>]
let wordWrapTests =
testList "wordWrap" [
test "breaks where it is supposed to" {
let testString = "The quick brown fox jumps over the lazy dog\nIt does!"
Expect.equal (wordWrap 20 testString) "The quick brown fox\njumps over the lazy\ndog\nIt does!\n"
"Line not broken correctly"
}
test "wraps long line without a space" {
let testString = "Asamatteroffact, the dog does too"
Expect.equal (wordWrap 10 testString) "Asamattero\nffact, the\ndog does\ntoo\n"
"Longer line not broken correctly"
}
test "preserves blank lines" {
let testString = "Here is\n\na string with blank lines"
Expect.equal (wordWrap 80 testString) testString "Blank lines were not preserved"
}
]

View File

@ -0,0 +1,605 @@
module PrayerTracker.UI.ViewModelsTests
open Expecto
open Microsoft.AspNetCore.Html
open PrayerTracker.Entities
open PrayerTracker.Tests.TestLocalization
open PrayerTracker.Utils
open PrayerTracker.ViewModels
open System
/// Filter function that filters nothing
let countAll _ = true
module ReferenceListTests =
[<Tests>]
let emailTypeListTests =
testList "ReferenceList.emailTypeList" [
test "includes default type" {
let typs = ReferenceList.emailTypeList EmailType.Html _s
Expect.hasCountOf typs 3u countAll "There should have been 3 e-mail type options returned"
let top = Seq.head typs
Expect.equal (fst top) "" "The default option should have been blank"
Expect.equal (snd top).Value "Group Default (HTML Format)" "The default option label was incorrect"
let nxt = typs |> Seq.skip 1 |> Seq.head
Expect.equal (fst nxt) EmailType.Html "The 2nd option should have been HTML"
let lst = typs |> Seq.last
Expect.equal (fst lst) EmailType.PlainText "The 3rd option should have been plain text"
}
]
[<Tests>]
let expirationListTests =
testList "ReferenceList.expirationList" [
test "excludes immediate expiration if not required" {
let exps = ReferenceList.expirationList _s false
Expect.hasCountOf exps 2u countAll "There should have been 2 expiration types returned"
Expect.exists exps (fun exp -> fst exp = "N") "The option for normal expiration was not found"
Expect.exists exps (fun exp -> fst exp = "Y") "The option for \"never expire\" was not found"
}
test "includes immediate expiration if required" {
let exps = ReferenceList.expirationList _s true
Expect.hasCountOf exps 3u countAll "There should have been 3 expiration types returned"
Expect.exists exps (fun exp -> fst exp = "N") "The option for normal expiration was not found"
Expect.exists exps (fun exp -> fst exp = "Y") "The option for \"never expire\" was not found"
Expect.exists exps (fun exp -> fst exp = "X") "The option for \"expire immediately\" was not found"
}
]
[<Tests>]
let requestTypeListTests =
testList "ReferenceList.requestTypeList" [
let withList f () =
(ReferenceList.requestTypeList >> f) _s
yield! testFixture withList [
yield "returns 5 types",
fun typs -> Expect.hasCountOf typs 5u countAll "There should have been 5 request types returned"
yield! [ RequestType.Current; RequestType.Recurring; RequestType.Praise; RequestType.Expecting;
RequestType.Announcement
]
|> List.map (fun typ ->
sprintf "contains \"%s\"" typ,
fun typs ->
Expect.isSome (typs |> List.tryFind (fun x -> fst x = typ))
(sprintf "The \"%s\" option was not found" typ))
]
]
[<Tests>]
let announcementTests =
let empty = { sendToClass = "N"; text = "<p>unit testing</p>"; addToRequestList = None; requestType = None }
testList "Announcement" [
test "plainText strips HTML" {
let ann = { empty with text = "<p>unit testing</p>" }
Expect.equal (ann.plainText ()) "unit testing" "Plain text should have stripped HTML"
}
test "plainText wraps at 74 characters" {
let ann = { empty with text = String.replicate 80 "x" }
let txt = (ann.plainText ()).Split "\n"
Expect.hasCountOf txt 3u countAll "There should have been two lines of plain text returned"
Expect.stringHasLength txt.[0] 74 "The first line should have been wrapped at 74 characters"
Expect.stringHasLength txt.[1] 6 "The second line should have had the remaining 6 characters"
Expect.stringHasLength txt.[2] 0 "The third line should have been blank"
}
test "plainText wraps at 74 characters and strips HTML" {
let ann = { empty with text = sprintf "<strong>%s</strong>" (String.replicate 80 "z") }
let txt = ann.plainText ()
Expect.stringStarts txt "zzz" "HTML should have been stripped from the front of the plain text"
Expect.equal (txt.ToCharArray ()).[74] '\n' "The text should have been broken at 74 characters"
}
]
[<Tests>]
let appViewInfoTests =
testList "AppViewInfo" [
test "fresh is constructed properly" {
let vi = AppViewInfo.fresh
Expect.isEmpty vi.style "There should have been no styles set"
Expect.isEmpty vi.script "There should have been no scripts set"
Expect.equal vi.helpLink.Url HelpPage.None.Url "The help link should have been set to none"
Expect.isEmpty vi.messages "There should have been no messages set"
Expect.equal vi.version "" "The version should have been blank"
Expect.isGreaterThan vi.requestStart DateTime.MinValue.Ticks "The request start time should have been set"
Expect.isNone vi.user "There should not have been a user"
Expect.isNone vi.group "There should not have been a small group"
}
]
[<Tests>]
let assignGroupsTests =
testList "AssignGroups" [
test "fromUser populates correctly" {
let usr = { User.empty with userId = Guid.NewGuid (); firstName = "Alice"; lastName = "Bob" }
let asg = AssignGroups.fromUser usr
Expect.equal asg.userId usr.userId "The user ID was not filled correctly"
Expect.equal asg.userName usr.fullName "The user name was not filled correctly"
Expect.equal asg.smallGroups "" "The small group string was not filled correctly"
}
]
[<Tests>]
let editChurchTests =
testList "EditChurch" [
test "fromChurch populates correctly when interface exists" {
let church =
{ Church.empty with
churchId = Guid.NewGuid ()
name = "Unit Test"
city = "Testlandia"
st = "UT"
hasInterface = true
interfaceAddress = Some "https://test-dem-units.test"
}
let edit = EditChurch.fromChurch church
Expect.equal edit.churchId church.churchId "The church ID was not filled correctly"
Expect.equal edit.name church.name "The church name was not filled correctly"
Expect.equal edit.city church.city "The church's city was not filled correctly"
Expect.equal edit.st church.st "The church's state was not filled correctly"
Expect.isSome edit.hasInterface "The church should show that it has an interface"
Expect.equal edit.hasInterface (Some true) "The hasInterface flag should be true"
Expect.isSome edit.interfaceAddress "The interface address should exist"
Expect.equal edit.interfaceAddress church.interfaceAddress "The interface address was not filled correctly"
}
test "fromChurch populates correctly when interface does not exist" {
let edit =
EditChurch.fromChurch
{ Church.empty with
churchId = Guid.NewGuid ()
name = "Unit Test"
city = "Testlandia"
st = "UT"
}
Expect.isNone edit.hasInterface "The church should not show that it has an interface"
Expect.isNone edit.interfaceAddress "The interface address should not exist"
}
test "empty is as expected" {
let edit = EditChurch.empty
Expect.equal edit.churchId Guid.Empty "The church ID should be the empty GUID"
Expect.equal edit.name "" "The church name should be blank"
Expect.equal edit.city "" "The church's city should be blank"
Expect.equal edit.st "" "The church's state should be blank"
Expect.isNone edit.hasInterface "The church should not show that it has an interface"
Expect.isNone edit.interfaceAddress "The interface address should not exist"
}
test "isNew works on a new church" {
Expect.isTrue (EditChurch.empty.isNew ()) "An empty GUID should be flagged as a new church"
}
test "isNew works on an existing church" {
Expect.isFalse ({ EditChurch.empty with churchId = Guid.NewGuid () }.isNew ())
"A non-empty GUID should not be flagged as a new church"
}
test "populateChurch works correctly when an interface exists" {
let edit =
{ EditChurch.empty with
churchId = Guid.NewGuid ()
name = "Test Baptist Church"
city = "Testerville"
st = "TE"
hasInterface = Some true
interfaceAddress = Some "https://test.units"
}
let church = edit.populateChurch Church.empty
Expect.notEqual church.churchId edit.churchId "The church ID should not have been modified"
Expect.equal church.name edit.name "The church name was not updated correctly"
Expect.equal church.city edit.city "The church's city was not updated correctly"
Expect.equal church.st edit.st "The church's state was not updated correctly"
Expect.isTrue church.hasInterface "The church should show that it has an interface"
Expect.isSome church.interfaceAddress "The interface address should exist"
Expect.equal church.interfaceAddress edit.interfaceAddress "The interface address was not updated correctly"
}
test "populateChurch works correctly when an interface does not exist" {
let church =
{ EditChurch.empty with
name = "Test Baptist Church"
city = "Testerville"
st = "TE"
}.populateChurch Church.empty
Expect.isFalse church.hasInterface "The church should show that it has an interface"
Expect.isNone church.interfaceAddress "The interface address should exist"
}
]
[<Tests>]
let editMemberTests =
testList "EditMember" [
test "fromMember populates with group default format" {
let mbr =
{ Member.empty with
memberId = Guid.NewGuid ()
memberName = "Test Name"
email = "test_units@example.com"
}
let edit = EditMember.fromMember mbr
Expect.equal edit.memberId mbr.memberId "The member ID was not filled correctly"
Expect.equal edit.memberName mbr.memberName "The member name was not filled correctly"
Expect.equal edit.emailAddress mbr.email "The e-mail address was not filled correctly"
Expect.equal edit.emailType "" "The e-mail type should have been blank for group default"
}
test "fromMember populates with specific format" {
let edit = EditMember.fromMember { Member.empty with format = Some EmailType.Html }
Expect.equal edit.emailType EmailType.Html "The e-mail type was not filled correctly"
}
test "empty is as expected" {
let edit = EditMember.empty
Expect.equal edit.memberId Guid.Empty "The member ID should have been an empty GUID"
Expect.equal edit.memberName "" "The member name should have been blank"
Expect.equal edit.emailAddress "" "The e-mail address should have been blank"
Expect.equal edit.emailType "" "The e-mail type should have been blank"
}
test "isNew works for a new member" {
Expect.isTrue (EditMember.empty.isNew ()) "An empty GUID should be flagged as a new member"
}
test "isNew works for an existing member" {
Expect.isFalse ({ EditMember.empty with memberId = Guid.NewGuid () }.isNew ())
"A non-empty GUID should not be flagged as a new member"
}
]
[<Tests>]
let editPreferencesTests =
testList "EditPreferences" [
test "fromPreferences succeeds for named colors and private list" {
let prefs = ListPreferences.empty
let edit = EditPreferences.fromPreferences prefs
Expect.equal edit.expireDays prefs.daysToExpire "The expiration days were not filled correctly"
Expect.equal edit.daysToKeepNew prefs.daysToKeepNew "The days to keep new were not filled correctly"
Expect.equal edit.longTermUpdateWeeks prefs.longTermUpdateWeeks "The weeks for update were not filled correctly"
Expect.equal edit.requestSort prefs.requestSort "The request sort was not filled correctly"
Expect.equal edit.emailFromName prefs.emailFromName "The e-mail from name was not filled correctly"
Expect.equal edit.emailFromAddress prefs.emailFromAddress "The e-mail from address was not filled correctly"
Expect.equal edit.defaultEmailType prefs.defaultEmailType "The default e-mail type was not filled correctly"
Expect.equal edit.headingLineType "Name" "The heading line color type was not derived correctly"
Expect.equal edit.headingLineColor prefs.lineColor "The heading line color was not filled correctly"
Expect.equal edit.headingTextType "Name" "The heading text color type was not derived correctly"
Expect.equal edit.headingTextColor prefs.headingColor "The heading text color was not filled correctly"
Expect.equal edit.listFonts prefs.listFonts "The list fonts were not filled correctly"
Expect.equal edit.headingFontSize prefs.headingFontSize "The heading font size was not filled correctly"
Expect.equal edit.listFontSize prefs.textFontSize "The list text font size was not filled correctly"
Expect.equal edit.timeZone prefs.timeZoneId "The time zone was not filled correctly"
Expect.isSome edit.groupPassword "The group password should have been set"
Expect.equal edit.groupPassword (Some prefs.groupPassword) "The group password was not filled correctly"
Expect.equal edit.listVisibility RequestVisibility.``private`` "The list visibility was not derived correctly"
}
test "fromPreferences succeeds for RGB line color and password-protected list" {
let prefs = { ListPreferences.empty with lineColor = "#ff0000"; groupPassword = "pw" }
let edit = EditPreferences.fromPreferences prefs
Expect.equal edit.headingLineType "RGB" "The heading line color type was not derived correctly"
Expect.equal edit.headingLineColor prefs.lineColor "The heading line color was not filled correctly"
Expect.isSome edit.groupPassword "The group password should have been set"
Expect.equal edit.groupPassword (Some prefs.groupPassword) "The group password was not filled correctly"
Expect.equal edit.listVisibility RequestVisibility.passwordProtected
"The list visibility was not derived correctly"
}
test "fromPreferences succeeds for RGB text color and public list" {
let prefs = { ListPreferences.empty with headingColor = "#0000ff"; isPublic = true }
let edit = EditPreferences.fromPreferences prefs
Expect.equal edit.headingTextType "RGB" "The heading text color type was not derived correctly"
Expect.equal edit.headingTextColor prefs.headingColor "The heading text color was not filled correctly"
Expect.isSome edit.groupPassword "The group password should have been set"
Expect.equal edit.groupPassword (Some "") "The group password was not filled correctly"
Expect.equal edit.listVisibility RequestVisibility.``public`` "The list visibility was not derived correctly"
}
]
[<Tests>]
let editRequestTests =
testList "EditRequest" [
test "empty is as expected" {
let mt = EditRequest.empty
Expect.equal mt.requestId Guid.Empty "The request ID should be an empty GUID"
Expect.equal mt.requestType "" "The request type should have been blank"
Expect.isNone mt.enteredDate "The entered date should have been None"
Expect.isNone mt.skipDateUpdate "The \"skip date update\" flag should have been None"
Expect.isNone mt.requestor "The requestor should have been None"
Expect.equal mt.expiration "N" "The expiration should have been \"N\""
Expect.equal mt.text "" "The text should have been blank"
}
test "fromRequest succeeds when a request has the do-not-expire flag set" {
let req =
{ PrayerRequest.empty with
prayerRequestId = Guid.NewGuid ()
requestType = RequestType.Current
requestor = Some "Me"
doNotExpire = true
text = "the text"
}
let edit = EditRequest.fromRequest req
Expect.equal edit.requestId req.prayerRequestId "The request ID was not filled correctly"
Expect.equal edit.requestType req.requestType "The request type was not filled correctly"
Expect.equal edit.requestor req.requestor "The requestor was not filled correctly"
Expect.equal edit.expiration "Y" "The expiration should have been \"Y\" since the do-not-expire flag was set"
Expect.equal edit.text req.text "The text was not filled correctly"
}
test "fromRequest succeeds when a request has the do-not-expire flag unset" {
let req =
{ PrayerRequest.empty with
requestor = None
doNotExpire = false
}
let edit = EditRequest.fromRequest req
Expect.equal edit.requestor req.requestor "The requestor was not filled correctly"
Expect.equal edit.expiration "N" "The expiration should have been \"N\" since the do-not-expire flag was not set"
}
test "isNew works for a new request" {
Expect.isTrue (EditRequest.empty.isNew ()) "An empty GUID should be flagged as a new request"
}
test "isNew works for an existing request" {
Expect.isFalse ({ EditRequest.empty with requestId = Guid.NewGuid () }.isNew ())
"A non-empty GUID should not be flagged as a new request"
}
]
[<Tests>]
let editSmallGroupTests =
testList "EditSmallGroup" [
test "fromGroup succeeds" {
let grp =
{ SmallGroup.empty with
smallGroupId = Guid.NewGuid ()
name = "test group"
churchId = Guid.NewGuid ()
}
let edit = EditSmallGroup.fromGroup grp
Expect.equal edit.smallGroupId grp.smallGroupId "The small group ID was not filled correctly"
Expect.equal edit.name grp.name "The name was not filled correctly"
Expect.equal edit.churchId grp.churchId "The church ID was not filled correctly"
}
test "empty is as expected" {
let mt = EditSmallGroup.empty
Expect.equal mt.smallGroupId Guid.Empty "The small group ID should be an empty GUID"
Expect.equal mt.name "" "The name should be blank"
Expect.equal mt.churchId Guid.Empty "The church ID should be an empty GUID"
}
test "isNew works for a new small group" {
Expect.isTrue (EditSmallGroup.empty.isNew ()) "An empty GUID should be flagged as a new small group"
}
test "isNew works for an existing small group" {
Expect.isFalse ({ EditSmallGroup.empty with smallGroupId = Guid.NewGuid () }.isNew ())
"A non-empty GUID should not be flagged as a new small group"
}
test "populateGroup succeeds" {
let edit =
{ EditSmallGroup.empty with
name = "test name"
churchId = Guid.NewGuid ()
}
let grp = edit.populateGroup SmallGroup.empty
Expect.equal grp.name edit.name "The name was not populated correctly"
Expect.equal grp.churchId edit.churchId "The church ID was not populated correctly"
}
]
[<Tests>]
let editUserTests =
testList "EditUser" [
test "empty is as expected" {
let mt = EditUser.empty
Expect.equal mt.userId Guid.Empty "The user ID should be an empty GUID"
Expect.equal mt.firstName "" "The first name should be blank"
Expect.equal mt.lastName "" "The last name should be blank"
Expect.equal mt.emailAddress "" "The e-mail address should be blank"
Expect.equal mt.password "" "The password should be blank"
Expect.equal mt.passwordConfirm "" "The confirmed password should be blank"
Expect.isNone mt.isAdmin "The isAdmin flag should be None"
}
test "fromUser succeeds" {
let usr =
{ User.empty with
userId = Guid.NewGuid ()
firstName = "user"
lastName = "test"
emailAddress = "a@b.c"
}
let edit = EditUser.fromUser usr
Expect.equal edit.userId usr.userId "The user ID was not filled correctly"
Expect.equal edit.firstName usr.firstName "The first name was not filled correctly"
Expect.equal edit.lastName usr.lastName "The last name was not filled correctly"
Expect.equal edit.emailAddress usr.emailAddress "The e-mail address was not filled correctly"
Expect.isNone edit.isAdmin "The isAdmin flag was not filled correctly"
}
test "isNew works for a new user" {
Expect.isTrue (EditUser.empty.isNew ()) "An empty GUID should be flagged as a new user"
}
test "isNew works for an existing user" {
Expect.isFalse ({ EditUser.empty with userId = Guid.NewGuid () }.isNew ())
"A non-empty GUID should not be flagged as a new user"
}
test "populateUser succeeds" {
let edit =
{ EditUser.empty with
firstName = "name"
lastName = "eman"
emailAddress = "n@m.e"
isAdmin = Some true
password = "testpw"
}
let hasher = fun x -> x + "+"
let usr = edit.populateUser User.empty hasher
Expect.equal usr.firstName edit.firstName "The first name was not populated correctly"
Expect.equal usr.lastName edit.lastName "The last name was not populated correctly"
Expect.equal usr.emailAddress edit.emailAddress "The e-mail address was not populated correctly"
Expect.isTrue usr.isAdmin "The isAdmin flag was not populated correctly"
Expect.equal usr.passwordHash (hasher edit.password) "The password hash was not populated correctly"
}
]
[<Tests>]
let groupLogOnTests =
testList "GroupLogOn" [
test "empty is as expected" {
let mt = GroupLogOn.empty
Expect.equal mt.smallGroupId Guid.Empty "The small group ID should be an empty GUID"
Expect.equal mt.password "" "The password should be blank"
Expect.isNone mt.rememberMe "Remember Me should be None"
}
]
[<Tests>]
let requestListTests =
testList "RequestList" [
let withRequestList f () =
{ requests = [
{ PrayerRequest.empty with
requestType = RequestType.Current
requestor = Some "Zeb"
text = "zyx"
updatedDate = DateTime.Today
}
{ PrayerRequest.empty with
requestType = RequestType.Current
requestor = Some "Aaron"
text = "abc"
updatedDate = DateTime.Today - TimeSpan.FromDays 9.
}
{ PrayerRequest.empty with
requestType = RequestType.Praise
text = "nmo"
updatedDate = DateTime.Today
}
]
date = DateTime.Today
listGroup = SmallGroup.empty
showHeader = false
recipients = []
canEmail = false
}
|> f
yield! testFixture withRequestList [
"asHtml succeeds without header",
fun reqList ->
let htmlList = { reqList with listGroup = { reqList.listGroup with name = "Test HTML Group" } }
let html = htmlList.asHtml _s
Expect.equal -1 (html.IndexOf "Test HTML Group") "The small group name should not have existed (no header)"
let curReqHeading =
[ "<table style=\"font-family:Century Gothic,Tahoma,Luxi Sans,sans-serif;page-break-inside:avoid;\">"
"<tr>"
"<td style=\"font-size:16pt;color:maroon;padding:3px 0;border-top:solid 3px navy;border-bottom:solid 3px navy;font-weight:bold;\">"
"&nbsp; &nbsp; Current Requests&nbsp; &nbsp; </td></tr></table>"
]
|> String.concat ""
Expect.stringContains html curReqHeading "Heading for category \"Current Requests\" not found"
let curReqHtml =
[ "<ul>"
"<li style=\"list-style-type:circle;font-family:Century Gothic,Tahoma,Luxi Sans,sans-serif;font-size:12pt;padding-bottom:.25em;\">"
"<strong>Zeb</strong> &mdash; zyx</li>"
"<li style=\"list-style-type:disc;font-family:Century Gothic,Tahoma,Luxi Sans,sans-serif;font-size:12pt;padding-bottom:.25em;\">"
"<strong>Aaron</strong> &mdash; abc</li></ul>"
]
|> String.concat ""
Expect.stringContains html curReqHtml "Expected HTML for \"Current Requests\" requests not found"
let praiseHeading =
[ "<table style=\"font-family:Century Gothic,Tahoma,Luxi Sans,sans-serif;page-break-inside:avoid;\">"
"<tr>"
"<td style=\"font-size:16pt;color:maroon;padding:3px 0;border-top:solid 3px navy;border-bottom:solid 3px navy;font-weight:bold;\">"
"&nbsp; &nbsp; Praise Reports&nbsp; &nbsp; </td></tr></table>"
]
|> String.concat ""
Expect.stringContains html praiseHeading "Heading for category \"Praise Reports\" not found"
let praiseHtml =
[ "<ul>"
"<li style=\"list-style-type:circle;font-family:Century Gothic,Tahoma,Luxi Sans,sans-serif;font-size:12pt;padding-bottom:.25em;\">"
"nmo</li></ul>"
]
|> String.concat ""
Expect.stringContains html praiseHtml "Expected HTML for \"Praise Reports\" requests not found"
"asHtml succeeds with header",
fun reqList ->
let htmlList =
{ reqList with
listGroup = { reqList.listGroup with name = "Test HTML Group" }
showHeader = true
}
let html = htmlList.asHtml _s
let lstHeading =
[ "<div style=\"text-align:center;font-family:Century Gothic,Tahoma,Luxi Sans,sans-serif\">"
"<span style=\"font-size:16pt;\"><strong>Prayer Requests</strong></span><br>"
"<span style=\"font-size:12pt;\"><strong>Test HTML Group</strong><br>"
htmlList.date.ToString "MMMM d, yyyy"
"</span></div><br>"
]
|> String.concat ""
Expect.stringContains html lstHeading "Expected HTML for the list heading not found"
// spot check; without header test tests this exhaustively
Expect.stringContains html "<strong>Zeb</strong> &mdash; zyx</li>" "Expected requests not found"
"asText succeeds",
fun reqList ->
let textList = { reqList with listGroup = { reqList.listGroup with name = "Test Group" } }
let text = textList.asText _s
Expect.stringContains text (textList.listGroup.name + "\n") "Small group name not found"
Expect.stringContains text "Prayer Requests\n" "List heading not found"
Expect.stringContains text ((textList.date.ToString "MMMM d, yyyy") + "\n \n") "List date not found"
Expect.stringContains text "--------------------\n CURRENT REQUESTS\n--------------------\n"
"Heading for category \"Current Requests\" not found"
Expect.stringContains text " + Zeb - zyx\n" "First request not found"
Expect.stringContains text " - Aaron - abc\n \n" "Second request not found; should have been end of category"
Expect.stringContains text "------------------\n PRAISE REPORTS\n------------------\n"
"Heading for category \"Praise Reports\" not found"
Expect.stringContains text " + nmo\n \n" "Last request not found"
"isNew succeeds for both old and new requests",
fun reqList ->
let reqs = reqList.requestsInCategory RequestType.Current
Expect.hasCountOf reqs 2u countAll "There should have been two requests"
Expect.isTrue (reqList.isNew (List.head reqs)) "The first request should have been new"
Expect.isFalse (reqList.isNew (List.last reqs)) "The second request should not have been new"
"requestsInCategory succeeds when requests exist",
fun reqList ->
let reqs = reqList.requestsInCategory RequestType.Current
Expect.hasCountOf reqs 2u countAll "There should have been two requests"
let first = List.head reqs
Expect.equal first.text "zyx" "The requests should be sorted by updated date descending"
"requestsInCategory succeeds when requests do not exist",
fun reqList ->
Expect.isEmpty (reqList.requestsInCategory "ABC") "There should have been no category \"ABC\" requests"
"requestsInCategory succeeds and sorts by requestor",
fun reqList ->
let newList =
{ reqList with
listGroup =
{ reqList.listGroup with preferences = { reqList.listGroup.preferences with requestSort = "R" } }
}
let reqs = newList.requestsInCategory RequestType.Current
Expect.hasCountOf reqs 2u countAll "There should have been two requests"
let first = List.head reqs
Expect.equal first.text "abc" "The requests should be sorted by requestor"
]
]
[<Tests>]
let userLogOnTests =
testList "UserLogOn" [
test "empty is as expected" {
let mt = UserLogOn.empty
Expect.equal mt.emailAddress "" "The e-mail address should be blank"
Expect.equal mt.password "" "The password should be blank"
Expect.equal mt.smallGroupId Guid.Empty "The small group ID should be an empty GUID"
Expect.isNone mt.rememberMe "Remember Me should be None"
Expect.isNone mt.redirectUrl "Redirect URL should be None"
}
]
[<Tests>]
let userMessageTests =
testList "UserMessage" [
test "Error is constructed properly" {
let msg = UserMessage.Error
Expect.equal msg.level "ERROR" "Incorrect message level"
Expect.equal msg.text HtmlString.Empty "Text should have been blank"
Expect.isNone msg.description "Description should have been None"
}
test "Warning is constructed properly" {
let msg = UserMessage.Warning
Expect.equal msg.level "WARNING" "Incorrect message level"
Expect.equal msg.text HtmlString.Empty "Text should have been blank"
Expect.isNone msg.description "Description should have been None"
}
test "Info is constructed properly" {
let msg = UserMessage.Info
Expect.equal msg.level "Info" "Incorrect message level"
Expect.equal msg.text HtmlString.Empty "Text should have been blank"
Expect.isNone msg.description "Description should have been None"
}
]

View File

@ -0,0 +1,106 @@
module PrayerTracker.Views.Church
open Giraffe.GiraffeViewEngine
open PrayerTracker.Entities
open PrayerTracker.ViewModels
open System
open System.Collections.Generic
/// View for the church edit page
let edit (m : EditChurch) ctx vi =
let pageTitle = match m.isNew () with true -> "Add a New Church" | false -> "Edit Church"
let s = I18N.localizer.Force ()
[ form [ _action "/church/save"; _method "post"; _class "pt-center-columns" ] [
style [ _scoped ]
[ rawText "#name { width: 20rem; } #city { width: 10rem; } #st { width: 3rem; } #interfaceAddress { width: 30rem; }" ]
csrfToken ctx
input [ _type "hidden"; _name "churchId"; _value (m.churchId.ToString "N") ]
div [ _class "pt-field-row" ] [
div [ _class "pt-field" ] [
label [ _for "name" ] [ encLocText s.["Church Name"] ]
input [ _type "text"; _name "name"; _id "name"; _required; _autofocus; _value m.name ]
]
div [ _class "pt-field" ] [
label [ _for "City"] [ encLocText s.["City"] ]
input [ _type "text"; _name "city"; _id "city"; _required; _value m.city ]
]
div [ _class "pt-field" ] [
label [ _for "ST" ] [ encLocText s.["State"] ]
input [ _type "text"; _name "st"; _id "st"; _required; _minlength "2"; _maxlength "2"; _value m.st ]
]
]
div [ _class "pt-field-row" ] [
div [ _class "pt-checkbox-field" ] [
input [ yield _type "checkbox"
yield _name "hasInterface"
yield _id "hasInterface"
yield _value "True"
match m.hasInterface with Some x when x -> yield _checked | _ -> () ]
label [ _for "hasInterface" ] [ encLocText s.["Has an interface with Virtual Prayer Room"] ]
]
]
div [ _class "pt-field-row pt-fadeable"; _id "divInterfaceAddress" ] [
div [ _class "pt-field" ] [
label [ _for "interfaceAddress" ] [ encLocText s.["VPR Interface URL"] ]
input [ _type "url"; _name "interfaceAddress"; _id "interfaceAddress";
_value (match m.interfaceAddress with Some ia -> ia | None -> "") ]
]
]
div [ _class "pt-field-row" ] [ submit [] "save" s.["Save Church"] ]
]
script [] [ rawText "PT.onLoad(PT.church.edit.onPageLoad)" ]
]
|> Layout.Content.standard
|> Layout.standard vi pageTitle
/// View for church maintenance page
let maintain (churches : Church list) (stats : Map<string, ChurchStats>) ctx vi =
let s = I18N.localizer.Force ()
[ div [ _class "pt-center-text" ] [
br []
a [ _href (sprintf "/church/%s/edit" emptyGuid); _title s.["Add a New Church"].Value ]
[ icon "add_circle"; rawText " &nbsp;"; encLocText s.["Add a New Church"] ]
br []
br []
]
tableSummary churches.Length s
table [ _class "pt-table pt-action-table" ] [
thead [] [
tr [] [
th [] [ encLocText s.["Actions"] ]
th [] [ encLocText s.["Name"] ]
th [] [ encLocText s.["Location"] ]
th [] [ encLocText s.["Groups"] ]
th [] [ encLocText s.["Requests"] ]
th [] [ encLocText s.["Users"] ]
th [] [ encLocText s.["Interface?"] ]
]
]
churches
|> List.map (fun ch ->
let chId = ch.churchId.ToString "N"
let delAction = sprintf "/church/%s/delete" chId
let delPrompt = s.["Are you want to delete this {0}? This action cannot be undone.",
sprintf "%s (%s)" (s.["Church"].Value.ToLower ()) ch.name]
tr [] [
td [] [
a [ _href (sprintf "/church/%s/edit" chId); _title s.["Edit This Church"].Value ] [ icon "edit" ]
a [ _href delAction
_title s.["Delete This Church"].Value
_onclick (sprintf "return PT.confirmDelete('%s','%A')" delAction delPrompt) ]
[ icon "delete_forever" ]
]
td [] [ encodedText ch.name ]
td [] [ encodedText ch.city; rawText ", "; encodedText ch.st ]
td [ _class "pt-right-text" ] [ rawText (stats.[chId].smallGroups.ToString "N0") ]
td [ _class "pt-right-text" ] [ rawText (stats.[chId].prayerRequests.ToString "N0") ]
td [ _class "pt-right-text" ] [ rawText (stats.[chId].users.ToString "N0") ]
td [ _class "pt-center-text" ] [ encLocText s.[match ch.hasInterface with true -> "Yes" | false -> "No"] ]
])
|> tbody []
]
form [ _id "DeleteForm"; _action ""; _method "post" ] [ csrfToken ctx ]
]
|> Layout.Content.wide
|> Layout.standard vi "Maintain Churches"

View File

@ -0,0 +1,143 @@
[<AutoOpen>]
module PrayerTracker.Views.CommonFunctions
open Giraffe
open Giraffe.GiraffeViewEngine
open Microsoft.AspNetCore.Antiforgery
open Microsoft.AspNetCore.Http
open Microsoft.AspNetCore.Mvc.Localization
open Microsoft.Extensions.Localization
open System.IO
open System.Text.Encodings.Web
/// Encoded text for a localized string
let encLocText (text : LocalizedString) = encodedText text.Value
/// Raw text for a localized HTML string
let rawLocText (writer : StringWriter) (text : LocalizedHtmlString) =
text.WriteTo (writer, HtmlEncoder.Default)
let txt = string writer
writer.GetStringBuilder().Clear () |> ignore
rawText txt
/// A space (used for back-to-back localization string breaks)
let space = rawText " "
/// Generate a Material Design icon
let icon name = i [ _class "material-icons" ] [ rawText name ]
/// Generate a Material Design icon, specifying the point size (must be defined in CSS)
let iconSized size name = i [ _class (sprintf "material-icons md-%i" size) ] [ rawText name ]
/// Generate a CSRF prevention token
let csrfToken (ctx : HttpContext) =
let antiForgery = ctx.GetService<IAntiforgery> ()
let tokenSet = antiForgery.GetAndStoreTokens ctx
input [ _type "hidden"; _name tokenSet.FormFieldName; _value tokenSet.RequestToken ]
/// Create a summary for a table of items
let tableSummary itemCount (s : IStringLocalizer) =
div [ _class "pt-center-text" ] [
small [] [
match itemCount with
| 0 -> s.["No Entries to Display"]
| 1 -> s.["Displaying {0} Entry", itemCount]
| _ -> s.["Displaying {0} Entries", itemCount]
|> encLocText
]
]
/// Generate a list of named HTML colors
let namedColorList name selected attrs (s : IStringLocalizer) =
/// The list of HTML named colors (name, display, text color)
seq {
yield ("aqua", s.["Aqua"], "black")
yield ("black", s.["Black"], "white")
yield ("blue", s.["Blue"], "white")
yield ("fuchsia", s.["Fuchsia"], "black")
yield ("gray", s.["Gray"], "white")
yield ("green", s.["Green"], "white")
yield ("lime", s.["Lime"], "black")
yield ("maroon", s.["Maroon"], "white")
yield ("navy", s.["Navy"], "white")
yield ("olive", s.["Olive"], "white")
yield ("purple", s.["Purple"], "white")
yield ("red", s.["Red"], "black")
yield ("silver", s.["Silver"], "black")
yield ("teal", s.["Teal"], "white")
yield ("white", s.["White"], "black")
yield ("yellow", s.["Yellow"], "black")
}
|> Seq.map (fun color ->
let (colorName, dispText, txtColor) = color
option [ yield _value colorName
yield _style (sprintf "background-color:%s;color:%s;" colorName txtColor)
match colorName = selected with true -> yield _selected | false -> () ] [
encodedText (dispText.Value.ToLower ())
])
|> List.ofSeq
|> select (_name name :: attrs)
/// Generate an input[type=radio] that is selected if its value is the current value
let radio name domId value current =
input [ yield _type "radio"
yield _name name
yield _id domId
yield _value value
match value = current with true -> yield _checked | false -> () ]
/// Generate a select list with the current value selected
let selectList name selected attrs items =
items
|> Seq.map (fun (value, text) ->
option [ yield _value value
match value = selected with true -> yield _selected | false -> () ] [ encodedText text ])
|> List.ofSeq
|> select (List.concat [ [ _name name; _id name ]; attrs ])
/// Generate the text for a default entry at the top of a select list
let selectDefault text = sprintf "— %s —" text
/// Generate a standard submit button with icon and text
let submit attrs ico text = button (_type "submit" :: attrs) [ icon ico; rawText " &nbsp;"; encLocText text ]
/// An empty GUID string (used for "add" actions)
let emptyGuid = System.Guid.Empty.ToString "N"
/// blockquote tag
let blockquote = tag "blockquote"
/// role attribute
let _role = attr "role"
/// aria-* attribute
let _aria typ = attr (sprintf "aria-%s" typ)
/// onclick attribute
let _onclick = attr "onclick"
/// onsubmit attribute
let _onsubmit = attr "onsubmit"
/// scoped flag (used for <style> tag)
let _scoped = flag "scoped"
/// Utility methods to help with time zones (and localization of their names)
module TimeZones =
open System.Collections.Generic
/// Cross-reference between time zone Ids and their English names
let private xref =
[ "America/Chicago", "Central"
"America/Denver", "Mountain"
"America/Los_Angeles", "Pacific"
"America/New_York", "Eastern"
"America/Phoenix", "Mountain (Arizona)"
"Europe/Berlin", "Central European"
]
|> Map.ofList
/// Get the name of a time zone, given its Id
let name tzId (s : IStringLocalizer) =
try s.[xref.[tzId]]
with :? KeyNotFoundException -> LocalizedString (tzId, tzId)

View File

@ -0,0 +1,472 @@
module PrayerTracker.Views.Help
open Giraffe.GiraffeViewEngine
open Microsoft.AspNetCore.Html
open PrayerTracker
open System.IO
/// View for the add/edit request help page
let editRequest () =
let s = I18N.localizer.Force ()
let l = I18N.forView "Help/Requests/Edit"
use sw = new StringWriter ()
let raw = rawLocText sw
[ p [] [
raw l.["This page allows you to enter or update a new prayer request."]
]
p [] [
strong [] [ encLocText s.["Request Type"] ]
br []
raw l.["There are 5 request types in {0}.", s.["PrayerTracker"]]
space
raw l.["“{0}” are your regular requests that people may have regarding things happening over the next week or so.",
s.["Current Requests"]]
space
raw l.["“{0}” are requests that may occur repeatedly or continue indefinitely.", s.["Long-Term Requests"]]
space
raw l.["“{0}” are like “{1}”, but they are answers to prayer to share with your group.",
s.["Praise Reports"], s.["Current Requests"]]
space
raw l.["“{0}” is for those who are pregnant.", s.["Expecting"]]
space
raw l.["“{0}” are like “{1}”, but instead of a request, they are simply passing information along about something coming up.",
s.["Announcements"], s.["Current Requests"]]
]
p [] [
raw l.["The order above is the order in which the request types appear on the list."]
space
raw l.["“{0}” and “{1}” are not subject to the automatic expiration (set on the “{2}” page) that the other requests are.",
s.["Long-Term Requests"], s.["Expecting"], s.["Change Preferences"]]
]
p [] [
strong [] [ encLocText s.["Date"] ]
br []
raw l.["For new requests, this is a box with a calendar date picker."]
space
raw l.["Click or tab into the box to display the calendar, which will be preselected to today's date."]
space
raw l.["For existing requests, there will be a check box labeled “{0}”.", s.["Check to not update the date"]]
space
raw l.["This can be used if you are correcting spelling or punctuation, and do not have an actual update to make to the request."]
]
p [] [
strong [] [ encLocText s.["Requestor / Subject"] ]
br []
raw l.["For requests or praises, this field is for the name of the person who made the request or offered the praise report."]
space
raw l.["For announcements, this should contain the subject of the announcement."]
space
raw l.["For all types, it is optional; I used to have an announcement with no subject that ran every week, telling where to send requests and updates."]
]
p [] [
strong [] [ encLocText s.["Expiration"] ]
br []
raw l.["“{0}” means that the request is subject to the expiration days in the group preferences.",
s.["Expire Normally"]]
space
raw l.["“{0}” can be used to make a request never expire (note that this is redundant for “{1}” and {2}).",
s.["Request Never Expires"], s.["Long-Term Requests"], s.["Expecting"]]
space
raw l.["If you are editing an existing request, a third option appears."]
space
raw l.["“{0}” will make the request expire when it is saved.", s.["Expire Immediately"]]
space
raw l.["Apart from the icons on the request maintenance page, this is the only way to expire “{0}” and “{1}” requests, but it can be used for any request type.",
s.["Long-Term Requests"], s.["Expecting"]]
]
p [] [
strong [] [ encLocText s.["Request"] ]
br []
raw l.["This is the text of the request."]
space
raw l.["The editor provides many formatting capabilities, including “Spell Check as you Type” (enabled by default), “Paste from Word”, and “Paste Plain”, as well as “Source” view, if you want to edit the HTML yourself."]
space
raw l.["It also supports undo and redo, and the editor supports full-screen mode."]
space
raw l.["Hover over each icon to see what each button does."]
]
]
|> Layout.help "Add / Edit a Request"
/// View for the small group member maintenance help
let groupMembers () =
let s = I18N.localizer.Force ()
let l = I18N.forView "Help/Group/Members"
use sw = new StringWriter ()
let raw = rawLocText sw
[ p [] [
raw l.["From this page, you can add, edit, and delete the e-mail addresses for your group."]
]
p [] [
strong [] [ encLocText s.["Add a New Group Member"] ]
br []
raw l.["To add an e-mail address, click the icon or text in the center of the page, below the title and above the list of addresses for your group."]
]
p [] [
strong [] [ encLocText s.["Edit Group Member"] ]
br []
raw l.["To edit an e-mail address, click the blue pencil icon; it's the first icon under the “{0}” column heading.",
s.["Actions"]]
space
raw l.["This will allow you to update the name and/or the e-mail address for that member."]
]
p [] [
strong [] [ encLocText s.["Delete a Group Member"] ]
br []
raw l.["To delete an e-mail address, click the blue trash can icon in the “{0}” column.", s.["Actions"]]
space
raw l.["Note that once an e-mail address has been deleted, it is gone."]
space
raw l.["(Of course, if you delete it in error, you can enter it again using the “Add” instructions above.)"]
]
]
|> Layout.help "Maintain Group Members"
/// View for the log on help page
let logOn () =
let s = I18N.localizer.Force ()
let l = I18N.forView "Help/User/LogOn"
use sw = new StringWriter ()
let raw = rawLocText sw
[ p [] [
raw l.["This page allows you to log on to {0}.", s.["PrayerTracker"]]
space
raw l.["There are two different levels of access for {0} - user and group.", s.["PrayerTracker"]]
]
p [] [
strong [] [ encLocText s.["User Log On"] ]
br []
raw l.["Select your group, then enter your e-mail address and password into the appropriate boxes."]
space
raw l.["If you want {0} to remember you on your computer, click the “{1}” box before clicking the “{2}” button.",
s.["PrayerTracker"], s.["Remember Me"], s.["Log On"]]
]
p [] [
strong [] [ encLocText s.["Group Log On"] ]
br []
raw l.["If your group has defined a password to use to allow you to view their request list online, select your group from the drop down list, then enter the group password into the appropriate box."]
space
raw l.["If you want {0} to remember your group, click the “{1}” box before clicking the “{2}” button.",
s.["PrayerTracker"], s.["Remember Me"], s.["Log On"]]
]
]
|> Layout.help "Log On"
/// Help index page
let index vi =
let s = I18N.localizer.Force ()
let l = I18N.forView "Help/Index"
use sw = new StringWriter ()
let raw = rawLocText sw
let helpRows =
Help.all
|> List.map (fun h ->
tr [] [
td [] [
a [ _href (sprintf "/help/%s" h.Url)
_onclick (sprintf "return PT.showHelp('%s')" h.Url) ]
[ encLocText s.[h.linkedText] ]
]
])
[ p [] [
raw l.["Throughout {0}, you'll see this icon {1} next to the title on each page.",
s.["PrayerTracker"], icon "help_outline" |> (renderHtmlNode >> HtmlString)]
space
raw l.["Clicking this will open a new, small window with directions on using that page."]
space
raw l.["If you are looking for a quick overview of {0}, start with the “{1}” and “{2}” entries.",
s.["PrayerTracker"], s.["Edit Request"], s.["Change Preferences"]]
]
hr []
p [ _class "pt-center-text" ] [ strong [] [ encLocText s.["Help Topics"] ] ]
table [ _class "pt-table" ] [ tbody [] helpRows ]
]
|> Layout.Content.standard
|> Layout.standard vi "Help"
let password () =
let s = I18N.localizer.Force ()
let l = I18N.forView "Help/User/Password"
use sw = new StringWriter ()
let raw = rawLocText sw
[ p [] [
raw l.["This page will let you change your password."]
space
raw l.["Enter your existing password in the top box, then enter your new password in the bottom two boxes."]
space
raw l.["Entering your existing password is a security measure; with the “{0}” box on the log in page, this will prevent someone else who may be using your computer from being able to simply go to the site and change your password.",
s.["Remember Me"]]
]
p [] [
raw l.["If you cannot remember your existing password, we cannot retrieve it, but we can set it to something known so that you can then change it to your password."]
space
raw l.["<a href=\"mailto:daniel@djs-consulting.com?subject={0}%20Password%20Help\">Click here to request help resetting your password</a>.",
s.["PrayerTracker"]]
]
]
|> Layout.help "Change Your Password"
/// View for the small group preferences help page
let preferences () =
let s = I18N.localizer.Force ()
let l = I18N.forView "Help/Group/Preferences"
use sw = new StringWriter ()
let raw = rawLocText sw
[ p [] [
raw l.["This page allows you to change how your prayer request list looks and behaves."]
space
raw l.["Each section is addressed below."]
]
p [] [
strong [] [ encLocText s.["Requests Expire After"] ]
br []
raw l.["When a regular request goes this many days without being updated, it expires and no longer appears on the request list."]
space
raw l.["Note that the categories “{0}” and “{1}” never expire automatically.", s.["Long-Term Requests"], s.["Expecting"]]
]
p [] [
strong [] [ encLocText s.["Requests “New” For"] ]
br []
raw l.["Requests that have been updated within this many days are identified by a hollow circle for their bullet, as opposed to a filled circle for other requests."]
space
raw l.["All categories respect this setting."]
space
raw l.["If you do a typo correction on a request, if you do not check the box to update the date, this setting will change the bullet."]
space
raw l.["(NOTE: In the plain-text e-mail, new requests are bulleted with a “+” symbol, and old are bulleted with a “-” symbol.)"]
]
p [] [
strong [] [ encLocText s.["Long-Term Requests Alerted for Update"] ]
br []
raw l.["Requests that have not been updated in this many weeks are identified by an italic font on the “{0}” page, to remind you to seek updates on these requests so that your prayers can stay relevant and current.",
s.["Maintain Requests"]]
]
p [] [
strong [] [ encLocText s.["Request Sorting"] ]
br []
raw l.["By default, requests are sorted within each group by the last updated date, with the most recent on top."]
space
raw l.["If you would prefer to have the list sorted by requestor or subject rather than by date, select “{0}” instead.",
s.["Sort by Requestor Name"]]
]
p [] [
strong [] [ encLocText s.["E-mail “From” Name and Address"] ]
br []
raw l.["{0} must put an name and e-mail address in the “from” position of each e-mail it sends.", s.["PrayerTracker"]]
space
raw l.["The default name is “PrayerTracker”, and the default e-mail address is prayer@djs-consulting.com."]
space
raw l.["This will work, but any bounced e-mails and out-of-office replies will be sent to that address (which is not even a real address)."]
space
raw l.["Changing at least the e-mail address to your address will ensure that you receive these e-mails, and can prune your e-mail list accordingly."]
]
p [] [
strong [] [ encLocText s.["E-mail Format"] ]
br []
raw l.["This is the default e-mail format for your group."]
space
raw l.["The {0} default is HTML, which sends the list just as you see it online.", s.["PrayerTracker"]]
space
raw l.["However, some e-mail clients may not display this properly, so you can choose to default the email to a plain-text format, which does not have colors, italics, or other formatting."]
space
raw l.["The setting on this page is the group default; you can select a format for each recipient on the “{0}” page.",
s.["Maintain Group Members"]]
]
p [] [
strong [] [ encLocText s.["Colors"] ]
br []
raw l.["You can customize the colors that are used for the headings and lines in your request list."]
space
raw l.["You can select one of the 16 named colors in the drop down lists, or you can “mix your own” using red, green, and blue (RGB) values between 0 and 255."]
space
raw l.["There is a link on the bottom of the page to a color list with more names and their RGB values, if you're really feeling artistic."]
space
raw l.["The background color cannot be changed."]
]
p [] [
strong [] [ encLocText s.["Fonts{0} for List", ""] ]
br []
raw l.["This is a comma-separated list of fonts that will be used for your request list."]
space
raw l.["A warning is good here; just because you have an obscure font and like the way that it looks does not mean that others have that same font."]
space
raw l.["It is generally best to stick with the fonts that come with Windows - fonts like “Arial”, “Times New Roman”, “Tahoma”, and “Comic Sans MS."]
space
raw l.["You should also end the font list with either “serif” or “sans-serif”, which will use the browser's default serif (like “Times New Roman”) or sans-serif (like “Arial”) font."]
]
p [] [
strong [] [ encLocText s.["Heading / List Text Size"] ]
br []
raw l.["This is the point size to use for each."]
space
raw l.["The default for the heading is 16pt, and the default for the text is 12pt."]
]
p [] [
strong [] [ encLocText s.["Making a “Large Print” List"] ]
br []
raw l.["If your group is comprised mostly of people who prefer large print, the following settings will make your list look like the typical large-print publication:"]
br []
blockquote [] [
em [] [ encLocText s.["Fonts"] ]
rawText " &#8212; 'Times New Roman',serif"
br []
em [] [ encLocText s.["Heading Text Size"] ]
rawText " &#8212; 18pt"
br []
em [] [ encLocText s.["List Text Size"] ]
rawText " &#8212; 16pt"
]
]
p [] [
strong [] [ encLocText s.["Time Zone"] ]
br []
raw l.["This is the time zone that you would like to use for your group."]
space
raw l.["If you do not see your time zone listed, just <a href=\"mailto:daniel@djs-consulting.com?subject={0}%20{1}\">contact Daniel</a> and tell him what time zone you need.",
s.["PrayerTracker"], s.["Time Zone"].Value.Replace(" ", "%20")]
]
p [] [
strong [] [ encLocText s.["Request List Visibility"] ]
br []
raw l.["The group's request list can be either public, private, or password-protected."]
space
raw l.["Public lists are available without logging in, and private lists are only available online to administrators (though the list can still be sent via e-mail by an administrator)."]
space
raw l.["Password-protected lists allow group members to log in and view the current request list online, using the “{0}” link and providing this password.",
s.["Group Log On"]]
raw l.["As this is a shared password, it is stored in plain text, so you can easily see what it is."]
space
raw l.["If you select “{0}” but do not enter a password, the list remains private, which is also the default value.",
s.["Password Protected"]]
space
raw l.["(Changing this password will force all members of the group who logged in with the “{0}” box checked to provide the new password.)",
s.["Remember Me"]]
]
]
|> Layout.help "Change Preferences"
/// View for the request maintenance help page
let requests () =
let s = I18N.localizer.Force ()
let l = I18N.forView "Help/Requests/Maintain"
use sw = new StringWriter ()
let raw = rawLocText sw
[ p [] [
raw l.["From this page, you can add, edit, and delete your current requests."]
raw l.["You can also restore requests that may have expired, but should be made active once again."]
]
p [] [
strong [] [ encLocText s.["Add a New Request"] ]
br []
raw l.["To add a request, click the icon or text in the center of the page, below the title and above the list of requests for your group."]
]
p [] [
strong [] [ encLocText s.["Edit Request"] ]
br []
raw l.["To edit a request, click the blue pencil icon; it's the first icon under the “{0}” column heading.",
s.["Actions"]]
]
p [] [
strong [] [ encLocText s.["Expire a Request"] ]
br []
raw l.["For active requests, the second icon is an eye with a slash through it; clicking this icon will expire the request immediately."]
space
raw l.["This is equivalent to editing the request, selecting “{0}”, and saving it.", s.["Expire Immediately"]]
]
p [] [
strong [] [ encLocText s.["Restore an Inactive Request"] ]
br []
raw l.["When the page is first displayed, it does not display inactive requests."]
space
raw l.["However, clicking the link at the bottom of the page will refresh the page with the inactive requests shown."]
space
raw l.["The middle icon will look like an eye; clicking it will restore the request as an active request."]
space
raw l.["The last updated date will be current, and the request is set to expire normally."]
]
p [] [
strong [] [ encLocText s.["Delete a Request"] ]
br []
raw l.["Deleting a request is contrary to the intent of {0}, as you can retrieve requests that have expired.",
s.["PrayerTracker"]]
space
raw l.["However, if there is a request that needs to be deleted, clicking the blue trash can icon in the “{0}” column will allow you to do it.",
s.["Actions"]]
space
raw l.["Use this option carefully, as these deletions cannot be undone; once a request is deleted, it is gone for good."]
]
]
|> Layout.help "Maintain Requests"
/// View for the Send Announcement page help
let sendAnnouncement () =
let s = I18N.localizer.Force ()
let l = I18N.forView "Help/Group/Announcement"
use sw = new StringWriter ()
let raw = rawLocText sw
[ p [] [
strong [] [ encLocText s.["Announcement Text"] ]
br []
raw l.["This is the text of the announcement you would like to send."]
space
raw l.["It functions the same way as the text box on the “<a href=\"{0}\">{1}</a>” page.",
(sprintf "/help/%s/%s" Help.editRequest.``module`` Help.editRequest.topic), s.["Edit Request"]]
]
p [] [
strong [] [ encLocText s.["Add to Request List"] ]
br []
raw l.["Without this box checked, the text of the announcement will only be e-mailed to your group members."]
space
raw l.["If you check this box, however, the text of the announcement will be added to your prayer list under the section you have selected."]
]
]
|> Layout.help "Send Announcement"
let viewRequests () =
let s = I18N.localizer.Force ()
let l = I18N.forView "Help/Requests/View"
use sw = new StringWriter ()
let raw = rawLocText sw
[ p [] [
raw l.["From this page, you can view the request list (for today or for the next Sunday), view a printable version of the list, and e-mail the list to the members of your group."]
space
raw l.["(NOTE: If you are logged in as a group member, the only option you will see is to view a printable list.)"]
]
p [] [
strong [] [ encLocText s.["List for Next Sunday"] ]
br []
raw l.["This will modify the date for the list, so it will look like it is currently next Sunday."]
space
raw l.["This can be used, for example, to see what requests will expire, or allow you to print a list with Sunday's date on Saturday evening."]
space
raw l.["Note that this link does not appear if it is Sunday."]
]
p [] [
strong [] [ encLocText s.["View Printable"] ]
br []
raw l.["Clicking this link will display the list in a format that is suitable for printing; it does not have the normal {0} header across the top.",
s.["PrayerTracker"]]
space
raw l.["Once you have clicked the link, you can print it using your browser's standard “Print” functionality."]
]
p [] [
strong [] [ encLocText s.["Send Via E-mail"] ]
br []
raw l.["Clicking this link will send the list you are currently viewing to your group members."]
space
raw l.["The page will remind you that you are about to do that, and ask for your confirmation."]
space
raw l.["If you proceed, you will see a page that shows to whom the list was sent, and what the list looked like."]
space
raw l.["You may safely use your browser's “Back” button to navigate away from the page."]
]
]
|> Layout.help "View Request List"

View File

@ -0,0 +1,262 @@
/// Views associated with the home page, or those that don't fit anywhere else
module PrayerTracker.Views.Home
open Giraffe.GiraffeViewEngine
open Microsoft.AspNetCore.Html
open PrayerTracker.ViewModels
open System.IO
/// The error page
let error code vi =
let s = I18N.localizer.Force ()
let l = I18N.forView "Home/Error"
use sw = new StringWriter ()
let raw = rawLocText sw
let is404 = "404" = code
let pageTitle = match is404 with true -> "Page Not Found" | false -> "Server Error"
[ yield!
match is404 with
| true ->
[ p [] [
raw l.["The page you requested cannot be found."]
raw l.["Please use your &ldquo;Back&rdquo; button to return to {0}.", s.["PrayerTracker"]]
]
p [] [
raw l.["If you reached this page from a link within {0}, please copy the link from the browser's address bar, and send it to support, along with the group for which you were currently authenticated (if any).",
s.["PrayerTracker"]]
]
]
| false ->
[ p [] [
raw l.["An error ({0}) has occurred.", code]
raw l.["Please use your &ldquo;Back&rdquo; button to return to {0}.", s.["PrayerTracker"]]
]
]
yield br []
yield hr []
yield div [ _style "font-size:70%;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen-Sans,Ubuntu,Cantarell,'Helvetica Neue',sans-serif" ] [
img [ _src (sprintf "/img/%A.png" s.["footer_en"])
_alt (sprintf "%A %A" s.["PrayerTracker"] s.["from Bit Badger Solutions"])
_title (sprintf "%A %A" s.["PrayerTracker"] s.["from Bit Badger Solutions"])
_style "vertical-align:text-bottom;" ]
encodedText vi.version
]
]
|> div []
|> Layout.bare pageTitle
/// The home page
let index vi =
let s = I18N.localizer.Force ()
let l = I18N.forView "Home/Index"
use sw = new StringWriter ()
let raw = rawLocText sw
[ p [] [
raw l.["Welcome to <strong>{0}</strong>!", s.["PrayerTracker"]]
space
raw l.["{0} is an interactive website that provides churches, Sunday School classes, and other organizations an easy way to keep up with their prayer requests.",
s.["PrayerTracker"]]
space
raw l.["It is provided at no charge, as a ministry and a community service."]
]
h4 [] [ raw l.["What Does It Do?"] ]
p [] [
raw l.["{0} has what you need to make maintaining a prayer request list a breeze.", s.["PrayerTracker"]]
space
raw l.["Some of the things it can do..."]
]
ul [] [
li [] [
raw l.["It drops old requests off the list automatically."]
space
raw l.["Requests other than “{0}” requests will expire at 14 days, though this can be changed by the organization.",
s.["Long-Term Requests"]]
space
raw l.["This expiration is based on the last update, not the initial request."]
space
raw l.["(And, once requests do “drop off”, they are not gone - they may be recovered if needed.)"]
]
li [] [
raw l.["Requests can be viewed any time."]
space
raw l.["Lists can be made public, or they can be secured with a password, if desired."]
]
li [] [
raw l.["Lists can be e-mailed to a pre-defined list of members."]
space
raw l.["This can be useful for folks who may not be able to write down all the requests during class, but want a list so that they can pray for them the rest of week."]
space
raw l.["E-mails are sent individually to each person, which keeps the e-mail list private and keeps the messages from being flagged as spam."]
]
li [] [
raw l.["The look and feel of the list can be configured for each group."]
space
raw l.["All fonts, colors, and sizes can be customized."]
space
raw l.["This allows for configuration of large-print lists, among other things."]
]
]
h4 [] [ raw l.["How Can Your Organization Use {0}?", s.["PrayerTracker"]] ]
p [] [
raw l.["Like Gods gift of salvation, {0} is free for the asking for any church, Sunday School class, or other organization who wishes to use it.",
s.["PrayerTracker"]]
space
raw l.["If your organization would like to get set up, just <a href=\"mailto:daniel@djs-consulting.com?subject=New%20{0}%20Class\">e-mail</a> Daniel and let him know.",
s.["PrayerTracker"]]
]
h4 [] [ raw l.["Do I Have to Register to See the Requests?"] ]
p [] [
raw l.["This depends on the group."]
space
raw l.["Lists can be configured to be password-protected, but they do not have to be."]
space
raw l.["If you click on the “{0}” link above, you will see a list of groups - those that do not indicate that they require logging in are publicly viewable.",
s.["View Request List"]]
]
h4 [] [ raw l.["How Does It Work?"] ]
p [] [
raw l.["Check out the “{0}” link above - it details each of the processes and how they work.", s.["Help"]]
]
]
|> Layout.Content.standard
|> Layout.standard vi "Welcome!"
/// Privacy Policy page
let privacyPolicy vi =
let s = I18N.localizer.Force ()
let l = I18N.forView "Home/PrivacyPolicy"
use sw = new StringWriter ()
let raw = rawLocText sw
[ p [ _class "pt-right-text" ] [ small[] [ em [] [ raw l.["(as of July 31, 2018)"] ] ] ]
p [] [
raw l.["The nature of the service is one where privacy is a must."]
space
raw l.["The items below will help you understand the data we collect, access, and store on your behalf as you use this service."]
]
h3 [] [ raw l.["What We Collect"] ]
ul [] [
li [] [
strong [] [ raw l.["Identifying Data"] ]
rawText " &ndash; "
raw l.["{0} stores the first and last names, e-mail addresses, and hashed passwords of all authorized users.", s.["PrayerTracker"]]
space
raw l.["Users are also associated with one or more small groups."]
]
li [] [
strong [] [ raw l.["User Provided Data"] ]
rawText " &ndash; "
raw l.["{0} stores the text of prayer requests.", s.["PrayerTracker"]]
space
raw l.["It also stores names and e-mail addreses of small group members, and plain-text passwords for small groups with password-protected lists."]
]
]
h3 [] [ raw l.["How Your Data Is Accessed / Secured"] ]
ul [] [
li [] [
raw l.["While you are signed in, {0} utilizes a session cookie, and transmits that cookie to the server to establish your identity.",
s.["PrayerTracker"]]
space
raw l.["If you utilize the “{0}” box on sign in, a second cookie is stored, and transmitted to establish a session; this cookie is removed by clicking the “{1}” link.",
s.["Remember Me"], s.["Log Off"]]
space
raw l.["Both of these cookies are encrypted, both in your browser and in transit."]
space
raw l.["Finally, a third cookie is used to maintain your currently selected language, so that this selection is maintained across browser sessions."]
]
li [] [
raw l.["Data for your small group is returned to you, as required, to display and edit."]
space
raw l.["{0} also sends e-mails on behalf of the configured owner of a small group; these e-mails are sent from prayer@djs-consulting.com, with the “Reply To” header set to the configured owner of the small group.",
s.["PrayerTracker"]]
space
raw l.["Distinct e-mails are sent to each user, as to not disclose the other recipients."]
space
raw l.["On the server, all data is stored in a controlled-access database."]
]
li [] [
raw l.["Your data is backed up, along with other Bit Badger Solutions hosted systems, in a rolling manner; backups are preserved for the prior 7 days, and backups from the 1st and 15th are preserved for 3 months."]
space
raw l.["These backups are stored in a private cloud data repository."]
]
li [] [
raw l.["Access to servers and backups is strictly controlled and monitored for unauthorized access attempts."]
]
]
h3 [] [ raw l.["Removing Your Data"] ]
p [] [
raw l.["At any time, you may choose to discontinue using {0}; just e-mail Daniel, as you did to register, and request deletion of your small group.",
s.["PrayerTracker"]]
]
]
|> Layout.Content.standard
|> Layout.standard vi "Privacy Policy"
/// Terms of Service page
let termsOfService vi =
let s = I18N.localizer.Force ()
let l = I18N.forView "Home/TermsOfService"
use sw = new StringWriter ()
let raw = rawLocText sw
let ppLink =
a [ _href "/legal/privacy-policy" ] [ encodedText (s.["Privacy Policy"].Value.ToLower ()) ]
|> (renderHtmlNode >> HtmlString)
[ p [ _class "pt-right-text" ] [ small [] [ em [] [ raw l.["(as of May 24, 2018)"] ] ] ]
h3 [] [ encodedText "1. "; raw l.["Acceptance of Terms"] ]
p [] [
raw l.["By accessing this web site, you are agreeing to be bound by these Terms and Conditions, and that you are responsible to ensure that your use of this site complies with all applicable laws."]
space
raw l.["Your continued use of this site implies your acceptance of these terms."]
]
h3 [] [ encodedText "2. "; raw l.["Description of Service and Registration"] ]
p [] [
raw l.["{0} is a service that allows individuals to enter and amend prayer requests on behalf of organizations.",
s.["PrayerTracker"]]
space
raw l.["Registration is accomplished via e-mail to Daniel Summers (daniel at bitbadger dot solutions, substituting punctuation)."]
space
raw l.["See our {0} for details on the personal (user) information we maintain.", ppLink]
]
h3 [] [ encodedText "3. "; raw l.["Liability"] ]
p [] [
raw l.["This service is provided “as is”, and no warranty (express or implied) exists."]
space
raw l.["The service and its developers may not be held liable for any damages that may arise through the use of this service."]
]
h3 [] [ encodedText "4. "; raw l.["Updates to Terms"] ]
p [] [
raw l.["These terms and conditions may be updated at any time."]
space
raw l.["When these terms are updated, users will be notified by a system-generated announcement."]
space
raw l.["Additionally, the date at the top of this page will be updated."]
]
hr []
p [] [ raw l.["You may also wish to review our {0} to learn how we handle your data.", ppLink] ]
]
|> Layout.Content.standard
|> Layout.standard vi "Terms of Service"
/// View for unauthorized page
let unauthorized vi =
let s = I18N.localizer.Force ()
let l = I18N.forView "Home/Unauthorized"
use sw = new StringWriter ()
let raw = rawLocText sw
[ p [] [
raw l.["If you feel you have reached this page in error, please <a href=\"mailto:daniel@djs-consulting.com?Subject={0}%20Unauthorized%20Access\">contact Daniel</a> and provide the details as to what you were doing (i.e., what link did you click, where had you been, etc.).",
s.["PrayerTracker"]]
]
p [] [
raw l.["Otherwise, you may select one of the links above to get back into an authorized portion of {0}.",
s.["PrayerTracker"]]
]
]
|> Layout.Content.standard
|> Layout.standard vi "Unauthorized Access"

View File

@ -0,0 +1,22 @@
/// Internationalization for PrayerTracker
module PrayerTracker.Views.I18N
open Microsoft.AspNetCore.Mvc.Localization
open Microsoft.Extensions.Localization
open PrayerTracker
let mutable private stringLocFactory : IStringLocalizerFactory = null
let mutable private htmlLocFactory : IHtmlLocalizerFactory = null
let private resAsmName = typeof<Common>.Assembly.GetName().Name
/// Set up the string and HTML localizer factories
let setUpFactories fac =
stringLocFactory <- fac
htmlLocFactory <- HtmlLocalizerFactory stringLocFactory
/// An instance of the common string localizer
let localizer = lazy (stringLocFactory.Create ("Common", resAsmName))
/// Get a view localizer
let forView (view : string) =
htmlLocFactory.Create (sprintf "Views.%s" (view.Replace ('/', '.')), resAsmName)

View File

@ -0,0 +1,315 @@
/// Layout items for PrayerTracker
module PrayerTracker.Views.Layout
open Giraffe.GiraffeViewEngine
open PrayerTracker
open PrayerTracker.ViewModels
open System
/// Navigation items
module Navigation =
open System.Globalization
/// Top navigation bar
let top m =
let s = PrayerTracker.Views.I18N.localizer.Force ()
let menuSpacer = rawText "&nbsp; "
let leftLinks = [
match m.user with
| Some u ->
yield li [ _class "dropdown" ] [
a [ _class "dropbtn"; _role "button"; _aria "label" s.["Requests"].Value; _title s.["Requests"].Value ]
[ icon "question_answer"; space; encLocText s.["Requests"]; space; icon "keyboard_arrow_down" ]
div [ _class "dropdown-content"; _role "menu" ] [
a [ _href "/prayer-requests" ] [ icon "compare_arrows"; menuSpacer; encLocText s.["Maintain"] ]
a [ _href "/prayer-requests/view" ] [ icon "list"; menuSpacer; encLocText s.["View List"] ]
]
]
yield li [ _class "dropdown" ] [
a [ _class "dropbtn"; _role "button"; _aria "label" s.["Group"].Value; _title s.["Group"].Value ]
[ icon "group"; space; encLocText s.["Group"]; space; icon "keyboard_arrow_down" ]
div [ _class "dropdown-content"; _role "menu" ] [
a [ _href "/small-group/members" ] [ icon "email"; menuSpacer; encLocText s.["Maintain Group Members"] ]
a [ _href "/small-group/announcement" ] [ icon "send"; menuSpacer; encLocText s.["Send Announcement"] ]
a [ _href "/small-group/preferences" ] [ icon "build"; menuSpacer; encLocText s.["Change Preferences"] ]
]
]
match u.isAdmin with
| true ->
yield li [ _class "dropdown" ] [
a [ _class "dropbtn"; _role "button"; _aria "label" s.["Administration"].Value; _title s.["Administration"].Value ]
[ icon "settings"; space; encLocText s.["Administration"]; space; icon "keyboard_arrow_down" ]
div [ _class "dropdown-content"; _role "menu" ] [
a [ _href "/churches" ] [ icon "home"; menuSpacer; encLocText s.["Churches"] ]
a [ _href "/small-groups" ] [ icon "send"; menuSpacer; encLocText s.["Groups"] ]
a [ _href "/users" ] [ icon "build"; menuSpacer; encLocText s.["Users"] ]
]
]
| false -> ()
| None ->
match m.group with
| Some _ ->
yield li [] [
a [ _href "/prayer-requests/view"
_aria "label" s.["View Request List"].Value
_title s.["View Request List"].Value ]
[ icon "list"; space; encLocText s.["View Request List"] ]
]
| None ->
yield li [ _class "dropdown" ] [
a [ _class "dropbtn"; _role "button"; _aria "label" s.["Log On"].Value; _title s.["Log On"].Value ]
[ icon "security"; space; encLocText s.["Log On"]; space; icon "keyboard_arrow_down" ]
div [ _class "dropdown-content"; _role "menu" ] [
a [ _href "/user/log-on" ] [ icon "person"; menuSpacer; encLocText s.["User"] ]
a [ _href "/small-group/log-on" ] [ icon "group"; menuSpacer; encLocText s.["Group"] ]
]
]
yield li [] [
a [ _href "/prayer-requests/lists"
_aria "label" s.["View Request List"].Value
_title s.["View Request List"].Value ]
[ icon "list"; space; encLocText s.["View Request List"] ]
]
yield li [] [
a [ _href "/help"; _aria "label" s.["Help"].Value; _title s.["View Help"].Value ]
[ icon "help"; space; encLocText s.["Help"] ]
]
]
let rightLinks =
match m.group with
| Some _ ->
[ match m.user with
| Some _ ->
yield li [] [
a [ _href "/user/password"
_aria "label" s.["Change Your Password"].Value
_title s.["Change Your Password"].Value ]
[ icon "lock"; space; encLocText s.["Change Your Password"] ]
]
| None -> ()
yield li [] [
a [ _href "/log-off"; _aria "label" s.["Log Off"].Value; _title s.["Log Off"].Value ]
[ icon "power_settings_new"; space; encLocText s.["Log Off"] ]
]
]
| None -> List.empty
header [ _class "pt-title-bar" ] [
section [ _class "pt-title-bar-left" ] [
span [ _class "pt-title-bar-home" ] [
a [ _href "/"; _title s.["Home"].Value ] [ encLocText s.["PrayerTracker"] ]
]
ul [] leftLinks
]
section [ _class "pt-title-bar-center" ] []
section [ _class "pt-title-bar-right"; _role "toolbar" ] [
ul [] rightLinks
]
]
/// Identity bar (below top nav)
let identity m =
let s = I18N.localizer.Force ()
header [ _id "pt-language" ] [
div [] [
yield span [ _class "u" ] [ encLocText s.["Language"]; rawText ": " ]
match CultureInfo.CurrentCulture.Name.StartsWith "es" with
| true ->
yield encLocText s.["Spanish"]
yield rawText " &nbsp; &bull; &nbsp; "
yield a [ _href "/language/en" ] [ encLocText s.["Change to English"] ]
| false ->
yield encLocText s.["English"]
yield rawText " &nbsp; &bull; &nbsp; "
yield a [ _href "/language/es" ] [ encLocText s.["Cambie a Español"] ]
]
match m.group with
| Some g ->
[ match m.user with
| Some u ->
yield span [ _class "u" ] [ encLocText s.["Currently Logged On"] ]
yield rawText "&nbsp; &nbsp;"
yield icon "person"
yield strong [] [ encodedText u.fullName ]
yield rawText "&nbsp; &nbsp; "
| None ->
yield encLocText s.["Logged On as a Member of"]
yield rawText "&nbsp; "
yield icon "group"
yield space
match m.user with
| Some _ -> yield a [ _href "/small-group" ] [ strong [] [ encodedText g.name ] ]
| None -> yield strong [] [ encodedText g.name ]
yield rawText " &nbsp;"
]
| None -> []
|> div []
]
/// Content layouts
module Content =
/// Content layout that tops at 60rem
let standard = div [ _class "pt-content" ]
/// Content layout that uses the full width of the browser window
let wide = div [ _class "pt-content pt-full-width" ]
/// Separator for parts of the title
let private titleSep = rawText " &#xab; "
let private commonHead =
[ meta [ _name "viewport"; _content "width=device-width, initial-scale=1" ]
meta [ _name "generator"; _content "Giraffe" ]
link [ _rel "stylesheet"; _href "https://fonts.googleapis.com/icon?family=Material+Icons" ]
link [ _rel "stylesheet"; _href "/css/app.css" ]
script [ _src "/js/app.js" ] []
]
/// Render the <head> portion of the page
let private htmlHead m pageTitle =
let s = I18N.localizer.Force ()
head [] [
yield meta [ _charset "UTF-8" ]
yield title [] [ encLocText pageTitle; titleSep; encLocText s.["PrayerTracker"] ]
yield! commonHead
for cssFile in m.style do
yield link [ _rel "stylesheet"; _href (sprintf "/css/%s.css" cssFile); _type "text/css" ]
for jsFile in m.script do
yield script [ _src (sprintf "/js/%s.js" jsFile) ] []
]
/// Render a link to the help page for the current page
let private helpLink link =
let s = I18N.localizer.Force ()
sup [] [
a [ _href (sprintf "/help/%s" link)
_title s.["Click for Help on This Page"].Value
_onclick (sprintf "return PT.showHelp('%s')" link) ] [
icon "help_outline"
]
]
/// Render the page title, and optionally a help link
let private renderPageTitle m pageTitle =
h2 [ _id "pt-page-title" ] [
match m.helpLink with
| x when x = HelpPage.None -> ()
| _ -> yield helpLink m.helpLink.Url
yield encLocText pageTitle
]
/// Render the messages that may need to be displayed to the user
let private messages m =
let s = I18N.localizer.Force ()
m.messages
|> List.map (fun msg ->
table [ _class (sprintf "pt-msg %s" (msg.level.ToLower ())) ] [
tr [] [
td [] [
match msg.level with
| "Info" -> ()
| lvl ->
yield strong [] [ encLocText s.[lvl] ]
yield rawText " &#xbb; "
yield rawText msg.text.Value
match msg.description with
| Some desc ->
yield br []
yield div [ _class "description" ] [ rawText desc.Value ]
| None -> ()
]
]
])
/// Render the <footer> at the bottom of the page
let private htmlFooter m =
let s = I18N.localizer.Force ()
let imgText = sprintf "%O %O" s.["PrayerTracker"] s.["from Bit Badger Solutions"]
let resultTime = TimeSpan(DateTime.Now.Ticks - m.requestStart).TotalSeconds
footer [] [
div [ _id "pt-legal" ] [
a [ _href "/legal/privacy-policy" ] [ encLocText s.["Privacy Policy"] ]
rawText " &bull; "
a [ _href "/legal/terms-of-service" ] [ encLocText s.["Terms of Service"] ]
rawText " &bull; "
a [ _href "https://github.com/bit-badger/PrayerTracker"
_title s.["View source code and get technical support"].Value
_target "_blank"
_rel "noopener" ] [
encLocText s.["Source & Support"]
]
]
div [ _id "pt-footer" ] [
a [ _href "/"; _style "line-height:28px;" ] [
img [ _src (sprintf "/img/%O.png" s.["footer_en"]); _alt imgText; _title imgText ]
]
encodedText m.version
space
i [ _title s.["This page loaded in {0:N3} seconds", resultTime].Value; _class "material-icons md-18" ] [
encodedText "schedule"
]
]
]
/// The standard layout for PrayerTracker
let standard m pageTitle content =
let s = I18N.localizer.Force ()
let ttl = s.[pageTitle]
html [ _lang "" ] [
htmlHead m ttl
body [] [
Navigation.top m
div [ _id "pt-body" ] [
yield Navigation.identity m
yield renderPageTitle m ttl
yield! messages m
yield content
yield htmlFooter m
]
]
]
/// A layout with nothing but a title and content
let bare pageTitle content =
let s = I18N.localizer.Force ()
let ttl = s.[pageTitle]
html [ _lang "" ] [
head [] [
meta [ _charset "UTF-8" ]
title [] [ encLocText ttl; titleSep; encLocText s.["PrayerTracker"] ]
]
body [] [
content
]
]
/// Help layout
let help pageTitle content =
let s = I18N.localizer.Force ()
let ttl = s.[pageTitle]
html [ _lang "" ] [
head [] [
yield meta [ _charset "UTF-8" ]
yield title [] [ encLocText ttl; titleSep; encLocText s.["Help"]; titleSep; encLocText s.["PrayerTracker"] ]
yield! commonHead
yield link [ _rel "stylesheet"; _href "/css/help.css" ]
]
body [] [
header [ _class "pt-title-bar" ] [
section [ _class "pt-title-bar-left" ] [ encLocText s.["PrayerTracker"] ]
section [ _class "pt-title-bar-right" ] [ encLocText s.["Help"] ]
]
div [ _class "pt-content" ] [
yield h2 [] [ encLocText ttl ]
yield! content
yield p [ _class "pt-center-text" ] [
a [ _href "#"
_title s.["Click to Close This Window"].Value
_onclick "window.close();return false" ] [
tag "big" [] [ icon "cancel"; space; encLocText s.["Close Window"] ]
]
]
]
]
]

View File

@ -0,0 +1,322 @@
module PrayerTracker.Views.PrayerRequest
open Giraffe
open Giraffe.GiraffeViewEngine
open Microsoft.AspNetCore.Http
open NodaTime
open PrayerTracker
open PrayerTracker.Entities
open PrayerTracker.ViewModels
open System
open System.IO
open System.Text
/// View for the prayer request edit page
let edit (m : EditRequest) today ctx vi =
let s = I18N.localizer.Force ()
let pageTitle = match m.isNew () with true -> "Add a New Request" | false -> "Edit Request"
[ form [ _action "/prayer-request/save"; _method "post"; _class "pt-center-columns" ] [
csrfToken ctx
input [ _type "hidden"; _name "requestId"; _value (m.requestId.ToString "N") ]
div [ _class "pt-field-row" ] [
yield div [ _class "pt-field" ] [
label [ _for "requestType" ] [ encLocText s.["Request Type"] ]
ReferenceList.requestTypeList s
|> Seq.ofList
|> Seq.map (fun item -> fst item, (snd item).Value)
|> selectList "requestType" m.requestType [ _required; _autofocus ]
]
yield div [ _class "pt-field" ] [
label [ _for "requestor" ] [ encLocText s.["Requestor / Subject"] ]
input [ _type "text"
_name "requestor"
_id "requestor"
_value (match m.requestor with Some x -> x | None -> "") ]
]
match m.isNew () with
| true ->
yield div [ _class "pt-field" ] [
label [ _for "enteredDate" ] [ encLocText s.["Date"] ]
input [ _type "date"; _name "enteredDate"; _id "enteredDate"; _placeholder today ]
]
| false ->
yield div [ _class "pt-field" ] [
div [ _class "pt-checkbox-field" ] [
br []
input [ _type "checkbox"; _name "skipDateUpdate"; _id "skipDateUpdate"; _value "True" ]
label [ _for "skipDateUpdate" ] [ encLocText s.["Check to not update the date"] ]
br []
small [] [ em [] [ encodedText (s.["Typo Corrections"].Value.ToLower ()); rawText ", etc." ] ]
]
]
]
div [ _class "pt-field-row" ] [
div [ _class "pt-field" ] [
label [] [ encLocText s.["Expiration"] ]
ReferenceList.expirationList s ((m.isNew >> not) ())
|> List.map (fun exp ->
let radioId = sprintf "expiration_%s" (fst exp)
span [ _class "text-nowrap" ] [
radio "expiration" radioId (fst exp) m.expiration
label [ _for radioId ] [ encLocText (snd exp) ]
rawText " &nbsp; &nbsp; "
])
|> div [ _class "pt-center-text" ]
]
]
div [ _class "pt-field-row" ] [
div [ _class "pt-field pt-editor" ] [
label [ _for "text" ] [ encLocText s.["Request"] ]
textarea [ _name "text"; _id "text" ] [ encodedText m.text ]
]
]
div [ _class "pt-field-row" ] [ submit [] "save" s.["Save Request"] ]
]
script [] [ rawText "PT.onLoad(PT.initCKEditor)" ]
]
|> Layout.Content.standard
|> Layout.standard vi pageTitle
/// View for the request e-mail results page
let email m vi =
let s = I18N.localizer.Force ()
let pageTitle = sprintf "%s %s" s.["Prayer Requests"].Value m.listGroup.name
let prefs = m.listGroup.preferences
let addresses =
m.recipients
|> List.fold (fun (acc : StringBuilder) mbr -> acc.AppendFormat(", {0} <{1}>", mbr.memberName, mbr.email))
(StringBuilder ())
[ p [ _style (sprintf "font-family:%s;font-size:%ipt;" prefs.listFonts prefs.textFontSize) ] [
encLocText s.["The request list was sent to the following people, via individual e-mails"]
rawText ":"
br []
small [] [ encodedText (addresses.Remove(0, 2).ToString ()) ]
]
span [ _class "pt-email-heading" ] [ encLocText s.["HTML Format"]; rawText ":" ]
div [ _class "pt-email-canvas" ] [ rawText (m.asHtml s) ]
br []
br []
span [ _class "pt-email-heading" ] [ encLocText s.["Plain-Text Format"]; rawText ":" ]
div[ _class "pt-email-canvas" ] [ pre [] [ encodedText (m.asText s) ] ]
]
|> Layout.Content.standard
|> Layout.standard vi pageTitle
/// View for a small group's public prayer request list
let list (m : RequestList) vi =
[ br []
I18N.localizer.Force () |> (m.asHtml >> rawText)
]
|> Layout.Content.standard
|> Layout.standard vi "View Request List"
/// View for the prayer request lists page
let lists (grps : SmallGroup list) vi =
let s = I18N.localizer.Force ()
let l = I18N.forView "Requests/Lists"
use sw = new StringWriter ()
let raw = rawLocText sw
[ yield p [] [
raw l.["The groups listed below have either public or password-protected request lists."]
space
raw l.["Those with list icons are public, and those with log on icons are password-protected."]
space
raw l.["Click the appropriate icon to log on or view the request list."]
]
match grps.Length with
| 0 -> yield p [] [ raw l.["There are no groups with public or password-protected request lists."] ]
| count ->
yield tableSummary count s
yield table [ _class "pt-table pt-action-table" ] [
thead [] [
tr [] [
th [] [ encLocText s.["Actions"] ]
th [] [ encLocText s.["Church"] ]
th [] [ encLocText s.["Group"] ]
]
]
grps
|> List.map (fun grp ->
let grpId = grp.smallGroupId.ToString "N"
tr [] [
match grp.preferences.isPublic with
| true ->
a [ _href (sprintf "/prayer-requests/%s/list" grpId); _title s.["View"].Value ] [ icon "list" ]
| false ->
a [ _href (sprintf "/small-group/log-on/%s" grpId); _title s.["Log On"].Value ]
[ icon "verified_user" ]
|> List.singleton
|> td []
td [] [ encodedText grp.church.name ]
td [] [ encodedText grp.name ]
])
|> tbody []
]
]
|> Layout.Content.standard
|> Layout.standard vi "Request Lists"
/// View for the prayer request maintenance page
let maintain (reqs : PrayerRequest seq) (grp : SmallGroup) onlyActive (ctx : HttpContext) vi =
let s = I18N.localizer.Force ()
let now = grp.localDateNow (ctx.GetService<IClock> ())
let typs = ReferenceList.requestTypeList s |> Map.ofList
let updReq (req : PrayerRequest) =
match req.updateRequired now grp.preferences.daysToExpire grp.preferences.longTermUpdateWeeks with
| true -> "pt-request-update"
| false -> ""
|> _class
let reqExp (req : PrayerRequest) =
_class (match req.isExpired now grp.preferences.daysToExpire with true -> "pt-request-expired" | false -> "")
/// Iterate the sequence once, before we render, so we can get the count of it at the top of the table
let requests =
reqs
|> Seq.map (fun req ->
let reqId = req.prayerRequestId.ToString "N"
let reqText = Utils.htmlToPlainText req.text
let delAction = sprintf "/prayer-request/%s/delete" reqId
let delPrompt = s.["Are you want to delete this prayer request? This action cannot be undone.\\n(If the prayer request has been answered, or an event has passed, consider inactivating it instead.)"].Value
tr [] [
td [] [
yield a [ _href (sprintf "/prayer-request/%s/edit" reqId); _title s.["Edit This Prayer Request"].Value ]
[ icon "edit" ]
match req.isExpired now grp.preferences.daysToExpire with
| true ->
yield a [ _href (sprintf "/prayer-request/%s/restore" reqId)
_title s.["Restore This Inactive Request"].Value ]
[ icon "visibility" ]
| false ->
yield a [ _href (sprintf "/prayer-request/%s/expire" reqId)
_title s.["Expire This Request Immediately"].Value ]
[ icon "visibility_off" ]
yield a [ _href delAction; _title s.["Delete This Request"].Value;
_onclick (sprintf "return PT.confirmDelete('%s','%s')" delAction delPrompt) ]
[ icon "delete_forever" ]
]
td [ updReq req ] [
encodedText (req.updatedDate.ToString(s.["MMMM d, yyyy"].Value,
System.Globalization.CultureInfo.CurrentUICulture))
]
td [] [ encLocText typs.[req.requestType] ]
td [ reqExp req ] [ encodedText (match req.requestor with Some r -> r | None -> " ") ]
td [] [
yield
match 60 > reqText.Length with
| true -> rawText reqText
| false -> rawText (sprintf "%s&hellip;" (reqText.Substring (0, 60)))
]
])
|> List.ofSeq
[ div [ _class "pt-center-text" ] [
br []
a [ _href (sprintf "/prayer-request/%s/edit" emptyGuid); _title s.["Add a New Request"].Value ]
[ icon "add_circle"; rawText " &nbsp;"; encLocText s.["Add a New Request"] ]
rawText " &nbsp; &nbsp; &nbsp; "
a [ _href "/prayer-requests/view"; _title s.["View Prayer Request List"].Value ]
[ icon "list"; rawText " &nbsp;"; encLocText s.["View Prayer Request List"] ]
br []
br []
]
tableSummary requests.Length s
table [ _class "pt-table pt-action-table" ] [
thead [] [
tr [] [
th [] [ encLocText s.["Actions"] ]
th [] [ encLocText s.["Updated Date"] ]
th [] [ encLocText s.["Type"] ]
th [] [ encLocText s.["Requestor"] ]
th [] [ encLocText s.["Request"] ]
]
]
tbody [] requests
]
div [ _class "pt-center-text" ] [
yield br []
match onlyActive with
| true ->
yield encLocText s.["Inactive requests are currently not shown"]
yield br []
yield a [ _href "/prayer-requests/inactive" ] [ encLocText s.["Show Inactive Requests"] ]
| false ->
yield encLocText s.["Inactive requests are currently shown"]
yield br []
yield a [ _href "/prayer-requests" ] [ encLocText s.["Do Not Show Inactive Requests"] ]
]
form [ _id "DeleteForm"; _action ""; _method "post" ] [ csrfToken ctx ]
]
|> Layout.Content.wide
|> Layout.standard vi "Maintain Requests"
/// View for the printable prayer request list
let print m version =
let s = I18N.localizer.Force ()
let pageTitle = sprintf "%s %s" s.["Prayer Requests"].Value m.listGroup.name
let imgAlt = sprintf "%s %s" s.["PrayerTracker"].Value s.["from Bit Badger Solutions"].Value
article [] [
rawText (m.asHtml s)
br []
hr []
div [ _style "font-size:70%;font-family:@Model.ListGroup.preferences.listFonts;" ] [
img [ _src (sprintf "/img/%s.png" s.["footer_en"].Value)
_style "vertical-align:text-bottom;"
_alt imgAlt
_title imgAlt ]
space
encodedText version
]
]
|> Layout.bare pageTitle
/// View for the prayer request list
let view m vi =
let s = I18N.localizer.Force ()
let pageTitle = sprintf "%s %s" s.["Prayer Requests"].Value m.listGroup.name
let spacer = rawText " &nbsp; &nbsp; &nbsp; "
let dtString = m.date.ToString "yyyy-MM-dd"
[ div [ _class "pt-center-text" ] [
yield br []
yield a [ _class "pt-icon-link"
_href (sprintf "/prayer-requests/print/%s" dtString)
_title s.["View Printable"].Value ] [
icon "print"; rawText " &nbsp;"; encLocText s.["View Printable"]
]
match m.canEmail with
| true ->
yield spacer
match m.date.DayOfWeek = DayOfWeek.Sunday with
| true -> ()
| false ->
let rec findSunday (date : DateTime) =
match date.DayOfWeek = DayOfWeek.Sunday with
| true -> date
| false -> findSunday (date.AddDays 1.)
let sunday = findSunday m.date
yield a [ _class "pt-icon-link"
_href (sprintf "/prayer-requests/view/%s" (sunday.ToString "yyyy-MM-dd"))
_title s.["List for Next Sunday"].Value ] [
icon "update"; rawText " &nbsp;"; encLocText s.["List for Next Sunday"]
]
yield spacer
let emailPrompt = s.["This will e-mail the current list to every member of your class, without further prompting. Are you sure this is what you are ready to do?"].Value
yield a [ _class "pt-icon-link"
_href (sprintf "/prayer-requests/email/%s" dtString)
_title s.["Send via E-mail"].Value
_onclick (sprintf "return PT.requests.view.promptBeforeEmail('%s')" emailPrompt) ] [
icon "mail_outline"; rawText " &nbsp;"; encLocText s.["Send via E-mail"]
]
yield spacer
yield a [ _class "pt-icon-link"; _href "/prayer-requests"; _title s.["Maintain Prayer Requests"].Value ] [
icon "compare_arrows"; rawText " &nbsp;"; encLocText s.["Maintain Prayer Requests"]
]
| false -> ()
]
br []
rawText (m.asHtml s)
]
|> Layout.Content.standard
|> Layout.standard vi pageTitle

View File

@ -0,0 +1,95 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<FileVersion>7.0.0.0</FileVersion>
</PropertyGroup>
<ItemGroup>
<Compile Include="Utils.fs" />
<Compile Include="ViewModels.fs" />
<Compile Include="I18N.fs" />
<Compile Include="CommonFunctions.fs" />
<Compile Include="Layout.fs" />
<Compile Include="Church.fs" />
<Compile Include="Help.fs" />
<Compile Include="Home.fs" />
<Compile Include="PrayerRequest.fs" />
<Compile Include="SmallGroup.fs" />
<Compile Include="User.fs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Giraffe" Version="3.1.0" />
<PackageReference Include="MailKit" Version="2.0.6" />
<PackageReference Include="Microsoft.AspNetCore.Html.Abstractions" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Http.Extensions" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.1.3" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PrayerTracker.Data\PrayerTracker.Data.fsproj" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Resources\Common.es.resx">
<Generator>ResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Resources\Views\Help\Group\Announcement.es.resx">
<Generator>ResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Resources\Views\Help\Group\Members.es.resx">
<Generator>ResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Resources\Views\Help\Group\Preferences.es.resx">
<Generator>ResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Resources\Views\Help\Requests\Edit.es.resx">
<Generator>ResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Resources\Views\Help\Requests\Maintain.es.resx">
<Generator>ResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Resources\Views\Help\Requests\View.es.resx">
<Generator>ResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Resources\Views\Help\User\LogOn.es.resx">
<Generator>ResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Resources\Views\Help\User\Password.es.resx">
<Generator>ResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Resources\Views\Help\Index.es.resx">
<Generator>ResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Resources\Views\Home\Error.es.resx">
<Generator>ResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Resources\Views\Home\Index.es.resx">
<Generator>ResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Resources\Views\Home\NotAuthorized.es.resx">
<Generator>ResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Resources\Views\Home\PrivacyPolicy.es.resx">
<Generator>ResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Resources\Views\Home\TermsOfService.es.resx">
<Generator>ResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Resources\Views\Requests\Lists.es.resx">
<Generator>ResXFileCodeGenerator</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Resources\Views\SmallGroup\Preferences.es.resx">
<Generator>ResXFileCodeGenerator</Generator>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<PackageReference Update="FSharp.Core" Version="4.5.2" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,849 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Actions" xml:space="preserve">
<value>Acciones</value>
</data>
<data name="Add / Edit a Request" xml:space="preserve">
<value>Agregar / Editar una Petición</value>
</data>
<data name="Add a New Church" xml:space="preserve">
<value>Agregar una Iglesia Nueva</value>
</data>
<data name="Add a New Group Member" xml:space="preserve">
<value>Añadir un Nuevo Miembro del Grupo</value>
</data>
<data name="Added" xml:space="preserve">
<value>Agregado</value>
</data>
<data name="Administration" xml:space="preserve">
<value>Administración</value>
</data>
<data name="and added it to the request list" xml:space="preserve">
<value>y agregado a la lista de peticiones</value>
</data>
<data name="Announcement for {0} - {1:MMMM d, yyyy} {2}" xml:space="preserve">
<value>Anuncio para {0} - {1:MMMM d, yyyy} {2}</value>
</data>
<data name="Announcements" xml:space="preserve">
<value>Anuncios</value>
</data>
<data name="Aqua" xml:space="preserve">
<value>Verde Azulado Brillante</value>
</data>
<data name="Are you want to delete this {0}? This action cannot be undone." xml:space="preserve">
<value>¿Está desea eliminar este {0}? Esta acción no se puede deshacer.</value>
</data>
<data name="Attached PDF" xml:space="preserve">
<value>PDF Adjunto</value>
</data>
<data name="Black" xml:space="preserve">
<value>Negro</value>
</data>
<data name="Blue" xml:space="preserve">
<value>Azul</value>
</data>
<data name="Change Preferences" xml:space="preserve">
<value>Cambiar las Preferencias</value>
</data>
<data name="Change to English" xml:space="preserve">
<value>Change to English</value>
</data>
<data name="Change Your Password" xml:space="preserve">
<value>Cambiar Su Contraseña</value>
</data>
<data name="Check to not update the date" xml:space="preserve">
<value>Seleccionar para no actualizar la fecha</value>
</data>
<data name="Church" xml:space="preserve">
<value>Iglesia</value>
</data>
<data name="Churches" xml:space="preserve">
<value>Iglesias</value>
</data>
<data name="Click for Help on This Page" xml:space="preserve">
<value>Haga Clic para Obtener Ayuda en Esta Página</value>
</data>
<data name="Click to Close This Window" xml:space="preserve">
<value>Haga Clic para Cerrar Esta Ventana</value>
</data>
<data name="Close Window" xml:space="preserve">
<value>Cerrar Esta Ventana</value>
</data>
<data name="Current Requests" xml:space="preserve">
<value>Peticiones Actuales</value>
</data>
<data name="Currently Logged On" xml:space="preserve">
<value>Conectado como</value>
</data>
<data name="Delete This Church" xml:space="preserve">
<value>Eliminar Este Iglesia</value>
</data>
<data name="Delete This Group Member" xml:space="preserve">
<value>Eliminar Este Miembro del Grupo</value>
</data>
<data name="Displaying {0} Entries" xml:space="preserve">
<value>Mostrando {0} Entradas</value>
</data>
<data name="Displaying {0} Entry" xml:space="preserve">
<value>Mostrando {0} Entrada</value>
</data>
<data name="E-mail Address" xml:space="preserve">
<value>Dirección de Correo Electrónico</value>
</data>
<data name="Edit Church" xml:space="preserve">
<value>Editar la Iglesia</value>
</data>
<data name="Edit This Church" xml:space="preserve">
<value>Editar Este Iglesia</value>
</data>
<data name="Edit This Group Member" xml:space="preserve">
<value>Editar Este Miembro del Grupo</value>
</data>
<data name="English" xml:space="preserve">
<value>Inglés</value>
</data>
<data name="Expecting" xml:space="preserve">
<value>Embarazada</value>
</data>
<data name="Expire Immediately" xml:space="preserve">
<value>Expirará Inmediatamente</value>
</data>
<data name="Expire Normally" xml:space="preserve">
<value>Expirará Normalmente</value>
</data>
<data name="footer_en" xml:space="preserve">
<value>footer_es</value>
</data>
<data name="Format" xml:space="preserve">
<value>Formato</value>
</data>
<data name="from Bit Badger Solutions" xml:space="preserve">
<value>de Soluciones Bit Badger</value>
</data>
<data name="Fuchsia" xml:space="preserve">
<value>Fucsia</value>
</data>
<data name="Generated by P R A Y E R T R A C K E R" xml:space="preserve">
<value>Generado por S E G U I D O R O R A C I Ó N</value>
</data>
<data name="Gray" xml:space="preserve">
<value>Gris</value>
</data>
<data name="Green" xml:space="preserve">
<value>Verde</value>
</data>
<data name="Group" xml:space="preserve">
<value>Grupo</value>
</data>
<data name="Group Default" xml:space="preserve">
<value>Grupo Predeterminada</value>
</data>
<data name="Group Members" xml:space="preserve">
<value>Los Miembros del Grupo</value>
</data>
<data name="Group preferences updated successfully" xml:space="preserve">
<value>Las preferencias del grupo actualizaron con éxito</value>
</data>
<data name="Groups" xml:space="preserve">
<value>Grupos</value>
</data>
<data name="Help" xml:space="preserve">
<value>Ayuda</value>
</data>
<data name="Help Topics" xml:space="preserve">
<value>Los Temas de Ayuda</value>
</data>
<data name="HTML Format" xml:space="preserve">
<value>Formato HTML</value>
</data>
<data name="Interface?" xml:space="preserve">
<value>¿Interfaz?</value>
</data>
<data name="Invalid credentials - log on unsuccessful" xml:space="preserve">
<value>Credenciales no válidas - de inicio de sesión sin éxito</value>
</data>
<data name="Language" xml:space="preserve">
<value>Lengua</value>
</data>
<data name="Lime" xml:space="preserve">
<value>Lima</value>
</data>
<data name="Location" xml:space="preserve">
<value>Ubicación</value>
</data>
<data name="Log Off" xml:space="preserve">
<value>Cierre de Sesión</value>
</data>
<data name="Log On" xml:space="preserve">
<value>Iniciar Sesión</value>
</data>
<data name="Log On Successful • Welcome to {0}" xml:space="preserve">
<value>Iniciar Sesión con Éxito • Bienvenido a {0}</value>
</data>
<data name="Log Off Successful • Have a nice day!" xml:space="preserve">
<value>Cerrar la Sesión con Éxito • ¡Tener un Buen Día!</value>
</data>
<data name="Logged On as a Member of" xml:space="preserve">
<value>Conectado como Miembro de</value>
</data>
<data name="Long-Term Requests" xml:space="preserve">
<value>Peticiones a Largo Plazo</value>
</data>
<data name="Maintain" xml:space="preserve">
<value>Mantener</value>
</data>
<data name="Maintain Churches" xml:space="preserve">
<value>Mantener las Iglesias</value>
</data>
<data name="Maintain Group Members" xml:space="preserve">
<value>Mantener los Miembros del Grupo</value>
</data>
<data name="Maintain Requests" xml:space="preserve">
<value>Mantener las Peticiones</value>
</data>
<data name="Maroon" xml:space="preserve">
<value>Granate</value>
</data>
<data name="Name" xml:space="preserve">
<value>Nombre</value>
</data>
<data name="Navy" xml:space="preserve">
<value>Azul Oscuro</value>
</data>
<data name="No Entries to Display" xml:space="preserve">
<value>No hay Entradas para Mostrar</value>
</data>
<data name="Olive" xml:space="preserve">
<value>Oliva</value>
</data>
<data name="Password incorrect - login unsuccessful" xml:space="preserve">
<value>Contraseña incorrecta - de inicio de sesión sin éxito</value>
</data>
<data name="Plain-Text Format" xml:space="preserve">
<value>Formato de Texto Plano</value>
</data>
<data name="Please select at least one group for which this user ({0}) is authorized" xml:space="preserve">
<value>Por favor, seleccione al menos uno grupo para la que este usuario ({0}) puede iniciar sesión en</value>
</data>
<data name="Praise Reports" xml:space="preserve">
<value>Informes de Alabanza</value>
</data>
<data name="Prayer Requests for {0} - {1:MMMM d, yyyy}" xml:space="preserve">
<value>Las Peticiones de Oración para {0} - {1:MMMM d, yyyy}</value>
</data>
<data name="PrayerTracker" xml:space="preserve">
<value>SeguidorOración</value>
</data>
<data name="Purple" xml:space="preserve">
<value>Púrpura</value>
</data>
<data name="Red" xml:space="preserve">
<value>Rojo</value>
</data>
<data name="Request Never Expires" xml:space="preserve">
<value>Petición no Expira Nunca</value>
</data>
<data name="Requests" xml:space="preserve">
<value>Peticiones</value>
</data>
<data name="Sample" xml:space="preserve">
<value>Muestra</value>
</data>
<data name="Save Church" xml:space="preserve">
<value>Guardar la Iglesia</value>
</data>
<data name="Select" xml:space="preserve">
<value>Seleccionar</value>
</data>
<data name="Send Announcement" xml:space="preserve">
<value>Enviar un Anuncio</value>
</data>
<data name="Silver" xml:space="preserve">
<value>Plata</value>
</data>
<data name="Sorry, an error occurred while processing your request." xml:space="preserve">
<value>Lo sentimos, ha ocurrido un error al procesar su solicitud.</value>
</data>
<data name="Spanish" xml:space="preserve">
<value>Español</value>
</data>
<data name="Successfully deleted user {0}" xml:space="preserve">
<value>Eliminado correctamente de usuario {0}</value>
</data>
<data name="Successfully sent announcement to all {0}{1}" xml:space="preserve">
<value>Enviado anuncio a todos {0}{1} con éxito</value>
</data>
<data name="Successfully updated group permissions for {0}" xml:space="preserve">
<value>Actualizado permisos del grupo para {0} con éxito</value>
</data>
<data name="Successfully {0} group member" xml:space="preserve">
<value>El miembro del grupo {0} con éxito</value>
</data>
<data name="Successfully {0} prayer request" xml:space="preserve">
<value>Petición la oración {0} con éxito</value>
</data>
<data name="Successfully {0} user" xml:space="preserve">
<value>Usuario {0} con éxito</value>
</data>
<data name="Teal" xml:space="preserve">
<value>Verde Azulado</value>
</data>
<data name="The group member “{0}” was deleted successfully" xml:space="preserve">
<value>El miembro del grupo “{0}” se eliminó con éxito</value>
</data>
<data name="The group {0} and its {1} prayer request(s) was deleted successfully (revoked access from {2} user(s))" xml:space="preserve">
<value>El grupo {0} y sus {1} peticion(es) de oración se ha eliminado correctamente (acceso revocada por {2} usuario(s))</value>
</data>
<data name="The old password was incorrect - your password was NOT changed" xml:space="preserve">
<value>La contraseña antigua es incorrecta - la contraseña NO ha cambiado</value>
</data>
<data name="The page you requested requires authentication; please log on below." xml:space="preserve">
<value>La página solicitada requiere autenticación, por favor, inicio de sesión mediante el siguiente formulario.</value>
</data>
<data name="The prayer request was deleted successfully" xml:space="preserve">
<value>La petición de oración se ha eliminado correctamente</value>
</data>
<data name="The prayer request you tried to access is not assigned to your group" xml:space="preserve">
<value>La petición de oración que ha intentado acceder no se ha asignado a su grupo</value>
</data>
<data name="The request list for the group you tried to view is not public." xml:space="preserve">
<value>La lista de peticiones para el grupo que desea ver no es pública.</value>
</data>
<data name="There are no classes with passwords defined" xml:space="preserve">
<value>No hay clases con contraseñas se define</value>
</data>
<data name="This is likely due to one of the following reasons:&lt;ul&gt;&lt;li&gt;The e-mail address “{0}” is invalid.&lt;/li&gt;&lt;li&gt;The password entered does not match the password for the given e-mail address.&lt;/li&gt;&lt;li&gt;You are not authorized to administer the group “{1}”.&lt;/li&gt;&lt;/ul&gt;" xml:space="preserve">
<value>Esto es probablemente debido a una de las siguientes razones:&lt;ul&gt;&lt;li&gt;La dirección de correo electrónico “{0}” no es válida.&lt;/li&gt;&lt;li&gt;La contraseña introducida no coincide con la contraseña de la determinada dirección de correo electrónico.&lt;/li&gt;&lt;li&gt;Usted no está autorizado para administrar el grupo “{1}”.&lt;/li&gt;&lt;/ul&gt;</value>
</data>
<data name="This page loaded in {0:N3} seconds" xml:space="preserve">
<value>Esta página cargada en {0:N3} segundos</value>
</data>
<data name="This request is expired." xml:space="preserve">
<value>Esta petición ha expirado.</value>
</data>
<data name="To make it active again, update it as necessary, leave “{0}” and “{1}” unchecked, and it will return as an active request." xml:space="preserve">
<value>Para que sea más activa de nuevo, que se actualizará cuando sea necesario, salir de “{0}” y “{1}” no seleccionado, y volverá como una petición activa.</value>
</data>
<data name="Toggle Navigation" xml:space="preserve">
<value>Navegación de Palanca</value>
</data>
<data name="Updated" xml:space="preserve">
<value>Actualizaron</value>
</data>
<data name="User" xml:space="preserve">
<value>Usuario</value>
</data>
<data name="Users" xml:space="preserve">
<value>Usuarios</value>
</data>
<data name="View List" xml:space="preserve">
<value>Vista de lista</value>
</data>
<data name="View Request List" xml:space="preserve">
<value>Ver la Lista de Peticiones</value>
</data>
<data name="WARNING" xml:space="preserve">
<value>ADVERTENCIA</value>
</data>
<data name="White" xml:space="preserve">
<value>Blanco</value>
</data>
<data name="Yellow" xml:space="preserve">
<value>Amarillo</value>
</data>
<data name="Yes" xml:space="preserve">
<value>Sí</value>
</data>
<data name="You are not authorized to view the requested page." xml:space="preserve">
<value>No tiene permisos para acceder a la página solicitada.</value>
</data>
<data name="You must select at least one group to assign" xml:space="preserve">
<value>Debe seleccionar al menos uno grupo para asignar</value>
</data>
<data name="Your password was changed successfully" xml:space="preserve">
<value>La contraseña se cambió con éxito</value>
</data>
<data name="{0} users" xml:space="preserve">
<value>{0} usuarios</value>
</data>
<data name="Add a New Request" xml:space="preserve">
<value>Agregar una Nueva Petición</value>
</data>
<data name="Edit Request" xml:space="preserve">
<value>Editar la Petición</value>
</data>
<data name="Typo Corrections" xml:space="preserve">
<value>Corrección de Errata</value>
</data>
<data name="Unauthorized Access" xml:space="preserve">
<value>El Acceso No Autorizado</value>
</data>
<data name="Welcome!" xml:space="preserve">
<value>¡Bienvenidos!</value>
</data>
<data name="Add to Request List" xml:space="preserve">
<value>Agregar a la Lista de Peticiones En</value>
</data>
<data name="Announcement Text" xml:space="preserve">
<value>Texto del Anuncio</value>
</data>
<data name="Colors" xml:space="preserve">
<value>Colores</value>
</data>
<data name="Date" xml:space="preserve">
<value>Fecha</value>
</data>
<data name="Delete a Group Member" xml:space="preserve">
<value>Eliminar un Miembro del Grupo</value>
</data>
<data name="Delete a Request" xml:space="preserve">
<value>Eliminar una Petición</value>
</data>
<data name="E-mail Format" xml:space="preserve">
<value>Formato de Correo Electrónico</value>
</data>
<data name="E-mail “From” Name and Address" xml:space="preserve">
<value>Correo Electrónico “De” Nombre y Dirección</value>
</data>
<data name="Edit Group Member" xml:space="preserve">
<value>Editar el Miembro del Grupo</value>
</data>
<data name="Expiration" xml:space="preserve">
<value>Expiración</value>
</data>
<data name="Fonts" xml:space="preserve">
<value>Fuentes</value>
</data>
<data name="Fonts{0} for List" xml:space="preserve">
<value>Fuentes{0} de la Lista</value>
</data>
<data name="Group Log On" xml:space="preserve">
<value>Iniciar Sesión como Grupo</value>
</data>
<data name="Heading / List Text Size" xml:space="preserve">
<value>Tamaño del Texto de Partida y Lista</value>
</data>
<data name="Heading Text Size" xml:space="preserve">
<value>Partida el Tamaño del Texto</value>
</data>
<data name="List Text Size" xml:space="preserve">
<value>Lista el Tamaño del Texto</value>
</data>
<data name="Long-Term Requests Alerted for Update" xml:space="preserve">
<value>Peticiones a Largo Plazo Alertó para la Actualización</value>
</data>
<data name="Making a “Large Print” List" xml:space="preserve">
<value>Realización de una Lista de “Letra Grande”</value>
</data>
<data name="Password Protected" xml:space="preserve">
<value>Protegido por Contraseña</value>
</data>
<data name="Remember Me" xml:space="preserve">
<value>Acuérdate de Mí</value>
</data>
<data name="Request" xml:space="preserve">
<value>Petición</value>
</data>
<data name="Request List Visibility" xml:space="preserve">
<value>La Visibilidad del la Lista de las Peticiones</value>
</data>
<data name="Request Sorting" xml:space="preserve">
<value>Orden de Peticiones</value>
</data>
<data name="Request Type" xml:space="preserve">
<value>Tipo de Petición</value>
</data>
<data name="Requestor / Subject" xml:space="preserve">
<value>Peticionario / Sujeto</value>
</data>
<data name="Requests Expire After" xml:space="preserve">
<value>Peticiones Expiran Después de</value>
</data>
<data name="Requests “New” For" xml:space="preserve">
<value>Peticiones “Nuevas” Para</value>
</data>
<data name="Sort by Requestor Name" xml:space="preserve">
<value>Ordenar por Nombre del Solicitante</value>
</data>
<data name="Time Zone" xml:space="preserve">
<value>Zona Horaria</value>
</data>
<data name="List for Next Sunday" xml:space="preserve">
<value>Lista para el Próximo Domingo</value>
</data>
<data name="Restore an Inactive Request" xml:space="preserve">
<value>Restaurar una Petición Inactivo</value>
</data>
<data name="Send via E-mail" xml:space="preserve">
<value>Enviar por correo electrónico</value>
</data>
<data name="User Log On" xml:space="preserve">
<value>Iniciar Sesión como Usuario</value>
</data>
<data name="View Printable" xml:space="preserve">
<value>Versión Imprimible</value>
</data>
<data name="Add a New Group" xml:space="preserve">
<value>Agregar un Grupo Nuevo</value>
</data>
<data name="Add a New User" xml:space="preserve">
<value>Agregar un Usuario Nuevo</value>
</data>
<data name="Admin?" xml:space="preserve">
<value>¿Admin?</value>
</data>
<data name="All {0} Users" xml:space="preserve">
<value>Todos los Usuarios {0}</value>
</data>
<data name="Announcement Sent" xml:space="preserve">
<value>El Anuncio Enviado</value>
</data>
<data name="Assign Groups" xml:space="preserve">
<value>Asignar Grupos</value>
</data>
<data name="Assign Groups to This User" xml:space="preserve">
<value>Asignar Grupos a Este Usuario</value>
</data>
<data name="Case-Sensitive" xml:space="preserve">
<value>Entre Mayúsculas y Minúsculas</value>
</data>
<data name="Color of Heading Lines" xml:space="preserve">
<value>El Color de las Líneas de Partida</value>
</data>
<data name="Color of Heading Text" xml:space="preserve">
<value>Color del Texto de la Partida</value>
</data>
<data name="Dates" xml:space="preserve">
<value>Fechas</value>
</data>
<data name="Days" xml:space="preserve">
<value>Días</value>
</data>
<data name="Delete This Group" xml:space="preserve">
<value>Eliminar Este Grupo</value>
</data>
<data name="Do Not Show Inactive Requests" xml:space="preserve">
<value>No Muestran las Peticiones Inactivos</value>
</data>
<data name="E-mail" xml:space="preserve">
<value>Correo Electrónico</value>
</data>
<data name="Edit Group" xml:space="preserve">
<value>Editar Grupo</value>
</data>
<data name="Edit This Group" xml:space="preserve">
<value>Editar Este Grupo</value>
</data>
<data name="Edit This User" xml:space="preserve">
<value>Editiar Este Usuario</value>
</data>
<data name="Edit User" xml:space="preserve">
<value>Editar el Usuario</value>
</data>
<data name="Group Preferences" xml:space="preserve">
<value>Las Preferencias del Grupo</value>
</data>
<data name="Inactive requests are currently not shown" xml:space="preserve">
<value>Peticiones inactivas no se muestra actualmente</value>
</data>
<data name="Inactive requests are currently shown" xml:space="preserve">
<value>Peticiones inactivas se muestra actualmente</value>
</data>
<data name="Maintain Groups" xml:space="preserve">
<value>Mantener los Grupos</value>
</data>
<data name="Maintain Users" xml:space="preserve">
<value>Mantener los Usuarios</value>
</data>
<data name="Named Color" xml:space="preserve">
<value>Color con Nombre</value>
</data>
<data name="No change" xml:space="preserve">
<value>Sin alterar</value>
</data>
<data name="or" xml:space="preserve">
<value>o</value>
</data>
<data name="Other Settings" xml:space="preserve">
<value>Otros Ajustes</value>
</data>
<data name="Prayer Requests" xml:space="preserve">
<value>Las Peticiones de Oración</value>
</data>
<data name="Private" xml:space="preserve">
<value>Privado</value>
</data>
<data name="Public" xml:space="preserve">
<value>Público</value>
</data>
<data name="Red / Green / Blue Mix" xml:space="preserve">
<value>Mezcla de Rojo / Verde / Azul</value>
</data>
<data name="Request Lists" xml:space="preserve">
<value>Listas de Peticiones</value>
</data>
<data name="Requestor" xml:space="preserve">
<value>Peticionario</value>
</data>
<data name="Requires Cookies" xml:space="preserve">
<value>Requiere que las Cookies</value>
</data>
<data name="Save Group" xml:space="preserve">
<value>Guardar el Grupo</value>
</data>
<data name="Save Group Assignments" xml:space="preserve">
<value>Guardar las Autorizaciones del Grupo</value>
</data>
<data name="Save Preferences" xml:space="preserve">
<value>Guardar las Preferencias</value>
</data>
<data name="Save Request" xml:space="preserve">
<value>Guardar la Petición</value>
</data>
<data name="Save User" xml:space="preserve">
<value>Guardar el Usuario</value>
</data>
<data name="Send Announcement to" xml:space="preserve">
<value>Enviar anuncio a</value>
</data>
<data name="Show Inactive Requests" xml:space="preserve">
<value>Muestran las Peticiones Inactivos</value>
</data>
<data name="Sort by Last Updated Date" xml:space="preserve">
<value>Ordenar por Fecha de Última Actualización</value>
</data>
<data name="The request list was sent to the following people, via individual e-mails" xml:space="preserve">
<value>La lista de peticiones fue enviado a las siguientes personas, a través de correos electrónicos individuales</value>
</data>
<data name="This Group" xml:space="preserve">
<value>Este Grupo</value>
</data>
<data name="This will e-mail the current list to every member of your class, without further prompting. Are you sure this is what you are ready to do?" xml:space="preserve">
<value>Esto enviará un correo electrónico la lista actual de todos los miembros de su clase, sin más indicaciones. ¿Estás seguro de que esto es lo que están dispuestos a hacer?</value>
</data>
<data name="To change your password, enter your current password in the specified box below, then enter your new password twice." xml:space="preserve">
<value>Para cambiar su contraseña, introduzca su contraseña actual en el cuadro se especifica a continuación, introduzca su nueva contraseña dos veces.</value>
</data>
<data name="Type" xml:space="preserve">
<value>Tipo</value>
</data>
<data name="Updated Date" xml:space="preserve">
<value>Fecha de Actualización</value>
</data>
<data name="View" xml:space="preserve">
<value>Ver</value>
</data>
<data name="Weeks" xml:space="preserve">
<value>Semanas</value>
</data>
<data name="Active Requests" xml:space="preserve">
<value>Peticiones Activas</value>
</data>
<data name="Delete This Request" xml:space="preserve">
<value>Eliminar esta petición</value>
</data>
<data name="Edit This Prayer Request" xml:space="preserve">
<value>Editar esta petición de oración</value>
</data>
<data name="Expire a Request" xml:space="preserve">
<value>Expirar una petición</value>
</data>
<data name="Expire This Request Immediately" xml:space="preserve">
<value>Expirar esta petición de oración de inmediato</value>
</data>
<data name="Maintain Prayer Requests" xml:space="preserve">
<value>Mantener las Peticiones de Oración</value>
</data>
<data name="Members" xml:space="preserve">
<value>Miembros</value>
</data>
<data name="Quick Actions" xml:space="preserve">
<value>Acciones Rápidas</value>
</data>
<data name="Restore This Inactive Request" xml:space="preserve">
<value>Restaurar esta petición inactiva</value>
</data>
<data name="Save" xml:space="preserve">
<value>Guardar</value>
</data>
<data name="Total Requests" xml:space="preserve">
<value>Total de Peticiones</value>
</data>
<data name="View Prayer Request List" xml:space="preserve">
<value>Ver la Lista de Peticiones de Oración</value>
</data>
<data name="Central European" xml:space="preserve">
<value>Central Europeo</value>
</data>
<data name="Eastern" xml:space="preserve">
<value>Este</value>
</data>
<data name="MMMM d, yyyy" xml:space="preserve">
<value>d \de MMMM yyyy</value>
</data>
<data name="Mountain" xml:space="preserve">
<value>Montaña</value>
</data>
<data name="Mountain (Arizona)" xml:space="preserve">
<value>Montaña (Arizona)</value>
</data>
<data name="Pacific" xml:space="preserve">
<value>Pacífico</value>
</data>
<data name="Page Not Found" xml:space="preserve">
<value>Página No Encontrada</value>
</data>
<data name="Server Error" xml:space="preserve">
<value>Error del Servidor</value>
</data>
<data name="Privacy Policy" xml:space="preserve">
<value>Política de privacidad</value>
</data>
<data name="Terms of Service" xml:space="preserve">
<value>Términos de servicio</value>
</data>
<data name="Password" xml:space="preserve">
<value>Contraseña</value>
</data>
<data name="Current Password" xml:space="preserve">
<value>Contraseña Actual</value>
</data>
<data name="New Password Twice" xml:space="preserve">
<value>Nueva Contraseña Dos Veces</value>
</data>
<data name="Fonts** for List" xml:space="preserve">
<value>Fuentes** de la Lista</value>
</data>
<data name="From Address" xml:space="preserve">
<value>De Dirección</value>
</data>
<data name="From Name" xml:space="preserve">
<value>De Nombre</value>
</data>
<data name="Group Password (Used to Read Online)" xml:space="preserve">
<value>Contraseña del Grupo (Utilizado para Leer en Línea)</value>
</data>
<data name="Source &amp; Support" xml:space="preserve">
<value>Fuente y Soporte</value>
</data>
<data name="View source code and get technical support" xml:space="preserve">
<value>Ver código fuente y obtener soporte técnico</value>
</data>
</root>

View File

@ -0,0 +1,132 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="If you check this box, however, the text of the announcement will be added to your prayer list under the section you have selected." xml:space="preserve">
<value>Si marca esta caja, sin embargo, el texto del anuncio será añadido a su lista de oración en la sección que ha seleccionado.</value>
</data>
<data name="It functions the same way as the text box on the “&lt;a href=\&quot;{0}\&quot;&gt;{1}&lt;/a&gt;” page." xml:space="preserve">
<value>Funciona de la misma forma que el cuadro de texto en la página “&lt;a href="{0}"&gt;{1}&lt;/a&gt;”.</value>
</data>
<data name="This is the text of the announcement you would like to send." xml:space="preserve">
<value>Este es el texto del anuncio que desea enviar.</value>
</data>
<data name="Without this box checked, the text of the announcement will only be e-mailed to your group members." xml:space="preserve">
<value>Sin esta caja marcada, el texto del anuncio sólo será por correo electrónico a los miembros del su grupo.</value>
</data>
</root>

View File

@ -0,0 +1,141 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="(Of course, if you delete it in error, you can enter it again using the “Add” instructions above.)" xml:space="preserve">
<value>(Por supuesto, si usted lo elimine por error, se puede entrar de nuevo utilizando la opción “Agregar” instrucciones de arriba.)</value>
</data>
<data name="From this page, you can add, edit, and delete the e-mail addresses for your group." xml:space="preserve">
<value>Desde esta página, usted puede agregar, editar y eliminar las direcciones de correo electrónico para su grupo.</value>
</data>
<data name="Note that once an e-mail address has been deleted, it is gone." xml:space="preserve">
<value>Tenga en cuenta que una vez que la dirección de correo electrónico se ha eliminado, se ha ido.</value>
</data>
<data name="This will allow you to update the name and/or the e-mail address for that member." xml:space="preserve">
<value>Esto le permitirá actualizar el nombre y / o la dirección de correo electrónico para ese miembro.</value>
</data>
<data name="To add an e-mail address, click the icon or text in the center of the page, below the title and above the list of addresses for your group." xml:space="preserve">
<value>Para agregar una dirección de correo electrónico, haga clic en el icono o el texto en el centro de la página, debajo del título y por encima de la lista de direcciones para su grupo.</value>
</data>
<data name="To delete an e-mail address, click the blue trash can icon in the “{0}” column." xml:space="preserve">
<value>Para eliminar una dirección de correo electrónico, haga clic en el icono azul de la papelera en la columna “{0}”.</value>
</data>
<data name="To edit an e-mail address, click the blue pencil icon; it's the first icon under the “{0}” column heading." xml:space="preserve">
<value>Para editar una dirección de correo electrónico, haga clic en el icono de lápiz azul, es el primer icono bajo el título de columna “{0}”.</value>
</data>
</root>

View File

@ -0,0 +1,234 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="(Changing this password will force all members of the group who logged in with the “{0}” box checked to provide the new password.)" xml:space="preserve">
<value>(Cambiar esta contraseña obligará a todos los miembros del grupo que se iniciar sesión en el "{0}" caja marcada para proporcionar la nueva contraseña.)</value>
</data>
<data name="(NOTE: In the plain-text e-mail, new requests are bulleted with a “+” symbol, and old are bulleted with a “-” symbol.)" xml:space="preserve">
<value>(NOTA: En el texto sin formato de correo electrónico, las nuevas solicitudes se identifican con un símbolo “+”, y pide a los viejos se identifican con un símbolo “-”.)</value>
</data>
<data name="A warning is good here; just because you have an obscure font and like the way that it looks does not mean that others have that same font." xml:space="preserve">
<value>Una advertencia de que es bueno aquí, sólo porque usted tiene una fuente oscura y gusta la forma en que se vea no significa que los demás tienen de que la misma fuente.</value>
</data>
<data name="All categories respect this setting." xml:space="preserve">
<value>Todas las categorías respetar esta opción.</value>
</data>
<data name="As this is a shared password, it is stored in plain text, so you can easily see what it is." xml:space="preserve">
<value>Como se trata de una contraseña compartida, se almacena en texto plano, así que usted puede ver fácilmente lo que es.</value>
</data>
<data name="By default, requests are sorted within each group by the last updated date, with the most recent on top." xml:space="preserve">
<value>De forma predeterminada, las solicitudes se ordenan dentro de cada grupo por la última fecha de actualización, con el más reciente en la parte superior.</value>
</data>
<data name="Changing at least the e-mail address to your address will ensure that you receive these e-mails, and can prune your e-mail list accordingly." xml:space="preserve">
<value>Cambiar por lo menos la dirección de correo electrónico a su dirección se asegurará de que usted recibe estos correos electrónicos, y se puede podar su lista de correo electrónico en consecuencia.</value>
</data>
<data name="Each section is addressed below." xml:space="preserve">
<value>Cada sección se aborda más adelante.</value>
</data>
<data name="However, some e-mail clients may not display this properly, so you can choose to default the email to a plain-text format, which does not have colors, italics, or other formatting." xml:space="preserve">
<value>Sin embargo, algunos clientes de correo electrónico no puede mostrar esto correctamente, para que pueda elegir el correo electrónico a un formato de texto plano predeterminadas, que no tiene colores, cursiva, u otro formato.</value>
</data>
<data name="If you do a typo correction on a request, if you do not check the box to update the date, this setting will change the bullet." xml:space="preserve">
<value>Si usted hace una corrección de errata en una petición, si no marque la caja para actualizar la fecha, este valor va a cambiar la bala.</value>
</data>
<data name="If you do not see your time zone listed, just &lt;a href=\&quot;mailto:daniel@djs-consulting.com?subject={0}%20{1}\&quot;&gt;contact Daniel&lt;/a&gt; and tell him what time zone you need." xml:space="preserve">
<value>Si no puede ver la zona horaria en la lista, ponte en &lt;a href="mailto:daniel@djs-consulting.com?subject={1}%20por%20{0}"&gt;contacto con Daniel&lt;/a&gt; y decirle lo que la zona horaria que usted necesita.</value>
</data>
<data name="If you select “{0}” but do not enter a password, the list remains private, which is also the default value." xml:space="preserve">
<value>Si selecciona "{0}" pero no introduce una contraseña, la lista sigue siendo privado, que también es el valor predeterminado.</value>
</data>
<data name="If you would prefer to have the list sorted by requestor or subject rather than by date, select “{0}” instead." xml:space="preserve">
<value>Si prefiere tener la lista ordenada por el solicitante o el sujeto en vez de por fecha, seleccione “{0}” en su lugar.</value>
</data>
<data name="If your group is comprised mostly of people who prefer large print, the following settings will make your list look like the typical large-print publication:" xml:space="preserve">
<value>Si el grupo está compuesta en su mayoría de la gente que prefiere letras grandes, los siguientes ajustes harán que su lista de parecerse a la típica la publicación “Letra Grande”:</value>
</data>
<data name="It is generally best to stick with the fonts that come with Windows - fonts like “Arial”, “Times New Roman”, “Tahoma”, and “Comic Sans MS”." xml:space="preserve">
<value>Generalmente es mejor quedarse con las fuentes que vienen con Windows - Fuentes como “Arial”, “Times New Roman”, “Tahoma”, y “Comic Sans MS”.</value>
</data>
<data name="Note that the categories “{0}” and “{1}” never expire automatically." xml:space="preserve">
<value>Tenga en cuenta que las categorías “{0}” y “{1}” no expirará automáticamente.</value>
</data>
<data name="Password-protected lists allow group members to log in and view the current request list online, using the “{0}” link and providing this password." xml:space="preserve">
<value>Protegidos con contraseña listas permiten miembros del grupo iniciar sesión y ver la lista de peticiones actual en el sito, utilizando el "{0}" enlace y proporcionar la contraseña.</value>
</data>
<data name="Public lists are available without logging in, and private lists are only available online to administrators (though the list can still be sent via e-mail by an administrator)." xml:space="preserve">
<value>Las listas públicas están disponibles sin iniciar sesión, y listas privadas sólo están disponibles en línea a los administradores (aunque la lista todavía puede ser enviado por correo electrónico por el administrador).</value>
</data>
<data name="Requests that have been updated within this many days are identified by a hollow circle for their bullet, as opposed to a filled circle for other requests." xml:space="preserve">
<value>Peticiones que han sido actualizadas dentro de esta cantidad de días se identifican por un círculo hueco para su bala, en oposición a un círculo relleno para otras peticiones.</value>
</data>
<data name="Requests that have not been updated in this many weeks are identified by an italic font on the “{0}” page, to remind you to seek updates on these requests so that your prayers can stay relevant and current." xml:space="preserve">
<value>Peticiones que no han sido actualizados en esta semana muchos se identifican con un tipo de letra cursiva en la página “{0}”, para recordarle que debe buscar novedades en estas peticiones para que vuestras oraciones pueden permanecer relevante y actual.</value>
</data>
<data name="The background color cannot be changed." xml:space="preserve">
<value>El color de fondo no puede ser cambiado.</value>
</data>
<data name="The default for the heading is 16pt, and the default for the text is 12pt." xml:space="preserve">
<value>El valor predeterminado para el título es 16 puntos, y el valor por defecto para el texto es 12 puntos.</value>
</data>
<data name="The default name is “PrayerTracker”, and the default e-mail address is “prayer@djs-consulting.com”." xml:space="preserve">
<value>El nombre predeterminado es “PrayerTracker”, y el valor predeterminado dirección de correo electrónico es “prayer@djs-consulting.com”.</value>
</data>
<data name="The group's request list can be either public, private, or password-protected." xml:space="preserve">
<value>La lista de peticiones del grupo puede ser pública, privada o protegida por contraseña.</value>
</data>
<data name="The setting on this page is the group default; you can select a format for each recipient on the “{0}” page." xml:space="preserve">
<value>La configuración en esta página es el valor predeterminado del grupo, se puede seleccionar un formato para cada destinatario de la página “{0}”.</value>
</data>
<data name="The {0} default is HTML, which sends the list just as you see it online." xml:space="preserve">
<value>El valor predeterminado de {0} es HTML, el cual envía la lista al igual que usted lo ve en el sitio.</value>
</data>
<data name="There is a link on the bottom of the page to a color list with more names and their RGB values, if you're really feeling artistic." xml:space="preserve">
<value>Hay un enlace en la parte inferior de la página para una lista de colores con más nombres y sus valores RGB, si realmente estás sintiendo artística.</value>
</data>
<data name="This is a comma-separated list of fonts that will be used for your request list." xml:space="preserve">
<value>Esta es una lista separada por comas de fuentes que se utilizarán para su lista de peticiones.</value>
</data>
<data name="This is the default e-mail format for your group." xml:space="preserve">
<value>Este es el valor predeterminado formato de correo electrónico para su grupo.</value>
</data>
<data name="This is the point size to use for each." xml:space="preserve">
<value>Este es el tamaño de punto a utilizar para cada uno.</value>
</data>
<data name="This is the time zone that you would like to use for your group." xml:space="preserve">
<value>Esta es la zona horaria que desea utilizar para su clase.</value>
</data>
<data name="This page allows you to change how your prayer request list looks and behaves." xml:space="preserve">
<value>Esta página le permite cambiar la forma en que su lista de peticiones de la oración se ve y se comporta.</value>
</data>
<data name="This will work, but any bounced e-mails and out-of-office replies will be sent to that address (which is not even a real address)." xml:space="preserve">
<value>Esto funciona, pero los mensajes devueltos, y las respuestas de fuera de la oficina serán enviados a esa dirección (que no es ni siquiera una dirección real).</value>
</data>
<data name="When a regular request goes this many days without being updated, it expires and no longer appears on the request list." xml:space="preserve">
<value>Cuando una petición regular va esta cantidad de días sin actualizar, caduca y ya no aparece en la lista de peticiones.</value>
</data>
<data name="You can customize the colors that are used for the headings and lines in your request list." xml:space="preserve">
<value>Usted puede personalizar los colores que se utilizan para las partidas y líneas en su lista de peticiones.</value>
</data>
<data name="You can select one of the 16 named colors in the drop down lists, or you can “mix your own” using red, green, and blue (RGB) values between 0 and 255." xml:space="preserve">
<value>Puede seleccionar uno de los 16 colores con nombre en las listas desplegables, o puede “mezclar su propia” en colores rojo, verde y azul (RGB) valores entre 0 y 255.</value>
</data>
<data name="You should also end the font list with either “serif” or “sans-serif”, which will use the browser's default serif (like “Times New Roman”) or sans-serif (like “Arial”) font." xml:space="preserve">
<value>También debe poner fin a la lista de fuentes, ya sea con “serif” o el “sans-serif”, que utilizará el fuente serif predeterminado (como “Times New Roman”) o el fuente sans-serif predeterminado (como “Arial”).</value>
</data>
<data name="{0} must put an name and e-mail address in the “from” position of each e-mail it sends." xml:space="preserve">
<value>{0} debe poner el nombre y la dirección de correo electrónico en el “de” posición de cada correo electrónico que envía.</value>
</data>
</root>

View File

@ -0,0 +1,129 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Clicking this will open a new, small window with directions on using that page." xml:space="preserve">
<value>Al hacer clic en esta opción, se abrirá una nueva y pequeña ventana con instrucciones sobre cómo usar esa página.</value>
</data>
<data name="If you are looking for a quick overview of {0}, start with the “{1}” and “{2}” entries." xml:space="preserve">
<value>Si está buscando una descripción rápida de {0}, comience con las entradas "{1}" y "{2}".</value>
</data>
<data name="Throughout {0}, you'll see this icon&amp;#xa0;&lt;i class=&quot;material-icons&quot; title=&quot;{1}&quot;&gt;help_outline&lt;/i&gt;&amp;#xa0;next to the title on each page." xml:space="preserve">
<value>En todo el sistema, verá este icono&amp;#xa0;&lt;i class="material-icons" title="{1}"&gt;help_outline&lt;/i&gt;&amp;#xa0;junto al título de cada página.</value>
</data>
</root>

View File

@ -0,0 +1,195 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Apart from the icons on the request maintenance page, this is the only other way to expire “{0}” and “{1}” requests, but it can be used for any request type." xml:space="preserve">
<value>Aparte de los iconos de la página de mantenimiento de las peticiones, ésta es la única otra forma de expirar peticiones del tipos “{0}” y “{1}”, pero puede ser utilizada para cualquier tipo de petición.</value>
</data>
<data name="Click or tab into the box to display the calendar, which will be preselected to today's date." xml:space="preserve">
<value>Haga clic en la pestaña o en la caja para mostrar el calendario, que será preseleccionada para la fecha de hoy.</value>
</data>
<data name="For all types, it is optional; I used to have an announcement with no subject that ran every week, telling where to send requests and updates." xml:space="preserve">
<value>Para todos los tipos, es opcional, yo solía tener un anuncio con ningún tema que iba todas las semanas, diciendo a dónde enviar peticiones y actualizaciones.</value>
</data>
<data name="For announcements, this should contain the subject of the announcement." xml:space="preserve">
<value>Para los anuncios, este debe contener el objeto del anuncio.</value>
</data>
<data name="For existing requests, there will be a check box labeled “{0}”." xml:space="preserve">
<value>Para peticiones existentes, habrá una casilla de verificación “{0}”.</value>
</data>
<data name="For new requests, this is a box with a calendar date picker." xml:space="preserve">
<value>Para nuevas peticiones, se trata de una caja con un selector de fechas del calendario.</value>
</data>
<data name="For requests or praises, this field is for the name of the person who made the request or offered the praise report." xml:space="preserve">
<value>Para las peticiones o alabanzas, este campo es el nombre de la persona que hizo la petición o que ofrece el informe de alabanza.</value>
</data>
<data name="Hover over each icon to see what each button does." xml:space="preserve">
<value>Pase el ratón sobre cada icono para ver qué hace cada botón.</value>
</data>
<data name="If you are editing an existing request, a third option appears." xml:space="preserve">
<value>Si está editando una petición existente, aparece una tercera opción.</value>
</data>
<data name="It also supports undo and redo, and the editor supports full-screen mode." xml:space="preserve">
<value>También es compatible con deshacer y rehacer, y el editor soporta modo de pantalla completa.</value>
</data>
<data name="The editor provides many formatting capabilities, including “Spell Check as you Type” (enabled by default), “Paste from Word”, and “Paste Plain”, as well as “Source” view, if you want to edit the HTML yourself." xml:space="preserve">
<value>El editor ofrece muchas capacidades de formato, como "El Corrector Ortográfico al Escribir" (habilitado predeterminado), "Pegar desde Word" y "Pegar sin formato", así como "Código Fuente" punto de vista, si quieres editar el código HTML usted mismo.</value>
</data>
<data name="The order above is the order in which the request types appear on the list." xml:space="preserve">
<value>El orden anterior es el orden en que los tipos de peticiones aparecen en la lista.</value>
</data>
<data name="There are 5 request types in {0}." xml:space="preserve">
<value>Hay 5 tipos de peticiones en {0}.</value>
</data>
<data name="This can be used if you are correcting spelling or punctuation, and do not have an actual update to make to the request." xml:space="preserve">
<value>Esto puede ser usado si corrige la ortografía ni la puntuacion, y no tienen una actualización real de hacer la petición.</value>
</data>
<data name="This is the text of the request." xml:space="preserve">
<value>Este es el texto de la petición.</value>
</data>
<data name="This page allows you to enter or update a new prayer request." xml:space="preserve">
<value>Esta página le permite introducir o actualizar una petición de oración nueva.</value>
</data>
<data name="“{0}” and “{1}” are not subject to the automatic expiration (set on the “{2}” page) that the other requests are." xml:space="preserve">
<value>“{0}” y “{1}” no están sujetos a la caducidad automática (establecida en el “{2}” de la página) que las peticiones son otros.</value>
</data>
<data name="“{0}” are like “{1}”, but instead of a request, they are simply passing information along about something coming up." xml:space="preserve">
<value>“{0}” son como “{1}”, pero en lugar de una petición, simplemente se pasa la información a lo largo de algo por venir.</value>
</data>
<data name="“{0}” are like “{1}”, but they are answers to prayer to share with your group." xml:space="preserve">
<value>“{0}” son como “{1}”, pero son respuestas a la oración para compartir con su grupo.</value>
</data>
<data name="“{0}” are requests that may occur repeatedly or continue indefinitely." xml:space="preserve">
<value>“{0}” son peticiones que pueden ocurrir varias veces, o continuar indefinidamente.</value>
</data>
<data name="“{0}” are your regular requests that people may have regarding things happening over the next week or so." xml:space="preserve">
<value>“{0}” son sus peticiones habituales que la gente pueda tener acerca de las cosas que suceden durante la próxima semana o así.</value>
</data>
<data name="“{0}” can be used to make a request never expire (note that this is redundant for “{1}” and “{2}”)." xml:space="preserve">
<value>“{0}” se puede utilizar para hacer una petición que no caduque nunca (nótese que esto es redundante para los tipos “{1}” y “{2}”).</value>
</data>
<data name="“{0}” is for those who are pregnant.&quot;" xml:space="preserve">
<value>“{0}” es para aquellos que están embarazadas.</value>
</data>
<data name="“{0}” means that the request is subject to the expiration days in the group preferences." xml:space="preserve">
<value>“{0}” significa que la petición está sujeta a los días de vencimiento de las preferencias del grupo.</value>
</data>
<data name="“{0}” will make the request expire when it is saved." xml:space="preserve">
<value>“{0}” hará que la petición expirará cuando se guarda.</value>
</data>
</root>

View File

@ -0,0 +1,159 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Deleting a request is contrary to the intent of {0}, as you can retrieve requests that have expired." xml:space="preserve">
<value>Eliminación de una petición es contraria a la intención de {0}, como se puede recuperar peticiones que han expirado.</value>
</data>
<data name="For active requests, the second icon is an eye with a slash through it; clicking this icon will expire the request immediately." xml:space="preserve">
<value>Para las peticiones activas, el segundo icono es un ojo con una barra a través de él; Si hace clic en este icono, la petición se cancelará inmediatamente.</value>
</data>
<data name="From this page, you can add, edit, and delete your current requests." xml:space="preserve">
<value>Desde esta página, usted puede agregar, editar y borrar sus peticiones actuales.</value>
</data>
<data name="However, clicking the link at the bottom of the page will refresh the page with the inactive requests shown." xml:space="preserve">
<value>Sin embargo, al hacer clic en el vínculo en la parte inferior de la página se actualizará la página con las peticiones se muestran inactivos.</value>
</data>
<data name="However, if there is a request that needs to be deleted, clicking the blue trash can icon in the “{0}” column will allow you to do it." xml:space="preserve">
<value>Sin embargo, si hay una solicitud que debe ser eliminado, haga clic en el icono azul de la papelera en la columna “{0}” le permitirá hacerlo.</value>
</data>
<data name="The last updated date will be current, and the request is set to expire normally." xml:space="preserve">
<value>La última fecha actualizada será actual, y la petición se establece para caducar normalmente.</value>
</data>
<data name="The middle icon will look like an eye; clicking it will restore the request as an active request." xml:space="preserve">
<value>El icono del centro se verá como un ojo; Haciendo clic en él, restaurará la petición como una petición activa.</value>
</data>
<data name="This is equivalent to editing the request, selecting “{0}”, and saving it." xml:space="preserve">
<value>Esto equivale a editar la petición, seleccionar "{0}" y guardarla.</value>
</data>
<data name="To add a request, click the icon or text in the center of the page, below the title and above the list of requests for your group." xml:space="preserve">
<value>Para agregar una petición, haga clic en el icono o el texto en el centro de la página, debajo del título y por encima de la lista de peticiones para su grupo.</value>
</data>
<data name="To edit a request, click the blue pencil icon; it's the first icon under the “{0}” column heading." xml:space="preserve">
<value>Para editar una petición, haga clic en el icono de lápiz azul, el primer icono bajo el título de columna “{0}”.</value>
</data>
<data name="Use this option carefully, as these deletions cannot be undone; once a request is deleted, it is gone for good." xml:space="preserve">
<value>Utilice esta opción con cuidado, ya que estas supresiones no se puede deshacer, una vez a la petición se ha borrado, ha desaparecido para siempre.</value>
</data>
<data name="When the page is first displayed, it does not display inactive requests." xml:space="preserve">
<value>Cuando la página se muestra por primera vez, que no muestra peticiones inactivos.</value>
</data>
<data name="You can also restore requests that may have expired, but should be made active once again." xml:space="preserve">
<value>También puede restaurar peticiones que han caducado, sino que debe ser activa, una vez más.</value>
</data>
</root>

View File

@ -0,0 +1,153 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="(NOTE: If you are logged in as a group member, the only option you will see is to view a printable list.)" xml:space="preserve">
<value>(NOTA: Si usted está registrado como miembro de la clase, la única opción que se ve es para ver una lista para imprimir.)</value>
</data>
<data name="Clicking this link will display the list in a format that is suitable for printing; it does not have the normal {0} header across the top." xml:space="preserve">
<value>Hacer clic en este vínculo, se muestra la lista en un formato que sea adecuado para imprimir, sino que no tiene el encabezado normal de {0} en la parte superior.</value>
</data>
<data name="Clicking this link will send the list you are currently viewing to your group members." xml:space="preserve">
<value>Al hacer clic en este enlace le enviará la lista que está viendo en ese momento a los miembros del grupo.</value>
</data>
<data name="From this page, you can view the request list (for today or for the next Sunday), view a printable version of the list, and e-mail the list to the members of your group." xml:space="preserve">
<value>Desde esta página, puede ver la lista de peticiones (para hoy o para el próximo Domingo), ver una versión imprimible de la lista, y por correo electrónico la lista de los miembros de su grupo.</value>
</data>
<data name="If you proceed, you will see a page that shows to whom the list was sent, and what the list looked like." xml:space="preserve">
<value>Si continúa, usted verá una página que muestra a la que la lista fue enviado, y lo que la lista parecía.</value>
</data>
<data name="Note that this link does not appear if it is Sunday." xml:space="preserve">
<value>Tenga en cuenta que este enlace no aparece si es Domingo.</value>
</data>
<data name="Once you have clicked the link, you can print it using your browser's standard “Print” functionality." xml:space="preserve">
<value>Una vez que haya hecho clic en el enlace, se puede imprimir con el navegador estándar de “Imprimir” funcionalidad.</value>
</data>
<data name="The page will remind you that you are about to do that, and ask for your confirmation." xml:space="preserve">
<value>La página te recordará que estás a punto de hacerlo, y pedir su confirmación.</value>
</data>
<data name="This can be used, for example, to see what requests will expire, or allow you to print a list with Sunday's date on Saturday evening." xml:space="preserve">
<value>Esto puede ser usado, por ejemplo, para ver lo que peticiones de caducidad, ni le permite imprimir una lista con la fecha del Domingo en la noche del Sábado.</value>
</data>
<data name="This will modify the date for the list, so it will look like it is currently next Sunday." xml:space="preserve">
<value>Esto modificará la fecha de la lista, por lo que se verá como es en la actualidad el próximo Domingo.</value>
</data>
<data name="You may safely use your browser's “Back” button to navigate away from the page." xml:space="preserve">
<value>Usted puede utilizar con seguridad de su navegador botón “Atrás” para navegar fuera de la página.</value>
</data>
</root>

View File

@ -0,0 +1,138 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="If you want {0} to remember you on your computer, click the “{1}” box before clicking the “{2}” button." xml:space="preserve">
<value>Si desea que {0} que le recuerde en su ordenador, haga clic en “{1}” caja antes de pulsar el “{2}” botón.</value>
</data>
<data name="If you want {0} to remember your group, click the “{1}” box before clicking the “{2}” button." xml:space="preserve">
<value>Si desea que {0} recuerde su grupo, haga clic en “{1}” caja antes de pulsar el “{2}” botón.</value>
</data>
<data name="If your group has defined a password to use to allow you to view their request list online, select your group from the drop down list, then enter the group password into the appropriate box." xml:space="preserve">
<value>Si el grupo se ha definido una contraseña para usar que le permite ver su lista de peticiones en línea, seleccionar el grupo en la lista desplegable y introduzca la contraseña del grupo en la caja correspondiente.</value>
</data>
<data name="Select your group, then enter your e-mail address and password into the appropriate boxes." xml:space="preserve">
<value>Seleccione su grupo y introduzca su dirección de correo electrónico y contraseña en las cajas apropiadas.</value>
</data>
<data name="There are two different levels of access for {0} - user and group." xml:space="preserve">
<value>Hay dos diferentes niveles de acceso para {0} - el usuario y el grupo.</value>
</data>
<data name="This page allows you to log on to {0}." xml:space="preserve">
<value>Esta página le permite acceder a {0}.</value>
</data>
</root>

View File

@ -0,0 +1,135 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="&lt;a href=&quot;mailto:daniel@djs-consulting.com?subject={0}%20Password%20Help&quot;&gt;Click here to request help resetting your password&lt;/a&gt;." xml:space="preserve">
<value>&lt;a href="mailto:daniel@djs-consulting.com?subject=Ayuda%20de%20Contraseña%20de%20{0}"&gt;Haga clic aquí para solicitar ayuda para restablecer su contraseña&lt;/a&gt;.</value>
</data>
<data name="Enter your existing password in the top box, then enter your new password in the bottom two boxes." xml:space="preserve">
<value>Ingrese su contraseña actual en la caja superior y introduzca la nueva contraseña en la parte inferior dos cajas.</value>
</data>
<data name="Entering your existing password is a security measure; with the “{0}” box on the log in page, this will prevent someone else who may be using your computer from being able to simply go to the site and change your password." xml:space="preserve">
<value>Al entrar su contraseña actual es una medida de seguridad, con el “{0}” caja de la página inicio de sesión, esto evitará que otra persona que pueda estar usando su computadora de la posibilidad de simplemente ir a el sitio y cambiar la contraseña.</value>
</data>
<data name="If you cannot remember your existing password, we cannot retrieve it, but we can set it to something known so that you can then change it to your password." xml:space="preserve">
<value>Si no recuerdas tu contraseña actual, no podemos recuperar, pero podemos ponerlo en algo que se conoce de modo que usted puede cambiarlo a su contraseña.</value>
</data>
<data name="This page will let you change your password." xml:space="preserve">
<value>Esta página le permitirá cambiar su contraseña.</value>
</data>
</root>

View File

@ -0,0 +1,132 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="An error ({0}) has occurred." xml:space="preserve">
<value>Se ha producido un error ({0}).</value>
</data>
<data name="If you reached this page from a link within {0}, please copy the link from the browser's address bar, and send it to support, along with the group for which you were currently authenticated (if any)." xml:space="preserve">
<value>Si accediste a esta página desde un enlace dentro de {0}, copia el vínculo de la barra de direcciones del navegador y envíalo a soporte, junto con el grupo para el que estás autenticado (si existe).</value>
</data>
<data name="Please use your &quot;Back&quot; button to return to {0}." xml:space="preserve">
<value>Utilice su botón "Atrás" para volver a {0}.</value>
</data>
<data name="The page you requested cannot be found." xml:space="preserve">
<value>La página solicitada no pudo ser encontrada.</value>
</data>
</root>

View File

@ -0,0 +1,201 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="(And, once requests do “drop off”, they are not gone - they may be recovered if needed.)" xml:space="preserve">
<value>(Y, una vez que se las peticiones “dejar”, no se han ido - que se puede recuperar si es necesario.)</value>
</data>
<data name="All fonts, colors, and sizes can be customized." xml:space="preserve">
<value>Todos los tipos de letra, colores y tamaños pueden ser personalizados.</value>
</data>
<data name="Check out the “{0}” link above - it details each of the processes and how they work." xml:space="preserve">
<value>Echa un vistazo a la “{0}” enlace de arriba - que detalla cada uno de los procesos y cómo funcionan.</value>
</data>
<data name="Do I Have to Register to See the Requests?" xml:space="preserve">
<value>¿Tengo que Registrarme para Ver las Peticiones?</value>
</data>
<data name="E-mails are sent individually to each person, which keeps the e-mail list private and keeps the messages from being flagged as spam." xml:space="preserve">
<value>Los correos electrónicos se envían de forma individual a cada persona, lo que mantiene la lista de correo electrónico privado y mantiene los mensajes de ser marcado como spam.</value>
</data>
<data name="How Can Your Organization Use {0}?" xml:space="preserve">
<value>¿Cómo Puede Su Organización Utilizan {0}?</value>
</data>
<data name="How Does It Work?" xml:space="preserve">
<value>¿Cómo Funciona?</value>
</data>
<data name="If you click on the “{0}” link above, you will see a list of groups - those that do not indicate that they require logging in are publicly viewable." xml:space="preserve">
<value>Si hace clic en la “{0}” enlace de arriba, podrás ver una lista de grupos - los que no indican que se requiere el registro en el son públicos y visibles.</value>
</data>
<data name="If your organization would like to get set up, just &lt;a href=&quot;mailto:daniel@djs-consulting.com?subject=New%20{0}%20Class&quot;&gt;e-mail&lt;/a&gt; Daniel and let him know." xml:space="preserve">
<value>Si su organización quiere ponerse en marcha, &lt;a href="mailto:daniel@djs-consulting.com?subject=Nueva%20Clase%20de%20{0}"&gt;enviar por correo electrónico a Daniel&lt;/a&gt; y le hizo saber.</value>
</data>
<data name="It drops old requests off the list automatically." xml:space="preserve">
<value>Suelta las peticiones de edad fuera de la lista automáticamente.</value>
</data>
<data name="It is provided at no charge, as a ministry and a community service." xml:space="preserve">
<value>Se proporciona sin costo alguno, como un ministerio y un servicio a la comunidad.</value>
</data>
<data name="Like Gods gift of salvation, {0} is free for the asking for any church, Sunday School class, or other organization who wishes to use it." xml:space="preserve">
<value>Como un regalo de Dios de la salvación, {0} es un país libre para pedir para cualquier iglesia, la clase de escuela dominical, o cualquier otra organización que desee utilizarlo.</value>
</data>
<data name="Lists can be configured to be password-protected, but they do not have to be." xml:space="preserve">
<value>Las listas pueden ser configurados para estar protegido por contraseña, pero no tiene que ser.</value>
</data>
<data name="Lists can be e-mailed to a pre-defined list of members." xml:space="preserve">
<value>Las listas pueden ser enviados por correo electrónico a una lista predefinida de los miembros.</value>
</data>
<data name="Lists can be made public, or they can be secured with a password, if desired." xml:space="preserve">
<value>Las listas pueden hacerse públicos, o pueden ser asegurados con una contraseña, si lo desea.</value>
</data>
<data name="Requests can be viewed any time." xml:space="preserve">
<value>Peticiones se pueden ver en cualquier momento.</value>
</data>
<data name="Requests other than “{0}” requests will expire at 14 days, though this can be changed by the organization." xml:space="preserve">
<value>Peticiones que no sean “{0}” peticiones finalizará a los 14 días, aunque esto puede ser cambiado por la organización.</value>
</data>
<data name="Some of the things it can do..." xml:space="preserve">
<value>Algunas de las cosas que puede hacer...</value>
</data>
<data name="The look and feel of the list can be configured for each group." xml:space="preserve">
<value>La mirada y la sensación de la lista se puede configurar para cada grupo.</value>
</data>
<data name="This allows for configuration of large-print lists, among other things." xml:space="preserve">
<value>Esto permite que para la configuración de gran impresión listas, entre otras cosas.</value>
</data>
<data name="This can be useful for folks who may not be able to write down all the requests during class, but want a list so that they can pray for them the rest of week." xml:space="preserve">
<value>Esto puede ser útil para la gente que no puede ser capaz de escribir todas las las peticiones durante la clase, pero quiero una lista para que puedan orar por ellos el resto de la semana.</value>
</data>
<data name="This depends on the group." xml:space="preserve">
<value>Esto depende del grupo.</value>
</data>
<data name="This expiration is based on the last update, not the initial request." xml:space="preserve">
<value>Esta caducidad se basa en la última actualización, no de la petición inicial.</value>
</data>
<data name="Welcome to &lt;strong&gt;{0}&lt;/strong&gt;!" xml:space="preserve">
<value>¡Bienvenido a &lt;strong&gt;{0}&lt;/strong&gt;!</value>
</data>
<data name="What Does It Do?" xml:space="preserve">
<value>¿Qué Hacer?</value>
</data>
<data name="{0} has what you need to make maintaining a prayer request list a breeze." xml:space="preserve">
<value>{0} tiene lo que usted necesita para hacer el mantenimiento de una lista de peticiones de la oración sencilla.</value>
</data>
<data name="{0} is an interactive website that provides churches, Sunday School classes, and other organizations an easy way to keep up with their prayer requests." xml:space="preserve">
<value>{0} es un sitio web interactivo que ofrece a iglesias, clases de escuela dominical, y otras organizaciones una manera fácil de mantenerse al día con sus peticiones de oración.</value>
</data>
</root>

View File

@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="&quot;Otherwise, you may select one of the links above to get back into an authorized portion of {0}." xml:space="preserve">
<value>De lo contrario, usted puede seleccionar uno de los enlaces de arriba para volver en una parte autorizada de {0}.</value>
</data>
<data name="If you feel you have reached this page in error, please &lt;a href=&quot;mailto:daniel@djs-consulting.com?Subject={0}%20Unauthorized%20Access&quot;&gt;contact Daniel&lt;/a&gt; and provide the details as to what you were doing (i.e., what link did you click, where had you been, etc.)." xml:space="preserve">
<value>Si usted siente que ha llegado a esta página por error, por favor &lt;a href="mailto:daniel@djs-consulting.com?Subject={0}%20El%20Acceso%20No%20Autorizado"&gt;póngase en contacto con Daniel&lt;/a&gt; y proporcionar los detalles de lo que estaba haciendo (es decir, ¿qué relación se hace clic?, ¿dónde habías estado?, etc.). &lt;em&gt;(Primera lengua de Daniel es el Inglés, así que por favor tengan paciencia con él en su intento de ayudarle.)&lt;/em&gt;</value>
</data>
</root>

View File

@ -0,0 +1,192 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="(as of July 31, 2018)" xml:space="preserve">
<value>(al 31 de julio de 2018)</value>
</data>
<data name="Access to servers and backups is strictly controlled and monitored for unauthorized access attempts." xml:space="preserve">
<value>El acceso a servidores y copias de seguridad está estrictamente controlado y monitoreado para intentos de acceso no autorizados.</value>
</data>
<data name="At any time, you may choose to discontinue using {0}; just e-mail Daniel, as you did to register, and request deletion of your small group." xml:space="preserve">
<value>En cualquier momento, puede optar por dejar de usar {0}; solo envíe un correo electrónico a Daniel, como lo hizo para registrarse, y solicite la eliminación de su pequeño grupo.</value>
</data>
<data name="Both of these cookies are encrypted, both in your browser and in transit." xml:space="preserve">
<value>Ambas cookies están encriptadas, tanto en su navegador como en tránsito.</value>
</data>
<data name="Data for your small group is returned to you, as required, to display and edit." xml:space="preserve">
<value>Los datos para su pequeño grupo se le devuelven, según sea necesario, para mostrar y editar.</value>
</data>
<data name="Distinct e-mails are sent to each user, as to not disclose the other recipients." xml:space="preserve">
<value>Se envían correos electrónicos distintos a cada usuario para no revelar a los demás destinatarios.</value>
</data>
<data name="Finally, a third cookie is used to maintain your currently selected language, so that this selection is maintained across browser sessions." xml:space="preserve">
<value>Finalmente, se usa una tercera cookie para mantener el idioma seleccionado actualmente, de modo que esta selección se mantenga en todas las sesiones del navegador.</value>
</data>
<data name="How Your Data Is Accessed / Secured" xml:space="preserve">
<value>Cómo se Accede / se Aseguran Sus Datos</value>
</data>
<data name="Identifying Data" xml:space="preserve">
<value>Identificando Datos</value>
</data>
<data name="If you utilize the “{0}” box on sign in, a second cookie is stored, and transmitted to establish a session; this cookie is removed by clicking the “{1}” link." xml:space="preserve">
<value>Si utilizas el cuadro "{0}" al iniciar sesión, se almacena una segunda cookie y se transmite para establecer una sesión; esta cookie se elimina haciendo clic en el enlace "{1}".</value>
</data>
<data name="It also stores names and e-mail addreses of small group members, and plain-text passwords for small groups with password-protected lists." xml:space="preserve">
<value>También almacena nombres y direcciones de correo electrónico de miembros de grupos pequeños, y contraseñas de texto sin formato para grupos pequeños con listas protegidas por contraseña.</value>
</data>
<data name="On the server, all data is stored in a controlled-access database." xml:space="preserve">
<value>En el servidor, todos los datos se almacenan en una base de datos de acceso controlado.</value>
</data>
<data name="Removing Your Data" xml:space="preserve">
<value>Eliminar Tus Datos</value>
</data>
<data name="The items below will help you understand the data we collect, access, and store on your behalf as you use this service." xml:space="preserve">
<value>Los siguientes elementos le ayudarán a comprender los datos que recopilamos, accedemos y almacenamos en su nombre a medida que utiliza este servicio.</value>
</data>
<data name="The nature of the service is one where privacy is a must." xml:space="preserve">
<value>La naturaleza del servicio es uno donde la privacidad es imprescindible.</value>
</data>
<data name="These backups are stored in a private cloud data repository." xml:space="preserve">
<value>Estas copias de seguridad se almacenan en un repositorio de datos de nube privada.</value>
</data>
<data name="User Provided Data" xml:space="preserve">
<value>Datos Proporcionados por el Usuario</value>
</data>
<data name="Users are also associated with one or more small groups." xml:space="preserve">
<value>Los usuarios también están asociados con uno o más grupos pequeños.</value>
</data>
<data name="What We Collect" xml:space="preserve">
<value>Lo Que Recolectamos</value>
</data>
<data name="While you are signed in, {0} utilizes a session cookie, and transmits that cookie to the server to establish your identity." xml:space="preserve">
<value>Mientras está registrado, {0} utiliza una cookie de sesión y transmite esa cookie al servidor para establecer su identidad.</value>
</data>
<data name="Your data is backed up, along with other Bit Badger Solutions hosted systems, in a rolling manner; backups are preserved for the prior 7 days, and backups from the 1st and 15th are preserved for 3 months." xml:space="preserve">
<value>Sus datos están respaldados, junto con otros sistemas hospedados de Soluciones de Bit Badger, de manera continua; las copias de seguridad se conservan durante los 7 días anteriores, y las copias de seguridad de la 1ª y la 15ª se conservan durante 3 meses.</value>
</data>
<data name="{0} also sends e-mails on behalf of the configured owner of a small group; these e-mails are sent from prayer@djs-consulting.com, with the “Reply To” header set to the configured owner of the small group." xml:space="preserve">
<value>{0} también envía correos electrónicos en nombre del propietario configurado de un grupo pequeño; estos correos electrónicos se envían desde prayer@djs-consulting.com, con el encabezado “Reply To” configurado en el propietario configurado del grupo pequeño.</value>
</data>
<data name="{0} stores the first and last names, e-mail addresses, and hashed passwords of all authorized users." xml:space="preserve">
<value>{0} almacena los nombres y apellidos, las direcciones de correo electrónico y las contraseñas hash de todos los usuarios autorizados.</value>
</data>
<data name="{0} stores the text of prayer requests." xml:space="preserve">
<value>{0} almacena el texto de las solicitudes de oración.</value>
</data>
</root>

View File

@ -0,0 +1,168 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="(as of May 24, 2018)" xml:space="preserve">
<value>(a partir del 24 de mayo de 2018)</value>
</data>
<data name="Acceptance of Terms" xml:space="preserve">
<value>Aceptación de los Términos</value>
</data>
<data name="Additionally, the date at the top of this page will be updated." xml:space="preserve">
<value>Además, se actualizará la fecha en la parte superior de esta página.</value>
</data>
<data name="By accessing this web site, you are agreeing to be bound by these Terms and Conditions, and that you are responsible to ensure that your use of this site complies with all applicable laws." xml:space="preserve">
<value>Al acceder a este sitio web, usted acepta estar sujeto a estos Términos y condiciones, y que es responsable de garantizar que su uso de este sitio cumpla con todas las leyes aplicables.</value>
</data>
<data name="Description of Service and Registration" xml:space="preserve">
<value>Descripción del Servicio y Registro</value>
</data>
<data name="Liability" xml:space="preserve">
<value>Responsabilidad</value>
</data>
<data name="Registration is accomplished via e-mail to Daniel Summers (daniel at bitbadger dot solutions, substituting punctuation)." xml:space="preserve">
<value>El registro se realiza por correo electrónico a Daniel Summers (daniel en bitbadger dot solutions, sustituyendo la puntuación).</value>
</data>
<data name="See our {0} for details on the personal (user) information we maintain." xml:space="preserve">
<value>Vea nuestro {0} para obtener detalles sobre la información personal (usuario) que mantenemos.</value>
</data>
<data name="The service and its developers may not be held liable for any damages that may arise through the use of this service." xml:space="preserve">
<value>El servicio y sus desarrolladores no pueden ser considerados responsables de los daños que puedan surgir a través del uso de este servicio.</value>
</data>
<data name="These terms and conditions may be updated at any time." xml:space="preserve">
<value>Estos términos y condiciones pueden actualizarse en cualquier momento.</value>
</data>
<data name="This service is provided “as is”, and no warranty (express or implied) exists." xml:space="preserve">
<value>Este servicio se proporciona "tal cual", y no existe ninguna garantía (expresa o implícita).</value>
</data>
<data name="Updates to Terms" xml:space="preserve">
<value>Actualizaciones a los Términos</value>
</data>
<data name="When these terms are updated, users will be notified by a system-generated announcement." xml:space="preserve">
<value>Cuando se actualicen estos términos, los usuarios recibirán una notificación mediante un anuncio generado por el sistema.</value>
</data>
<data name="You may also wish to review our {0} to learn how we handle your data." xml:space="preserve">
<value>También puede consultar nuestro {0} para conocer cómo manejamos sus datos.</value>
</data>
<data name="Your continued use of this site implies your acceptance of these terms." xml:space="preserve">
<value>Su uso continuo de este sitio implica su aceptación de estos términos.</value>
</data>
<data name="{0} is a service that allows individuals to enter and amend prayer requests on behalf of organizations." xml:space="preserve">
<value>{0} es un servicio que permite a las personas ingresar y modificar las solicitudes de oración en nombre de las organizaciones.</value>
</data>
</root>

View File

@ -0,0 +1,132 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Click the appropriate icon to log on or view the request list." xml:space="preserve">
<value>Haga clic en el icono correspondiente para iniciar sesión en o ver la lista de peticiones.</value>
</data>
<data name="The groups listed below have either public or password-protected request lists." xml:space="preserve">
<value>Los grupos se enumeran a continuación tienen o listas de peticiones públicos o protegidos por contraseña.</value>
</data>
<data name="There are no groups with public or password-protected request lists." xml:space="preserve">
<value>No hay grupos con listas de peticiones públicos o protegidos por contraseña.</value>
</data>
<data name="Those with list icons are public, and those with log on icons are password-protected." xml:space="preserve">
<value>Los grupos con las listas públicas tienen el icono de la lista, los grupos con contraseñas protegidas listas tienen el icono de inicio de sesión.</value>
</data>
</root>

View File

@ -0,0 +1,132 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Ending with either “serif” or “sans-serif” will cause the user's browser to use the default “serif” font (“Times New Roman” on Windows) or “sans-serif” font (“Arial” on Windows) if no other fonts in the list are found." xml:space="preserve">
<value>Con la extensión “serif” o el “sans-serif” hará que el navegador del usuario para utilizar el valor predeterminado “serif” de la fuente (“Times New Roman” en Windows) o “sans-serif” de la fuente (“Arial” en Windows) si no otras fuentes en la lista se encuentran.</value>
</data>
<data name="If you want a custom color, you may be able to get some ideas (and a list of RGB values for those colors) from the W3 School's &lt;a href=&quot;http://www.w3schools.com/html/html_colornames.asp&quot; title=&quot;HTML Color List - W3 School&quot;&gt;HTML color name list&lt;/a&gt;." xml:space="preserve">
<value>Si desea un color personalizado, que puede ser capaz de obtener algunas ideas (y una lista de valores RGB para los colores) de la lista de la Escuela de W3 de &lt;a href="http://www.w3schools.com/html/html_colornames.asp" title="La Lista de Nombres de Colores HTML - La Escuela de W3"&gt;nombres de colores HTML&lt;/a&gt;.</value>
</data>
<data name="List font names, separated by commas." xml:space="preserve">
<value>Lista de nombres de fuentes separados por comas.</value>
</data>
<data name="The first font that is matched is the one that is used." xml:space="preserve">
<value>La primera fuente que se corresponde es el que se utiliza.</value>
</data>
</root>

View File

@ -0,0 +1,520 @@
module PrayerTracker.Views.SmallGroup
open Giraffe.GiraffeViewEngine
open Microsoft.Extensions.Localization
open PrayerTracker
open PrayerTracker.Entities
open PrayerTracker.ViewModels
open System.IO
/// View for the announcement page
let announcement isAdmin ctx vi =
let s = I18N.localizer.Force ()
let reqTypes = ReferenceList.requestTypeList s
[ form [ _action "/small-group/announcement/send"; _method "post"; _class "pt-center-columns" ] [
yield csrfToken ctx
yield div [ _class "pt-field-row" ] [
div [ _class "pt-field pt-editor" ] [
label [ _for "text" ] [ encLocText s.["Announcement Text"] ]
textarea [ _name "text"; _id "text"; _autofocus ] []
]
]
match isAdmin with
| true ->
yield div [ _class "pt-field-row" ] [
div [ _class "pt-field" ] [
label [] [ encLocText s.["Send Announcement to"]; rawText ":" ]
div [ _class "pt-center-text" ] [
radio "sendToClass" "sendY" "Y" "Y"
label [ _for "sendY" ] [ encLocText s.["This Group"]; rawText " &nbsp; &nbsp; " ]
radio "sendToClass" "sendN" "N" "Y"
label [ _for "sendN" ] [ encLocText s.["All {0} Users", s.["PrayerTracker"]] ]
]
]
]
| false ->
yield input [ _type "hidden"; _name "sendToClass"; _value "Y" ]
yield div [ _class "pt-field-row pt-fadeable pt-shown"; _id "divAddToList" ] [
div [ _class "pt-checkbox-field" ] [
input [ _type "checkbox"; _name "addToRequestList"; _id "addToRequestList"; _value "True" ]
label [ _for "addToRequestList" ] [ encLocText s.["Add to Request List"] ]
]
]
yield div [ _class "pt-field-row pt-fadeable"; _id "divCategory" ] [
div [ _class "pt-field" ] [
label [ _for "requestType" ] [ encLocText s.["Request Type"] ]
reqTypes
|> Seq.ofList
|> Seq.map (fun item -> fst item, (snd item).Value)
|> selectList "requestType" "Announcement" []
]
]
yield div [ _class "pt-field-row" ] [ submit [] "send" s.["Send Announcement"] ]
]
script [] [ rawText "PT.onLoad(PT.smallGroup.announcement.onPageLoad)" ]
]
|> Layout.Content.standard
|> Layout.standard vi "Send Announcement"
/// View for once an announcement has been sent
let announcementSent (m : Announcement) vi =
let s = I18N.localizer.Force ()
[ span [ _class "pt-email-heading" ] [ encLocText s.["HTML Format"]; rawText ":" ]
div [ _class "pt-email-canvas" ] [ rawText m.text ]
br []
br []
span [ _class "pt-email-heading" ] [ encLocText s.["Plain-Text Format"]; rawText ":" ]
div [ _class "pt-email-canvas" ] [ pre [] [ encodedText (m.plainText ()) ] ]
]
|> Layout.Content.standard
|> Layout.standard vi "Announcement Sent"
/// View for the small group add/edit page
let edit (m : EditSmallGroup) (churches : Church list) ctx vi =
let s = I18N.localizer.Force ()
let pageTitle = match m.isNew () with true -> "Add a New Group" | false -> "Edit Group"
form [ _action "/small-group/save"; _method "post"; _class "pt-center-columns" ] [
csrfToken ctx
input [ _type "hidden"; _name "smallGroupId"; _value (m.smallGroupId.ToString "N") ]
div [ _class "pt-field-row" ] [
div [ _class "pt-field" ] [
label [ _for "name" ] [ encLocText s.["Group Name"] ]
input [ _type "text"; _name "name"; _id "name"; _value m.name; _required; _autofocus ]
]
]
div [ _class "pt-field-row" ] [
div [ _class "pt-field" ] [
label [ _for "churchId" ] [ encLocText s.["Church"] ]
seq {
yield "", selectDefault s.["Select Church"].Value
yield! churches |> List.map (fun c -> c.churchId.ToString "N", c.name)
}
|> selectList "churchId" (m.churchId.ToString "N") [ _required ]
]
]
div [ _class "pt-field-row" ] [ submit [] "save" s.["Save Group"] ]
]
|> List.singleton
|> Layout.Content.standard
|> Layout.standard vi pageTitle
/// View for the member edit page
let editMember (m : EditMember) (typs : (string * LocalizedString) seq) ctx vi =
let s = I18N.localizer.Force ()
let pageTitle = match m.isNew () with true -> "Add a New Group Member" | false -> "Edit Group Member"
form [ _action "/small-group/member/save"; _method "post"; _class "pt-center-columns" ] [
style [ _scoped ] [ rawText "#memberName { width: 15rem; } #emailAddress { width: 20rem; }" ]
csrfToken ctx
input [ _type "hidden"; _name "memberId"; _value (m.memberId.ToString "N") ]
div [ _class "pt-field-row" ] [
div [ _class "pt-field" ] [
label [ _for "memberName" ] [ encLocText s.["Member Name"] ]
input [ _type "text"; _name "memberName"; _id "memberName"; _required; _autofocus; _value m.memberName ]
]
div [ _class "pt-field" ] [
label [ _for "emailAddress" ] [ encLocText s.["E-mail Address"] ]
input [ _type "email"; _name "emailAddress"; _id "emailAddress"; _required; _value m.emailAddress ]
]
]
div [ _class "pt-field-row" ] [
div [ _class "pt-field" ] [
label [ _for "emailType" ] [ encLocText s.["E-mail Format"] ]
typs
|> Seq.map (fun typ -> fst typ, (snd typ).Value)
|> selectList "emailType" m.emailType []
]
]
div [ _class "pt-field-row" ] [ submit [] "save" s.["Save"] ]
]
|> List.singleton
|> Layout.Content.standard
|> Layout.standard vi pageTitle
/// View for the small group log on page
let logOn (grps : SmallGroup list) grpId ctx vi =
let s = I18N.localizer.Force ()
[ form [ _action "/small-group/log-on/submit"; _method "post"; _class "pt-center-columns" ] [
csrfToken ctx
div [ _class "pt-field-row" ] [
div [ _class "pt-field" ] [
label [ _for "smallGroupId" ] [ encLocText s.["Group"] ]
seq {
match grps.Length with
| 0 -> yield "", s.["There are no classes with passwords defined"].Value
| _ ->
yield "", selectDefault s.["Select Group"].Value
yield! grps
|> List.map (fun grp -> grp.smallGroupId.ToString "N", sprintf "%s | %s" grp.church.name grp.name)
}
|> selectList "smallGroupId" grpId [ _required ]
]
div [ _class "pt-field" ] [
label [ _for "password" ] [ encLocText s.["Password"] ]
input [ _type "password"; _name "password"; _id "password"; _required;
_placeholder (s.["Case-Sensitive"].Value.ToLower ()) ]
]
]
div [ _class "pt-checkbox-field" ] [
input [ _type "checkbox"; _name "rememberMe"; _id "rememberMe"; _value "True" ]
label [ _for "rememberMe" ] [ encLocText s.["Remember Me"] ]
br []
small [] [ em [] [ encodedText (s.["Requires Cookies"].Value.ToLower ()) ] ]
]
div [ _class "pt-field-row" ] [ submit [] "account_circle" s.["Log On"] ]
]
script [] [ rawText "PT.onLoad(PT.smallGroup.logOn.onPageLoad)" ]
]
|> Layout.Content.standard
|> Layout.standard vi "Group Log On"
/// View for the small group maintenance page
let maintain (grps : SmallGroup list) ctx vi =
let s = I18N.localizer.Force ()
[ div [ _class "pt-center-text" ] [
br []
a [ _href (sprintf "/small-group/%s/edit" emptyGuid); _title s.["Add a New Group"].Value ] [
icon "add_circle"
rawText " &nbsp;"
encLocText s.["Add a New Group"]
]
br []
br []
]
tableSummary grps.Length s
table [ _class "pt-table pt-action-table" ] [
thead [] [
tr [] [
th [] [ encLocText s.["Actions"] ]
th [] [ encLocText s.["Name"] ]
th [] [ encLocText s.["Church"] ]
th [] [ encLocText s.["Time Zone"] ]
]
]
grps
|> List.map (fun g ->
let grpId = g.smallGroupId.ToString "N"
let delAction = sprintf "/small-group/%s/delete" grpId
let delPrompt = s.["Are you want to delete this {0}? This action cannot be undone.",
sprintf "%s (%s)" (s.["Small Group"].Value.ToLower ()) g.name].Value
tr [] [
td [] [
a [ _href (sprintf "/small-group/%s/edit" grpId); _title s.["Edit This Group"].Value ] [ icon "edit" ]
a [ _href delAction
_title s.["Delete This Group"].Value
_onclick (sprintf "return PT.confirmDelete('%s','%s')" delAction delPrompt) ]
[ icon "delete_forever" ]
]
td [] [ encodedText g.name ]
td [] [ encodedText g.church.name ]
td [] [ encLocText (TimeZones.name g.preferences.timeZoneId s) ]
])
|> tbody []
]
form [ _id "DeleteForm"; _action ""; _method "post" ] [ csrfToken ctx ]
]
|> Layout.Content.standard
|> Layout.standard vi "Maintain Groups"
/// View for the member maintenance page
let members (mbrs : Member list) (emailTyps : Map<string, LocalizedString>) ctx vi =
let s = I18N.localizer.Force ()
[ div [ _class"pt-center-text" ] [
br []
a [ _href (sprintf "/small-group/member/%s/edit" emptyGuid); _title s.["Add a New Group Member"].Value ]
[ icon "add_circle"; rawText " &nbsp;"; encLocText s.["Add a New Group Member"] ]
br []
br []
]
tableSummary mbrs.Length s
table [ _class "pt-table pt-action-table" ] [
thead [] [
tr [] [
th [] [ encLocText s.["Actions"] ]
th [] [ encLocText s.["Name"] ]
th [] [ encLocText s.["E-mail Address"] ]
th [] [ encLocText s.["Format"] ]
]
]
mbrs
|> List.map (fun mbr ->
let mbrId = mbr.memberId.ToString "N"
let delAction = sprintf "/small-group/member/%s/delete" mbrId
let delPrompt = s.["Are you want to delete this {0} ({1})? This action cannot be undone.",
s.["group member"], mbr.memberName].Value
tr [] [
td [] [
a [ _href (sprintf "/small-group/member/%s/edit" mbrId); _title s.["Edit This Group Member"].Value ]
[ icon "edit" ]
a [ _href delAction
_title s.["Delete This Group Member"].Value
_onclick (sprintf "return PT.confirmDelete('%s','%s')" delAction delPrompt) ]
[ icon "delete_forever" ]
]
td [] [ encodedText mbr.memberName ]
td [] [ encodedText mbr.email ]
td [] [ encLocText emailTyps.[defaultArg mbr.format ""] ]
])
|> tbody []
]
form [ _id "DeleteForm"; _action ""; _method "post" ] [ csrfToken ctx ]
]
|> Layout.Content.standard
|> Layout.standard vi "Maintain Group Members"
/// View for the small group overview page
let overview m vi =
let s = I18N.localizer.Force ()
let linkSpacer = rawText "&nbsp; "
let typs = ReferenceList.requestTypeList s |> Map.ofList
article [ _class "pt-overview" ] [
section [] [
header [ _role "heading" ] [
iconSized 72 "bookmark_border"
encLocText s.["Quick Actions"]
]
div [] [
a [ _href "/prayer-requests/view" ] [ icon "list"; linkSpacer; encLocText s.["View Prayer Request List"] ]
hr []
a [ _href "/small-group/announcement" ] [ icon "send"; linkSpacer; encLocText s.["Send Announcement"] ]
hr []
a [ _href "/small-group/preferences" ] [ icon "build"; linkSpacer; encLocText s.["Change Preferences"] ]
]
]
section [] [
header [ _role "heading" ] [
iconSized 72 "question_answer"
encLocText s.["Prayer Requests"]
]
div [] [
yield p [ _class "pt-center-text" ] [
strong [] [ encodedText (m.totalActiveReqs.ToString "N0"); space; encLocText s.["Active Requests"] ]
]
yield hr []
for cat in m.activeReqsByCat do
yield encodedText (cat.Value.ToString "N0")
yield space
yield encLocText typs.[cat.Key]
yield br []
yield br []
yield encodedText (m.allReqs.ToString "N0")
yield space
yield encLocText s.["Total Requests"]
yield hr []
yield a [ _href "/prayer-requests/maintain" ] [
icon "compare_arrows"
linkSpacer
encLocText s.["Maintain Prayer Requests"]
]
]
]
section [] [
header [ _role "heading" ] [
iconSized 72 "people_outline"
encLocText s.["Group Members"]
]
div [ _class "pt-center-text" ] [
strong [] [ encodedText (m.totalMbrs.ToString "N0"); space; encLocText s.["Members"] ]
hr []
a [ _href "/small-group/members" ] [ icon "email"; linkSpacer; encLocText s.["Maintain Group Members"] ]
]
]
]
|> List.singleton
|> Layout.Content.wide
|> Layout.standard vi "Small Group Overview"
/// View for the small group preferences page
let preferences (m : EditPreferences) (tzs : TimeZone list) ctx vi =
let s = I18N.localizer.Force ()
let l = I18N.forView "SmallGroup/Preferences"
use sw = new StringWriter ()
let raw = rawLocText sw
[ form [ _action "/small-group/preferences/save"; _method "post"; _class "pt-center-columns" ] [
style [ _scoped ] [ rawText "#expireDays, #daysToKeepNew, #longTermUpdateWeeks, #headingFontSize, #listFontSize { width: 3rem; } #emailFromAddress { width: 20rem; } #listFonts { width: 40rem; } @media screen and (max-width: 40rem) { #listFonts { width: 100%; } }" ]
csrfToken ctx
fieldset [] [
legend [] [ strong [] [ icon "date_range"; rawText " &nbsp;"; encLocText s.["Dates"] ] ]
div [ _class "pt-field-row" ] [
div [ _class "pt-field" ] [
label [ _for "expireDays" ] [ encLocText s.["Requests Expire After"] ]
span [] [
input [ _type "number"; _name "expireDays"; _id "expireDays"; _min "1"; _max "30"; _required; _autofocus
_value (string m.expireDays) ]
space; encodedText (s.["Days"].Value.ToLower ())
]
]
div [ _class "pt-field" ] [
label [ _for "daysToKeepNew" ] [ encLocText s.["Requests “New” For"] ]
span [] [
input [ _type "number"; _name "daysToKeepNew"; _id "daysToKeepNew"; _min "1"; _max "30"; _required
_value (string m.daysToKeepNew) ]
space; encodedText (s.["Days"].Value.ToLower ())
]
]
div [ _class "pt-field" ] [
label [ _for "longTermUpdateWeeks" ] [ encLocText s.["Long-Term Requests Alerted for Update"] ]
span [] [
input [ _type "number"; _name "longTermUpdateWeeks"; _id "longTermUpdateWeeks"; _min "1"; _max "30"
_required; _value (string m.longTermUpdateWeeks) ]
space; encodedText (s.["Weeks"].Value.ToLower ())
]
]
]
]
fieldset [] [
legend [] [ strong [] [ icon "sort"; rawText " &nbsp;"; encLocText s.["Request Sorting"] ] ]
radio "requestSort" "requestSort_D" "D" m.requestSort
label [ _for "requestSort_D" ] [ encLocText s.["Sort by Last Updated Date"] ]
rawText " &nbsp; "
radio "requestSort" "requestSort_R" "R" m.requestSort
label [ _for "requestSort_R" ] [ encLocText s.["Sort by Requestor Name"] ]
]
fieldset [] [
legend [] [ strong [] [ icon "mail_outline"; rawText " &nbsp;"; encLocText s.["E-mail"] ] ]
div [ _class "pt-field-row" ] [
div [ _class "pt-field" ] [
label [ _for "emailFromName" ] [ encLocText s.["From Name"] ]
input [ _type "text"; _name "emailFromName"; _id "emailFromName"; _required; _value m.emailFromName ]
]
div [ _class "pt-field" ] [
label [ _for "emailFromAddress" ] [ encLocText s.["From Address"] ]
input [ _type "email"; _name "emailFromAddress"; _id "emailFromAddress"; _required
_value m.emailFromAddress ]
]
]
div [ _class "pt-field-row" ] [
div [ _class "pt-field" ] [
label [ _for "defaultEmailType" ] [ encLocText s.["E-mail Format"] ]
seq {
yield "", selectDefault s.["Select"].Value
yield! ReferenceList.emailTypeList "" s |> Seq.skip 1 |> Seq.map (fun typ -> fst typ, (snd typ).Value)
}
|> selectList "defaultEmailType" m.defaultEmailType [ _required ]
]
]
]
fieldset [] [
legend [] [ strong [] [ icon "color_lens"; rawText " &nbsp;"; encLocText s.["Colors"] ]; rawText " ***" ]
div [ _class "pt-field-row" ] [
div [ _class "pt-field" ] [
label [ _class "pt-center-text" ] [ encLocText s.["Color of Heading Lines"] ]
span [] [
radio "headingLineType" "headingLineType_Name" "Name" m.headingLineType
label [ _for "headingLineType_Name" ] [ encLocText s.["Named Color"] ]
namedColorList "headingLineColor" m.headingLineColor
[ yield _id "headingLineColor_Select"
match m.headingLineColor.StartsWith "#" with true -> yield _disabled | false -> () ] s
rawText "&nbsp; &nbsp; "; encodedText (s.["or"].Value.ToUpper ())
radio "headingLineType" "headingLineType_RGB" "RGB" m.headingLineType
label [ _for "headingLineType_RGB" ] [ encLocText s.["Custom Color"] ]
input [ yield _type "color"
yield _name "headingLineColor"
yield _id "headingLineColor_Color"
yield _value m.headingLineColor
match m.headingLineColor.StartsWith "#" with true -> () | false -> yield _disabled ]
]
]
]
div [ _class "pt-field-row" ] [
div [ _class "pt-field" ] [
label [ _class "pt-center-text" ] [ encLocText s.["Color of Heading Text"] ]
span [] [
radio "headingTextType" "headingTextType_Name" "Name" m.headingTextType
label [ _for "headingTextType_Name" ] [ encLocText s.["Named Color"] ]
namedColorList "headingTextColor" m.headingTextColor
[ yield _id "headingTextColor_Select"
match m.headingTextColor.StartsWith "#" with true -> yield _disabled | false -> () ] s
rawText "&nbsp; &nbsp; "; encodedText (s.["or"].Value.ToUpper ())
radio "headingTextType" "headingTextType_RGB" "RGB" m.headingTextType
label [ _for "headingTextType_RGB" ] [ encLocText s.["Custom Color"] ]
input [ yield _type "color"
yield _name "headingTextColor"
yield _id "headingTextColor_Color"
yield _value m.headingTextColor
match m.headingTextColor.StartsWith "#" with true -> () | false -> yield _disabled ]
]
]
]
]
fieldset [] [
legend [] [ strong [] [ icon "font_download"; rawText " &nbsp;"; encLocText s.["Fonts"] ] ]
div [ _class "pt-field" ] [
label [ _for "listFonts" ] [ encLocText s.["Fonts** for List"] ]
input [ _type "text"; _name "listFonts"; _id "listFonts"; _required; _value m.listFonts ]
]
div [ _class "pt-field-row" ] [
div [ _class "pt-field" ] [
label [ _for "headingFontSize" ] [ encLocText s.["Heading Text Size"] ]
input [ _type "number"; _name "headingFontSize"; _id "headingFontSize"; _min "8"; _max "24"; _required
_value (string m.headingFontSize) ]
]
div [ _class "pt-field" ] [
label [ _for "listFontSize" ] [ encLocText s.["List Text Size"] ]
input [ _type "number"; _name "listFontSize"; _id "listFontSize"; _min "8"; _max "24"; _required
_value (string m.listFontSize) ]
]
]
]
fieldset [] [
legend [] [ strong [] [ icon "settings"; rawText " &nbsp;"; encLocText s.["Other Settings"] ] ]
div [ _class "pt-field-row" ] [
div [ _class "pt-field" ] [
label [ _for "TimeZone" ] [ encLocText s.["Time Zone"] ]
seq {
yield "", selectDefault s.["Select"].Value
yield! tzs |> List.map (fun tz -> tz.timeZoneId, (TimeZones.name tz.timeZoneId s).Value)
}
|> selectList "timeZone" m.timeZone [ _required ]
]
]
div [ _class "pt-field" ] [
label [] [ encLocText s.["Request List Visibility"] ]
span [] [
radio "listVisibility" "viz_Public" (string RequestVisibility.``public``) (string m.listVisibility)
label [ _for "viz_Public" ] [ encLocText s.["Public"] ]
rawText " &nbsp;"
radio "listVisibility" "viz_Private" (string RequestVisibility.``private``) (string m.listVisibility)
label [ _for "viz_Private" ] [ encLocText s.["Private"] ]
rawText " &nbsp;"
radio "listVisibility" "viz_Password" (string RequestVisibility.passwordProtected) (string m.listVisibility)
label [ _for "viz_Password" ] [ encLocText s.["Password Protected"] ]
]
]
div [ yield _id "divClassPassword"
match m.listVisibility = RequestVisibility.passwordProtected with
| true -> yield _class "pt-field-row pt-fadeable pt-show"
| false -> yield _class "pt-field-row pt-fadeable"
] [
div [ _class "pt-field" ] [
label [ _for "groupPassword" ] [ encLocText s.["Group Password (Used to Read Online)"] ]
input [ _type "text"; _name "groupPassword"; _id "groupPassword";
_value (match m.groupPassword with Some x -> x | None -> "") ]
]
]
div [ _class "pt-field-row" ] [ submit [] "save" s.["Save Preferences"] ]
]
]
p [] [
rawText "** "
raw l.["List font names, separated by commas."]
space
raw l.["The first font that is matched is the one that is used."]
space
raw l.["Ending with either “serif” or “sans-serif” will cause the user's browser to use the default “serif” font (“Times New Roman” on Windows) or “sans-serif” font (“Arial” on Windows) if no other fonts in the list are found."]
]
p [] [
rawText "*** "
raw l.["If you want a custom color, you may be able to get some ideas (and a list of RGB values for those colors) from the W3 School's <a href=\"http://www.w3schools.com/html/html_colornames.asp\" title=\"HTML Color List - W3 School\">HTML color name list</a>."]
]
script [] [ rawText "PT.onLoad(PT.smallGroup.preferences.onPageLoad)" ]
]
|> Layout.Content.standard
|> Layout.standard vi "Group Preferences"

View File

@ -0,0 +1,222 @@
module PrayerTracker.Views.User
open Giraffe.GiraffeViewEngine
open PrayerTracker.Entities
open PrayerTracker.ViewModels
/// View for the group assignment page
let assignGroups m (groups : Map<string, string>) (curGroups : string list) ctx vi =
let s = I18N.localizer.Force ()
let pageTitle = sprintf "%s %A" m.userName s.["Assign Groups"]
form [ _action "/user/small-groups/save"; _method "post"; _class "pt-center-columns" ] [
csrfToken ctx
input [ _type "hidden"; _name "userId"; _value (m.userId.ToString "N") ]
input [ _type "hidden"; _name "userName"; _value m.userName ]
table [ _class "pt-table" ] [
thead [] [
tr [] [
th [] [ rawText "&nbsp;" ]
th [] [ encLocText s.["Group"] ]
]
]
groups
|> Seq.map (fun grp ->
let inputId = sprintf "id-%s" grp.Key
tr [] [
td [] [
input [ yield _type "checkbox"
yield _name "smallGroups"
yield _id inputId
yield _value grp.Key
match curGroups |> List.contains grp.Key with true -> yield _checked | false -> () ]
]
td [] [ label [ _for inputId ] [ encodedText grp.Value ] ]
])
|> List.ofSeq
|> tbody []
]
div [ _class "pt-field-row" ] [ submit [] "save" s.["Save Group Assignments"] ]
]
|> List.singleton
|> Layout.Content.standard
|> Layout.standard vi pageTitle
/// View for the password change page
let changePassword ctx vi =
let s = I18N.localizer.Force ()
[ p [ _class "pt-center-text" ] [
encLocText s.["To change your password, enter your current password in the specified box below, then enter your new password twice."]
]
form [ _action "/user/password/change"
_method "post"
_onsubmit (sprintf "return PT.compareValidation('newPassword','newPasswordConfirm','%A')" s.["The passwords do not match"]) ] [
style [ _scoped ] [ rawText "#oldPassword, #newPassword, #newPasswordConfirm { width: 10rem; } "]
csrfToken ctx
div [ _class "pt-field-row" ] [
div [ _class "pt-field" ] [
label [ _for "oldPassword" ] [ encLocText s.["Current Password"] ]
input [ _type "password"; _name "oldPassword"; _id "oldPassword"; _required; _autofocus ]
]
]
div [ _class "pt-field-row" ] [
div [ _class "pt-field" ] [
label [ _for "newPassword" ] [ encLocText s.["New Password Twice"] ]
input [ _type "password"; _name "newPassword"; _id "newPassword"; _required ]
]
div [ _class "pt-field" ] [
label [] [ rawText "&nbsp;" ]
input [ _type "password"; _name "newPasswordConfirm"; _id "newPasswordConfirm"; _required ]
]
]
div [ _class "pt-field-row" ] [
submit [ _onclick "document.getElementById('newPasswordConfirm').setCustomValidity('')" ] "done"
s.["Change Your Password"]
]
]
]
|> Layout.Content.standard
|> Layout.standard vi "Change Your Password"
/// View for the edit user page
let edit (m : EditUser) ctx vi =
let s = I18N.localizer.Force ()
let pageTitle = match m.isNew () with true -> "Add a New User" | false -> "Edit User"
let pwPlaceholder = s.[match m.isNew () with true -> "" | false -> "No change"].Value
[ form [ _action "/user/edit/save"; _method "post"; _class "pt-center-columns"
_onsubmit (sprintf "return PT.compareValidation('password','passwordConfirm','%A')" s.["The passwords do not match"]) ] [
style [ _scoped ]
[ rawText "#firstName, #lastName, #password, #passwordConfirm { width: 10rem; } #emailAddress { width: 20rem; } " ]
csrfToken ctx
input [ _type "hidden"; _name "userId"; _value (m.userId.ToString "N") ]
div [ _class "pt-field-row" ] [
div [ _class "pt-field" ] [
label [ _for "firstName" ] [ encLocText s.["First Name"] ]
input [ _type "text"; _name "firstName"; _id "firstName"; _value m.firstName; _required; _autofocus ]
]
div [ _class "pt-field" ] [
label [ _for "lastName" ] [ encLocText s.["Last Name"] ]
input [ _type "text"; _name "lastName"; _id "lastName"; _value m.lastName; _required ]
]
div [ _class "pt-field" ] [
label [ _for "emailAddress" ] [ encLocText s.["E-mail Address"] ]
input [ _type "email"; _name "emailAddress"; _id "emailAddress"; _value m.emailAddress; _required ]
]
]
div [ _class "pt-field-row" ] [
div [ _class "pt-field" ] [
label [ _for "password" ] [ encLocText s.["Password"] ]
input [ _type "password"; _name "password"; _id "password"; _placeholder pwPlaceholder ]
]
div [ _class "pt-field" ] [
label [ _for "passwordConfirm" ] [ encLocText s.["Password Again"] ]
input [ _type "password"; _name "passwordConfirm"; _id "passwordConfirm"; _placeholder pwPlaceholder ]
]
]
div [ _class "pt-checkbox-field" ] [
input [ yield _type "checkbox"
yield _name "isAdmin"
yield _id "isAdmin"
yield _value "True"
match m.isAdmin with Some x when x -> yield _checked | _ -> () ]
label [ _for "isAdmin" ] [ encLocText s.["This user is a PrayerTracker administrator"] ]
]
div [ _class "pt-field-row" ] [ submit [] "save" s.["Save User"] ]
]
script [] [ rawText (sprintf "PT.onLoad(PT.user.edit.onPageLoad(%s))" ((string (m.isNew ())).ToLower ())) ]
]
|> Layout.Content.standard
|> Layout.standard vi pageTitle
/// View for the user log on page
let logOn (m : UserLogOn) (groups : Map<string, string>) ctx vi =
let s = I18N.localizer.Force ()
form [ _action "/user/log-on"; _method "post"; _class "pt-center-columns" ] [
style [ _scoped ] [ rawText "#emailAddress { width: 20rem; }" ]
csrfToken ctx
input [ _type "hidden"; _name "redirectUrl"; _value (defaultArg m.redirectUrl "") ]
div [ _class "pt-field-row" ] [
div [ _class "pt-field" ] [
label [ _for "emailAddress"] [ encLocText s.["E-mail Address"] ]
input [ _type "email"; _name "emailAddress"; _id "emailAddress"; _value m.emailAddress; _required; _autofocus ]
]
div [ _class "pt-field" ] [
label [ _for "password" ] [ encLocText s.["Password"] ]
input [ _type "password"; _name "password"; _id "password"; _required;
_placeholder (sprintf "(%s)" (s.["Case-Sensitive"].Value.ToLower ())) ]
]
]
div [ _class "pt-field-row" ] [
div [ _class "pt-field" ] [
label [ _for "smallGroupId" ] [ encLocText s.["Group"] ]
seq {
yield "", selectDefault s.["Select Group"].Value
yield! groups |> Seq.sortBy (fun x -> x.Value) |> Seq.map (fun x -> x.Key, x.Value)
}
|> selectList "smallGroupId" "" [ _required ]
]
]
div [ _class "pt-checkbox-field" ] [
input [ _type "checkbox"; _name "rememberMe"; _id "rememberMe"; _value "True" ]
label [ _for "rememberMe" ] [ encLocText s.["Remember Me"] ]
br []
small [] [ em [] [ rawText "("; encodedText (s.["Requires Cookies"].Value.ToLower ()); rawText ")" ] ]
]
div [ _class "pt-field-row" ] [ submit [] "account_circle" s.["Log On"] ]
]
|> List.singleton
|> Layout.Content.standard
|> Layout.standard vi "User Log On"
/// View for the user maintenance page
let maintain (users : User list) ctx vi =
let s = I18N.localizer.Force ()
[ div [ _class "pt-center-text" ] [
br []
a [ _href (sprintf "/user/%s/edit" emptyGuid); _title s.["Add a New User"].Value ]
[ icon "add_circle"; rawText " &nbsp;"; encLocText s.["Add a New User"] ]
br []
br []
]
tableSummary users.Length s
table [ _class "pt-table pt-action-table" ] [
thead [] [
tr [] [
th [] [ encLocText s.["Actions"] ]
th [] [ encLocText s.["Name"] ]
th [] [ encLocText s.["Admin?"] ]
]
]
users
|> List.map (fun user ->
let userId = user.userId.ToString "N"
let delAction = sprintf "/user/%s/delete" userId
let delPrompt = s.["Are you want to delete this {0}? This action cannot be undone.",
(sprintf "%s (%s)" (s.["User"].Value.ToLower()) user.fullName)].Value
tr [] [
td [] [
a [ _href (sprintf "/user/%s/edit" userId); _title s.["Edit This User"].Value ] [ icon "edit" ]
a [ _href (sprintf "/user/%s/small-groups" userId); _title s.["Assign Groups to This User"].Value ]
[ icon "group" ]
a [ _href delAction
_title s.["Delete This User"].Value
_onclick (sprintf "return PT.confirmDelete('%s','%s')" delAction delPrompt) ]
[ icon "delete_forever" ]
]
td [] [ encodedText user.fullName ]
td [ _class "pt-center-text" ] [
match user.isAdmin with
| true -> yield strong [] [ encLocText s.["Yes"] ]
| false -> yield encLocText s.["No"]
]
])
|> tbody []
]
form [ _id "DeleteForm"; _action ""; _method "post" ] [ csrfToken ctx ]
]
|> Layout.Content.standard
|> Layout.standard vi "Maintain Users"

View File

@ -0,0 +1,207 @@
[<AutoOpen>]
module PrayerTracker.Utils
open System.Net
open System.Security.Cryptography
open System.Text
open System.Text.RegularExpressions
open System
/// Hash a string with a SHA1 hash
let sha1Hash (x : string) =
use alg = SHA1.Create ()
alg.ComputeHash (ASCIIEncoding().GetBytes x)
|> Seq.map (fun chr -> chr.ToString "x2")
|> Seq.reduce (+)
/// Hash a string using 1,024 rounds of PBKDF2 and a salt
let pbkdf2Hash (salt : Guid) (x : string) =
use alg = new Rfc2898DeriveBytes (x, Encoding.UTF8.GetBytes (salt.ToString "N"), 1024)
Convert.ToBase64String(alg.GetBytes 64)
/// Replace the first occurrence of a string with a second string within a given string
let replaceFirst (needle : string) replacement (haystack : string) =
let i = haystack.IndexOf needle
match i with
| -1 -> haystack
| _ ->
seq {
yield haystack.Substring (0, i)
yield replacement
yield haystack.Substring (i + needle.Length)
}
|> Seq.reduce (+)
/// Strip HTML tags from the given string
// Adapted from http://www.dijksterhuis.org/safely-cleaning-html-with-strip_tags-in-csharp/
let stripTags allowedTags input =
let stripHtmlExp = Regex @"(<\/?[^>]+>)"
let mutable output = input
for tag in stripHtmlExp.Matches input do
let htmlTag = tag.Value.ToLower ()
let isAllowed =
allowedTags
|> List.fold
(fun acc t ->
acc
|| htmlTag.IndexOf (sprintf "<%s>" t) = 0
|| htmlTag.IndexOf (sprintf "<%s " t) = 0
|| htmlTag.IndexOf (sprintf "</%s" t) = 0) false
match isAllowed with
| true -> ()
| false -> output <- replaceFirst tag.Value "" output
output
/// Wrap a string at the specified number of characters
let wordWrap charPerLine (input : string) =
match input.Length with
| len when len <= charPerLine -> input
| _ ->
let rec findSpace (inp : string) idx =
match idx with
| 0 -> 0
| _ ->
match inp.Substring (idx, 1) with
| null | " " -> idx
| _ -> findSpace inp (idx - 1)
seq {
for line in input.Replace("\r", "").Split '\n' do
let mutable remaining = line
match remaining.Length with
| 0 -> ()
| _ ->
while charPerLine < remaining.Length do
let spaceIdx = findSpace remaining charPerLine
match spaceIdx with
| 0 ->
// No whitespace; just break it at [characters]
yield remaining.Substring (0, charPerLine)
remaining <- remaining.Substring charPerLine
| _ ->
yield remaining.Substring (0, spaceIdx)
remaining <- remaining.Substring (spaceIdx + 1)
match remaining.Length with
| 0 -> ()
| _ -> yield remaining
}
|> Seq.fold (fun (acc : StringBuilder) line -> acc.AppendFormat ("{0}\n", line)) (StringBuilder ())
|> string
/// Modify the text returned by CKEditor into the format we need for request and announcement text
let ckEditorToText (text : string) =
text
.Replace("\n\t", "") // \r
.Replace("&nbsp;", " ")
.Replace(" ", "&#xa0; ")
.Replace("</p><p>", "<br><br>") // \r
.Replace("</p>", "")
.Replace("<p>", "")
.Trim()
/// Convert an HTML piece of text to plain text
let htmlToPlainText html =
match html with
| null | "" -> ""
| _ ->
WebUtility.HtmlDecode((html.Trim() |> stripTags [ "br" ]).Replace("<br />", "\n").Replace("<br>", "\n"))
.Replace("\u00a0", " ")
/// Get the second portion of a tuple as a string
let sndAsString x = (snd >> string) x
/// "Magic string" repository
[<RequireQualifiedAccess>]
module Key =
/// This contains constants for session-stored objects within PrayerTracker
module Session =
/// The currently logged-on small group
let currentGroup = "CurrentGroup"
/// The currently logged-on user
let currentUser = "CurrentUser"
/// User messages to be displayed the next time a page is sent
let userMessages = "UserMessages"
/// The URL to which the user should be redirected once they have logged in
let redirectUrl = "RedirectUrl"
/// Names and value names for use with cookies
module Cookie =
/// The name of the user cookie
let user = "LoggedInUser"
/// The name of the class cookie
let group = "LoggedInClass"
/// The name of the culture cookie
let culture = "CurrentCulture"
/// The name of the idle timeout cookie
let timeout = "TimeoutCookie"
/// The cookies that should be cleared when a user or group logs off
let logOffCookies = [ user; group; timeout ]
/// Enumerated values for small group request list visibility (derived from preferences, used in UI)
module RequestVisibility =
/// Requests are publicly accessible
[<Literal>]
let ``public`` = 1
/// The small group members can enter a password to view the request list
[<Literal>]
let passwordProtected = 2
/// No one can see the requests for a small group except its administrators ("User" access level)
[<Literal>]
let ``private`` = 3
/// A page with verbose user instructions
type HelpPage =
{ /// The module to which the help page applies
``module`` : string
/// The topic for the help page
topic : string
/// The text with which this help page is linked (context help is linked with an icon)
linkedText : string
}
with
/// A help page that does not exist
static member None = { ``module`` = null; topic = null; linkedText = null }
/// The URL fragment for this page (appended to "/help/" for the full URL)
member this.Url = sprintf "%s/%s" this.``module`` this.topic
/// Links for help locations
module Help =
/// Help link for small group preference edit page
let groupPreferences = { ``module`` = "group"; topic = "preferences"; linkedText = "Change Preferences" }
/// Help link for send announcement page
let sendAnnouncement = { ``module`` = "group"; topic = "announcement"; linkedText = "Send Announcement" }
/// Help link for maintain group members page
let maintainGroupMembers = { ``module`` = "group"; topic = "members"; linkedText = "Maintain Group Members" }
/// Help link for request edit page
let editRequest = { ``module`` = "requests"; topic = "edit"; linkedText = "Add / Edit a Request" }
/// Help link for maintain requests page
let maintainRequests = { ``module`` = "requests"; topic = "maintain"; linkedText = "Maintain Requests" }
/// Help link for view request list page
let viewRequestList = { ``module`` = "requests"; topic = "view"; linkedText = "View Request List" }
/// Help link for user and class login pages
let logOn = { ``module`` = "user"; topic = "logon"; linkedText = "Log On" }
/// Help link for user password change page
let changePassword = { ``module`` = "user"; topic = "password"; linkedText = "Change Your Password" }
/// All help pages (the order is the order in which they are displayed on the main help page)
let all =
[ logOn
maintainRequests
editRequest
groupPreferences
maintainGroupMembers
viewRequestList
sendAnnouncement
changePassword
]
/// This class serves as a common anchor for resources
type Common () =
do ()

View File

@ -0,0 +1,625 @@
namespace PrayerTracker.ViewModels
open Microsoft.AspNetCore.Html
open Microsoft.Extensions.Localization
open PrayerTracker
open PrayerTracker.Entities
open System
/// Helper module to return localized reference lists
module ReferenceList =
/// A list of e-mail type options
let emailTypeList def (s : IStringLocalizer) =
// Localize the default type
let defaultType =
match def with
| EmailType.Html -> s.["HTML Format"].Value
| EmailType.PlainText -> s.["Plain-Text Format"].Value
| EmailType.AttachedPdf -> s.["Attached PDF"].Value
| _ -> ""
seq {
yield "", LocalizedString ("", sprintf "%s (%s)" s.["Group Default"].Value defaultType)
yield EmailType.Html, s.["HTML Format"]
yield EmailType.PlainText, s.["Plain-Text Format"]
}
/// A list of expiration options
let expirationList (s : IStringLocalizer) includeExpireNow =
seq {
yield "N", s.["Expire Normally"]
yield "Y", s.["Request Never Expires"]
match includeExpireNow with true -> yield "X", s.["Expire Immediately"] | false -> ()
}
|> List.ofSeq
/// A list of request types
let requestTypeList (s : IStringLocalizer) =
[ RequestType.Current, s.["Current Requests"]
RequestType.Recurring, s.["Long-Term Requests"]
RequestType.Praise, s.["Praise Reports"]
RequestType.Expecting, s.["Expecting"]
RequestType.Announcement, s.["Announcements"]
]
/// This is used to create a message that is displayed to the user
[<NoComparison; NoEquality>]
type UserMessage =
{ /// The type
level : string
/// The actual message
text : HtmlString
/// The description (further information)
description : HtmlString option
}
with
/// Error message template
static member Error =
{ level = "ERROR"
text = HtmlString.Empty
description = None
}
/// Warning message template
static member Warning =
{ level = "WARNING"
text = HtmlString.Empty
description = None
}
/// Info message template
static member Info =
{ level = "Info"
text = HtmlString.Empty
description = None
}
/// View model required by the layout template, given as first parameter for all pages in PrayerTracker
[<NoComparison; NoEquality>]
type AppViewInfo =
{ /// CSS files for the page
style : string list
/// JavaScript files for the page
script : string list
/// The link for help on this page
helpLink : HelpPage
/// Messages to be displayed to the user
messages : UserMessage list
/// The current version of PrayerTracker
version : string
/// The ticks when the request started
requestStart : int64
/// The currently logged on user, if there is one
user : User option
/// The currently logged on small group, if there is one
group : SmallGroup option
}
with
/// A fresh version that can be populated to process the current request
static member fresh =
{ style = []
script = []
helpLink = HelpPage.None
messages = []
version = ""
requestStart = DateTime.Now.Ticks
user = None
group = None
}
/// Form for sending a small group or system-wide announcement
[<CLIMutable; NoComparison; NoEquality>]
type Announcement =
{ /// Whether the announcement should be sent to the class or to PrayerTracker users
sendToClass : string
/// The text of the announcement
text : string
/// Whether this announcement should be added to the "Announcements" of the prayer list
addToRequestList : bool option
/// The ID of the request type to which this announcement should be added
requestType : string option
}
with
/// The text of the announcement, in plain text
member this.plainText () = (htmlToPlainText >> wordWrap 74) this.text
/// Form for assigning small groups to a user
[<CLIMutable; NoComparison; NoEquality>]
type AssignGroups =
{ /// The Id of the user being assigned
userId : UserId
/// The full name of the user being assigned
userName : string
/// The Ids of the small groups to which the user is authorized
smallGroups : string
}
with
/// Create an instance of this form from an existing user
static member fromUser (u : User) =
{ userId = u.userId
userName = u.fullName
smallGroups = ""
}
/// Form to allow users to change their password
[<CLIMutable; NoComparison; NoEquality>]
type ChangePassword =
{ /// The user's current password
oldPassword : string
/// The user's new password
newPassword : string
/// The user's new password, confirmed
newPasswordConfirm : string
}
/// Form for adding or editing a church
[<CLIMutable; NoComparison; NoEquality>]
type EditChurch =
{ /// The Id of the church
churchId : ChurchId
/// The name of the church
name : string
/// The city for the church
city : string
/// The state for the church
st : string
/// Whether the church has an active VPR interface
hasInterface : bool option
/// The address for the interface
interfaceAddress : string option
}
with
/// Create an instance from an existing church
static member fromChurch (ch : Church) =
{ churchId = ch.churchId
name = ch.name
city = ch.city
st = ch.st
hasInterface = match ch.hasInterface with true -> Some true | false -> None
interfaceAddress = ch.interfaceAddress
}
/// An instance to use for adding churches
static member empty =
{ churchId = Guid.Empty
name = ""
city = ""
st = ""
hasInterface = None
interfaceAddress = None
}
/// Is this a new church?
member this.isNew () = Guid.Empty = this.churchId
/// Populate a church from this form
member this.populateChurch (church : Church) =
{ church with
name = this.name
city = this.city
st = this.st
hasInterface = match this.hasInterface with Some x -> x | None -> false
interfaceAddress = match this.hasInterface with Some x when x -> this.interfaceAddress | _ -> None
}
/// Form for adding/editing small group members
[<CLIMutable; NoComparison; NoEquality>]
type EditMember =
{ /// The Id for this small group member (not user-entered)
memberId : MemberId
/// The name of the member
memberName : string
/// The e-mail address
emailAddress : string
/// The e-mail format
emailType : string
}
with
/// Create an instance from an existing member
static member fromMember (m : Member) =
{ memberId = m.memberId
memberName = m.memberName
emailAddress = m.email
emailType = match m.format with Some f -> f | None -> ""
}
/// An empty instance
static member empty =
{ memberId = Guid.Empty
memberName = ""
emailAddress = ""
emailType = ""
}
/// Is this a new member?
member this.isNew () = Guid.Empty = this.memberId
/// This form allows the user to set class preferences
[<CLIMutable; NoComparison; NoEquality>]
type EditPreferences =
{ /// The number of days after which requests are automatically expired
expireDays : int
/// The number of days requests are considered "new"
daysToKeepNew : int
/// The number of weeks after which a long-term requests is flagged as requiring an update
longTermUpdateWeeks : int
/// Whether to sort by updated date or requestor/subject
requestSort : string
/// The name from which e-mail will be sent
emailFromName : string
/// The e-mail address from which e-mail will be sent
emailFromAddress : string
/// The default e-mail type for this group
defaultEmailType : string
/// Whether the heading line color uses named colors or R/G/B
headingLineType : string
/// The named color for the heading lines
headingLineColor : string
/// Whether the heading text color uses named colors or R/G/B
headingTextType : string
/// The named color for the heading text
headingTextColor : string
/// The fonts to use for the list
listFonts : string
/// The font size for the heading text
headingFontSize : int
/// The font size for the list text
listFontSize : int
/// The time zone for the class
timeZone : string
/// The list visibility
listVisibility : int
/// The small group password
groupPassword : string option
}
with
static member fromPreferences (prefs : ListPreferences) =
let setType (x : string) = match x.StartsWith "#" with true -> "RGB" | false -> "Name"
{ expireDays = prefs.daysToExpire
daysToKeepNew = prefs.daysToKeepNew
longTermUpdateWeeks = prefs.longTermUpdateWeeks
requestSort = prefs.requestSort
emailFromName = prefs.emailFromName
emailFromAddress = prefs.emailFromAddress
defaultEmailType = prefs.defaultEmailType
headingLineType = setType prefs.lineColor
headingLineColor = prefs.lineColor
headingTextType = setType prefs.headingColor
headingTextColor = prefs.headingColor
listFonts = prefs.listFonts
headingFontSize = prefs.headingFontSize
listFontSize = prefs.textFontSize
timeZone = prefs.timeZoneId
groupPassword = Some prefs.groupPassword
listVisibility =
match true with
| _ when prefs.isPublic -> RequestVisibility.``public``
| _ when prefs.groupPassword = "" -> RequestVisibility.``private``
| _ -> RequestVisibility.passwordProtected
}
/// Set the properties of a small group based on the form's properties
member this.populatePreferences (prefs : ListPreferences) =
let isPublic, grpPw =
match this.listVisibility with
| RequestVisibility.``public`` -> true, ""
| RequestVisibility.passwordProtected -> false, (defaultArg this.groupPassword "")
| RequestVisibility.``private``
| _ -> false, ""
{ prefs with
daysToExpire = this.expireDays
daysToKeepNew = this.daysToKeepNew
longTermUpdateWeeks = this.longTermUpdateWeeks
requestSort = this.requestSort
emailFromName = this.emailFromName
emailFromAddress = this.emailFromAddress
defaultEmailType = this.defaultEmailType
lineColor = this.headingLineColor
headingColor = this.headingTextColor
listFonts = this.listFonts
headingFontSize = this.headingFontSize
textFontSize = this.listFontSize
timeZoneId = this.timeZone
isPublic = isPublic
groupPassword = grpPw
}
/// Form for adding or editing prayer requests
[<CLIMutable; NoComparison; NoEquality>]
type EditRequest =
{ /// The Id of the request
requestId : PrayerRequestId
/// The type of the request
requestType : string
/// The date of the request
//[<Display (Name = "Date")>]
enteredDate : DateTime option
/// Whether to update the date or not
skipDateUpdate : bool option
/// The requestor or subject
requestor : string option
/// How this request is expired
expiration : string
/// The text of the request
text : string
}
with
/// An empty instance to use for new requests
static member empty =
{ requestId = Guid.Empty
requestType = ""
enteredDate = None
skipDateUpdate = None
requestor = None
expiration = "N"
text = ""
}
/// Create an instance from an existing request
static member fromRequest req =
{ EditRequest.empty with
requestId = req.prayerRequestId
requestType = req.requestType
requestor = req.requestor
expiration = match req.doNotExpire with true -> "Y" | false -> "N"
text = req.text
}
/// Is this a new request?
member this.isNew () = Guid.Empty = this.requestId
/// Form for the admin-level editing of small groups
[<CLIMutable; NoComparison; NoEquality>]
type EditSmallGroup =
{ /// The Id of the small group
smallGroupId : SmallGroupId
/// The name of the small group
name : string
/// The Id of the church to which this small group belongs
churchId : ChurchId
}
with
/// Create an instance from an existing small group
static member fromGroup (g : SmallGroup) =
{ smallGroupId = g.smallGroupId
name = g.name
churchId = g.churchId
}
/// An empty instance (used when adding a new group)
static member empty =
{ smallGroupId = Guid.Empty
name = ""
churchId = Guid.Empty
}
/// Is this a new small group?
member this.isNew () = Guid.Empty = this.smallGroupId
/// Populate a small group from this form
member this.populateGroup (grp : SmallGroup) =
{ grp with
name = this.name
churchId = this.churchId
}
/// Form for the user edit page
[<CLIMutable; NoComparison; NoEquality>]
type EditUser =
{ /// The Id of the user
userId : UserId
/// The first name of the user
firstName : string
/// The last name of the user
lastName : string
/// The e-mail address for the user
emailAddress : string
/// The password for the user
password : string
/// The password hash for the user a second time
passwordConfirm : string
/// Is this user a PrayerTracker administrator?
isAdmin : bool option
}
with
/// An empty instance
static member empty =
{ userId = Guid.Empty
firstName = ""
lastName = ""
emailAddress = ""
password = ""
passwordConfirm = ""
isAdmin = None
}
/// Create an instance from an existing user
static member fromUser (user : User) =
{ EditUser.empty with
userId = user.userId
firstName = user.firstName
lastName = user.lastName
emailAddress = user.emailAddress
isAdmin = match user.isAdmin with true -> Some true | false -> None
}
/// Is this a new user?
member this.isNew () = Guid.Empty = this.userId
/// Populate a user from the form
member this.populateUser (user : User) hasher =
{ user with
firstName = this.firstName
lastName = this.lastName
emailAddress = this.emailAddress
isAdmin = match this.isAdmin with Some x -> x | None -> false
}
|> function
| u when this.password = null || this.password = "" -> u
| u -> { u with passwordHash = hasher this.password }
/// Form for the small group log on page
[<CLIMutable; NoComparison; NoEquality>]
type GroupLogOn =
{ /// The ID of the small group to which the user is logging on
smallGroupId : SmallGroupId
/// The password entered
password : string
/// Whether to remember the login
rememberMe : bool option
}
with
static member empty =
{ smallGroupId = Guid.Empty
password = ""
rememberMe = None
}
/// Items needed to display the small group overview page
type Overview =
{ /// The total number of active requests
totalActiveReqs : int
/// The numbers of active requests by category
activeReqsByCat : Map<string, int>
/// A count of all requests
allReqs : int
/// A count of all members
totalMbrs : int
}
/// Form for the user log on page
[<CLIMutable; NoComparison; NoEquality>]
type UserLogOn =
{ /// The e-mail address of the user
emailAddress : string
/// The password entered
password : string
/// The ID of the small group to which the user is logging on
smallGroupId : SmallGroupId
/// Whether to remember the login
rememberMe : bool option
/// The URL to which the user should be redirected once login is successful
redirectUrl : string option
}
with
static member empty =
{ emailAddress = ""
password = ""
smallGroupId = Guid.Empty
rememberMe = None
redirectUrl = None
}
open Giraffe.GiraffeViewEngine
/// This represents a list of requests
type RequestList =
{ /// The prayer request list
requests : PrayerRequest list
/// The date for which this list is being generated
date : DateTime
/// The small group to which this list belongs
listGroup : SmallGroup
/// Whether to show the class header
showHeader : bool
/// The list of recipients (populated if requests are e-mailed)
recipients : Member list
/// Whether the user can e-mail this list
canEmail : bool
}
with
/// Get the requests for a specified type
member this.requestsInCategory cat =
let reqs =
this.requests
|> Seq.ofList
|> Seq.filter (fun req -> req.requestType = cat)
match this.listGroup.preferences.requestSort with
| "D" -> reqs |> Seq.sortByDescending (fun req -> req.updatedDate)
| _ -> reqs |> Seq.sortBy (fun req -> req.requestor)
|> List.ofSeq
/// Is this request new?
member this.isNew (req : PrayerRequest) =
(this.date - req.updatedDate).Days <= this.listGroup.preferences.daysToKeepNew
/// Generate this list as HTML
member this.asHtml (s : IStringLocalizer) =
let prefs = this.listGroup.preferences
[ match this.showHeader with
| true ->
yield div [ _style (sprintf "text-align:center;font-family:%s" prefs.listFonts) ] [
span [ _style (sprintf "font-size:%ipt;" prefs.headingFontSize) ] [
strong [] [ encodedText s.["Prayer Requests"].Value ]
]
br []
span [ _style (sprintf "font-size:%ipt;" prefs.textFontSize) ] [
strong [] [ encodedText this.listGroup.name ]
br []
encodedText (this.date.ToString s.["MMMM d, yyyy"].Value)
]
]
yield br []
| false -> ()
let typs = ReferenceList.requestTypeList s
for cat in
typs
|> Seq.ofList
|> Seq.map fst
|> Seq.filter (fun c -> 0 < (this.requests |> List.filter (fun req -> req.requestType = c) |> List.length)) do
let reqs = this.requestsInCategory cat
let catName = typs |> List.filter (fun t -> fst t = cat) |> List.head |> snd
yield div [ _style "padding-left:10px;padding-bottom:.5em;" ] [
table [ _style (sprintf "font-family:%s;page-break-inside:avoid;" prefs.listFonts) ] [
tr [] [
td [ _style (sprintf "font-size:%ipt;color:%s;padding:3px 0;border-top:solid 3px %s;border-bottom:solid 3px %s;font-weight:bold;"
prefs.headingFontSize prefs.headingColor prefs.lineColor prefs.lineColor) ] [
rawText "&nbsp; &nbsp; "; encodedText catName.Value; rawText "&nbsp; &nbsp; "
]
]
]
]
yield
reqs
|> List.map (fun req ->
let bullet = match this.isNew req with true -> "circle" | false -> "disc"
li [ _style (sprintf "list-style-type:%s;font-family:%s;font-size:%ipt;padding-bottom:.25em;"
bullet prefs.listFonts prefs.textFontSize) ] [
match req.requestor with
| Some rqstr when rqstr <> "" ->
yield strong [] [ encodedText rqstr ]
yield rawText " &mdash; "
| Some _ -> ()
| None -> ()
yield rawText req.text
])
|> ul []
yield br []
]
|> renderHtmlNodes
/// Generate this list as plain text
member this.asText (s : IStringLocalizer) =
seq {
yield this.listGroup.name
yield s.["Prayer Requests"].Value
yield this.date.ToString s.["MMMM d, yyyy"].Value
yield " "
let typs = ReferenceList.requestTypeList s
for cat in
typs
|> Seq.ofList
|> Seq.map fst
|> Seq.filter (fun c -> 0 < (this.requests |> List.filter (fun req -> req.requestType = c) |> List.length)) do
let reqs = this.requestsInCategory cat
let typ = (typs |> List.filter (fun t -> fst t = cat) |> List.head |> snd).Value
let dashes = String.replicate (typ.Length + 4) "-"
yield dashes
yield sprintf @" %s" (typ.ToUpper ())
yield dashes
for req in reqs do
let bullet = match this.isNew req with true -> "+" | false -> "-"
let requestor = match req.requestor with Some r -> sprintf "%s - " r | None -> ""
yield sprintf " %s %s%s" bullet requestor (htmlToPlainText req.text)
yield " "
}
|> String.concat "\n"
|> wordWrap 74

43
src/PrayerTracker.sln Normal file
View File

@ -0,0 +1,43 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26228.4
MinimumVisualStudioVersion = 10.0.40219.1
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "PrayerTracker", "PrayerTracker\PrayerTracker.fsproj", "{63780D3F-D811-4BFB-9FB0-C28A83CCE28F}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "PrayerTracker.UI", "PrayerTracker.UI\PrayerTracker.UI.fsproj", "{EEE04A2B-818C-4241-90C5-69097CB0BF71}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "PrayerTracker.Tests", "PrayerTracker.Tests\PrayerTracker.Tests.fsproj", "{786E7BE9-9370-4117-B194-02CC2F71AA09}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "PrayerTracker.Data", "PrayerTracker.Data\PrayerTracker.Data.fsproj", "{2B5BA107-9BDA-4A1D-A9AF-AFEE6BF12270}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{63780D3F-D811-4BFB-9FB0-C28A83CCE28F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{63780D3F-D811-4BFB-9FB0-C28A83CCE28F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{63780D3F-D811-4BFB-9FB0-C28A83CCE28F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{63780D3F-D811-4BFB-9FB0-C28A83CCE28F}.Release|Any CPU.Build.0 = Release|Any CPU
{EEE04A2B-818C-4241-90C5-69097CB0BF71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EEE04A2B-818C-4241-90C5-69097CB0BF71}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EEE04A2B-818C-4241-90C5-69097CB0BF71}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EEE04A2B-818C-4241-90C5-69097CB0BF71}.Release|Any CPU.Build.0 = Release|Any CPU
{786E7BE9-9370-4117-B194-02CC2F71AA09}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{786E7BE9-9370-4117-B194-02CC2F71AA09}.Debug|Any CPU.Build.0 = Debug|Any CPU
{786E7BE9-9370-4117-B194-02CC2F71AA09}.Release|Any CPU.ActiveCfg = Release|Any CPU
{786E7BE9-9370-4117-B194-02CC2F71AA09}.Release|Any CPU.Build.0 = Release|Any CPU
{2B5BA107-9BDA-4A1D-A9AF-AFEE6BF12270}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2B5BA107-9BDA-4A1D-A9AF-AFEE6BF12270}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2B5BA107-9BDA-4A1D-A9AF-AFEE6BF12270}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2B5BA107-9BDA-4A1D-A9AF-AFEE6BF12270}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D8518203-9A8E-4DD7-AAD3-F048224DA21B}
EndGlobalSection
EndGlobal

205
src/PrayerTracker/App.fs Normal file
View File

@ -0,0 +1,205 @@
namespace PrayerTracker
open Microsoft.AspNetCore.Builder
open Microsoft.AspNetCore.Hosting
/// Module to hold configuration for the web app
[<RequireQualifiedAccess>]
module Configure =
open Cookies
open Giraffe
open Giraffe.TokenRouter
open Microsoft.AspNetCore.Localization
open Microsoft.AspNetCore.Server.Kestrel.Core
open Microsoft.EntityFrameworkCore
open Microsoft.Extensions.Configuration
open Microsoft.Extensions.DependencyInjection
open Microsoft.Extensions.Localization
open Microsoft.Extensions.Logging
open Microsoft.Extensions.Options
open NodaTime
open System.Globalization
/// Set up the configuration for the app
let configuration (ctx : WebHostBuilderContext) (cfg : IConfigurationBuilder) =
cfg.SetBasePath(ctx.HostingEnvironment.ContentRootPath)
.AddJsonFile("appsettings.json", optional = true, reloadOnChange = true)
.AddJsonFile(sprintf "appsettings.%s.json" ctx.HostingEnvironment.EnvironmentName, optional = true)
.AddEnvironmentVariables()
|> ignore
/// Configure Kestrel from appsettings.json
let kestrel (ctx : WebHostBuilderContext) (opts : KestrelServerOptions) =
(ctx.Configuration.GetSection >> opts.Configure >> ignore) "Kestrel"
let services (svc : IServiceCollection) =
svc.AddOptions()
.AddLocalization(fun options -> options.ResourcesPath <- "Resources")
.Configure<RequestLocalizationOptions>(
fun (opts : RequestLocalizationOptions) ->
let supportedCultures =
[| CultureInfo "en-US"; CultureInfo "en-GB"; CultureInfo "en-AU"; CultureInfo "en"
CultureInfo "es-MX"; CultureInfo "es-ES"; CultureInfo "es"
|]
opts.DefaultRequestCulture <- RequestCulture ("en-US", "en-US")
opts.SupportedCultures <- supportedCultures
opts.SupportedUICultures <- supportedCultures)
.AddDistributedMemoryCache()
.AddSession()
.AddAntiforgery()
.AddSingleton<IClock>(SystemClock.Instance)
|> ignore
let config = svc.BuildServiceProvider().GetRequiredService<IConfiguration>()
let crypto = config.GetSection "CookieCrypto"
CookieCrypto (crypto.["Key"], crypto.["IV"]) |> setCrypto
svc.AddDbContext<AppDbContext>(
fun options ->
options.UseNpgsql(config.GetConnectionString "PrayerTracker") |> ignore)
|> ignore
/// Routes for PrayerTracker
let webApp =
router Handlers.CommonFunctions.fourOhFour [
GET [
subRoute "/church" [
route "es" Handlers.Church.maintain
routef "/%O/edit" Handlers.Church.edit
]
route "/class/logon" (redirectTo true "/small-group/log-on")
routef "/error/%s" Handlers.Home.error
subRoute "/help" [
route "" Handlers.Help.index
routef "/%s/%s" Handlers.Help.show
]
routef "/language/%s" Handlers.Home.language
subRoute "/legal" [
route "/privacy-policy" Handlers.Home.privacyPolicy
route "/terms-of-service" Handlers.Home.tos
]
route "/log-off" Handlers.Home.logOff
subRoute "/prayer-request" [
route "s" (Handlers.PrayerRequest.maintain true)
routef "s/email/%s" Handlers.PrayerRequest.email
route "s/inactive" (Handlers.PrayerRequest.maintain false)
route "s/lists" Handlers.PrayerRequest.lists
routef "s/%O/list" Handlers.PrayerRequest.list
route "s/maintain" (redirectTo true "/prayer-requests")
routef "s/print/%s" Handlers.PrayerRequest.print
route "s/view" (Handlers.PrayerRequest.view None)
routef "s/view/%s" (Some >> Handlers.PrayerRequest.view)
routef "/%O/edit" Handlers.PrayerRequest.edit
routef "/%O/expire" Handlers.PrayerRequest.expire
routef "/%O/restore" Handlers.PrayerRequest.restore
]
subRoute "/small-group" [
route "" Handlers.SmallGroup.overview
route "s" Handlers.SmallGroup.maintain
route "/announcement" Handlers.SmallGroup.announcement
routef "/%O/edit" Handlers.SmallGroup.edit
route "/log-on" (Handlers.SmallGroup.logOn None)
routef "/log-on/%O" (Some >> Handlers.SmallGroup.logOn)
route "/logon" (redirectTo true "/small-group/log-on")
routef "/member/%O/edit" Handlers.SmallGroup.editMember
route "/members" Handlers.SmallGroup.members
route "/preferences" Handlers.SmallGroup.preferences
]
route "/unauthorized" Handlers.Home.unauthorized
subRoute "/user" [
route "s" Handlers.User.maintain
routef "/%O/edit" Handlers.User.edit
routef "/%O/small-groups" Handlers.User.smallGroups
route "/log-on" Handlers.User.logOn
route "/logon" (redirectTo true "/user/log-on")
route "/password" Handlers.User.password
]
route "/" Handlers.Home.homePage
]
POST [
subRoute "/church" [
routef "/%O/delete" Handlers.Church.delete
route "/save" Handlers.Church.save
]
subRoute "/prayer-request" [
routef "/%O/delete" Handlers.PrayerRequest.delete
route "/save" Handlers.PrayerRequest.save
]
subRoute "/small-group" [
route "/announcement/send" Handlers.SmallGroup.sendAnnouncement
routef "/%O/delete" Handlers.SmallGroup.delete
route "/log-on/submit" Handlers.SmallGroup.logOnSubmit
routef "/member/%O/delete" Handlers.SmallGroup.deleteMember
route "/member/save" Handlers.SmallGroup.saveMember
route "/preferences/save" Handlers.SmallGroup.savePreferences
route "/save" Handlers.SmallGroup.save
]
subRoute "/user" [
routef "/%O/delete" Handlers.User.delete
route "/edit/save" Handlers.User.save
route "/log-on" Handlers.User.doLogOn
route "/password/change" Handlers.User.changePassword
route "/small-groups/save" Handlers.User.saveGroups
]
]
]
let errorHandler (ex : exn) (logger : ILogger) =
logger.LogError(EventId(), ex, "An unhandled exception has occurred while executing the request.")
clearResponse >=> setStatusCode 500 >=> text ex.Message
/// Configure logging
let logging (log : ILoggingBuilder) =
let env = log.Services.BuildServiceProvider().GetService<IHostingEnvironment> ()
match env.IsDevelopment () with
| true -> log
| false -> log.AddFilter (fun l -> l > LogLevel.Information)
|> function l -> l.AddConsole().AddDebug()
|> ignore
let app (app : IApplicationBuilder) =
let env = app.ApplicationServices.GetRequiredService<IHostingEnvironment>()
let log = app.ApplicationServices.GetRequiredService<ILoggerFactory>()
(match env.IsDevelopment () with
| true ->
log.AddConsole () |> ignore
app.UseDeveloperExceptionPage ()
| false ->
log.AddConsole LogLevel.Warning |> ignore
try
use scope = app.ApplicationServices.GetRequiredService<IServiceScopeFactory>().CreateScope ()
scope.ServiceProvider.GetService<AppDbContext>().Database.Migrate ()
with _ -> () // om nom nom
app.UseGiraffeErrorHandler errorHandler)
.UseStatusCodePagesWithReExecute("/error/{0}")
.UseStaticFiles()
.UseSession()
.UseRequestLocalization(app.ApplicationServices.GetService<IOptions<RequestLocalizationOptions>>().Value)
.UseGiraffe(webApp)
|> ignore
Views.I18N.setUpFactories <| app.ApplicationServices.GetRequiredService<IStringLocalizerFactory> ()
/// The web application
module App =
open System
open System.IO
let exitCode = 0
let CreateWebHostBuilder _ =
let contentRoot = Directory.GetCurrentDirectory ()
WebHostBuilder()
.UseContentRoot(contentRoot)
.ConfigureAppConfiguration(Configure.configuration)
.UseKestrel(Configure.kestrel)
.UseWebRoot(Path.Combine (contentRoot, "wwwroot"))
.ConfigureServices(Configure.services)
.ConfigureLogging(Configure.logging)
.Configure(Action<IApplicationBuilder> Configure.app)
[<EntryPoint>]
let main args =
CreateWebHostBuilder(args).Build().Run()
exitCode

113
src/PrayerTracker/Church.fs Normal file
View File

@ -0,0 +1,113 @@
module PrayerTracker.Handlers.Church
open FSharp.Control.Tasks.V2.ContextInsensitive
open Giraffe
open PrayerTracker
open PrayerTracker.Entities
open PrayerTracker.ViewModels
open System
open System.Threading.Tasks
/// Find statistics for the given church
let private findStats (db : AppDbContext) churchId =
task {
let! grps = db.CountGroupsByChurch churchId
let! reqs = db.CountRequestsByChurch churchId
let! usrs = db.CountUsersByChurch churchId
return (churchId.ToString "N"), { smallGroups = grps; prayerRequests = reqs; users = usrs }
}
/// POST /church/[church-id]/delete
let delete churchId : HttpHandler =
requireAccess [ Admin ]
>=> validateCSRF
>=> fun next ctx ->
let db = ctx.dbContext ()
task {
let! church = db.TryChurchById churchId
match church with
| Some ch ->
let! _, stats = findStats db churchId
db.RemoveEntry ch
let! _ = db.SaveChangesAsync ()
let s = Views.I18N.localizer.Force ()
addInfo ctx
s.["The church {0} and its {1} small groups (with {2} prayer request(s)) were deleted successfully; revoked access from {3} user(s)",
ch.name, stats.smallGroups, stats.prayerRequests, stats.users]
return! redirectTo false "/churches" next ctx
| None -> return! fourOhFour next ctx
}
/// GET /church/[church-id]/edit
let edit churchId : HttpHandler =
requireAccess [ Admin ]
>=> fun next ctx ->
let startTicks = DateTime.Now.Ticks
task {
match churchId with
| x when x = Guid.Empty ->
return!
viewInfo ctx startTicks
|> Views.Church.edit EditChurch.empty ctx
|> renderHtml next ctx
| _ ->
let db = ctx.dbContext ()
let! church = db.TryChurchById churchId
match church with
| Some ch ->
return!
viewInfo ctx startTicks
|> Views.Church.edit (EditChurch.fromChurch ch) ctx
|> renderHtml next ctx
| None -> return! fourOhFour next ctx
}
/// GET /churches
let maintain : HttpHandler =
requireAccess [ Admin ]
>=> fun next ctx ->
let startTicks = DateTime.Now.Ticks
let db = ctx.dbContext ()
task {
let! churches = db.AllChurches ()
let! stats =
churches
|> Seq.ofList
|> Seq.map (fun c -> findStats db c.churchId)
|> Task.WhenAll
return!
viewInfo ctx startTicks
|> Views.Church.maintain churches (stats |> Map.ofArray) ctx
|> renderHtml next ctx
}
/// POST /church/save
let save : HttpHandler =
requireAccess [ Admin ]
>=> validateCSRF
>=> fun next ctx ->
task {
let! result = ctx.TryBindFormAsync<EditChurch> ()
match result with
| Ok m ->
let db = ctx.dbContext ()
let! church =
match m.isNew () with
| true -> Task.FromResult<Church option>(Some { Church.empty with churchId = Guid.NewGuid () })
| false -> db.TryChurchById m.churchId
match church with
| Some ch ->
m.populateChurch ch
|> (match m.isNew () with true -> db.AddEntry | false -> db.UpdateEntry)
let! _ = db.SaveChangesAsync ()
let s = Views.I18N.localizer.Force ()
let act = s.[match m.isNew () with true -> "Added" | _ -> "Updated"].Value.ToLower ()
addInfo ctx s.["Successfully {0} church “{1}”", act, m.name]
return! redirectTo false "/churches" next ctx
| None -> return! fourOhFour next ctx
| Error e -> return! bindError e next ctx
}

View File

@ -0,0 +1,272 @@
/// Functions common to many handlers
[<AutoOpen>]
module PrayerTracker.Handlers.CommonFunctions
open FSharp.Control.Tasks.V2.ContextInsensitive
open Giraffe
open Microsoft.AspNetCore.Antiforgery
open Microsoft.AspNetCore.Html
open Microsoft.AspNetCore.Http
open Microsoft.AspNetCore.Http.Extensions
open Microsoft.AspNetCore.Mvc.Rendering
open Microsoft.Extensions.Localization
open PrayerTracker
open PrayerTracker.Cookies
open PrayerTracker.ViewModels
open System
open System.Net
open System.Reflection
open System.Threading.Tasks
/// Create a select list from an enumeration
let toSelectList<'T> valFunc textFunc withDefault emptyText (items : 'T seq) =
match items with null -> nullArg "items" | _ -> ()
[ match withDefault with
| true ->
let s = PrayerTracker.Views.I18N.localizer.Force ()
yield SelectListItem (sprintf "&mdash; %A &mdash;" s.[emptyText], "")
| _ -> ()
yield! items |> Seq.map (fun x -> SelectListItem (textFunc x, valFunc x))
]
/// Create a select list from an enumeration
let toSelectListWithEmpty<'T> valFunc textFunc emptyText (items : 'T seq) =
toSelectList valFunc textFunc true emptyText items
/// Create a select list from an enumeration
let toSelectListWithDefault<'T> valFunc textFunc (items : 'T seq) =
toSelectList valFunc textFunc true "Select" items
/// The version of PrayerTracker
let appVersion =
let v = Assembly.GetExecutingAssembly().GetName().Version
#if (DEBUG)
sprintf "v%A" v
#else
seq {
yield sprintf "v%d" v.Major
match v.Minor with
| 0 -> match v.Build with 0 -> () | _ -> yield sprintf ".0.%d" v.Build
| _ ->
yield sprintf ".%d" v.Minor
match v.Build with 0 -> () | _ -> yield sprintf ".%d" v.Build
}
|> String.concat ""
#endif
/// An option of the currently signed-in user
let tryCurrentUser (ctx : HttpContext) =
ctx.Session.GetUser ()
/// The currently signed-in user (will raise if none exists)
let currentUser ctx =
match tryCurrentUser ctx with Some u -> u | None -> nullArg "User"
/// An option of the currently signed-in small group
let tryCurrentGroup (ctx : HttpContext) =
ctx.Session.GetSmallGroup ()
/// The currently signed-in small group (will raise if none exists)
let currentGroup ctx =
match tryCurrentGroup ctx with Some g -> g | None -> nullArg "SmallGroup"
/// Create the common view information heading
let viewInfo (ctx : HttpContext) startTicks =
let msg =
match ctx.Session.GetMessages () with
| [] -> []
| x ->
ctx.Session.SetMessages []
x
match tryCurrentUser ctx with
| Some u ->
// The idle timeout is 2 hours; if the app pool is recycled or the actual session goes away, we will log the
// user back in transparently using this cookie. Every request resets the timer.
let timeout =
{ Id = u.userId
GroupId = (currentGroup ctx).smallGroupId
Until = DateTime.UtcNow.AddHours(2.).Ticks
Password = ""
}
ctx.Response.Cookies.Append
(Key.Cookie.timeout, { timeout with Password = saltedTimeoutHash timeout }.toPayload (),
CookieOptions (Expires = Nullable<DateTimeOffset> (DateTimeOffset (DateTime timeout.Until)), HttpOnly = true))
| None -> ()
{ AppViewInfo.fresh with
version = appVersion
messages = msg
requestStart = startTicks
user = ctx.Session.GetUser ()
group = ctx.Session.GetSmallGroup ()
}
/// The view is the last parameter, so it can be composed
let renderHtml next ctx view =
htmlView view next ctx
/// Display an error regarding form submission
let bindError (msg : string) next (ctx : HttpContext) =
System.Console.WriteLine msg
ctx.SetStatusCode 400
text msg next ctx
/// Handler that will return a status code 404 and the text "Not Found"
let fourOhFour next (ctx : HttpContext) =
ctx.SetStatusCode 404
text "Not Found" next ctx
/// Handler to validate CSRF prevention token
let validateCSRF : HttpHandler =
fun next ctx ->
let antiForgery = ctx.GetService<IAntiforgery> ()
task {
let! isValid = antiForgery.IsRequestValidAsync ctx
match isValid with
| true -> return! next ctx
| false ->
return! (clearResponse >=> setStatusCode 400 >=> text "Quit hacking...") (fun _ -> Task.FromResult None) ctx
}
/// Add a message to the session
let addUserMessage (ctx : HttpContext) msg =
msg :: ctx.Session.GetMessages () |> ctx.Session.SetMessages
/// Convert a localized string to an HTML string
let htmlLocString (x : LocalizedString) =
(WebUtility.HtmlEncode >> HtmlString) x.Value
let htmlString (x : LocalizedString) =
HtmlString x.Value
/// Add an error message to the session
let addError ctx msg =
addUserMessage ctx { UserMessage.Error with text = htmlLocString msg }
/// Add an informational message to the session
let addInfo ctx msg =
addUserMessage ctx { UserMessage.Info with text = htmlLocString msg }
/// Add an informational HTML message to the session
let addHtmlInfo ctx msg =
addUserMessage ctx { UserMessage.Info with text = htmlString msg }
/// Add a warning message to the session
let addWarning ctx msg =
addUserMessage ctx { UserMessage.Warning with text = htmlLocString msg }
/// A level of required access
type AccessLevel =
/// Administrative access
| Admin
/// Small group administrative access
| User
/// Small group member access
| Group
/// Errbody
| Public
/// Require the given access role (also refreshes "Remember Me" user and group logons)
let requireAccess level : HttpHandler =
/// Is there currently a user logged on?
let isUserLoggedOn (ctx : HttpContext) =
ctx.Session.GetUser () |> Option.isSome
/// Log a user on from the timeout cookie
let logOnUserFromTimeoutCookie (ctx : HttpContext) =
task {
// Make sure the cookie hasn't been tampered with
try
match TimeoutCookie.fromPayload ctx.Request.Cookies.[Key.Cookie.timeout] with
| Some c when c.Password = saltedTimeoutHash c ->
let db = ctx.dbContext ()
let! user = db.TryUserById c.Id
match user with
| Some _ ->
ctx.Session.SetUser user
let! grp = db.TryGroupById c.GroupId
ctx.Session.SetSmallGroup grp
| _ -> ()
| _ -> ()
// If something above doesn't work, the user doesn't get logged in
with _ -> ()
}
/// Attempt to log the user on from their stored cookie
let logOnUserFromCookie (ctx : HttpContext) =
task {
match UserCookie.fromPayload ctx.Request.Cookies.[Key.Cookie.user] with
| Some c ->
let db = ctx.dbContext ()
let! user = db.TryUserLogOnByCookie c.Id c.GroupId c.PasswordHash
match user with
| Some _ ->
ctx.Session.SetUser user
let! grp = db.TryGroupById c.GroupId
ctx.Session.SetSmallGroup grp
// Rewrite the cookie to extend the expiration
ctx.Response.Cookies.Append (Key.Cookie.user, c.toPayload (), autoRefresh)
| _ -> ()
| _ -> ()
}
/// Is there currently a small group (or member thereof) logged on?
let isGroupLoggedOn (ctx : HttpContext) =
ctx.Session.GetSmallGroup () |> Option.isSome
/// Attempt to log the small group on from their stored cookie
let logOnGroupFromCookie (ctx : HttpContext) =
task {
match GroupCookie.fromPayload ctx.Request.Cookies.[Key.Cookie.group] with
| Some c ->
let! grp = (ctx.dbContext ()).TryGroupLogOnByCookie c.GroupId c.PasswordHash sha1Hash
match grp with
| Some _ ->
ctx.Session.SetSmallGroup grp
// Rewrite the cookie to extend the expiration
ctx.Response.Cookies.Append (Key.Cookie.group, c.toPayload (), autoRefresh)
| None -> ()
| None -> ()
}
fun next ctx ->
task {
// Auto-logon user or class, if required
match isUserLoggedOn ctx with
| true -> ()
| false ->
do! logOnUserFromTimeoutCookie ctx
match isUserLoggedOn ctx with
| true -> ()
| false ->
do! logOnUserFromCookie ctx
match isGroupLoggedOn ctx with true -> () | false -> do! logOnGroupFromCookie ctx
match true with
| _ when level |> List.contains Public -> return! next ctx
| _ when level |> List.contains User && isUserLoggedOn ctx -> return! next ctx
| _ when level |> List.contains Group && isGroupLoggedOn ctx -> return! next ctx
| _ when level |> List.contains Admin && isUserLoggedOn ctx ->
match (currentUser ctx).isAdmin with
| true -> return! next ctx
| false ->
let s = Views.I18N.localizer.Force ()
addError ctx s.["You are not authorized to view the requested page."]
return! redirectTo false "/unauthorized" next ctx
| _ when level |> List.contains User ->
// Redirect to the user log on page
ctx.Session.SetString (Key.Session.redirectUrl, ctx.Request.GetEncodedUrl ())
return! redirectTo false "/user/log-on" next ctx
| _ when level |> List.contains Group ->
// Redirect to the small group log on page
ctx.Session.SetString (Key.Session.redirectUrl, ctx.Request.GetEncodedUrl ())
return! redirectTo false "/small-group/log-on" next ctx
| _ ->
let s = Views.I18N.localizer.Force ()
addError ctx s.["You are not authorized to view the requested page."]
return! redirectTo false "/unauthorized" next ctx
}

View File

@ -0,0 +1,128 @@
module PrayerTracker.Cookies
open Microsoft.AspNetCore.Http
open Newtonsoft.Json
open System
open System.Security.Cryptography
open System.IO
/// Cryptography settings to use for encrypting cookies
type CookieCrypto (key : string, iv : string) =
/// The key for the AES encryptor/decryptor
member __.Key = Convert.FromBase64String key
/// The initialization vector for the AES encryptor/decryptor
member __.IV = Convert.FromBase64String iv
/// Helpers for encrypting/decrypting cookies
[<AutoOpen>]
module private Crypto =
/// An instance of the cookie cryptography settings
let mutable crypto = CookieCrypto ("", "")
/// Encrypt a cookie payload
let encrypt (payload : string) =
use aes = new AesManaged ()
use enc = aes.CreateEncryptor (crypto.Key, crypto.IV)
use ms = new MemoryStream ()
use cs = new CryptoStream (ms, enc, CryptoStreamMode.Write)
use sw = new StreamWriter (cs)
sw.Write payload
sw.Close ()
(ms.ToArray >> Convert.ToBase64String) ()
/// Decrypt a cookie payload
let decrypt payload =
use aes = new AesManaged ()
use dec = aes.CreateDecryptor (crypto.Key, crypto.IV)
use ms = new MemoryStream (Convert.FromBase64String payload)
use cs = new CryptoStream (ms, dec, CryptoStreamMode.Read)
use sr = new StreamReader (cs)
sr.ReadToEnd ()
/// Encrypt a cookie
let encryptCookie cookie =
(JsonConvert.SerializeObject >> encrypt) cookie
/// Decrypt a cookie
let decryptCookie<'T> payload =
(decrypt >> JsonConvert.DeserializeObject<'T> >> box) payload
|> function null -> None | x -> Some (unbox<'T> x)
/// Accessor so that the crypto settings instance can be set during startup
let setCrypto c = Crypto.crypto <- c
/// Properties stored in the Small Group cookie
type GroupCookie =
{ /// The Id of the small group
[<JsonProperty "g">]
GroupId : Guid
/// The password hash of the small group
[<JsonProperty "p">]
PasswordHash : string
}
with
/// Convert these properties to a cookie payload
member this.toPayload () =
encryptCookie this
/// Create a set of strongly-typed properties from the cookie payload
static member fromPayload x =
try decryptCookie<GroupCookie> x with _ -> None
/// The payload for the timeout cookie
type TimeoutCookie =
{ /// The Id of the small group to which the user is currently logged in
[<JsonProperty "g">]
GroupId : Guid
/// The Id of the user who is currently logged in
[<JsonProperty "i">]
Id : Guid
/// The salted timeout hash to ensure that there has been no tampering with the cookie
[<JsonProperty "p">]
Password : string
/// How long this cookie is valid
[<JsonProperty "u">]
Until : int64
}
with
/// Convert this set of properties to the cookie payload
member this.toPayload () =
encryptCookie this
/// Create a strongly-typed timeout cookie from the cookie payload
static member fromPayload x =
try decryptCookie<TimeoutCookie> x with _ -> None
/// The payload for the user's "Remember Me" cookie
type UserCookie =
{ /// The Id of the group into to which the user is logged
[< JsonProperty "g">]
GroupId : Guid
/// The Id of the user
[<JsonProperty "i">]
Id : Guid
/// The user's password hash
[<JsonProperty "p">]
PasswordHash : string
}
with
/// Convert this set of properties to a cookie payload
member this.toPayload () =
encryptCookie this
/// Create the strongly-typed cookie properties from a cookie payload
static member fromPayload x =
try decryptCookie<UserCookie> x with _ -> None
/// Create a salted hash to use to validate the idle timeout key
let saltedTimeoutHash (c : TimeoutCookie) =
sha1Hash (sprintf "Prayer%ATracker%AIdle%dTimeout" c.Id c.GroupId c.Until)
/// Cookie options to push an expiration out by 100 days
let autoRefresh =
CookieOptions (Expires = Nullable<DateTimeOffset> (DateTimeOffset (DateTime.UtcNow.AddDays 100.)), HttpOnly = true)

View File

@ -0,0 +1,84 @@
/// Methods for sending e-mails
module PrayerTracker.Email
open FSharp.Control.Tasks.ContextInsensitive
open MailKit.Net.Smtp
open MailKit.Security
open Microsoft.Extensions.Localization
open MimeKit
open MimeKit.Text
open PrayerTracker.Entities
open System
/// The e-mail address from which e-mail is sent (must match Google account)
let private fromAddress = "prayer@djs-consulting.com"
/// Get an SMTP client connection
// FIXME: make host configurable
let getConnection () =
task {
let client = new SmtpClient ()
do! client.ConnectAsync ("127.0.0.1", 25, SecureSocketOptions.None)
return client
}
/// Create a mail message object, filled with everything but the body content
let createMessage (grp : SmallGroup) subj =
let msg = MimeMessage ()
msg.From.Add (MailboxAddress (grp.preferences.emailFromName, fromAddress))
msg.Subject <- subj
msg.ReplyTo.Add (MailboxAddress (grp.preferences.emailFromName, grp.preferences.emailFromAddress))
msg
/// Create an HTML-format e-mail message
let createHtmlMessage grp subj body (s : IStringLocalizer) =
let bodyText =
[ @"<!DOCTYPE html><html xmlns=""http://www.w3.org/1999/xhtml""><head><title></title></head><body>"
body
@"<hr><div style=""text-align:right;font-family:Arial,Helvetica,sans-serif;font-size:8pt;padding-right:10px;"">"
s.["Generated by P R A Y E R T R A C K E R"].Value
"<br><small>"
s.["from Bit Badger Solutions"].Value
"</small></div></body></html>"
]
|> String.concat ""
let msg = createMessage grp subj
msg.Body <- TextPart (TextFormat.Html, Text = bodyText)
msg
/// Create a plain-text-format e-mail message
let createTextMessage grp subj body (s : IStringLocalizer) =
let bodyText =
[ body
"\n\n--\n"
s.["Generated by P R A Y E R T R A C K E R"].Value
"\n"
s.["from Bit Badger Solutions"].Value
]
|> String.concat ""
let msg = createMessage grp subj
msg.Body <- TextPart (TextFormat.Plain, Text = bodyText)
msg
/// Send e-mails to a class
let sendEmails (client : SmtpClient) (recipients : Member list) grp subj html text s =
task {
let htmlMsg = createHtmlMessage grp subj html s
let plainTextMsg = createTextMessage grp subj text s
for mbr in recipients do
let emailType = match mbr.format with Some f -> f | None -> grp.preferences.defaultEmailType
let emailTo = MailboxAddress (mbr.memberName, mbr.email)
match emailType with
| EmailType.Html ->
htmlMsg.To.Add emailTo
do! client.SendAsync htmlMsg
htmlMsg.To.Clear ()
| EmailType.PlainText ->
plainTextMsg.To.Add emailTo
do! client.SendAsync plainTextMsg
plainTextMsg.To.Clear ()
| EmailType.AttachedPdf ->
raise <| NotImplementedException "Attached PDF format has not been implemented"
| _ -> invalidOp <| sprintf "Unknown e-mail type %s passed" emailType
}

View File

@ -0,0 +1,45 @@
[<AutoOpen>]
module PrayerTracker.Extensions
open Microsoft.AspNetCore.Http
open Newtonsoft.Json
open PrayerTracker.Entities
open PrayerTracker.ViewModels
type ISession with
/// Set an object in the session
member this.SetObject key value =
this.SetString (key, JsonConvert.SerializeObject value)
/// Get an object from the session
member this.GetObject<'T> key =
match this.GetString key with
| null -> Unchecked.defaultof<'T>
| v -> JsonConvert.DeserializeObject<'T> v
member this.GetSmallGroup () =
this.GetObject<SmallGroup> Key.Session.currentGroup |> optRec
member this.SetSmallGroup (group : SmallGroup option) =
match group with
| Some g -> this.SetObject Key.Session.currentGroup g
| None -> this.Remove Key.Session.currentGroup
member this.GetUser () =
this.GetObject<User> Key.Session.currentUser |> optRec
member this.SetUser (user: User option) =
match user with
| Some u -> this.SetObject Key.Session.currentUser u
| None -> this.Remove Key.Session.currentUser
member this.GetMessages () =
match box (this.GetObject<UserMessage list> Key.Session.userMessages) with
| null -> List.empty<UserMessage>
| msgs -> unbox msgs
member this.SetMessages (messages : UserMessage list) =
this.SetObject Key.Session.userMessages messages
type HttpContext with
/// Get the EF database context from DI
member this.dbContext () : AppDbContext = downcast this.RequestServices.GetService typeof<AppDbContext>

36
src/PrayerTracker/Help.fs Normal file
View File

@ -0,0 +1,36 @@
module PrayerTracker.Handlers.Help
open Giraffe
open PrayerTracker
open System
/// Help template lookup
let private templates =
[ Help.sendAnnouncement.Url, Views.Help.sendAnnouncement
Help.maintainGroupMembers.Url, Views.Help.groupMembers
Help.groupPreferences.Url, Views.Help.preferences
Help.editRequest.Url, Views.Help.editRequest
Help.maintainRequests.Url, Views.Help.requests
Help.viewRequestList.Url, Views.Help.viewRequests
Help.logOn.Url, Views.Help.logOn
Help.changePassword.Url, Views.Help.password
]
|> Map.ofList
/// GET /help
let index : HttpHandler =
requireAccess [ AccessLevel.Public ]
>=> fun next ctx ->
viewInfo ctx DateTime.Now.Ticks
|> Views.Help.index
|> renderHtml next ctx
/// GET /help/[module]/[topic]
let show (``module``, topic) : HttpHandler =
requireAccess [ AccessLevel.Public ]
>=> fun next ctx ->
match templates.TryGetValue (sprintf "%s/%s" ``module`` topic) with
| true, view -> renderHtml next ctx (view ())
| false, _ -> fourOhFour next ctx

90
src/PrayerTracker/Home.fs Normal file
View File

@ -0,0 +1,90 @@
module PrayerTracker.Handlers.Home
open Giraffe
open Microsoft.AspNetCore.Http
open Microsoft.AspNetCore.Localization
open PrayerTracker
open System
open System.Globalization
/// GET /error/[error-code]
let error code : HttpHandler =
requireAccess [ AccessLevel.Public ]
>=> fun next ctx ->
viewInfo ctx DateTime.Now.Ticks
|> Views.Home.error code
|> renderHtml next ctx
/// GET /
let homePage : HttpHandler =
requireAccess [ AccessLevel.Public ]
>=> fun next ctx ->
viewInfo ctx DateTime.Now.Ticks
|> Views.Home.index
|> renderHtml next ctx
/// GET /language/[culture]
let language culture : HttpHandler =
requireAccess [ AccessLevel.Public ]
>=> fun next ctx ->
try
match culture with
| null
| ""
| "en" -> "en-US"
| "es" -> "es-MX"
| _ -> sprintf "%s-%s" culture (culture.ToUpper ())
|> (CultureInfo >> Option.ofObj)
with
| :? CultureNotFoundException
| :? ArgumentException -> None
|> function
| Some c ->
ctx.Response.Cookies.Append (
CookieRequestCultureProvider.DefaultCookieName,
CookieRequestCultureProvider.MakeCookieValue (RequestCulture c),
CookieOptions (Expires = Nullable<DateTimeOffset> (DateTimeOffset (DateTime.Now.AddYears 1))))
| _ -> ()
let url = match string ctx.Request.Headers.["Referer"] with null | "" -> "/" | r -> r
redirectTo false url next ctx
/// GET /legal/privacy-policy
let privacyPolicy : HttpHandler =
requireAccess [ AccessLevel.Public ]
>=> fun next ctx ->
viewInfo ctx DateTime.Now.Ticks
|> Views.Home.privacyPolicy
|> renderHtml next ctx
/// GET /legal/terms-of-service
let tos : HttpHandler =
requireAccess [ AccessLevel.Public ]
>=> fun next ctx ->
viewInfo ctx DateTime.Now.Ticks
|> Views.Home.termsOfService
|> renderHtml next ctx
/// GET /log-off
let logOff : HttpHandler =
requireAccess [ AccessLevel.Public ]
>=> fun next ctx ->
ctx.Session.Clear ()
// Remove cookies if they exist
Key.Cookie.logOffCookies |> List.iter ctx.Response.Cookies.Delete
let s = Views.I18N.localizer.Force ()
addHtmlInfo ctx s.["Log Off Successful Have a nice day!"]
redirectTo false "/" next ctx
/// GET /unauthorized
let unauthorized : HttpHandler =
requireAccess [ AccessLevel.Public ]
>=> fun next ctx ->
viewInfo ctx DateTime.Now.Ticks
|> Views.Home.unauthorized
|> renderHtml next ctx

View File

@ -0,0 +1,299 @@
module PrayerTracker.Handlers.PrayerRequest
open FSharp.Control.Tasks.V2.ContextInsensitive
open Giraffe
open Microsoft.AspNetCore.Http
open NodaTime
open PrayerTracker
open PrayerTracker.Entities
open PrayerTracker.ViewModels
open System
open System.Threading.Tasks
/// Retrieve a prayer request, and ensure that it belongs to the current class
let private findRequest (ctx : HttpContext) reqId =
task {
let! req = ctx.dbContext().TryRequestById reqId
match req with
| Some pr when pr.smallGroupId = (currentGroup ctx).smallGroupId -> return Ok pr
| Some _ ->
let s = Views.I18N.localizer.Force ()
addError ctx s.["The prayer request you tried to access is not assigned to your group"]
return Error (redirectTo false "/unauthorized")
| None -> return Error fourOhFour
}
/// Generate a list of requests for the given date
let private generateRequestList ctx date =
let grp = currentGroup ctx
let clock = ctx.GetService<IClock> ()
let listDate =
match date with
| Some d -> d
| None -> grp.localDateNow clock
let reqs = ctx.dbContext().AllRequestsForSmallGroup grp clock (Some listDate) true
{ requests = reqs |> List.ofSeq
date = listDate
listGroup = grp
showHeader = true
canEmail = tryCurrentUser ctx |> Option.isSome
recipients = []
}
/// Parse a string into a date (optionally, of course)
let private parseListDate (date : string option) =
match date with
| Some dt -> match DateTime.TryParse dt with true, d -> Some d | false, _ -> None
| None -> None
/// GET /prayer-request/[request-id]/edit
let edit (reqId : PrayerRequestId) : HttpHandler =
requireAccess [ User ]
>=> fun next ctx ->
let startTicks = DateTime.Now.Ticks
let grp = currentGroup ctx
let now = grp.localDateNow (ctx.GetService<IClock> ())
task {
match reqId = Guid.Empty with
| true ->
return!
{ viewInfo ctx startTicks with script = [ "ckeditor/ckeditor" ]; helpLink = Help.editRequest }
|> Views.PrayerRequest.edit EditRequest.empty (now.ToString "yyyy-MM-dd") ctx
|> renderHtml next ctx
| false ->
let! result = findRequest ctx reqId
match result with
| Ok req ->
let s = Views.I18N.localizer.Force ()
match req.isExpired now grp.preferences.daysToExpire with
| true ->
{ UserMessage.Warning with
text = htmlLocString s.["This request is expired."]
description =
s.["To make it active again, update it as necessary, leave “{0}” and “{1}” unchecked, and it will return as an active request.",
s.["Expire Immediately"], s.["Check to not update the date"]]
|> (htmlLocString >> Some)
}
|> addUserMessage ctx
| false -> ()
return!
{ viewInfo ctx startTicks with script = [ "ckeditor/ckeditor" ]; helpLink = Help.editRequest }
|> Views.PrayerRequest.edit (EditRequest.fromRequest req) "" ctx
|> renderHtml next ctx
| Error e -> return! e next ctx
}
/// GET /prayer-requests/email/[date]
let email date : HttpHandler =
requireAccess [ User ]
>=> fun next ctx ->
let startTicks = DateTime.Now.Ticks
let s = Views.I18N.localizer.Force ()
let listDate = parseListDate (Some date)
let grp = currentGroup ctx
task {
let list = generateRequestList ctx listDate
let! recipients = ctx.dbContext().AllMembersForSmallGroup grp.smallGroupId
use! client = Email.getConnection ()
do! Email.sendEmails client recipients
grp s.["Prayer Requests for {0} - {1:MMMM d, yyyy}", grp.name, list.date].Value
(list.asHtml s) (list.asText s) s
return!
viewInfo ctx startTicks
|> Views.PrayerRequest.email { list with recipients = recipients }
|> renderHtml next ctx
}
/// POST /prayer-request/[request-id]/delete
let delete reqId : HttpHandler =
requireAccess [ User ]
>=> validateCSRF
>=> fun next ctx ->
task {
let! result = findRequest ctx reqId
match result with
| Ok r ->
let db = ctx.dbContext ()
let s = Views.I18N.localizer.Force ()
db.PrayerRequests.Remove r |> ignore
let! _ = db.SaveChangesAsync ()
addInfo ctx s.["The prayer request was deleted successfully"]
return! redirectTo false "/prayer-requests" next ctx
| Error e -> return! e next ctx
}
/// GET /prayer-request/[request-id]/expire
let expire reqId : HttpHandler =
requireAccess [ User ]
>=> fun next ctx ->
task {
let! result = findRequest ctx reqId
match result with
| Ok r ->
let db = ctx.dbContext ()
let s = Views.I18N.localizer.Force ()
db.UpdateEntry { r with isManuallyExpired = true }
let! _ = db.SaveChangesAsync ()
addInfo ctx s.["Successfully {0} prayer request", s.["Expired"].Value.ToLower ()]
return! redirectTo false "/prayer-requests" next ctx
| Error e -> return! e next ctx
}
/// GET /prayer-requests/[group-id]/list
let list groupId : HttpHandler =
requireAccess [ AccessLevel.Public ]
>=> fun next ctx ->
let startTicks = DateTime.Now.Ticks
let db = ctx.dbContext ()
task {
let! grp = db.TryGroupById groupId
match grp with
| Some g when g.preferences.isPublic ->
let clock = ctx.GetService<IClock> ()
let reqs = db.AllRequestsForSmallGroup g clock None true
return!
viewInfo ctx startTicks
|> Views.PrayerRequest.list
{ requests = List.ofSeq reqs
date = g.localDateNow clock
listGroup = g
showHeader = true
canEmail = (tryCurrentUser >> Option.isSome) ctx
recipients = []
}
|> renderHtml next ctx
| Some _ ->
let s = Views.I18N.localizer.Force ()
addError ctx s.["The request list for the group you tried to view is not public."]
return! redirectTo false "/unauthorized" next ctx
| None -> return! fourOhFour next ctx
}
/// GET /prayer-requests/lists
let lists : HttpHandler =
requireAccess [ AccessLevel.Public ]
>=> fun next ctx ->
let startTicks = DateTime.Now.Ticks
task {
let! grps = ctx.dbContext().PublicAndProtectedGroups ()
return!
viewInfo ctx startTicks
|> Views.PrayerRequest.lists grps
|> renderHtml next ctx
}
/// GET /prayer-requests[/inactive?]
let maintain onlyActive : HttpHandler =
requireAccess [ User ]
>=> fun next ctx ->
let startTicks = DateTime.Now.Ticks
let db = ctx.dbContext ()
let grp = currentGroup ctx
task {
let reqs = db.AllRequestsForSmallGroup grp (ctx.GetService<IClock> ()) None onlyActive
return!
{ viewInfo ctx startTicks with helpLink = Help.maintainRequests }
|> Views.PrayerRequest.maintain reqs grp onlyActive ctx
|> renderHtml next ctx
}
/// GET /prayer-request/print/[date]
let print date : HttpHandler =
requireAccess [ User; Group ]
>=> fun next ctx ->
let listDate = parseListDate (Some date)
task {
let list = generateRequestList ctx listDate
return!
Views.PrayerRequest.print list appVersion
|> renderHtml next ctx
}
/// GET /prayer-request/[request-id]/restore
let restore reqId : HttpHandler =
requireAccess [ User ]
>=> fun next ctx ->
task {
let! result = findRequest ctx reqId
match result with
| Ok r ->
let db = ctx.dbContext ()
let s = Views.I18N.localizer.Force ()
db.UpdateEntry { r with isManuallyExpired = false; updatedDate = DateTime.Now }
let! _ = db.SaveChangesAsync ()
addInfo ctx s.["Successfully {0} prayer request", s.["Restored"].Value.ToLower ()]
return! redirectTo false "/prayer-requests" next ctx
| Error e -> return! e next ctx
}
/// POST /prayer-request/save
let save : HttpHandler =
requireAccess [ User ]
>=> validateCSRF
>=> fun next ctx ->
task {
let! result = ctx.TryBindFormAsync<EditRequest> ()
match result with
| Ok m ->
let db = ctx.dbContext ()
let! req =
match m.isNew () with
| true -> Task.FromResult (Some { PrayerRequest.empty with prayerRequestId = Guid.NewGuid () })
| false -> db.TryRequestById m.requestId
match req with
| Some pr ->
let upd8 =
{ pr with
requestType = m.requestType
requestor = m.requestor
text = ckEditorToText m.text
doNotExpire = m.expiration = "Y"
isManuallyExpired = m.expiration = "X"
}
let grp = currentGroup ctx
let now = grp.localDateNow (ctx.GetService<IClock> ())
match m.isNew () with
| true ->
let dt = match m.enteredDate with Some x -> x | None -> now
{ upd8 with
smallGroupId = grp.smallGroupId
userId = (currentUser ctx).userId
enteredDate = dt
updatedDate = dt
}
| false when Option.isSome m.skipDateUpdate && Option.get m.skipDateUpdate -> upd8
| false -> { upd8 with updatedDate = now }
|> (match m.isNew () with true -> db.AddEntry | false -> db.UpdateEntry)
let! _ = db.SaveChangesAsync ()
let s = Views.I18N.localizer.Force ()
let act = match m.isNew () with true -> "Added" | false -> "Updated"
addInfo ctx s.["Successfully {0} prayer request", s.[act].Value.ToLower ()]
return! redirectTo false "/prayer-requests" next ctx
| None -> return! fourOhFour next ctx
| Error e -> return! bindError e next ctx
}
/// GET /prayer-request/view/[date?]
let view date : HttpHandler =
requireAccess [ User; Group ]
>=> fun next ctx ->
let startTicks = DateTime.Now.Ticks
let listDate = parseListDate date
task {
let list = generateRequestList ctx listDate
return!
viewInfo ctx startTicks
|> Views.PrayerRequest.view { list with showHeader = false }
|> renderHtml next ctx
}

View File

@ -0,0 +1,47 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<AssemblyVersion>7.1.0.0</AssemblyVersion>
<FileVersion>7.0.0.0</FileVersion>
<Authors></Authors>
<Company>Bit Badger Solutions</Company>
</PropertyGroup>
<ItemGroup>
<Content Remove="appsettings.json" />
</ItemGroup>
<ItemGroup>
<None Include="appsettings.json" />
<Compile Include="Extensions.fs" />
<Compile Include="Cookies.fs" />
<Compile Include="Email.fs" />
<Compile Include="CommonFunctions.fs" />
<Compile Include="Church.fs" />
<Compile Include="Help.fs" />
<Compile Include="Home.fs" />
<Compile Include="PrayerRequest.fs" />
<Compile Include="SmallGroup.fs" />
<Compile Include="User.fs" />
<Compile Include="App.fs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Giraffe" Version="3.1.0" />
<PackageReference Include="Giraffe.TokenRouter" Version="1.0.0" />
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.5" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.5" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="2.1.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PrayerTracker.Data\PrayerTracker.Data.fsproj" />
<ProjectReference Include="..\PrayerTracker.UI\PrayerTracker.UI.fsproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="FSharp.Core" Version="4.5.2" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,409 @@
module PrayerTracker.Handlers.SmallGroup
open FSharp.Control.Tasks.V2.ContextInsensitive
open Giraffe
open Giraffe.GiraffeViewEngine
open Microsoft.AspNetCore.Http
open NodaTime
open PrayerTracker
open PrayerTracker.Cookies
open PrayerTracker.Entities
open PrayerTracker.ViewModels
open System
open System.Threading.Tasks
/// Set a small group "Remember Me" cookie
let private setGroupCookie (ctx : HttpContext) pwHash =
ctx.Response.Cookies.Append
(Key.Cookie.group, { GroupId = (currentGroup ctx).smallGroupId; PasswordHash = pwHash }.toPayload(), autoRefresh)
/// GET /small-group/announcement
let announcement : HttpHandler =
requireAccess [ User ]
>=> fun next ctx ->
let startTicks = DateTime.Now.Ticks
{ viewInfo ctx startTicks with helpLink = Help.sendAnnouncement; script = [ "ckeditor/ckeditor" ] }
|> Views.SmallGroup.announcement (currentUser ctx).isAdmin ctx
|> renderHtml next ctx
/// POST /small-group/[group-id]/delete
let delete groupId : HttpHandler =
requireAccess [ Admin ]
>=> validateCSRF
>=> fun next ctx ->
let db = ctx.dbContext ()
let s = Views.I18N.localizer.Force ()
task {
let! grp = db.TryGroupById groupId
match grp with
| Some g ->
let! reqs = db.CountRequestsBySmallGroup groupId
let! usrs = db.CountUsersBySmallGroup groupId
db.RemoveEntry g
let! _ = db.SaveChangesAsync ()
addInfo ctx
s.["The group {0} and its {1} prayer request(s) were deleted successfully; revoked access from {2} user(s)",
g.name, reqs, usrs]
return! redirectTo false "/small-groups" next ctx
| None -> return! fourOhFour next ctx
}
/// POST /small-group/member/[member-id]/delete
let deleteMember memberId : HttpHandler =
requireAccess [ User ]
>=> validateCSRF
>=> fun next ctx ->
let db = ctx.dbContext ()
let s = Views.I18N.localizer.Force ()
task {
let! mbr = db.TryMemberById memberId
match mbr with
| Some m when m.smallGroupId = (currentGroup ctx).smallGroupId ->
db.RemoveEntry m
let! _ = db.SaveChangesAsync ()
addHtmlInfo ctx s.["The group member &ldquo;{0}&rdquo; was deleted successfully", m.memberName]
return! redirectTo false "/small-group/members" next ctx
| Some _
| None -> return! fourOhFour next ctx
}
/// GET /small-group/[group-id]/edit
let edit (groupId : SmallGroupId) : HttpHandler =
requireAccess [ Admin ]
>=> fun next ctx ->
let startTicks = DateTime.Now.Ticks
let db = ctx.dbContext ()
task {
let! churches = db.AllChurches ()
match groupId = Guid.Empty with
| true ->
return!
viewInfo ctx startTicks
|> Views.SmallGroup.edit EditSmallGroup.empty churches ctx
|> renderHtml next ctx
| false ->
let! grp = db.TryGroupById groupId
match grp with
| Some g ->
return!
viewInfo ctx startTicks
|> Views.SmallGroup.edit (EditSmallGroup.fromGroup g) churches ctx
|> renderHtml next ctx
| None -> return! fourOhFour next ctx
}
/// GET /small-group/member/[member-id]/edit
let editMember (memberId : MemberId) : HttpHandler =
requireAccess [ User ]
>=> fun next ctx ->
let startTicks = DateTime.Now.Ticks
let db = ctx.dbContext ()
let s = Views.I18N.localizer.Force ()
let grp = currentGroup ctx
let typs = ReferenceList.emailTypeList grp.preferences.defaultEmailType s
task {
match memberId = Guid.Empty with
| true ->
return!
viewInfo ctx startTicks
|> Views.SmallGroup.editMember EditMember.empty typs ctx
|> renderHtml next ctx
| false ->
let! mbr = db.TryMemberById memberId
match mbr with
| Some m when m.smallGroupId = grp.smallGroupId ->
return!
viewInfo ctx startTicks
|> Views.SmallGroup.editMember (EditMember.fromMember m) typs ctx
|> renderHtml next ctx
| Some _
| None -> return! fourOhFour next ctx
}
/// GET /small-group/log-on/[group-id?]
let logOn (groupId : SmallGroupId option) : HttpHandler =
requireAccess [ AccessLevel.Public ]
>=> fun next ctx ->
let startTicks = DateTime.Now.Ticks
task {
let! grps = ctx.dbContext().ProtectedGroups ()
let grpId = match groupId with Some gid -> gid.ToString "N" | None -> ""
return!
{ viewInfo ctx startTicks with helpLink = Help.logOn }
|> Views.SmallGroup.logOn grps grpId ctx
|> renderHtml next ctx
}
/// POST /small-group/log-on/submit
let logOnSubmit : HttpHandler =
requireAccess [ AccessLevel.Public ]
>=> validateCSRF
>=> fun next ctx ->
task {
let! result = ctx.TryBindFormAsync<GroupLogOn> ()
match result with
| Ok m ->
let s = Views.I18N.localizer.Force ()
let! grp = ctx.dbContext().TryGroupLogOnByPassword m.smallGroupId m.password
match grp with
| Some _ ->
ctx.Session.SetSmallGroup grp
match m.rememberMe with
| Some x when x -> (setGroupCookie ctx << Utils.sha1Hash) m.password
| _ -> ()
addInfo ctx s.["Log On Successful Welcome to {0}", s.["PrayerTracker"]]
return! redirectTo false "/prayer-requests/view" next ctx
| None ->
addError ctx s.["Password incorrect - login unsuccessful"]
return! redirectTo false (sprintf "/small-group/log-on/%s" (m.smallGroupId.ToString "N")) next ctx
| Error e -> return! bindError e next ctx
}
/// GET /small-groups
let maintain : HttpHandler =
requireAccess [ Admin ]
>=> fun next ctx ->
let startTicks = DateTime.Now.Ticks
task {
let! grps = ctx.dbContext().AllGroups ()
return!
viewInfo ctx startTicks
|> Views.SmallGroup.maintain grps ctx
|> renderHtml next ctx
}
/// GET /small-group/members
let members : HttpHandler =
requireAccess [ User ]
>=> fun next ctx ->
let startTicks = DateTime.Now.Ticks
let db = ctx.dbContext ()
let grp = currentGroup ctx
let s = Views.I18N.localizer.Force ()
task {
let! mbrs = db.AllMembersForSmallGroup grp.smallGroupId
let typs = ReferenceList.emailTypeList grp.preferences.defaultEmailType s |> Map.ofSeq
return!
{ viewInfo ctx startTicks with helpLink = Help.maintainGroupMembers }
|> Views.SmallGroup.members mbrs typs ctx
|> renderHtml next ctx
}
/// GET /small-group
let overview : HttpHandler =
requireAccess [ User ]
>=> fun next ctx ->
let startTicks = DateTime.Now.Ticks
let db = ctx.dbContext ()
let clock = ctx.GetService<IClock> ()
task {
let reqs = db.AllRequestsForSmallGroup (currentGroup ctx) clock None true |> List.ofSeq
let! reqCount = db.CountRequestsBySmallGroup (currentGroup ctx).smallGroupId
let! mbrCount = db.CountMembersForSmallGroup (currentGroup ctx).smallGroupId
let m =
{ totalActiveReqs = List.length reqs
allReqs = reqCount
totalMbrs = mbrCount
activeReqsByCat =
(reqs
|> Seq.ofList
|> Seq.map (fun req -> req.requestType)
|> Seq.distinct
|> Seq.map (fun reqType -> reqType, reqs |> List.filter (fun r -> r.requestType = reqType) |> List.length)
|> Map.ofSeq)
}
return!
viewInfo ctx startTicks
|> Views.SmallGroup.overview m
|> renderHtml next ctx
}
/// GET /small-group/preferences
let preferences : HttpHandler =
requireAccess [ User ]
>=> fun next ctx ->
let startTicks = DateTime.Now.Ticks
task {
let! tzs = ctx.dbContext().AllTimeZones ()
return!
{ viewInfo ctx startTicks with helpLink = Help.groupPreferences }
|> Views.SmallGroup.preferences (EditPreferences.fromPreferences (currentGroup ctx).preferences) tzs ctx
|> renderHtml next ctx
}
/// POST /small-group/save
let save : HttpHandler =
requireAccess [ Admin ]
>=> validateCSRF
>=> fun next ctx ->
let s = Views.I18N.localizer.Force ()
task {
let! result = ctx.TryBindFormAsync<EditSmallGroup> ()
match result with
| Ok m ->
let db = ctx.dbContext ()
let! grp =
match m.isNew () with
| true -> Task.FromResult<SmallGroup option>(Some { SmallGroup.empty with smallGroupId = Guid.NewGuid () })
| false -> db.TryGroupById m.smallGroupId
match grp with
| Some g ->
m.populateGroup g
|> function
| g when m.isNew () ->
db.AddEntry g
db.AddEntry { g.preferences with smallGroupId = g.smallGroupId }
| g -> db.UpdateEntry g
let! _ = db.SaveChangesAsync ()
let act = s.[match m.isNew () with true -> "Added" | false -> "Updated"].Value.ToLower ()
addHtmlInfo ctx s.["Successfully {0} group “{1}”", act, m.name]
return! redirectTo false "/small-groups" next ctx
| None -> return! fourOhFour next ctx
| Error e -> return! bindError e next ctx
}
/// POST /small-group/member/save
let saveMember : HttpHandler =
requireAccess [ User ]
>=> validateCSRF
>=> fun next ctx ->
task {
let! result = ctx.TryBindFormAsync<EditMember> ()
match result with
| Ok m ->
let grp = currentGroup ctx
let db = ctx.dbContext ()
let! mMbr =
match m.isNew () with
| true ->
Task.FromResult<Member option>
(Some
{ Member.empty with
memberId = Guid.NewGuid ()
smallGroupId = grp.smallGroupId
})
| false -> db.TryMemberById m.memberId
match mMbr with
| Some mbr when mbr.smallGroupId = grp.smallGroupId ->
{ mbr with
memberName = m.memberName
email = m.emailAddress
format = match m.emailType with "" | null -> None | _ -> Some m.emailType
}
|> (match m.isNew () with true -> db.AddEntry | false -> db.UpdateEntry)
let! _ = db.SaveChangesAsync ()
let s = Views.I18N.localizer.Force ()
let act = s.[match m.isNew () with true -> "Added" | false -> "Updated"].Value.ToLower ()
addInfo ctx s.["Successfully {0} group member", act]
return! redirectTo false "/small-group/members" next ctx
| Some _
| None -> return! fourOhFour next ctx
| Error e -> return! bindError e next ctx
}
/// POST /small-group/preferences/save
let savePreferences : HttpHandler =
requireAccess [ User ]
>=> validateCSRF
>=> fun next ctx ->
task {
let! result = ctx.TryBindFormAsync<EditPreferences> ()
match result with
| Ok m ->
let db = ctx.dbContext ()
// Since the class is stored in the session, we'll use an intermediate instance to persist it; once that
// works, we can repopulate the session instance. That way, if the update fails, the page should still show
// the database values, not the then out-of-sync session ones.
let! grp = db.TryGroupById (currentGroup ctx).smallGroupId
match grp with
| Some g ->
let prefs = m.populatePreferences g.preferences
db.UpdateEntry prefs
let! _ = db.SaveChangesAsync ()
// Refresh session instance
ctx.Session.SetSmallGroup <| Some { g with preferences = prefs }
let s = Views.I18N.localizer.Force ()
addInfo ctx s.["Group preferences updated successfully"]
return! redirectTo false "/small-group/preferences" next ctx
| None -> return! fourOhFour next ctx
| Error e -> return! bindError e next ctx
}
/// POST /small-group/announcement/send
let sendAnnouncement : HttpHandler =
requireAccess [ User ]
>=> validateCSRF
>=> fun next ctx ->
let startTicks = DateTime.Now.Ticks
task {
let! result = ctx.TryBindFormAsync<Announcement> ()
match result with
| Ok m ->
let grp = currentGroup ctx
let usr = currentUser ctx
let db = ctx.dbContext ()
let now = grp.localTimeNow (ctx.GetService<IClock> ())
let s = Views.I18N.localizer.Force ()
// Reformat the text to use the class's font stylings
let requestText = ckEditorToText m.text
let htmlText =
p [ _style (sprintf "font-family:%s;font-size:%dpt;" grp.preferences.listFonts grp.preferences.textFontSize) ]
[ rawText requestText ]
|> renderHtmlNode
let plainText = (htmlToPlainText >> wordWrap 74) htmlText
// Send the e-mails
let! recipients =
match m.sendToClass with
| "N" when usr.isAdmin -> db.AllUsersAsMembers ()
| _ -> db.AllMembersForSmallGroup grp.smallGroupId
use! client = Email.getConnection ()
do! Email.sendEmails client recipients grp
s.["Announcement for {0} - {1:MMMM d, yyyy} {2}",
grp.name, now.Date, (now.ToString "h:mm tt").ToLower ()].Value
htmlText plainText s
// Add to the request list if desired
match m.sendToClass, m.addToRequestList with
| "N", _
| _, None -> ()
| _, Some x when not x -> ()
| _, _ ->
{ PrayerRequest.empty with
prayerRequestId = Guid.NewGuid ()
smallGroupId = grp.smallGroupId
userId = usr.userId
requestType = Option.get m.requestType
text = requestText
enteredDate = now
updatedDate = now
}
|> db.AddEntry
let! _ = db.SaveChangesAsync ()
()
// Tell 'em what they've won, Johnny!
let toWhom =
match m.sendToClass with
| "N" -> s.["{0} users", s.["PrayerTracker"]].Value
| _ -> s.["Group Members"].Value.ToLower ()
let andAdded = match m.addToRequestList with Some x when x -> "and added it to the request list" | _ -> ""
addInfo ctx s.["Successfully sent announcement to all {0} {1}", toWhom, s.[andAdded]]
return!
viewInfo ctx startTicks
|> Views.SmallGroup.announcementSent { m with text = htmlText }
|> renderHtml next ctx
| Error e -> return! bindError e next ctx
}

344
src/PrayerTracker/User.fs Normal file
View File

@ -0,0 +1,344 @@
module PrayerTracker.Handlers.User
open FSharp.Control.Tasks.V2.ContextInsensitive
open Giraffe
open Microsoft.AspNetCore.Html
open Microsoft.AspNetCore.Http
open PrayerTracker
open PrayerTracker.Cookies
open PrayerTracker.Entities
open PrayerTracker.ViewModels
open System
open System.Collections.Generic
open System.Net
open System.Threading.Tasks
/// Set the user's "remember me" cookie
let private setUserCookie (ctx : HttpContext) pwHash =
ctx.Response.Cookies.Append (
Key.Cookie.user,
{ Id = (currentUser ctx).userId; GroupId = (currentGroup ctx).smallGroupId; PasswordHash = pwHash }.toPayload(),
autoRefresh)
/// Retrieve a user from the database by password
// If the hashes do not match, determine if it matches a previous scheme, and upgrade them if it does
let private findUserByPassword m (db : AppDbContext) =
task {
match! db.TryUserByEmailAndGroup m.emailAddress m.smallGroupId with
| Some u ->
match u.salt with
| Some salt ->
// Already upgraded; match = success
let pwHash = pbkdf2Hash salt m.password
match u.passwordHash = pwHash with
| true -> return Some { u with passwordHash = ""; salt = None; smallGroups = List<UserSmallGroup>() }, pwHash
| _ -> return None, ""
| _ ->
// Not upgraded; check against old hash
match u.passwordHash = sha1Hash m.password with
| true ->
// Upgrade 'em!
let salt = Guid.NewGuid ()
let pwHash = pbkdf2Hash salt m.password
let upgraded = { u with salt = Some salt; passwordHash = pwHash }
db.UpdateEntry upgraded
let! _ = db.SaveChangesAsync ()
return Some { u with passwordHash = ""; salt = None; smallGroups = List<UserSmallGroup>() }, pwHash
| _ -> return None, ""
| _ -> return None, ""
}
/// POST /user/password/change
let changePassword : HttpHandler =
requireAccess [ User ]
>=> validateCSRF
>=> fun next ctx ->
task {
let! result = ctx.TryBindFormAsync<ChangePassword> ()
match result with
| Ok m ->
let s = Views.I18N.localizer.Force ()
let db = ctx.dbContext ()
let curUsr = currentUser ctx
let! dbUsr = db.TryUserById curUsr.userId
let! user =
match dbUsr with
| Some usr ->
// Check the old password against a possibly non-salted hash
(match usr.salt with | Some salt -> pbkdf2Hash salt | _ -> sha1Hash) m.oldPassword
|> db.TryUserLogOnByCookie curUsr.userId (currentGroup ctx).smallGroupId
| _ -> Task.FromResult None
match user with
| Some _ when m.newPassword = m.newPasswordConfirm ->
match dbUsr with
| Some usr ->
// Generate salt if it has not been already
let salt = match usr.salt with Some s -> s | _ -> Guid.NewGuid ()
db.UpdateEntry { usr with passwordHash = pbkdf2Hash salt m.newPassword; salt = Some salt }
let! _ = db.SaveChangesAsync ()
// If the user is remembered, update the cookie with the new hash
match ctx.Request.Cookies.Keys.Contains Key.Cookie.user with
| true -> setUserCookie ctx usr.passwordHash
| _ -> ()
addInfo ctx s.["Your password was changed successfully"]
| None -> addError ctx s.["Unable to change password"]
return! redirectTo false "/" next ctx
| Some _ ->
addError ctx s.["The new passwords did not match - your password was NOT changed"]
return! redirectTo false "/user/password" next ctx
| None ->
addError ctx s.["The old password was incorrect - your password was NOT changed"]
return! redirectTo false "/user/password" next ctx
| Error e -> return! bindError e next ctx
}
/// POST /user/[user-id]/delete
let delete userId : HttpHandler =
requireAccess [ Admin ]
>=> validateCSRF
>=> fun next ctx ->
task {
let db = ctx.dbContext ()
let! user = db.TryUserById userId
match user with
| Some u ->
db.RemoveEntry u
let! _ = db.SaveChangesAsync ()
let s = Views.I18N.localizer.Force ()
addInfo ctx s.["Successfully deleted user {0}", u.fullName]
return! redirectTo false "/users" next ctx
| _ -> return! fourOhFour next ctx
}
/// POST /user/log-on
let doLogOn : HttpHandler =
requireAccess [ AccessLevel.Public ]
>=> validateCSRF
>=> fun next ctx ->
task {
let! result = ctx.TryBindFormAsync<UserLogOn> ()
match result with
| Ok m ->
let db = ctx.dbContext ()
let s = Views.I18N.localizer.Force ()
let! usr, pwHash = findUserByPassword m db
let! grp = db.TryGroupById m.smallGroupId
let nextUrl =
match usr with
| Some _ ->
ctx.Session.SetUser usr
ctx.Session.SetSmallGroup grp
match m.rememberMe with Some x when x -> setUserCookie ctx pwHash | _ -> ()
addHtmlInfo ctx s.["Log On Successful Welcome to {0}", s.["PrayerTracker"]]
match m.redirectUrl with
| None -> "/small-group"
| Some x when x = "" -> "/small-group"
| Some x -> x
| _ ->
let grpName = match grp with Some g -> g.name | _ -> "N/A"
{ UserMessage.Error with
text = htmlLocString s.["Invalid credentials - log on unsuccessful"]
description =
[ s.["This is likely due to one of the following reasons"].Value
":<ul><li>"
s.["The e-mail address “{0}” is invalid.", WebUtility.HtmlEncode m.emailAddress].Value
"</li><li>"
s.["The password entered does not match the password for the given e-mail address."].Value
"</li><li>"
s.["You are not authorized to administer the group “{0}”.", WebUtility.HtmlEncode grpName].Value
"</li></ul>"
]
|> String.concat ""
|> (HtmlString >> Some)
}
|> addUserMessage ctx
"/user/log-on"
return! redirectTo false nextUrl next ctx
| Error e -> return! bindError e next ctx
}
/// GET /user/[user-id]/edit
let edit (userId : UserId) : HttpHandler =
requireAccess [ Admin ]
>=> fun next ctx ->
let startTicks = DateTime.Now.Ticks
task {
match userId = Guid.Empty with
| true ->
return!
viewInfo ctx startTicks
|> Views.User.edit EditUser.empty ctx
|> renderHtml next ctx
| false ->
let! user = ctx.dbContext().TryUserById userId
match user with
| Some u ->
return!
viewInfo ctx startTicks
|> Views.User.edit (EditUser.fromUser u) ctx
|> renderHtml next ctx
| _ -> return! fourOhFour next ctx
}
/// GET /user/log-on
let logOn : HttpHandler =
requireAccess [ AccessLevel.Public ]
>=> fun next ctx ->
let startTicks = DateTime.Now.Ticks
let s = Views.I18N.localizer.Force ()
task {
let! groups = ctx.dbContext().GroupList ()
let url = Option.ofObj <| ctx.Session.GetString Key.Session.redirectUrl
match url with
| Some _ ->
ctx.Session.Remove Key.Session.redirectUrl
addWarning ctx s.["The page you requested requires authentication; please log on below."]
| None -> ()
return!
{ viewInfo ctx startTicks with helpLink = Help.logOn }
|> Views.User.logOn { UserLogOn.empty with redirectUrl = url } groups ctx
|> renderHtml next ctx
}
/// GET /users
let maintain : HttpHandler =
requireAccess [ Admin ]
>=> fun next ctx ->
let startTicks = DateTime.Now.Ticks
task {
let! users = ctx.dbContext().AllUsers ()
return!
viewInfo ctx startTicks
|> Views.User.maintain users ctx
|> renderHtml next ctx
}
/// GET /user/password
let password : HttpHandler =
requireAccess [ User ]
>=> fun next ctx ->
{ viewInfo ctx DateTime.Now.Ticks with helpLink = Help.changePassword }
|> Views.User.changePassword ctx
|> renderHtml next ctx
/// POST /user/save
let save : HttpHandler =
requireAccess [ Admin ]
>=> validateCSRF
>=> fun next ctx ->
task {
let! result = ctx.TryBindFormAsync<EditUser> ()
match result with
| Ok m ->
let db = ctx.dbContext ()
let! user =
match m.isNew () with
| true -> Task.FromResult (Some { User.empty with userId = Guid.NewGuid () })
| false -> db.TryUserById m.userId
let saltedUser =
match user with
| Some u ->
match u.salt with
| None when m.password <> "" ->
// Generate salt so that a new password hash can be generated
Some { u with salt = Some (Guid.NewGuid ()) }
| _ ->
// Leave the user with no salt, so prior hash can be validated/upgraded
user
| _ -> user
match saltedUser with
| Some u ->
m.populateUser u (pbkdf2Hash (Option.get u.salt))
|> (match m.isNew () with true -> db.AddEntry | false -> db.UpdateEntry)
let! _ = db.SaveChangesAsync ()
let s = Views.I18N.localizer.Force ()
match m.isNew () with
| true ->
let h = CommonFunctions.htmlString
{ UserMessage.Info with
text = h s.["Successfully {0} user", s.["Added"].Value.ToLower ()]
description =
h s.[ "Please select at least one group for which this user ({0}) is authorized", u.fullName]
|> Some
}
|> addUserMessage ctx
return! redirectTo false (sprintf "/user/%s/small-groups" (u.userId.ToString "N")) next ctx
| false ->
addInfo ctx s.["Successfully {0} user", s.["Updated"].Value.ToLower ()]
return! redirectTo false "/users" next ctx
| None -> return! fourOhFour next ctx
| Error e -> return! bindError e next ctx
}
/// POST /user/small-groups/save
let saveGroups : HttpHandler =
requireAccess [ Admin ]
>=> validateCSRF
>=> fun next ctx ->
task {
let! result = ctx.TryBindFormAsync<AssignGroups> ()
match result with
| Ok m ->
let s = Views.I18N.localizer.Force ()
match Seq.length m.smallGroups with
| 0 ->
addError ctx s.["You must select at least one group to assign"]
return! redirectTo false (sprintf "/user/%s/small-groups" (m.userId.ToString "N")) next ctx
| _ ->
let db = ctx.dbContext ()
let! user = db.TryUserByIdWithGroups m.userId
match user with
| Some u ->
let grps =
m.smallGroups.Split ','
|> Array.map Guid.Parse
|> List.ofArray
u.smallGroups
|> Seq.filter (fun x -> not (grps |> List.exists (fun y -> y = x.smallGroupId)))
|> db.UserGroupXref.RemoveRange
grps
|> Seq.ofList
|> Seq.filter (fun x -> not (u.smallGroups |> Seq.exists (fun y -> y.smallGroupId = x)))
|> Seq.map (fun x -> { UserSmallGroup.empty with userId = u.userId; smallGroupId = x })
|> List.ofSeq
|> List.iter db.AddEntry
let! _ = db.SaveChangesAsync ()
addInfo ctx s.["Successfully updated group permissions for {0}", m.userName]
return! redirectTo false "/users" next ctx
| _ -> return! fourOhFour next ctx
| Error e -> return! bindError e next ctx
}
/// GET /user/[user-id]/small-groups
let smallGroups userId : HttpHandler =
requireAccess [ Admin ]
>=> fun next ctx ->
let startTicks = DateTime.Now.Ticks
let db = ctx.dbContext ()
task {
let! user = db.TryUserByIdWithGroups userId
match user with
| Some u ->
let! grps = db.GroupList ()
let curGroups =
seq {
for g in u.smallGroups do
yield g.smallGroupId.ToString "N"
}
|> List.ofSeq
return!
viewInfo ctx startTicks
|> Views.User.assignGroups (AssignGroups.fromUser u) grps curGroups ctx
|> renderHtml next ctx
| None -> return! fourOhFour next ctx
}

View File

@ -0,0 +1,398 @@
/**
* This is the main stylesheet for the PrayerTracker application.
*/
body {
background-color: #222;
margin: 0;
margin-bottom: 25px;
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
font-size: 1rem;
}
acronym {
border-bottom: dotted 1px black;
}
p {
margin: 1em 0;
}
a,
a:link,
a:visited {
text-decoration: none;
color: navy;
}
a:hover {
border-bottom: dotted 1px navy;
}
a > img {
border: 0;
}
.pt-title-bar {
display: flex;
flex-direction: row;
justify-content: space-between;
overflow: hidden;
width: 100%;
background-image: linear-gradient(to bottom, #222, #444);
margin-bottom: 0;
}
.pt-title-bar-left,
.pt-title-bar-right {
flex-grow: 0;
}
.pt-title-bar-center {
flex-grow: 4;
}
.pt-title-bar-home {
float: left;
font-size: 1.25rem;
font-weight: bold;
padding: .5rem 1rem 0 1rem;
}
.pt-title-bar-home a:link,
.pt-title-bar-home a:visited {
color: white;
}
.pt-title-bar-home a:hover {
border-bottom: none;
}
.pt-title-bar ul {
list-style-type: none;
margin: 0;
padding: 0;
display: inline-block;
}
.pt-title-bar li {
float: left;
}
.pt-title-bar li a,
.pt-title-bar .dropbtn,
.pt-title-bar .home-link {
display: inline-block;
color: #9d9d9d;
text-align: center;
padding: .75rem 1rem;
text-decoration: none;
}
.pt-title-bar .home-link {
font-size: 1.1rem;
}
.pt-title-bar li a:hover,
.pt-title-bar .dropdown:hover .dropbtn {
color: white;
border-bottom: none;
}
.pt-title-bar li.dropdown {
display: inline-block;
}
.pt-title-bar .dropdown-content {
display: none;
position: absolute;
background-image: linear-gradient(to bottom, #444, #888);
min-width: 160px;
box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
z-index: 1;
}
.pt-title-bar .dropdown-content a {
color: white;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}
.pt-title-bar .dropdown-content a:hover {
background-color: #222;
}
.pt-title-bar .dropdown:hover .dropdown-content {
display: block;
}
#pt-body {
background-color: #fcfcfc;
padding-bottom: 10px;
}
#pt-language {
background-color: lightgray;
display: flex;
flex-flow: row wrap;
justify-content: space-between;
border-bottom: solid 1px darkgray;
border-top: solid 1px darkgray;
}
#pt-page-title {
text-align: center;
border-bottom: dotted 1px lightgray;
}
.pt-content {
margin: auto;
max-width: 60rem;
}
.pt-content.pt-full-width {
max-width: unset;
margin-left: .5%;
margin-right: .5%;
}
@media screen and (max-width: 60rem) {
.pt-content {
margin-left: .5%;
margin-right: .5%;
}
}
fieldset {
margin: auto;
border: solid 1px #ccc;
border-radius: 1rem;
margin-bottom: 1rem;
}
input[type=email],
input[type=text],
input[type=password],
input[type=date],
input[type=number],
select {
border-radius: 5px;
font-size: 1rem;
padding: .2rem;
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
}
input:nth-of-type(2) {
margin-left: 2rem;
}
button[type=submit] {
border-radius: 10px;
padding: .2rem 1rem;
margin-top: .5rem;
background-color: #444;
border: none;
color: white;
}
button[type=submit]:hover {
background-color: #222;
cursor:pointer;
}
footer {
position: fixed;
bottom: 0;
width: 100%;
border-bottom: solid 10px #222;
}
#pt-legal {
background-color: #222;
margin: 0 0 -30px 0;
padding-left: 10px;
}
#pt-legal a:link,
#pt-legal a:visited {
color: lightgray;
color: rgba(255, 255, 255, .5);
font-size: 10pt;
}
#pt-footer {
border: solid 2px navy;
border-bottom: 0;
border-top-left-radius: 7px;
border-top-right-radius: 7px;
padding: 2px 5px 0 5px;
margin: 0 10px -11px auto;
font-size: 70%;
color: navy;
background-color: #eee;
float:right;
vertical-align: bottom;
}
#pt-footer img {
vertical-align: bottom;
}
footer a:hover {
border-bottom: 0;
}
.pt-center-columns {
display: flex;
flex-flow: column;
align-content: center;
}
.pt-field-row {
display: flex;
flex-flow: row wrap;
align-items: center;
justify-content: center;
}
.pt-field {
display: flex;
flex-flow: column;
padding-bottom: .5rem;
}
.pt-checkbox-field {
display: block;
margin: auto;
padding-bottom: .5rem;
}
.pt-field > label,
.pt-checkbox-field > label {
font-size: .75rem;
text-transform: uppercase;
color: #777;
}
.pt-field ~ .pt-field {
margin-left: 3rem;
}
.pt-center-text {
text-align: center;
}
.pt-right-text {
text-align: right;
}
.pt-table {
margin: auto;
border-collapse: collapse;
}
.pt-table tr:hover {
background-color: #eee;
}
.pt-table tr th,
.pt-table tr td {
padding: .25rem .5rem;
}
.pt-table tr td {
border-bottom: dotted 1px #444;
}
.pt-action-table tr td:first-child {
white-space: nowrap;
border-bottom: 0;
}
.pt-action-table tr td:first-child a {
background-color: lightgray;
color: white;
border-radius: .5rem;
padding: .125rem .5rem .5rem .5rem;
margin: 0 .125rem;
}
.pt-action-table tr:hover td:first-child a {
background-color: navy;
}
.pt-action-table tr td:first-child a:hover {
border-bottom: 0;
}
/* TODO: Figure out nice CSS transitions for these; these don't work */
.pt-fadeable {
height: 0;
overflow: hidden;
transition: all ease-out .5s;
}
.pt-shown {
height: auto;
transition: all ease-in .5s;
}
.pt-icon-link {
white-space: nowrap;
}
article.pt-overview {
display: flex;
flex-flow: row wrap;
justify-content: space-around;
align-items: flex-start;
}
article.pt-overview section {
max-width: 20rem;
border: solid 1px #444;
border-radius: 1rem;
margin: 2rem;
}
article.pt-overview section header {
text-align: center;
border-top-left-radius: 1rem;
border-top-right-radius: 1rem;
background-image: linear-gradient(to bottom, #444, #888);
padding: .5rem 1rem;
color: white;
}
article.pt-overview section div {
padding: .5rem;
}
article.pt-overview section div hr {
color: #444;
margin: .5rem -.5rem;
}
article.pt-overview section div p {
margin: 0;
}
.pt-editor {
width: 100%;
}
.pt-msg {
margin: .5rem auto;
border-top-right-radius: .5rem;
border-bottom-left-radius: .5rem;
border-width: 2px;
border-style: solid;
border-collapse: inherit;
}
.pt-msg ul {
text-align: left;
}
.pt-msg td {
padding: 5px 30px;
margin-bottom: 2px;
text-align: center;
}
.pt-msg.error {
background-color: #ffb6c1;
border-color: #ff0000;
}
.pt-msg.error strong {
color: #ff0000;
}
.pt-msg.warning {
background-color: #fafad2;
border-color: #a0522d;
}
.pt-msg.warning strong {
color: #a0522d;
}
.pt-msg.info {
background-color: #add8e6;
border-color: #000064;
}
.pt-msg .description {
display: inline-block;
vertical-align: top;
margin: auto;
text-align: left;
padding: .25rem 0;
}
.pt-email-heading {
text-decoration: underline;
font-style: italic;
}
.pt-email-canvas {
background-color: white;
width: 95%;
border: dotted 1px navy;
border-radius: 5px;
margin: auto;
}
.pt-request-update {
font-style: italic;
}
.pt-request-expired {
text-decoration: line-through;
}
.material-icons.md-18 {
font-size: 18px;
}
.material-icons.md-24 {
font-size: 24px;
}
.material-icons.md-36 {
font-size: 36px;
}
.material-icons.md-48 {
font-size: 48px;
}
.material-icons.md-72 {
font-size: 72px;
}
.material-icons {
vertical-align: middle;
}
#pt-help {
background-color: #fcfcfc;
}

View File

@ -0,0 +1,25 @@
/**
* PrayerTracker Help styling
*/
.pt-content {
background-color: white;
padding: 0 .25em;
}
.pt-title-bar-left {
color: white;
font-size: 1.25rem;
font-weight: bold;
margin-left: .5rem;
}
.pt-title-bar-right {
color: white;
color: rgba(255, 255, 255, .75);
font-size: 1.1rem;
font-variant: small-caps;
margin-right: 1rem;
}
h2 {
margin-top: 0;
padding-left: .5rem;
border-bottom: solid 1px #444;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@ -0,0 +1,278 @@
/**
* This file contains a library of common functions used throughout the PrayerTracker website, as well as specific
* functions used on pages throughout the site.
*/
const PT = {
/**
* Open a window with help
* @param {string} url The URL for the help page.
*/
showHelp(url) {
window.open(`/help/${url}`, 'helpWindow', 'height=600px,width=450px,toolbar=0,menubar=0,scrollbars=1')
return false
},
/**
* Confirm, then submit a delete action
* @param {string} action The URL for the action attribute of the delete form.
* @param {string} prompt The localized prompt for confirmation.
*/
confirmDelete(action, prompt) {
if (confirm(prompt)) {
let form = document.querySelector('#DeleteForm')
form.setAttribute('action', action)
form.submit()
}
return false
},
/**
* Make fields required
* @param {string[]|string} fields The field(s) to require
*/
requireFields(fields) {
(Array.isArray(fields) ? fields : [fields])
.forEach(f => document.getElementById(f).required = true)
},
/**
* Queue an action to occur when the DOM content is loaded
* @param {Function} func The function to run once the DOM content is loaded
*/
onLoad(func) {
document.addEventListener('DOMContentLoaded', func)
},
/**
* Validation that compares the values of 2 fields and fails if they do not match
* @param {string} field1 The ID of the first field
* @param {string} field2 The ID of the second fields (receives validate failure)
* @param {string} errorMsg The validation error message to display
* @returns {boolean} True if the fields match, false if not
*/
compareValidation(field1, field2, errorMsg) {
const field1Value = document.getElementById(field1).value
const field2Element = document.getElementById(field2)
if (field1Value === field2Element.value) {
field2Element.setCustomValidity('')
return true
}
field2Element.setCustomValidity(errorMsg)
return false
},
/**
* Show a div (adds CSS class)
* @param {HTMLElement} div The div to be shown
*/
showDiv(div) {
if (div.className.indexOf(' pt-shown') === -1) {
div.className += ' pt-shown'
}
},
/**
* Hide a div (removes CSS class)
* @param {HTMLElement} div The div to be hidden
*/
hideDiv(div) {
div.className = div.className.replace(' pt-shown', '')
},
/**
* Initialize CKEditor; this assumes that CKEditor will be running on a field with the ID of "Text"
*/
initCKEditor() {
ClassicEditor
.create(document.querySelector('#text'))
.catch(console.error)
},
/**
* Scripts for pages served by the Church controller
*/
church: {
/**
* Script for the church create / edit page
*/
edit: {
/**
* If the interface box is checked, show and require the interface URL field (if not, well... don't)
*/
checkInterface() {
const div = document.getElementById('divInterfaceAddress')
const addr = document.getElementById('interfaceAddress')
if (document.getElementById('hasInterface').checked) {
PT.showDiv(div)
addr.required = true
}
else {
PT.hideDiv(div)
addr.required = false
}
},
/**
* Set up the events for the page
*/
onPageLoad() {
PT.church.edit.checkInterface()
document.getElementById('hasInterface')
.addEventListener('click', PT.church.edit.checkInterface)
}
}
},
/**
* Scripts for pages served by the Requests controller
*/
requests: {
/**
* Script for the request view page
*/
view: {
/**
* Prompt the user to remind them that they are about to e-mail their class
* @param {string} confirmationPrompt The text to display to the user
*/
promptBeforeEmail(confirmationPrompt) {
return confirm(confirmationPrompt)
},
},
},
/**
* Scripts for pages served by the SmallGroup controller
*/
smallGroup: {
/**
* Script for the announcement page
*/
announcement: {
/**
* Set up events and focus on the text field
*/
onPageLoad() {
PT.initCKEditor()
const sendNo = document.getElementById('sendN')
const catDiv = document.getElementById('divCategory')
const catSel = document.getElementById('requestType')
const addChk = document.getElementById('addToRequestList')
if (sendNo !== 'undefined') {
const addDiv = document.getElementById('divAddToList')
sendNo.addEventListener('click', () => {
PT.hideDiv(addDiv)
PT.hideDiv(catDiv)
catSel.required = false
addChk.checked = false
})
document.getElementById('sendY').addEventListener('click', () => {
PT.showDiv(addDiv)
})
}
addChk.addEventListener('click', () => {
if (addChk.checked) {
PT.showDiv(catDiv)
catSel.required = true
} else {
PT.hideDiv(catDiv)
catSel.required = false
}
})
}
},
/**
* Script for the small group log on page
*/
logOn: {
/**
* Determine which field should have the focus
*/
onPageLoad() {
const grp = document.getElementById('SmallGroupId')
if (grp.options[grp.selectedIndex].value === '') {
grp.focus()
} else {
document.getElementById('Password').focus()
}
}
},
/**
* Script for the small group preferences page
*/
preferences: {
/**
* Enable/disable the named or custom color inputs based on type.
*
* @param name The name of the color field set.
*/
toggleType(name) {
const isNamed = document.getElementById(`${name}Type_Name`)
const named = document.getElementById(`${name}Color_Select`)
const custom = document.getElementById(`${name}Color_Color`)
if (isNamed.checked) {
custom.disabled = true
named.disabled = false
} else {
named.disabled = true
custom.disabled = false
}
},
/**
* Show or hide the class password based on the visibility.
*/
checkVisibility() {
const divPw = document.getElementById('divClassPassword')
if (document.getElementById('viz_Public').checked
|| document.getElementById('viz_Private').checked) {
// Disable password
PT.hideDiv(divPw)
} else {
PT.showDiv(divPw)
}
},
/**
* Bind the event handlers
*/
onPageLoad() {
['Public', 'Private', 'Password'].map(typ => {
document.getElementById(`viz_${typ}`).addEventListener('click',
PT.smallGroup.preferences.checkVisibility)
})
PT.smallGroup.preferences.checkVisibility()
;['headingLine', 'headingText'].map(name => {
document.getElementById(`${name}Type_Name`).addEventListener('click', () => {
PT.smallGroup.preferences.toggleType(name)
})
document.getElementById(`${name}Type_RGB`).addEventListener('click', () => {
PT.smallGroup.preferences.toggleType(name)
})
PT.smallGroup.preferences.toggleType(name)
})
},
},
},
/**
* Scripts for pages served by the User controller
*/
user: {
/**
* Script for the user create / edit page
*/
edit: {
/**
* Require password/confirmation for new users
*/
onPageLoad(isNew) {
if (isNew) {
PT.requireFields(['password', 'passwordConfirm'])
}
}
}
},
}

View File

@ -0,0 +1,21 @@
Software License Agreement
==========================
**CKEditor 5 classic editor build** https://github.com/ckeditor/ckeditor5-build-classic <br>
Copyright (c) 2003-2018, [CKSource](http://cksource.com) Frederico Knabben. All rights reserved.
Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html).
Sources of Intellectual Property Included in CKEditor
-----------------------------------------------------
Where not otherwise indicated, all CKEditor content is authored by CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, CKEditor will incorporate work done by developers outside of CKSource with their express permission.
The following libraries are included in CKEditor under the [MIT license](https://opensource.org/licenses/MIT):
* Lo-Dash - Copyright (c) JS Foundation and other contributors https://js.foundation/. Based on Underscore.js, copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors http://underscorejs.org/.
Trademarks
----------
**CKEditor** is a trademark of [CKSource](http://cksource.com) Frederico Knabben. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.

View File

@ -0,0 +1,9 @@
CKEditor 5 classic editor build v10.1.0
=======================================
In order to start using CKEditor 5 Builds, configure or customize them, please visit http://docs.ckeditor.com/ckeditor5/latest/builds/index.html
## License
Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html).
For full details about the license, please check the LICENSE.md file.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
(function(d){d['ar']=Object.assign(d['ar']||{},{a:"لا يمكن رفع الملف:",b:"Block quote",c:"Italic",d:"Bold",e:"Choose heading",f:"Heading",g:"image widget",h:"Enter image caption",i:"Full size image",j:"Side image",k:"Left aligned image",l:"Centered image",m:"Right aligned image",n:"Insert image",o:"Upload failed",p:"رابط",q:"قائمة مرقمة",r:"Bulleted List",s:"Paragraph",t:"Heading 1",u:"Heading 2",v:"Heading 3",w:"Change image text alternative",x:"Unlink",y:"تحرير الرابط",z:"فتح الرابط في تبويب جديد",aa:"This link has no URL",ab:"حفظ",ac:"إلغاء",ad:"Link URL",ae:"Upload in progress",af:"Rich Text Editor, %0",ag:"Rich Text Editor",ah:"Text alternative",ai:"تراجع",aj:"Redo"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

View File

@ -0,0 +1 @@
(function(d){d['ast']=Object.assign(d['ast']||{},{a:"Cannot upload file:",b:"Block quote",c:"Cursiva",d:"Negrina",e:"Choose heading",f:"Heading",g:"complementu d'imaxen",h:"Enter image caption",i:"Imaxen a tamañu completu",j:"Imaxen llateral",k:"Left aligned image",l:"Centered image",m:"Right aligned image",n:"Insert image",o:"Upload failed",p:"Enllazar",q:"Llista numberada",r:"Llista con viñetes",s:"Paragraph",t:"Heading 1",u:"Heading 2",v:"Heading 3",w:"Change image text alternative",x:"Desenllazar",y:"Edit link",z:"Open link in new tab",aa:"This link has no URL",ab:"Guardar",ac:"Encaboxar",ad:"URL del enllaz",ae:"Upload in progress",af:"Editor de testu arriquecíu, %0",ag:"Editor de testu arriquecíu",ah:"Text alternative",ai:"Desfacer",aj:"Refacer"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

View File

@ -0,0 +1 @@
(function(d){d['bg']=Object.assign(d['bg']||{},{a:"Cannot upload file:",b:"Цитат",c:"Курсив",d:"Удебелен",e:"Choose heading",f:"Heading",g:"image widget",h:"Enter image caption",i:"Full size image",j:"Side image",k:"Left aligned image",l:"Centered image",m:"Right aligned image",n:"Insert image",o:"Upload failed",p:"Link",q:"Numbered List",r:"Bulleted List",s:"Параграф",t:"Heading 1",u:"Heading 2",v:"Heading 3",w:"Change image text alternative",x:"Unlink",y:"Edit link",z:"Open link in new tab",aa:"This link has no URL",ab:"Запазване",ac:"Отказ",ad:"Link URL",ae:"Upload in progress",af:"Rich Text Editor, %0",ag:"Rich Text Editor",ah:"Text alternative",ai:"Undo",aj:"Redo"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

View File

@ -0,0 +1 @@
(function(d){d['ca']=Object.assign(d['ca']||{},{a:"No es pot pujar l'arxiu:",b:"Cita de bloc",c:"Cursiva",d:"Negreta",e:"Escull capçalera",f:"Capçalera",g:"image widget",h:"Enter image caption",i:"Full size image",j:"Side image",k:"Left aligned image",l:"Centered image",m:"Right aligned image",n:"Insert image",o:"Upload failed",p:"Link",q:"Numbered List",r:"Bulleted List",s:"Pàrraf",t:"Capçalera 1",u:"Capçalera 2",v:"Capçalera 3",w:"Change image text alternative",x:"Unlink",y:"Edit link",z:"Open link in new tab",aa:"This link has no URL",ab:"Desar",ac:"Cancel·lar",ad:"Link URL",ae:"Upload in progress",af:"Rich Text Editor, %0",ag:"Rich Text Editor",ah:"Text alternative",ai:"Undo",aj:"Redo"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

View File

@ -0,0 +1 @@
(function(d){d['cs']=Object.assign(d['cs']||{},{a:"Soubor nelze nahrát:",b:"Citace",c:"Kurzíva",d:"Tučné",e:"Zvolte nadpis",f:"Nadpis",g:"ovládací prvek obrázku",h:"Zadejte popis obrázku",i:"Obrázek v plné velikosti",j:"Postranní obrázek",k:"Obrázek zarovnaný vlevo",l:"Obrázek zarovnaný na střed",m:"Obrázek zarovnaný vpravo",n:"Vložit obrázek",o:"Nahrání selhalo",p:"Odkaz",q:"Číslování",r:"Odrážky",s:"Odstavec",t:"Nadpis 1",u:"Nadpis 2",v:"Nadpis 3",w:"Změnit alternativní text obrázku",x:"Odstranit odkaz",y:"Upravit odkaz",z:"Otevřít odkaz v nové kartě",aa:"Tento odkaz nemá žádnou URL",ab:"Uložit",ac:"Zrušit",ad:"URL odkazu",ae:"Probíhá nahrávání",af:"Textový editor, %0",ag:"Textový editor",ah:"Alternativní text",ai:"Zpět",aj:"Znovu"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

View File

@ -0,0 +1 @@
(function(d){d['da']=Object.assign(d['da']||{},{a:"Kan ikke uploade fil:",b:"Blot citat",c:"Kursiv",d:"Fed",e:"Vælg overskrift",f:"Overskrift",g:"billed widget",h:"Indtast billedoverskrift",i:"Fuld billedstørrelse",j:"Sidebillede",k:"Venstrestillet billede",l:"Centreret billede",m:"Højrestillet billede",n:"Indsæt billede",o:"Upload fejlede",p:"Link",q:"Opstilling med tal",r:"Punktopstilling",s:"Formattering",t:"Overskrift 1",u:"Overskrift 2",v:"Overskrift 3",w:"Skift alternativ billedtekst",x:"Fjern link",y:"Edit link",z:"Open link in new tab",aa:"This link has no URL",ab:"Gem",ac:"Annullér",ad:"Link URL",ae:"Upload in progress",af:"Wysiwyg editor, %0",ag:"Wysiwyg editor",ah:"Alternativ tekst",ai:"Fortryd",aj:"Gentag"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

View File

@ -0,0 +1 @@
(function(d){d['de']=Object.assign(d['de']||{},{a:"Datei kann nicht hochgeladen werden:",b:"Blockzitat",c:"Kursiv",d:"Fett",e:"Überschrift auswählen",f:"Überschrift",g:"Bild-Steuerelement",h:"Bildunterschrift eingeben",i:"Bild in voller Größe",j:"Seitenbild",k:"linksbündiges Bild",l:"zentriertes Bild",m:"rechtsbündiges Bild",n:"Bild einfügen",o:"Hochladen fehlgeschlagen",p:"Link",q:"Nummerierte Liste",r:"Aufzählungsliste",s:"Absatz",t:"Überschrift 1",u:"Überschrift 2",v:"Überschrift 3",w:"Alternativ Text ändern",x:"Link entfernen",y:"Link bearbeiten",z:"Link im neuen Tab öffnen",aa:"Dieser Link hat keine Adresse",ab:"Speichern",ac:"Abbrechen",ad:"Link Adresse",ae:"Upload in progress",af:"Rich-Text-Editor, %0",ag:"Rich Text Editor",ah:"Textalternative",ai:"Rückgängig",aj:"Wiederherstellen"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

View File

@ -0,0 +1 @@
(function(d){d['el']=Object.assign(d['el']||{},{a:"Cannot upload file:",b:"Περιοχή παράθεσης",c:"Πλάγια",d:"Έντονη",e:"Επιλέξτε κεφαλίδα",f:"Κεφαλίδα",g:"image widget",h:"Λεζάντα",i:"Εικόνα πλήρης μεγέθους",j:"Side image",k:"Left aligned image",l:"Centered image",m:"Right aligned image",n:"Εισαγωγή εικόνας",o:"Upload failed",p:"Σύνδεσμος",q:"Αριθμημένη λίστα",r:"Λίστα κουκκίδων",s:"Παράγραφος",t:"Κεφαλίδα 1",u:"Κεφαλίδα 2",v:"Κεφαλίδα 3",w:"Αλλαγή εναλλακτικού κείμενου",x:"Αφαίρεση συνδέσμου",y:"Edit link",z:"Open link in new tab",aa:"This link has no URL",ab:"Αποθήκευση",ac:"Ακύρωση",ad:"Διεύθυνση συνδέσμου",ae:"Upload in progress",af:"Επεξεργαστής Πλούσιου Κειμένου, 0%",ag:"Επεξεργαστής Πλούσιου Κειμένου",ah:"Εναλλακτικό κείμενο",ai:"Αναίρεση",aj:"Επανάληψη"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

View File

@ -0,0 +1 @@
(function(d){d['en-au']=Object.assign(d['en-au']||{},{a:"Cannot upload file:",b:"Block quote",c:"Italic",d:"Bold",e:"Choose heading",f:"Heading",g:"image widget",h:"Enter image caption",i:"Full size image",j:"Side image",k:"Left aligned image",l:"Centred image",m:"Right aligned image",n:"Insert image",o:"Upload failed",p:"Link",q:"Numbered List",r:"Bulleted List",s:"Paragraph",t:"Heading 1",u:"Heading 2",v:"Heading 3",w:"Change image text alternative",x:"Unlink",y:"Edit link",z:"Open link in new tab",aa:"This link has no URL",ab:"Save",ac:"Cancel",ad:"Link URL",ae:"Upload in progress",af:"Rich Text Editor, %0",ag:"Rich Text Editor",ah:"Text alternative",ai:"Undo",aj:"Redo"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

View File

@ -0,0 +1 @@
(function(d){d['eo']=Object.assign(d['eo']||{},{a:"Cannot upload file:",b:"Block quote",c:"kursiva",d:"grasa",e:"Elektu ĉapon",f:"Ĉapo",g:"bilda fenestraĵo",h:"Skribu klarigon pri la bildo",i:"Bildo kun reala dimensio",j:"Flanka biildo",k:"Left aligned image",l:"Centered image",m:"Right aligned image",n:"Enmetu bildon",o:"Upload failed",p:"Ligilo",q:"Numerita Listo",r:"Bula Listo",s:"Paragrafo",t:"Ĉapo 1",u:"Ĉapo 2",v:"Ĉapo 3",w:"Ŝanĝu la alternativan tekston de la bildo",x:"Malligi",y:"Edit link",z:"Open link in new tab",aa:"This link has no URL",ab:"Konservi",ac:"Nuligi",ad:"URL de la ligilo",ae:"Upload in progress",af:"Redaktilo de Riĉa Teksto, %0",ag:"Redaktilo de Riĉa Teksto",ah:"Alternativa teksto",ai:"Malfari",aj:"Refari"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

View File

@ -0,0 +1 @@
(function(d){d['es']=Object.assign(d['es']||{},{a:"No se pudo cargar el archivo:",b:"Entrecomillado",c:"Cursiva",d:"Negrita",e:"Elegir Encabezado",f:"Encabezado",g:"Widget de imagen",h:"Introducir título de la imagen",i:"Imagen a tamaño completo",j:"Imagen lateral",k:"Imagen alineada a la izquierda",l:"Imagen centrada",m:"Imagen alineada a la derecha",n:"Insertar imagen",o:"Fallo en la subida",p:"Enlace",q:"Lista numerada",r:"Lista de puntos",s:"Párrafo",t:"Encabezado 1",u:"Encabezado 2",v:"Encabezado 3",w:"Cambiar el texto alternativo de la imagen",x:"Quitar enlace",y:"Editar enlace",z:"Abrir enlace en una pestaña nueva",aa:"Este enlace no tiene URL",ab:"Guardar",ac:"Cancelar",ad:"URL del enlace",ae:"Upload in progress",af:"Editor de Texto Enriquecido, %0",ag:"Editor de Texto Enriquecido",ah:"Texto alternativo",ai:"Deshacer",aj:"Rehacer"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

View File

@ -0,0 +1 @@
(function(d){d['et']=Object.assign(d['et']||{},{a:"Faili ei suudeta üles laadida:",b:"Tsitaat",c:"Kaldkiri",d:"Rasvane",e:"Vali pealkiri",f:"Pealkiri",g:"pildi vidin",h:"Sisesta pildi pealkiri",i:"Täissuuruses pilt",j:"Pilt küljel",k:"Vasakule joondatud pilt",l:"Keskele joondatud pilt",m:"Paremale joondatud pilt",n:"Siseta pilt",o:"Üleslaadimine ebaõnnestus",p:"Link",q:"Nummerdatud loetelu",r:"Loetelu",s:"Lõik",t:"Pealkiri 1",u:"Pealkiri 2",v:"Pealkiri 3",w:"Muuda pildi tekstilist alternatiivi",x:"Eemalda link",y:"Muuda linki",z:"Ava link uuel vahekaardil",aa:"Sellel lingil puudub URL",ab:"Salvesta",ac:"Loobu",ad:"Lingi URL",ae:"Upload in progress",af:"Tekstiredaktor, %0",ag:"Tekstiredaktor",ah:"Alternatiivne tekst",ai:"Samm tagasi",aj:"Samm edasi"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

View File

@ -0,0 +1 @@
(function(d){d['eu']=Object.assign(d['eu']||{},{a:"Ezin da fitxategia kargatu:",b:"Aipua",c:"Etzana",d:"Lodia",e:"Aukeratu izenburua",f:"Izenburua",g:"irudi widgeta",h:"Sartu irudiaren epigrafea",i:"Tamaina osoko irudia",j:"Alboko irudia",k:"Ezkerrean lerrokatutako irudia",l:"Zentratutako irudia",m:"Eskuinean lerrokatutako irudia",n:"Txertatu irudia",o:"Kargatzeak huts egin du",p:"Esteka",q:"Zenbakidun zerrenda",r:"Buletdun zerrenda",s:"Paragrafoa",t:"Izenburua 1",u:"Izenburua 2",v:"Izenburua 3",w:"Aldatu irudiaren ordezko testua",x:"Desestekatu",y:"Edit link",z:"Open link in new tab",aa:"This link has no URL",ab:"Gorde",ac:"Utzi",ad:"Estekaren URLa",ae:"Upload in progress",af:"Testu aberastuaren editorea, %0",ag:"Testu aberastuaren editorea",ah:"Ordezko testua",ai:"Desegin",aj:"Berregin"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

View File

@ -0,0 +1 @@
(function(d){d['fa']=Object.assign(d['fa']||{},{a:"فایل آپلود نمی‌شود:",b:" بلوک نقل قول",c:"کج",d:"تو پر",e:"انتخاب عنوان",f:"عنوان",g:"ابزاره تصویر",h:"عنوان تصویر را وارد کنید",i:"تصویر در اندازه کامل",j:"تصویر جانبی",k:"تصویر تراز شده چپ",l:"تصویر در وسط",m:"تصویر تراز شده راست",n:"قرار دادن تصویر",o:"آپلود ناموفق بود",p:"پیوند",q:"لیست عددی",r:"لیست نشانه‌دار",s:"پاراگراف",t:"عنوان 1",u:"عنوان 2",v:"عنوان 3",w:"تغییر متن جایگزین تصویر",x:"لغو پیوند",y:"ویرایش پیوند",z:"باز کردن پیوند در برگه جدید",aa:"این پیوند نشانی اینترنتی ندارد",ab:"ذخیره",ac:"لغو",ad:"نشانی اینترنتی پیوند",ae:"Upload in progress",af:"ویرایشگر متن غنی، %0",ag:"ویرایشگر متن غنی",ah:"متن جایگزین",ai:"بازگردانی",aj:"باز انجام"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

View File

@ -0,0 +1 @@
(function(d){d['fi']=Object.assign(d['fi']||{},{a:"Tiedostoa ei voitu ladata:",b:"Lainaus",c:"Kursivointi",d:"Lihavointi",e:"Valitse tyyli",f:"Otsikkotyyli",g:"Kuvavimpain",h:"Syötä kuvateksti",i:"Täysikokoinen kuva",j:"Pieni kuva",k:"Vasemmalle tasattu kuva",l:"Keskitetty kuva",m:"Oikealle tasattu kuva",n:"Lisää kuva",o:"Lataus epäonnistui",p:"Linkki",q:"Numeroitu lista",r:"Lista",s:"Kappale",t:"Otsikko 1",u:"Otsikko 2",v:"Otsikko 3",w:"Vaihda kuvan vaihtoehtoinen teksti",x:"Poista linkki",y:"Edit link",z:"Open link in new tab",aa:"This link has no URL",ab:"Tallenna",ac:"Peruuta",ad:"Linkin osoite",ae:"Upload in progress",af:"Rikas tekstieditori, %0",ag:"Rikas tekstieditori",ah:"Vaihtoehtoinen teksti",ai:"Peru",aj:"Tee uudelleen"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

View File

@ -0,0 +1 @@
(function(d){d['fr']=Object.assign(d['fr']||{},{a:"Envoi du fichier échoué :",b:"Citation",c:"Italique",d:"Gras",e:"Choisir le titre",f:"En-tête",g:"Objet image",h:"Saisissez la légende de limage",i:"Image taille réelle",j:"Image sur le côté",k:"Image alignée à gauche",l:"Image centrée",m:"Image alignée a droite",n:"Insérer une image",o:"Échec de l'envoi",p:"Lien",q:"Liste numérotée",r:"Liste à puces",s:"Paragraphe",t:"Titre 1",u:"Titre 2",v:"Titre 3",w:"Changer le texte alternatif à limage",x:"Supprimer le lien",y:"Edit link",z:"Open link in new tab",aa:"This link has no URL",ab:"Enregistrer",ac:"Annuler",ad:"URL du lien",ae:"Upload in progress",af:"Éditeur de texte enrichi, %0",ag:"Éditeur de texte enrichi",ah:"Texte alternatif",ai:"Annuler",aj:"Restaurer"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

View File

@ -0,0 +1 @@
(function(d){d['gl']=Object.assign(d['gl']||{},{a:"Non é posíbel cargar o ficheiro:",b:"Cita de bloque",c:"Itálica",d:"Negra",e:"Escolla o título",f:"Título",g:"Trebello de imaxe",h:"Introduza o título da imaxe",i:"Imaxe a tamaño completo",j:"Lado da imaxe",k:"Imaxe aliñada á esquerda",l:"Imaxe centrada horizontalmente",m:"Imaxe aliñada á dereita",n:"Inserir imaxe",o:"Fallou o envío",p:"Ligar",q:"Lista numerada",r:"Lista viñeteada",s:"Parágrafo",t:"Título 1",u:"Título 2",v:"Título 3",w:"Cambiar o texto alternativo da imaxe",x:"Desligar",y:"Editar a ligazón",z:"Abrir a ligazón nunha nova lapela",aa:"Esta ligazón non ten URL",ab:"Gardar",ac:"Cancelar",ad:"URL de ligazón",ae:"Upload in progress",af:"Editor de texto mellorado, %0",ag:"Editor de texto mellorado",ah:"Texto alternativo",ai:"Desfacer",aj:"Refacer"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

View File

@ -0,0 +1 @@
(function(d){d['gu']=Object.assign(d['gu']||{},{a:"ફાઇલ અપલોડ ન થઇ શકી",b:" વિચાર ટાંકો",c:"ત્રાંસુ - ઇટલિક્",d:"ઘાટુ - બોલ્ડ્",e:"Choose heading",f:"Heading",g:"image widget",h:"Enter image caption",i:"Full size image",j:"Side image",k:"Left aligned image",l:"Centered image",m:"Right aligned image",n:"Insert image",o:"Upload failed",p:"Link",q:"Numbered List",r:"Bulleted List",s:"Paragraph",t:"Heading 1",u:"Heading 2",v:"Heading 3",w:"Change image text alternative",x:"Unlink",y:"Edit link",z:"Open link in new tab",aa:"This link has no URL",ab:"Save",ac:"Cancel",ad:"Link URL",ae:"Upload in progress",af:"Rich Text Editor, %0",ag:"Rich Text Editor",ah:"Text alternative",ai:"Undo",aj:"Redo"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

View File

@ -0,0 +1 @@
(function(d){d['hr']=Object.assign(d['hr']||{},{a:"Datoteku nije moguće poslati:",b:"Blok citat",c:"Ukošeno",d:"Podebljano",e:"Odaberite naslov",f:"Naslov",g:"Slika widget",h:"Unesite naslov slike",i:"Slika pune veličine",j:"Slika sa strane",k:"Lijevo poravnata slika",l:"Centrirana slika",m:"Slika poravnata desno",n:"Umetni sliku",o:"Slanje nije uspjelo",p:"Veza",q:"Brojčana lista",r:"Obična lista",s:"Paragraf",t:"Naslov 1",u:"Naslov 2",v:"Naslov 3",w:"Promijeni alternativni tekst slike",x:"Ukloni vezu",y:"Uredi vezu",z:"Otvori vezu u novoj kartici",aa:"Ova veza nema URL",ab:"Snimi",ac:"Poništi",ad:"URL veze",ae:"Slanje u tijeku",af:"Rich Text Editor, %0",ag:"Rich Text Editor",ah:"Alternativni tekst",ai:"Poništi",aj:"Ponovi"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

View File

@ -0,0 +1 @@
(function(d){d['hu']=Object.assign(d['hu']||{},{a:"Nem sikerült a fájl feltöltése:",b:"Idézet",c:"Dőlt",d:"Félkövér",e:"Stílus megadása",f:"Stílusok",g:"képmodul",h:"Képaláírás megadása",i:"Teljes méretű kép",j:"Oldalsó kép",k:"Balra igazított kép",l:"Középre igazított kép",m:"Jobbra igazított kép",n:"Kép beszúrása",o:"A feltöltés nem sikerült",p:"Link",q:"Számozott lista",r:"Pontozott lista",s:"Bekezdés",t:"Címsor 1",u:"Címsor 2",v:"Címsor 3",w:"Helyettesítő szöveg módosítása",x:"Link eltávolítása",y:"Link szerkesztése",z:"Link megnyitása új ablakban",aa:"A link nem tartalmaz URL-t",ab:"Mentés",ac:"Mégsem",ad:"URL link",ae:"A feltöltés folyamatban",af:"Bővített szövegszerkesztő, %0",ag:"Bővített szövegszerkesztő",ah:"Helyettesítő szöveg",ai:"Visszavonás",aj:"Újra"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

View File

@ -0,0 +1 @@
(function(d){d['it']=Object.assign(d['it']||{},{a:"Impossibile caricare il file:",b:"Blocco citazione",c:"Corsivo",d:"Grassetto",e:"Seleziona intestazione",f:"Intestazione",g:"Widget immagine",h:"inserire didascalia dell'immagine",i:"Immagine a dimensione intera",j:"Immagine laterale",k:"Immagine allineata a sinistra",l:"Immagine centrata",m:"Immagine allineata a destra",n:"Inserisci immagine",o:"Caricamento fallito",p:"Collegamento",q:"Elenco numerato",r:"Elenco puntato",s:"Paragrafo",t:"Intestazione 1",u:"Intestazione 2",v:"Intestazione 3",w:"Cambia testo alternativo dell'immagine",x:"Elimina collegamento",y:"Modifica collegamento",z:"Apri collegamento in nuova scheda",aa:"Questo collegamento non ha un URL",ab:"Salva",ac:"Annulla",ad:"URL del collegamento",ae:"Caricamento in corso",af:"Editor di testo Rich Text, %0",ag:"Editor di testo Rich Text",ah:"Testo alternativo",ai:"Annulla",aj:"Ripristina"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

View File

@ -0,0 +1 @@
(function(d){d['ja']=Object.assign(d['ja']||{},{a:"ファイルをアップロードできません:",b:"ブロッククオート(引用)",c:"イタリック",d:"ボールド",e:"見出しを選択",f:"見出し",g:"画像ウィジェット",h:"画像の注釈を入力",i:"フルサイズ画像",j:"サイドイメージ",k:"Left aligned image",l:"Centered image",m:"Right aligned image",n:"画像挿入",o:"アップロード失敗",p:"リンク",q:"番号付きリスト",r:"箇条書きリスト",s:"パラグラフ",t:"見出し1",u:"見出し2",v:"見出し3 ",w:"画像の代替テキストを変更",x:"リンク解除",y:"Edit link",z:"Open link in new tab",aa:"This link has no URL",ab:"保存",ac:"キャンセル",ad:"リンクURL",ae:"Upload in progress",af:"リッチテキストエディター, %0",ag:"リッチテキストエディター",ah:"代替テキスト",ai:"元に戻す",aj:"やり直し"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

View File

@ -0,0 +1 @@
(function(d){d['km']=Object.assign(d['km']||{},{a:"មិនអាច​អាប់ឡូត​ឯកសារ៖",b:"ប្លុក​ពាក្យ​សម្រង់",c:"ទ្រេត",d:"ដិត",e:"ជ្រើសរើស​ក្បាលអត្ថបទ",f:"ក្បាលអត្ថបទ",g:"វិដជិត​រូបភាព",h:"បញ្ចូល​ពាក្យ​ពណ៌នា​រូបភាព",i:"រូបភាព​ពេញ​ទំហំ",j:"រូបភាព​នៅ​ខាង",k:"Left aligned image",l:"Centered image",m:"Right aligned image",n:"បញ្ចូល​រូបភាព",o:"អាប់ឡូត​មិនបាន",p:"តំណ",q:"បញ្ជី​ជា​លេខ",r:"បញ្ជី​ជា​ចំណុច",s:"កថាខណ្ឌ",t:"ក្បាលអត្ថបទ 1",u:"ក្បាលអត្ថបទ 2",v:"ក្បាលអត្ថបទ 3",w:"Change image text alternative",x:"ផ្ដាច់​តំណ",y:"Edit link",z:"Open link in new tab",aa:"This link has no URL",ab:"រក្សាទុ",ac:"បោះបង់",ad:"URL តំណ",ae:"Upload in progress",af:"កម្មវិធី​កែសម្រួល​អត្ថបទ​សម្បូរបែប, %0",ag:"កម្មវិធី​កែសម្រួល​អត្ថបទ​សម្បូរបែប",ah:"Text alternative",ai:"លែង​ធ្វើ​វិញ",aj:"ធ្វើ​វិញ"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

View File

@ -0,0 +1 @@
(function(d){d['kn']=Object.assign(d['kn']||{},{a:"Cannot upload file:",b:"‍‍‍‍ಗುರುತಿಸಲಾದ ‍‍ಉಲ್ಲೇಖ",c:"‍ಇಟಾಲಿಕ್",d:"‍‍ದಪ್ಪ",e:"ಶೀರ್ಷಿಕೆ ಆಯ್ಕೆಮಾಡು",f:"ಶೀರ್ಷಿಕೆ",g:"‍ಚಿತ್ರ ವಿಜೆಟ್",h:"‍ಚಿತ್ರದ ಶೀರ್ಷಿಕೆ ಸೇರಿಸು",i:"‍ಪೂರ್ಣ ‍‍ಅಳತೆಯ ಚಿತ್ರ",j:"‍ಪಕ್ಕದ ಚಿತ್ರ",k:"Left aligned image",l:"Centered image",m:"Right aligned image",n:"Insert image",o:"Upload failed",p:"‍ಕೊಂಡಿ",q:"‍ಸಂಖ್ಯೆಯ ಪಟ್ಟಿ‍",r:"‍‍ಬುಲೆಟ್ ಪಟ್ಟಿ",s:"ಪ್ಯಾರಾಗ್ರಾಫ್",t:"ಶೀರ್ಷಿಕೆ 1",u:"ಶೀರ್ಷಿಕೆ 2",v:"ಶೀರ್ಷಿಕೆ 3",w:"‍ಚಿತ್ರದ ಬದಲಿ ಪಠ್ಯ ಬದಲಾಯಿಸು",x:"‍ಕೊಂಡಿ ತೆಗೆ",y:"Edit link",z:"Open link in new tab",aa:"This link has no URL",ab:"ಉಳಿಸು",ac:"ರದ್ದುಮಾಡು",ad:"‍ಕೊಂಡಿ ಸಂಪರ್ಕಿಸು",ae:"Upload in progress",af:"‍ಸಮೃದ್ಧ ಪಠ್ಯ ಸಂಪಾದಕ‍, %0",ag:"‍ಸಮೃದ್ಧ ಪಠ್ಯ ಸಂಪಾದಕ‍‍",ah:"‍ಪಠ್ಯದ ಬದಲಿ",ai:"‍‍ರದ್ದು",aj:"‍ಮತ್ತೆ ಮಾಡು"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

View File

@ -0,0 +1 @@
(function(d){d['ko']=Object.assign(d['ko']||{},{a:"Cannot upload file:",b:"인용 단락",c:"기울임꼴",d:"굵게",e:"제목 선택",f:"제목",g:"이미지 위젯",h:"이미지 설명을 입력하세요",i:"문서 너비",j:"내부 우측 정렬",k:"왼쪽 정렬",l:"가운데 정렬",m:"오른쪽 정렬",n:"Insert image",o:"Upload failed",p:"링크",q:"번호매기기",r:"글머리기호",s:"문단",t:"제목1",u:"제목2",v:"제목3",w:"대체 텍스트 변경",x:"링크 삭제",y:"Edit link",z:"Open link in new tab",aa:"This link has no URL",ab:"저장",ac:"취소",ad:"링크 주소",ae:"Upload in progress",af:"Rich Text Editor, %0",ag:"Rich Text Editor",ah:"대체 텍스트",ai:"실행 취소",aj:"다시 실행"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

View File

@ -0,0 +1 @@
(function(d){d['ku']=Object.assign(d['ku']||{},{a:"پەڕگەکە ناتوانرێت باربکرێت:",b:"وتەی وەرگیراو",c:"لار",d:"قەڵەو",e:"سەرنووسە هەڵبژێرە",f:"سەرنووسە",g:"وێدجیتی وێنە",h:"سەردێڕی وێنە دابنێ",i:"پڕ بەقەبارەی وێنە",j:"لای وێنە",k:"ڕیزکردنی وێنە بۆ لای چەپ",l:"ناوەڕاستکراوی وێنە",m:"ڕیزکردنی وێنە بۆ لای ڕاست",n:"وێنە دابنێ",o:"بارکردنەکە سەرنەکەووت",p:"بەستەر",q:"لیستەی ژمارەیی",r:"لیستەی خاڵەیی",s:"پەراگراف",t:"سەرنووسەی 1",u:"سەرنووسەی 2",v:"سەرنووسەی 3",w:"گۆڕینی جێگروەی تێکیسی وێنە",x:"لابردنی بەستەر",y:"دەسککاری بەستەر",z:"کردنەوەی بەستەرەکە لە پەڕەیەکی نوێ",aa:"ئەم بەستەررە ناونیشانی نیە",ab:"پاشکەوتکردن",ac:"هەڵوەشاندنەوە",ad:"ناونیشانی بەستەر",ae:"Upload in progress",af:"سەرنوسەری دەقی بەپیت, %0",ag:"سەرنوسەری دەقی بەپیت",ah:"جێگرەوەی تێکست",ai:"وەک خۆی لێ بکەوە",aj:"هەلگەڕاندنەوە"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

View File

@ -0,0 +1 @@
(function(d){d['nb']=Object.assign(d['nb']||{},{a:"Kan ikke laste opp fil:",b:"Blokksitat",c:"Kursiv",d:"Fet",e:"Velg overskrift",f:"Overskrift",g:"Bilde-widget",h:"Skriv inn bildetekst",i:"Bilde i full størrelse",j:"Sidebilde",k:"Venstrejustert bilde",l:"Midtstilt bilde",m:"Høyrejustert bilde",n:"Sett inn bilde",o:"Opplasting feilet",p:"Lenke",q:"Nummerert liste",r:"Punktmerket liste",s:"Avsnitt",t:"Overskrift 1",u:"Overskrift 2",v:"Overskrift 3",w:"Endre tekstalternativ for bilde",x:"Fjern lenke",y:"Rediger lenke",z:"Åpne lenke i ny fane",aa:"Denne lenken har ingen URL",ab:"Lagre",ac:"Avbryt",ad:"URL for lenke",ae:"Opplasting pågår",af:"Rikteksteditor, %0",ag:"Rikteksteditor",ah:"Tekstalternativ for bilde",ai:"Angre",aj:"Gjør om"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

View File

@ -0,0 +1 @@
(function(d){d['ne']=Object.assign(d['ne']||{},{a:"Cannot upload file:",b:"Block quote",c:"Italic",d:"Bold",e:"Choose heading",f:"Heading",g:"image widget",h:"Enter image caption",i:"Full size image",j:"Side image",k:"Left aligned image",l:"Centered image",m:"Right aligned image",n:"तस्वीर सम्मिलित गर्नुहोस्",o:"Upload failed",p:"Link",q:"Numbered List",r:"Bulleted List",s:"Paragraph",t:"Heading 1",u:"Heading 2",v:"Heading 3",w:"Change image text alternative",x:"Unlink",y:"Edit link",z:"Open link in new tab",aa:"This link has no URL",ab:"सुरक्षित गर्नुहोस्",ac:"रद्द गर्नुहोस्",ad:"Link URL",ae:"Upload in progress",af:"Rich Text Editor, %0",ag:"Rich Text Editor",ah:"Text alternative",ai:"Undo",aj:"Redo"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

View File

@ -0,0 +1 @@
(function(d){d['nl']=Object.assign(d['nl']||{},{a:"Kan bestand niet opladen:",b:"Blok citaat",c:"Cursief",d:"Vet",e:"Kies kop",f:"Koppen",g:"Afbeeldingswidget",h:"Typ een afbeeldingsbijschrift",i:"Afbeelding op volledige grootte",j:"Afbeelding naast tekst",k:"Links uitgelijnde afbeelding",l:"Gecentreerde afbeelding",m:"Rechts uitgelijnde afbeelding",n:"Afbeelding toevoegen",o:"Opladen afbeelding mislukt",p:"Link",q:"Genummerde lijst",r:"Ongenummerde lijst",s:"Paragraaf",t:"Kop 1",u:"Kop 2",v:"Kop 3",w:"Verander alt-tekst van de afbeelding",x:"Verwijder link",y:"Edit link",z:"Open link in new tab",aa:"This link has no URL",ab:"Opslaan",ac:"Annuleren",ad:"Link URL",ae:"Upload in progress",af:"Tekstbewerker, 0%",ag:"Tekstbewerker",ah:"Alt-tekst",ai:"Ongedaan maken",aj:"Opnieuw"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

View File

@ -0,0 +1 @@
(function(d){d['no']=Object.assign(d['no']||{},{a:"Cannot upload file:",b:"Block quote",c:"Kursiv",d:"Fet",e:"Choose heading",f:"Heading",g:"image widget",h:"Enter image caption",i:"Full size image",j:"Side image",k:"Left aligned image",l:"Centered image",m:"Right aligned image",n:"Insert image",o:"Upload failed",p:"Link",q:"Numbered List",r:"Bulleted List",s:"Avsnitt",t:"Overskrift 1",u:"Overskrift 2",v:"Overskrift 3",w:"Change image text alternative",x:"Fjern lenke",y:"Edit link",z:"Open link in new tab",aa:"This link has no URL",ab:"Lagre",ac:"Avbryt",ad:"Link URL",ae:"Upload in progress",af:"Rich Text Editor, %0",ag:"Rich Text Editor",ah:"Text alternative",ai:"Undo",aj:"Redo"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

View File

@ -0,0 +1 @@
(function(d){d['oc']=Object.assign(d['oc']||{},{a:"Cannot upload file:",b:"Block quote",c:"Italica",d:"Gras",e:"Choose heading",f:"Heading",g:"image widget",h:"Enter image caption",i:"Full size image",j:"Side image",k:"Left aligned image",l:"Centered image",m:"Right aligned image",n:"Insert image",o:"Upload failed",p:"Link",q:"Numbered List",r:"Bulleted List",s:"Paragraph",t:"Heading 1",u:"Heading 2",v:"Heading 3",w:"Change image text alternative",x:"Unlink",y:"Edit link",z:"Open link in new tab",aa:"This link has no URL",ab:"Enregistrar",ac:"Anullar",ad:"Link URL",ae:"Upload in progress",af:"Rich Text Editor, %0",ag:"Rich Text Editor",ah:"Text alternative",ai:"Undo",aj:"Redo"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

View File

@ -0,0 +1 @@
(function(d){d['pl']=Object.assign(d['pl']||{},{a:"Nie można przesłać pliku:",b:"Cytat blokowy",c:"Kursywa",d:"Pogrubienie",e:"Wybierz nagłówek",f:"Nagłówek",g:"image widget",h:"Enter image caption",i:"Full size image",j:"Side image",k:"Left aligned image",l:"Centered image",m:"Right aligned image",n:"Wstaw obraz",o:"Upload failed",p:"Wstaw odnośnik",q:"Lista numerowana",r:"Lista wypunktowana",s:"Akapit",t:"Nagłówek 1",u:"Nagłówek 2",v:"Nagłówek 3",w:"Change image text alternative",x:"Usuń odnośnik",y:"Edit link",z:"Open link in new tab",aa:"This link has no URL",ab:"Zapisz",ac:"Anuluj",ad:"Adres URL",ae:"Upload in progress",af:"Rich Text Editor, %0",ag:"Rich Text Editor",ah:"Text alternative",ai:"Cofnij",aj:"Ponów"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

View File

@ -0,0 +1 @@
(function(d){d['pt-br']=Object.assign(d['pt-br']||{},{a:"Não foi possível enviar o arquivo:",b:"Bloco de citação",c:"Itálico",d:"Negrito",e:"Escolha o título",f:"Titulo",g:"Ferramenta de imagem",h:"Inserir legenda da imagem",i:"Imagem completa",j:"Imagem lateral",k:"Imagem alinhada à esquerda",l:"Imagem centralizada",m:"Imagem alinhada à direita",n:"Inserir imagem",o:"Falha ao subir arquivo",p:"Link",q:"Lista numerada",r:"Lista com marcadores",s:"Parágrafo",t:"Título 1",u:"Título 2",v:"Título 3",w:"Alterar texto alternativo da imagem",x:"Remover link",y:"Editar link",z:"Abrir link em nova aba",aa:"Este link não possui uma URL",ab:"Salvar",ac:"Cancelar",ad:"URL",ae:"Upload in progress",af:"Editor de Formatação, %0",ag:"Editor de Formatação",ah:"Texto alternativo",ai:"Desfazer",aj:"Refazer"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

View File

@ -0,0 +1 @@
(function(d){d['pt']=Object.assign(d['pt']||{},{a:"Não foi possível carregar o ficheiro:",b:"Block quote",c:"Itálico",d:"Negrito",e:"Choose heading",f:"Cabeçalho",g:"módulo de imagem",h:"Indicar legenda da imagem",i:"Imagem em tamanho completo",j:"Imagem lateral",k:"Left aligned image",l:"Imagem centrada",m:"Right aligned image",n:"Inserir imagem",o:"Falha ao carregar",p:"Hiperligação",q:"Lista ordenada",r:"Lista não ordenada",s:"Parágrafo",t:"Cabeçalho 1",u:"Cabeçalho 2",v:"Cabeçalho 3",w:"Change image text alternative",x:"Desligar",y:"Edit link",z:"Open link in new tab",aa:"This link has no URL",ab:"Guardar",ac:"Cancelar",ad:"URL da ligação",ae:"Upload in progress",af:"Editor de texto avançado, %0",ag:"Editor de texto avançado",ah:"Texto alternativo",ai:"Desfazer",aj:"Refazer"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

View File

@ -0,0 +1 @@
(function(d){d['ro']=Object.assign(d['ro']||{},{a:"Nu pot încărca fișierul:",b:"Bloc citat",c:"Oblic",d:"Îngroșat",e:"Alege titlu rubrică",f:"Titlu rubrică",g:"widget imagine",h:"Introdu titlul descriptiv al imaginii",i:"Imagine mărime completă",j:"Imagine laterală",k:"Imagine aliniată stângă",l:"Imagine aliniată pe centru",m:"Imagine aliniată dreapta",n:"Inserează imagine",o:"Încărcare eșuată",p:"Link",q:"Listă numerotată",r:"Listă cu puncte",s:"Paragraf",t:"Titlu rubrică 1",u:"Titlu rubrică 2",v:"Titlu rubrică 3",w:"Schimbă textul alternativ al imaginii",x:"Șterge link",y:"Edit link",z:"Open link in new tab",aa:"This link has no URL",ab:"Salvare",ac:"Anulare",ad:"Link URL",ae:"Upload in progress",af:"Editor de text îmbunătățit, %0",ag:"Editor de text îmbunătățit",ah:"Text alternativ",ai:"Anulează",aj:"Revenire"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));

Some files were not shown because too many files have changed in this diff Show More