fix changes, still wip

This commit is contained in:
Torsten 2022-12-22 18:12:30 +02:00
parent 034d605d78
commit b42d8137a9
5 changed files with 17 additions and 8 deletions

View File

@ -18,7 +18,7 @@ module Merged
else
@card.move_down
end
@card.save
@card.save(current_member)
redirect_to section_cards_url(@card.section.id),notice: "#{@card.header} moved"
end

View File

@ -11,8 +11,8 @@ module Merged
def commit
raise "must have message" if params[:message].blank?
git = Git.open(Rails.root)
git.add("cms")
git.add("app/assets/images/cms")
git.add("merged")
git.add( Image.root )
begin
git.commit(params[:message])
rescue

View File

@ -1,4 +1,10 @@
module Merged
module ChangesHelper
def cms_part? name
return true if name.include?( Image.root )
return true if name.include?("merged/")
false
end
end
end

View File

@ -70,6 +70,10 @@ module Merged
end
end
def self.root
"app/assets/images/cms"
end
private
def asset_root

View File

@ -11,25 +11,24 @@
.relative.block.border.border-gray-100
Changed Files
-@status.changed.each do |name , file|
-next unless name.include?("cms")
-next unless cms_part?(name)
%p
= name
.relative.block.border.border-gray-100
Deletions
-@status.deleted.each do |name , file|
-next unless name.include?("cms")
-next unless cms_part?(name)
%p= name
.relative.block.border.border-gray-100
Additions
-@status.added.each do |name , file|
-next unless name.include?("cms")
-next unless cms_part?(name)
%p= name
.relative.block.border.border-gray-100
New
-@status.untracked.each do |name , file|
-next if name.starts_with?("merged")
-next unless name.include?("cms")
-next unless cms_part?(name)
%p
= name