<% require "open-uri" begin require "nokogiri" rescue LoadError %>

nokogiri library required. Please install to use this plugin

<% end %>
<% boards = [] invalid_token = "" begin data = URI.parse("https://#{settings['kanban_domain']}.kanbantool.com/api/v1/boards.xml?api_token=#{settings['kanban_token']}").read doc = Nokogiri::XML(data) boards = [] %> <% counter = 0 notfirst = "" doc.xpath("//board").each do |board| board_name = board.at_xpath("name").content.strip if counter != 0 notfirst = "border-left: 1px solid black;" end %><% boards.push [board.at_xpath("id").content.strip,board_name] counter += 1 end %><% counter = 0 notfirst = "" swimlanes = [] boards.each do |board| board_id = board[0] board_name = board[1] #stages[ID,Name] stages = [] if counter != 0 notfirst = "border-left: 1px solid black;" end counter += 1 %><% end %><% counter = 0 notfirst = "" boards.each do |board| board_id = board[0] board_name = board[1] #stages[ID,Name] stages = [] if counter != 0 notfirst = "border-left: 1px solid black;" end counter += 1 %><% end %><% require_dependency "roles_controller" if !settings['kanban_board_role'].nil? && settings['kanban_board_role'] != "" kanban_board_role = JSON.parse(settings['kanban_board_role']) end counter = 0 counter2 = 0 notfirst = "" roles_available = false boards.each do |board| if roles_available %><% end end if !roles_available %><% end rescue Exception => e logger.info e.inspect if settings['kanban_token'] != "" invalid_token = " "+l(:invalid_token) end end %>

<%= board_name %>

<%= l(:hide_stages) %>: <% data2 = URI.parse("https://#{settings['kanban_domain']}.kanbantool.com/api/v1/boards/#{board_id}.xml?api_token=#{settings['kanban_token']}").read doc2 = Nokogiri::XML(data2) doc2.xpath("//workflow-stage").each do |stage| stages.push [stage.at_xpath("id").content.strip,stage.at_xpath("name").content.strip] stages.each_with_index do |stage_sub,index| if stage_sub[0] == stage.at_xpath("parent-id").content.strip stages.delete_at(index) end end end if !settings['kanban_hide'].nil? kanban_hide = settings['kanban_hide'].split(',') end stages.each do |stage| if stage[1] != "" && !stage[1].nil? checked = "" css_checked = "" if !kanban_hide.nil? kanban_hide.each do |hide_id| if hide_id == stage[0] checked = 'checked="checked" ' css_checked = 'text-decoration:line-through;opacity:0.85;' break end end end %>id="<%= stage[0] %>" autocomplete="off" class="kanban_hide" value="<%= stage[0] %>" style="vertical-align:none"/>
<% end end doc2.xpath('//swimlane').each do |swimlane| swimlane_name = swimlane.at_xpath("name").content.strip if swimlane_name != "" swimlanes.push [swimlane.at_xpath("id").content.to_s.strip,swimlane_name,board_id] end end %>
<%= l(:hide_lanes) %>: <% if !settings['kanban_hide_lanes'].nil? kanban_hide_lanes = settings['kanban_hide_lanes'].split(',') end swimlanes.each do |lane| if lane[1] != "" && !lane[1].nil? && lane[2] == board_id checked = "" css_checked = "" if !kanban_hide_lanes.nil? kanban_hide_lanes.each do |hide_id| if hide_id == lane[0] checked = 'checked="checked" ' css_checked = 'text-decoration:line-through;opacity:0.85;' break end end end %>id="<%= lane[0] %>" autocomplete="off" class="kanban_hide_lanes" value="<%= lane[0] %>" style="vertical-align:none"/>
<% end end %>
<%= l(:board_user_role) %>: <% end if counter != 0 notfirst = "border-left: 1px solid black;" end counter += 1 Role.all.each do |role| if role.has_permission?(:use_kanbantool) if counter2 == 0 %><% roles_available = true end checked = "" if !kanban_board_role.nil? if !kanban_board_role[board[0]].nil? if kanban_board_role[board[0]].include? role["id"].to_s checked = 'checked="checked" ' end end end %>" <%= checked %>value="<%= role["id"] %>" style="vertical-align:none"/>
<% counter2 += 1 end end if roles_available %>
<%= l(:add_permissions) %>
API Token: <%= invalid_token %>
Domain: .kanbantool.com
Redmine URL:
(http://www.my_redmine_url.com)
<%= l(:hide_fields) %>: <% input_fields = ["kanban_stage","kanban_swimlane","kanban_subject","kanban_description"] if !settings['kanban_hide_fields'].nil? kanban_hide_fields = settings['kanban_hide_fields'].split(',') end input_fields.each do |field| checked = "" css_checked = "" if !kanban_hide_fields.nil? kanban_hide_fields.each do |hidden_field| if hidden_field == field checked = 'checked="checked" ' css_checked = 'text-decoration:line-through;opacity:0.85;' break end end end info = "" if field == "kanban_subject" info = " (" + l(:if_kanban_subject_hidden) + ")" end %>id="<%= field %>" autocomplete="off" class="kanban_hide_fields" value="<%= field %>" style="vertical-align:none"/> <%= info %>
<% end %>
<%= l(:custom_field_id) %>: