def edit
      @admin = current_admin.id == params[:id].to_i ? @current_admin : Admin.find(params[:id])

      # add breadcrumb and set title
      set_title(I18n.t("controllers.admin.administrators.edit.title", username: @admin.username))
      add_breadcrumb I18n.t("controllers.admin.administrators.edit.breadcrumb")

      # action for the form as both edit/new are using the same form.
      @action = 'update'

      # only allowed to edit the super user if you are the super user.
      if @admin.overlord == 'Y' && @admin.id != session[:admin_id]

        respond_to do |format|

          flash[:error] = I18n.t("controllers.admin.administrators.edit.flash.error")
          format.html { redirect_to admin_administrators_path }

        end

      end
    end
def edit
      @admin = current_admin.id == params[:id].to_i ? @current_admin : Admin.find(params[:id])

      # add breadcrumb and set title
      set_title(I18n.t("controllers.admin.administrators.edit.title", username: @admin.username))
      add_breadcrumb I18n.t("controllers.admin.administrators.edit.breadcrumb")

      # action for the form as both edit/new are using the same form.
      @action = 'update'

      # only allowed to edit the super user if you are the super user.
      if @admin.overlord == 'Y' && @admin.id != session[:admin_id]

        respond_to do |format|

          flash[:error] = I18n.t("controllers.admin.administrators.edit.flash.error")
          format.html { redirect_to admin_administrators_path }

        end

      end
    end
get and disply certain admin