Move page templates

parent 92dca5f6
......@@ -9,7 +9,7 @@ getHonorPledgeR :: Handler Html
getHonorPledgeR = do
is_elig <- curUserIsEligibleEstablish
muser <- maybeAuth
$(widget "honor-pledge" "Honor Pledge")
$(widget "page/honor-pledge" "Honor Pledge")
postHonorPledgeR :: Handler Html
postHonorPledgeR = do
......
......@@ -37,4 +37,4 @@ getJsLicensesR = do
, Lib "jquery.jqplot.min.js" (render $ StaticR js_jquery_jqplot_min_js) "Expat License" "http://www.jclark.com/xml/copying.txt" "jquery.jqplot.js" (render $ StaticR js_jquery_jqplot_js)
, Lib "jqplot.logAxisRenderer.min.js" (render $ StaticR js_plugins_jqplot_logAxisRenderer_min_js) "Expat License" "http://www.jclark.com/xml/copying.txt" "jqplot.logAxisRenderer.js" (render $ StaticR js_plugins_jqplot_logAxisRenderer_js)
]
$(widget "js-licenses" "Javascript Licenses")
$(widget "page/js-licenses" "Javascript Licenses")
......@@ -28,7 +28,7 @@ getWelcomeR = defaultLayoutNew "homepage" $ do
getSearchR :: Handler Html
getSearchR = do
q <- lookupGetParam "q"
$(widget "search" "Search")
$(widget "page/search" "Search")
getPUpdatesR,
getPTransactionsR
......@@ -83,21 +83,21 @@ getHomeR = do
setTitle "Snowdrift.coop — Free the Commons"
$(widgetFile "homepage"))
(\user ->
$(widget "dashboard/overview" "Dashboard"))
$(widget "page/dashboard/overview" "Dashboard"))
u
getUDashboardR = do
user <- requireAuth
$(widget "dashboard/overview" "Dashboard")
$(widget "page/dashboard/overview" "Dashboard")
getUTransactionsR = do
user <- requireAuth
$(widget "dashboard/transactions" "Transactions")
$(widget "page/dashboard/transactions" "Transactions")
getUPledgesR = do
user <- requireAuth
$(widget "dashboard/pledges" "Pledges")
$(widget "page/dashboard/pledges" "Pledges")
getUEditR = do
user <- requireAuth
$(widget "dashboard/edit-profile" "Edit Profile")
$(widget "page/dashboard/edit-profile" "Edit Profile")
--
-- #### NEEDS REVIEW. COPIED FROM EXISTING PAGES.
......@@ -107,7 +107,7 @@ getUEditR = do
getProjectsR :: Handler Html
getProjectsR = do
projects <- runDB fetchPublicProjectsDB
$(widget "projects" "Projects")
$(widget "page/projects" "Projects")
-- | Public page for a project
getPHomeR :: ProjectHandle -> Handler Html
......
......@@ -14,7 +14,7 @@ import qualified View.ResetPassphrase as View
getResetPassphraseR :: Handler Html
getResetPassphraseR = do
(form, enctype) <- generateFormPost resetPassphraseForm
$(widget "reset-passphrase" "Reset Passphrase")
$(widget "page/reset-passphrase" "Reset Passphrase")
initResetPassphrase :: UserId -> Text -> Handler Html
initResetPassphrase user_id email = do
......@@ -29,7 +29,7 @@ postResetPassphraseR = do
((result, form), enctype) <- runFormPost resetPassphraseForm
let alertAndRefresh msg = do
alertDanger msg
$(widget "reset-passphrase" "Reset Passphrase")
$(widget "page/reset-passphrase" "Reset Passphrase")
case result of
FormSuccess View.ResetPassphrase {..} ->
if | isNothing rpHandle && isNothing rpEmail ->
......
......@@ -21,21 +21,21 @@ getIntroR,
getDonateR,
getMerchandiseR
:: Handler Html
getIntroR = $(widget "how-it-works/intro" "Intro")
getFloR = $(widget "how-it-works/flo" "FLO")
getNetworkEffectR = $(widget "how-it-works/network-effect"
getIntroR = $(widget "page/how-it-works/intro" "Intro")
getFloR = $(widget "page/how-it-works/flo" "FLO")
getNetworkEffectR = $(widget "page/how-it-works/network-effect"
"Network Effect")
getSustainableFundingR = $(widget "how-it-works/sustainable-funding"
getSustainableFundingR = $(widget "page/how-it-works/sustainable-funding"
"Sustainable Funding")
getCoOpR = $(widget "how-it-works/co-op" "Co-op")
getPSignupR = $(widget "project-signup" "Project Signup")
getAboutHomeR = $(widget "about/old-homepage" "About")
getContactR = $(widget "contact" "Contact")
getTeamR = $(widget "team" "Team")
getPressR = $(widget "press" "Press")
getSponsorsR = $(widget "sponsors" "Sponsors")
getDonateR = $(widget "donate" "Donate")
getMerchandiseR = $(widget "merchandise" "Merchandise")
getCoOpR = $(widget "page/how-it-works/co-op" "Co-op")
getPSignupR = $(widget "page/project-signup" "Project Signup")
getAboutHomeR = $(widget "page/about/old-homepage" "About")
getContactR = $(widget "page/contact" "Contact")
getTeamR = $(widget "page/team" "Team")
getPressR = $(widget "page/press" "Press")
getSponsorsR = $(widget "page/sponsors" "Sponsors")
getDonateR = $(widget "page/donate" "Donate")
getMerchandiseR = $(widget "page/merchandise" "Merchandise")
-- * TODO: Convert these.
getTermsR,
......
......@@ -32,4 +32,4 @@ getUsersR = do
isVisible :: Entity User -> Bool
isVisible = (>= (0::Int)) . getUserKey
$(widget "users" "Users")
$(widget "page/users" "Users")
......@@ -35,4 +35,3 @@ $nothing
please
<a href=@{AuthR LoginR}>log in
and then reload this page to see the accept button.
mkdir -p how-it-works
git mv intro.* how-it-works
git mv flo.* how-it-works
git mv network-effect.* how-it-works
git mv sustainable-funding.* how-it-works
git mv co-op.* how-it-works
mkdir about
git mv old-homepage.* about
......@@ -595,4 +595,3 @@
Guido Zuidhof
<div .text-center>and 19 anonymous sponsors
......@@ -38,4 +38,3 @@
$forall ((projectName, projectHandle), roles) <- M.toAscList (fromMaybe mempty (userProjects user))
<a href=@{PHomeR projectHandle}>
#{projectName} (#{T.intercalate "/" (map roleAbbrev $ S.toList roles)})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment