Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
3298b8f
Fixed unicode issue in element_crud
T0ha Aug 12, 2018
cadd6df
Merge branch 'v1.0.0'
T0ha Aug 27, 2018
43edc06
Fixed FromEmail and Email missmatch in emailform
T0ha Aug 27, 2018
6340862
added validation for email_field
dan-kihot8 Aug 28, 2018
0d23eba
remove some logs
dan-kihot8 Aug 31, 2018
5e47644
added sending form to email using smtp
dan-kihot8 Aug 31, 2018
c060fd9
fixed returned code if error is on page
dan-kihot8 Sep 4, 2018
7d97a8e
Merge pull request #26 from dan-kihot8/master
T0ha Sep 5, 2018
bf0b646
added sitemap freq to pages, generating sitemap function
dan-kihot8 Sep 5, 2018
45b45b7
added sitemap handler
dan-kihot8 Sep 6, 2018
2d8ae12
Merge pull request #27 from dan-kihot8/master
T0ha Sep 10, 2018
6571af3
smart_extensions for sitemal.xml moved from LN CLI to cms
T0ha Sep 12, 2018
3845949
Added Reply-To field to email from sendmail
T0ha Sep 12, 2018
a00dfc8
fixed sitemap.xml
dan-kihot8 Sep 13, 2018
6ac04a3
Merge pull request #28 from dan-kihot8/master
T0ha Sep 13, 2018
f6d99de
Config format fixed for sitemap.xml
T0ha Sep 13, 2018
84a80f1
Fixed bug with emailform:submit calasses
T0ha Sep 13, 2018
9978c15
Fixed save_block for emailform:submit old version
T0ha Sep 13, 2018
b26b5b2
Close modal if present on emailform submit
T0ha Sep 13, 2018
e95acc8
added clear page func to db
dan-kihot8 Sep 18, 2018
610f69c
added APIs table
dan-kihot8 Sep 27, 2018
150463a
added Api call to emailform submit; added cms_api table
dan-kihot8 Sep 29, 2018
a30827d
fixed sitemap for index
dan-kihot8 Oct 1, 2018
a791912
upd version
dan-kihot8 Oct 1, 2018
aa64ad7
Merge pull request #29 from dan-kihot8/master
T0ha Oct 1, 2018
708bea9
Added undefined case for qs filter
T0ha Oct 3, 2018
cfd0c30
changed apicall for emailform submit
dan-kihot8 Oct 4, 2018
2856b93
added phone and name to submit apicall
dan-kihot8 Oct 4, 2018
96854bd
added html5:input
dan-kihot8 Oct 4, 2018
85cc0ef
fix conflicts for merge
dan-kihot8 Oct 8, 2018
0722eec
Merge pull request #31 from dan-kihot8/master
T0ha Oct 9, 2018
1fa3d1f
Fixed applications start at node starup
T0ha Oct 16, 2018
c210a11
saving page when changing element from * page
dan-kihot8 Oct 18, 2018
8baa1f9
Merge pull request #32 from dan-kihot8/master
T0ha Oct 18, 2018
fd9bd20
added languages managing: added translation block for any element
dan-kihot8 Oct 19, 2018
c687252
changed lang value in main.html to actual lang
dan-kihot8 Oct 20, 2018
b18b2d5
updated bootstrap.css: added dropdown style
dan-kihot8 Oct 23, 2018
8095a02
updated style.css: added img.flags-icon class
dan-kihot8 Oct 23, 2018
5dd30ec
added bootstrap:languages_menu; auto-append lang param to some links'
dan-kihot8 Oct 23, 2018
5e7c8ed
hotfix
dan-kihot8 Oct 23, 2018
7ddc4ed
fixed text-editor: update element after text changing
dan-kihot8 Oct 26, 2018
607b55e
some styled admin
dan-kihot8 Oct 29, 2018
9beb4d5
some fixed admin; added Defragment and Clear Trash buttons
dan-kihot8 Oct 29, 2018
4f7c269
Merge pull request #33 from dan-kihot8/master
T0ha Oct 30, 2018
e602f5b
added navigation btns for panel subblocks
dan-kihot8 Oct 30, 2018
2ace79d
fix in db:remove_blocks_without_parent
dan-kihot8 Oct 30, 2018
516b851
moved admin sidebar nav to top; some styled
dan-kihot8 Nov 2, 2018
fc387ce
fixed dublicates of metisMenu.min.js
dan-kihot8 Nov 2, 2018
7f9241f
hotfix
dan-kihot8 Nov 2, 2018
d6bc866
Merge pull request #34 from dan-kihot8/master
T0ha Nov 6, 2018
50bfd6b
added google tags to Analytics
dan-kihot8 Nov 6, 2018
2aa9f17
Merge pull request #35 from dan-kihot8/master
T0ha Nov 7, 2018
32c3c1a
fixed db defragmentation
dan-kihot8 Nov 7, 2018
a35f52a
fixed page_selector for inernal navigation block
dan-kihot8 Nov 7, 2018
524c29a
Merge pull request #36 from dan-kihot8/master
T0ha Nov 8, 2018
0beefa8
Folding markers added to db
T0ha Nov 9, 2018
89be264
Merge branch 'master' of github.com:T0ha/LiquidCMS
T0ha Nov 9, 2018
c87e0f7
urlencode added for email in emailform apicall
T0ha Nov 14, 2018
7de9487
Removed unnesessary form-control wrappers from emailform
T0ha Nov 14, 2018
a39a3f6
fix close_modal
dan-kihot8 Nov 14, 2018
49402ae
Merge pull request #37 from dan-kihot8/master
T0ha Nov 14, 2018
f2baa1d
admin: moved area title to top left; navbar-menu set right
dan-kihot8 Nov 14, 2018
17d9238
added sort edit to block
dan-kihot8 Nov 14, 2018
26a4946
moved db managing buttons to Page menu
dan-kihot8 Nov 14, 2018
408e888
fixed bag: showing block on pages if it unactive on * page
dan-kihot8 Nov 15, 2018
f42a530
fixed db:fix_sort : change dublicating sort to max_sort
dan-kihot8 Nov 15, 2018
f1454a3
change children parent_name if parent_id rename
dan-kihot8 Nov 15, 2018
32e4cb5
Merge pull request #38 from dan-kihot8/master
T0ha Nov 16, 2018
8c5d2bf
show session history of wathing blocks at Construct Page
dan-kihot8 Nov 16, 2018
f797d27
dont show arrow-right on block if it hasnt children
dan-kihot8 Nov 16, 2018
2a98f68
fix clear db trash
dan-kihot8 Nov 16, 2018
1ac7438
Merge pull request #39 from dan-kihot8/master
T0ha Nov 19, 2018
c7af363
Fixed string:split -> string:words
T0ha Nov 21, 2018
f30de7d
build html tree of mfa blocks in Construct Page
dan-kihot8 Nov 23, 2018
1a2f46f
updated jquery: from v1.12.0 to v.3.3.1
dan-kihot8 Nov 23, 2018
b2a9cca
added bootstrap-treeview static files
dan-kihot8 Nov 26, 2018
4565f96
remove format_sub for panel,article
dan-kihot8 Nov 26, 2018
1ccb433
admin:show tree of blocks at Construct Page, block edit panel at righ…
dan-kihot8 Nov 26, 2018
53d48f4
admin:some styled
dan-kihot8 Nov 26, 2018
d5243b9
#fixes
dan-kihot8 Nov 26, 2018
165eec5
Merge pull request #40 from dan-kihot8/master
T0ha Nov 27, 2018
ce7b60b
fixed panel for admin,account default_data
dan-kihot8 Nov 27, 2018
0cfb7a5
added bootstrap-treeview blocks to admin page when update to 2.0.0
dan-kihot8 Nov 27, 2018
00d9207
Merge pull request #41 from dan-kihot8/master
T0ha Nov 27, 2018
dc8e409
fix: view block in tree if mfa undefined
dan-kihot8 Nov 27, 2018
b6c9263
changed logic with show block from * page
dan-kihot8 Nov 27, 2018
fc85058
fixed selected_block_val position
dan-kihot8 Nov 27, 2018
01700e1
Merge pull request #42 from dan-kihot8/master
T0ha Nov 28, 2018
f68cde1
Fixed get_mfa/3 to ignore inactive blocks in page MFAs
T0ha Nov 28, 2018
09d1c70
Merge branch 'master' of github.com:T0ha/LiquidCMS
T0ha Nov 28, 2018
b101c3c
Added script part of GTagManager
T0ha Nov 28, 2018
40dc819
Avoid assets duplications on Filesystem refresh
T0ha Nov 28, 2018
9361264
replaced string:split -> string:tokens
dan-kihot8 Nov 28, 2018
67ea550
Added template for GTagManager script part
T0ha Nov 28, 2018
9690369
some admin fixes
dan-kihot8 Nov 28, 2018
879f150
Merge remote-tracking branch 'origin/master'
dan-kihot8 Nov 28, 2018
cfd01f6
save choosen block in session
dan-kihot8 Nov 28, 2018
ba48234
admin:fixes and updates
dan-kihot8 Nov 28, 2018
369e425
remove caret from {bootstrap, nav_item})
dan-kihot8 Nov 29, 2018
b549086
show blocks with subblocks in tree structure
dan-kihot8 Nov 29, 2018
c1535d4
replaced string:find to string:str
dan-kihot8 Nov 29, 2018
dd31b24
fixed copying of block bootstrap:nav_items
dan-kihot8 Nov 29, 2018
1044e60
added Copying with structure
dan-kihot8 Nov 30, 2018
a33f3e5
fixed navbar copying
dan-kihot8 Nov 30, 2018
18257a6
update old panels
dan-kihot8 Nov 30, 2018
d99b1f5
fix:view validate sub_blocks under block in tree
dan-kihot8 Nov 30, 2018
825762a
added handling of bootstrap:modal in a tree
dan-kihot8 Mar 4, 2019
4eeffeb
some optimization on remove block from tree
dan-kihot8 Mar 5, 2019
749dcd6
changed language filter
dan-kihot8 Mar 5, 2019
6547f42
start fix tree: dynamic load and changing
dan-kihot8 Apr 11, 2019
274e37a
fixed dinamically reload block of tree of 1lvl, copy blocks
dan-kihot8 Apr 11, 2019
ea97072
fixed tree for complex blocks (like panels); fixed editor of page;
dan-kihot8 Apr 12, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion include/db.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

-type role() :: 'admin' | 'editor' | 'nobody' | atom().
-type asset_type() :: 'image' | 'script' | 'css' | 'less' | binary.
-type language() :: 'any' | 'ru' | 'en' | atom().

%% DB tables records goes here
-record(cms_settings, {
Expand Down Expand Up @@ -68,6 +69,7 @@
title = <<"LiquidCMS">> :: binary(),
?TIMESTAMPS,
active=true :: boolean(),
sitemap = none :: atom(),
settings = #{} :: map()
}).

Expand Down Expand Up @@ -101,4 +103,10 @@
active=true :: boolean(),
comment="" :: string(),
?TIMESTAMPS
}).
}).

-record(cms_language, {
id :: language(),
icon :: string(),
default= false :: boolean()
}).
9 changes: 9 additions & 0 deletions priv/cms.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[
{nitrogen, [
% Smart extensions
{smart_extensions, [
{"xml", generate_sitemap, {xml_handler, handle}}
]}
]}
].

3 changes: 2 additions & 1 deletion rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
{lager, ".*", {git, "git://github.com/basho/lager.git", {branch, master}}},
%{esocial, ".*", {git, "https://github.com/T0ha/esocial.git"}},
%{coldstrap, ".*", {git, "https://github.com/choptastic/coldstrap.git"}},
{gettexter, ".*", {git, "https://github.com/seriyps/gettexter.git"}}
{gettexter, ".*", {git, "https://github.com/seriyps/gettexter.git"}},
{gen_smtpc, ".*", {git, "git://github.com/dan-kihot8/gen_smtpc.git"}}
]}.
4 changes: 4 additions & 0 deletions sample/esmtp.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[{esmtp, [{host, "smtp.gmail.com"},
{port, 465},
{smtp_auth_data, {"server@gmail.com","password"}}]
}].
14 changes: 8 additions & 6 deletions src/cms_modules/account.erl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%% -*- mode: nitrogen -*-
%% vim: ts=4 sw=4 et
-module (account).
-compile([export_all, {parse_transform, lager_transform}]).
-compile(export_all).
-include_lib("nitrogen_core/include/wf.hrl").
-include("records.hrl").
-include("db.hrl").
Expand Down Expand Up @@ -269,16 +269,13 @@ maybe_redirect_to_login(Page) -> % {{{2
maybe_redirect_to_login(#cms_page{accepted_role=undefined} = Page, URL) -> % {{{2
maybe_redirect_to_login(Page#cms_page{accepted_role=nobody}, URL);
maybe_redirect_to_login(#cms_page{accepted_role=nobody} = Page, _URL) -> % {{{2
?LOG("Not redirect to login: ~p", [Page]),
Page;
maybe_redirect_to_login(#cms_page{accepted_role=Role} = Page, URL) -> % {{{2
?LOG("role: ~p,wf:role(Role):~p, url:~p", [Role,wf:role(Role),URL]),
case wf:role(Role) of
true ->
?LOG("Role: ~p", [Role]),
Page;
false ->
?LOG("Redirect to login: ~p", [Page]),
wf:redirect_to_login(URL)
end.

Expand Down Expand Up @@ -351,7 +348,9 @@ default_data() -> % {{{2
{bootstrap, col, ["col-admin", "4", "4", ""]}),

admin:add_to_block("register", "col-admin",
{bootstrap, panel, ["admin-panel-header", "admin-panel-body", "", "", ["login-panel", "panel-default"]]}),
{bootstrap, panel,
["admin-panel-header", "admin-panel-body", [],[],[],[],[],[],
["login-panel", "panel-default"]]}),
admin:add_to_block("register", "admin-panel-header",
{text, ["<h3 class='panel-title'>Sign Up</h3>"]}),

Expand Down Expand Up @@ -382,7 +381,10 @@ default_data() -> % {{{2
admin:add_to_block("restore", "row",
{bootstrap, col, ["col", "4", "4", []]}),
admin:add_to_block("restore", "col",
{bootstrap, panel, ["panel-header", "panel-body", "", "", ["panel-default"]]}),
{bootstrap, panel,
["panel-header","panel-body",[],[],[],[],[],[],
[[],"panel-default"]]}),

admin:add_to_block("restore", "panel-header",
{common, text,["Change Password"]}),

Expand Down
Loading